If you need to detect a new hard disk added to your server wihout performing a reboot here is the command:
# for host in /sys/class/scsi_host/*; do echo "- - -" | sudo tee $host/scan; ls /dev/sd* ; done
The expected output should look like this:
$for host in /sys/class/scsi_host/; do echo "- - -" | sudo tee $host/scan; ls /dev/sd ; done
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb /dev/sdb1
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb /dev/sdb1
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sdb /dev/sdb1 /dev/sdc
As we can see from the last line a new device /dev/sdc was detected.
0 Comments
Please log in to leave a comment.