No results found. Please try re-entering the product name
Compute
Database
Office Automation
Middleware
Partners
Intelligent Management
Backup
Big Data
Management & Monitoring
Customer service
Network&CDN
Communication
IT Management
General Reference
Process Expanded EBS Disk Capacity in Linux
This chapter mainly describes how to expand partition capacity after an EBS disk of Linux OS has been expanded.
The Linux OS is CentOS7.2_64 bit, and a data disk has been mounted to it.
Before expansion, the data disk has only one primary partition (/dev/vdb1), and the file system is ext3. The mount point is /mnt, and the size is 20 G. After expansion, the size of the data disk is 30 G, but it still has only one primary partition.
df -TH
In the output, we can see that the current capacity of /dev/vdb1 is 20 G, the type of the file system is ext3, and the mount path is /mnt.
umount /dev /vdb1
fdisk /dev/vdb
d
to delete the original partition /dev/vdb1. n
and press Enter to create a new partition.In the information displayed, p
represents a primary partition, and e
represents an extended partition. In this example, a primary partition will be created.
Type in p
and press Enter to create a primary partition.
In the information displayed, Partition number
represents the serial number of the primary partition. The value range is from 1 to 4. The default value is 1.
Type in the number and press Enter. Or press Enter directly and the system will use the default value 1.
In the information displayed, First sector
represents the serial number of the first sector. The value range is from 2048 to 20971519, and the default value is 2048.
Type in the number and press Enter. Or press Enter directly and the system will use the default value 2048.
In the information displayed, Last sector
represents the serial number of the last sector. The value range is from 2048 to 62914559, and the default value is 62914559.
A primary partition has been created for a data disk of 30 GB.
w
and press Enter to write the result to the partition table.The above information indicates that the partition is successfully created.
q
, and the partition created before will be discarded.Run the command fdisk -l
to view the new partition.
e2fsck -f /dev/vdb1
resize2fs /dev/vdb1
mount /dev/vdb1 /mnt
df -TH
In the information displayed, we can see that the size of the partition mounted currently is 30 G, and the mount directory is /mnt.
Call us
400-151-8800
Email us
cloud@pingan.com