Refer to the blog post: http://www.cnblogs.com/sixiweb/p/3360008.htmledit settings, modify the hard disk size, root@localhost.pdf] # Fdisk-l # View disk partitions
Reference Blog: http://www.cnblogs.com/sixiweb/p/3360008.html
Edit Settings and modify hard disk size
[Root @ localhost ~] # Fdisk-l # View Disk partitions Disk/dev/sda: 59.1 GB, 59055800320 bytes # existing Disk capacity: 255 heads, 63 sectors/track, 7179 cylindersUnits = cylinders of 16065*512 = 8225280 bytesSector size (logical/physical): 512 bytes/512 bytesI/O size (minimum/optimal): 512 bytes/512 bytesDisk identifier: 0x000efc13 Device Boot Start End Blocks Id System # Current disk allocation/dev/sda1 * 1 64 512000 83 Linux # primary Partition 1 does not end on cylinder boundary. /dev/sda2 64 1045 7875584 8e Linux LVM # Extended partition/dev/sda3 1045 6527 44039519 + 8e Linux LVM # Extended partition Disk/dev/mapper/VolGroup-lv_root: 51.2 GB, 51229229056 bytes 255 heads, 63 sectors/track, 6228 cylindersUnits = cylinders of 16065*512 = 8225280 bytesSector size (logical/physical ): 512 bytes/512 bytesI/O size (minimum/optimal): 512 bytes/512 bytesDisk identifier: 0x00000000 Disk/dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes255 heads, 63 sectors/track, 104 cylindersUnits = cylinders of 16065*512 = 8225280 bytesSector size (logical/physical): 512 bytes/512 bytesI/O size (minimum/optimal ): 512 bytes/512 bytesDisk identifier: 0x00000000 |
Shut down the VMWARE linux system, set the original hard disk capacity, and then start the system.
# Add a new partition and load the new partition based on the original capacity
[Root @ localhost ~] # Fdisk/dev/sdaWARNING: DOS-compatible mode is deprecated. it's stronugly recommended to switch off the mode (command 'C') and change display units to sectors (command 'u '). command (m for help ): |
Enter n and press enter. Add a partition
|
Command (m for help): nCommand action e extended p primary partition (1-4) |
Enter P and press enter to select the primary partition.
Enter 4 and press enter to select partition 4, because sda1, sda2, and sda3 have all been used.
Enter 8e and press enter to change to lvm.
Enter w, press enter to save the settings, and then restart the computer.
Format the new partition after it is started.
# Resizing
|
[Root @ localhost ~] # Lvm # enter lvm mode lvm> pvcreate/dev/sda3. this is the partition just initialized, required lvm> vgextend VolGroup/dev/sda3 add initialized partitions to the virtual volume group vg_dc01lvm> lvextend-L + 29.9G/dev/vg_dc01/lv_root to expand the capacity of existing volumes (29.9G) lvm> pvdisplay to view the volume capacity, then you will see a large volume of lvm> quit to exit |
|
[Root @ localhost ~] # Resize2fs/dev/mapper/VolGroup-lv_root |
Enter df-h to check the disk capacity.