Preface:
Pre-storage is not well planned, business is rapidly expanding, high data security requirements (offsite, more one copy), a lot of demand? NM Doing the work is going to be the pit daddy every now and then.!particularly Real Production ENV 、、、、
<task, in VMware, test the newly added physical storage medium pv,extend LVM space and dynamically manage your storage for cloud Computing;
01, do not restart to identify the newly added hard drive, as we all know Hotplug Storage Media
Perform echo "---" >/sys/class/scsi_host/host*/scan
Perform the above re-scan the newly added PV log
02, based on the original LVM, using the newly added PV (eg,/dev/sdb) drive, create a new PV, add the newly created PV to the new VG
Expansion is done
[Ruiy Tips Notices]
Summarize the steps of PV expansion based on LVM:
1, new add PV, do not restart scan to the newly added PV hard drive (the newly added PV should be supported HotPlug type HDD, currently except IDE,SCSI etc.)
Perform the following command without restarting to identify the newly added PV
echo "---" >/sys/class/scsi_host/host*/scan
pvcreate/dev/sd* (Create PV)
Vgextend vg_ruiy/dev/sd* (with newly created PV, extended VG)
Lvextend-l +100%free/dev/vg_ruiy/lv_root (extended LV)
Resize2fs-p/dev/vg_ruiy/lv_root (stretched LV already expanded)
<task two;, extending the presence of the LV in LVM to achieve the purpose of expanding the mount point of the LV, here we test to create PV in LVM, add PV to the VG, and create a new LV in the VG
Extend VG (PV,LV) use HotPlug Storage PV for VMI (ECC ENV)