Environment Introduction:
Virtualized environments for VMware ESXi 5.5
CentOS 6.9 Operating System
Because the business needs to expand the virtual machine disk or add a hard disk, but generally need to restart the virtual machine to recognize the hard disk, but some business is not allowed to restart the operating system, then how to identify the disk without restarting it?
Operation:
1) First edit the virtual machine to set the size of the hard drive to 100G
2) login system fdisk-l See no change in disk space
3) There are two ways to rescan the storage device's SCSI bus at this time
Method One
Locate the SCSI disk number for Rescan
shell>ls/sys/class/scsi_disk/
Shell>echo 1 >/sys/class/scsi_disk/2\:0\:0\:0/device/rescan
Fdisk-l Discover new expansion space
Method Two
Shell>echo 1 >/sys/block/Extended Disk/device/rescan
Extended disks, such as SDA SDB, SDC, etc.
VMWARE ESXI Linux virtual machine does not restart online expansion disk