In vmware linux, after a new disk is added, refresh the disk, scan the SCSI bus again, and add the SCSI device without restarting the VM.
[Root @ centos4 scsi_host] # ls
Host0 host1 host2
[Root @ centos4 scsi_host] # fdisk-l
Disk/dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk label type: dos
Disk identifier: 0x00081e99
Device Boot Start End Blocks Id System
/Dev/sda1*2048 2099199 1048576 83 Linux
/Dev/sda2 2099200 41943039 19921920 8e Linux LVM
Disk/dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk/dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
[Root @ centos4 scsi_host] # echo "---">/sys/class/scsi_host/host0/scan
[Root @ centos4 scsi_host] # fdisk-l
Disk/dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk label type: dos
Disk identifier: 0x00081e99
Device Boot Start End Blocks Id System
/Dev/sda1*2048 2099199 1048576 83 Linux
/Dev/sda2 2099200 41943039 19921920 8e Linux LVM
Disk/dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk/dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk/dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
[Root @ centos4 scsi_host] # lsblk
Name maj: MIN RM SIZE RO TYPE MOUNTPOINT
Sda 8:0 0 20G 0 disk
Ipv── sda1 8:1 0 1G 0 part/boot
└ ── Sda2 8:2 0 19G 0 part
├ ── Centos-root 253: 0 0 17G 0 lvm/
└-Centos-swap 253: 1 0 2G 0 lvm [SWAP]
Sdb 8: 16 0 20G 0 disk
Sr0 1 4.2G 0 rom
[Root @ centos4 scsi_host] #
Re-scan the SCSI bus. Adding a SCSI device without restarting the VM will cause
Boot into dracut #