How to add a virtual disk without restarting vmwarevm (on)
Recently, because the business needs to resize the system without restarting the system, the premise is that the system has been lvm, but there is not enough physical volume (hard disk), so a new article is introduced, this article is divided into two parts: the first part. Directory
Add Disk LVM
Add Hard Disk
In order to add disks to a virtual machine without restarting the virtual machine, this experiment was conducted today.
Edit the vm parameters on the vSphere management interface, as shown in.
Run the command: echo "--">/sys/class/scsi_hZ success? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> vc3QvaG9zdDAvc2NhbjxiciAvPg0KCb/issue =" here write picture description "src =" http://www.bkjia.com/uploads/allimg/150731/04403W625-1.jpg "title =" \ "/>
LVM
Run the cfdisk command to format and mount the disk:
(1) format the hard disk: cfdisk-> new-> Primary-> Type-> 8e (the reason is to do LVM)-> write-> quit
The fdisk-l command shows 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 directory is only 36 GB. Now, check df-h again. It can be seen that it has increased by nearly 10 Gb.