Prerequisites:
1. Create a disk when creating a new virtual machine for example, after which the disk can be dynamically extended in the virtual machine state, otherwise it can only be expanded by adding another hard drive.
Default partitioning scheme for 2.CENTOS6.4-MINIMAL-64
That is: Hard disk size 16G, one boot partition, the rest is LVM partition, one VG, two LV (Lv_root and Lv_swap)
[[email protected] ~]# df-hfilesystem Size used Avail use% mounted On/dev/mapper/volgroup-lv_roo T 14G 2.9G 11G 22%/tmpfs 499M 0 499M 0%/dev/shm/dev/sda1 485M 33M 427M 8%/boot[[email protected] ~]# fdisk-ldisk/dev/sda:17.2 GB, 17179869184 bytes255 heads, sectors/tr Ack, 2088 cylindersunits = cylinders of 16065 * MB = 8225280 bytessector size (logical/physical): bytes/512 bytesI/ O size (minimum/optimal): bytes/512 bytesdisk identifier:0x00028ecc Device Boot Start End Block S Id system/dev/sda1 * 1 512000 linuxpartition 1 does not end on cylinder boundary./ Dev/sda2 2089 16264192 8e Linux lvmdisk/dev/mapper/volgroup-lv_root:14.9 GB, 14935916544 by tes255 heads, sectors/track, 1815 cylindersunits = cylinders of 16065 * = 8225280 bytessector size (logical/physica L): bytes/512 byteSI/O size (minimum/optimal): bytes/512 bytesdisk identifier:0x00000000disk/dev/mapper/volgroup-lv_swap:1715 MB, 1 715470336 bytes255 heads, sectors/track, 208 cylindersunits = cylinders of 16065 * = 8225280 bytessector size (logi cal/physical): bytes/512 bytesi/o size (minimum/optimal): bytes/512 bytesdisk IDENTIFIER:0X00000000[[EMAIL&NB Sp;protected] ~]#
Process:
1. Turn off the virtual machine first.
2. Open the configuration item and resize the hard disk.
3. After booting
Fdisk-l See if the disk size is normal fdisk/dev/sdap,n,3,t,8e,p,wrebootpvcreate/dev/sda3pvdisplayvgdisplayvgextend volgroup/dev/ Sda3lvdisplaylvextend-l +4gb-n/dev/volgroup/lv_rootresize2fs/dev/volgroup/lv_rootreboot So the expansion is done.
Virtualization VMware Virtual Machine expansion