Recently, because the business need to do not restart the system under the premise of the system expansion, if the system has done LVM. However, there is not enough physical volume (hard disk), so it leads to the change of text. This paper is divided into two parts. This is the first part. Folder
-
Join the hard drive
-
In order to implement the virtual machine to join the disk without restarting the virtual machine today, we have done the experiment.
First edit the virtual machine parameters in the Vsphere management interface, for example, as seen in.
-
Use command: Echo "---" >/sys/class/scsi_host/host0/scan
Can not restart the system to identify the newly added virtual disk, because just joined the 10G hard disk. For example, as seen in:
-
Do LVM
-
You can then use the Cfdisk command to format and mount the disk:
(1) Format the hard drive operation: Cfdisk->new->primary->type->8e (The reason is to do LVM)->write->quit
Use the Fdisk-l command to see the newly added disk partition:
(2) Add to LVM:
a. pvcreate /dev/sdb1
b. vgextend VolGroup /dev/sdb1
c. lvextend -L +10G /dev/VolGroup/lv_root
d. resize2fs /dev/VolGroup/lv_root
The original root folder is only 36G, and now look at df-h again. Can see that the growth of nearly 10G space.
How to join a virtual disk without restarting the VMware Virtual machine (top)