Summarize:
~~~~~~~~~~~~~~~~~~~~
Fdisk-l
Pvcreate/dev/sdb
Vgextend Volgroup/dev/sdb
Lvextend-l +180g/dev/mapper/volgroup-lv_root
Resize2fs/dev/volgroup/lv_root
~~~~~~~~~~~~~~~~~~~
1. Add a new hard disk to the client in VM WARE ESXi
2, restart the client
3. View entire disk space with Fdisk–l
#fdisk-L
DISK/DEV/SDA:34.4GB,34359738368bytes255Heads theSectors/track,4177cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x000b2d34Device Boot Start End Blocks Id System/DEV/SDA1 *1 - 512000 thelinuxpartition1does not end on cylinder boundary./dev/sda2 - 4178 330414088e Linux LVM Disk/DEV/SDB:214.7GB,214748364800bytes255Heads theSectors/track,26108cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000Disk/dev/mapper/volgroup-lv_root:30.4GB,30396121088bytes255Heads theSectors/track,3695cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000Disk/dev/mapper/volgroup-lv_swap:3435MB,3435134976bytes255Heads theSectors/track,417cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000
4. Add a new hard disk to the physical volume with Pvcreate/dev/sdb
Pvcreate/dev/sdb
" /dev/sdb " successfully created
5. Add a new hard disk to the volume group with Vgextend Volgroup/dev/sdb
Vgextend Volgroup/dev/sdb
" VolGroup " successfully extended
6, diffusion space lvextend-l +200g/dev/mapper/volgroup-lv_root for root partition
Lvextend-l +180g/dev/mapper/volgroup-lv_root
208.31 giblogical Volume lv_root successfully resized
7, apply it to Resize2fs/dev/volgroup/lv_root
Resize2fs/dev/volgroup/lv_root
1.41. (-may-/dev/volgroup/lv_root ismounted on/; on-2 performingan on5460684854606848long.
8, then use Df–h to view the space, has joined
Df-h
Filesystem Size used Avail use% mountedon/dev/mapper/volgroup-lv_root 206G 5. 7G 189G 3%/tmpfs 1. 9G 0 1. 9G 0/dev/ shm/dev/sda1 485M 32M 428M 7/boot
9, other details
Additional hard disk space for LVM disks under Linux