Rescan SCSI Disk Without Reboot

hard drivescsi

I installed/added 2 new disks on VMware.

I executed this command and didn't detect any new disks:

ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done

Is there other way to rescan vmw_pvscsi devices?


 ./lsscsi -s
[0:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR00 1.00  /dev/sr0        -
[2:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda   32.2GB
[2:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb    107GB
[3:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sdc    107GB
[3:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdd    214GB
[3:0:2:0]    disk    VMware   Virtual disk     1.0   /dev/sde   53.6GB
[3:0:3:0]    disk    VMware   Virtual disk     1.0   /dev/sdf   53.6GB
[3:0:4:0]    disk    VMware   Virtual disk     1.0   /dev/sdg    161GB

Best Answer

The devices should show up automatically in Linux under VMware. Check the output of dmesg|tail.

If you've changed the size of the devices, you can rescan/recognize this with...

echo 1 > /sys/class/scsi_disk/0\:0\:0\:0/device/rescan, where you substitute the SCSI disk ID.

For example:

[root@xt /sys/class/scsi_disk]# ls -1
2:0:0:0
2:0:1:0
3:0:0:4
Related Topic