If you add a new disk to your OS, you won’t find this device in the device list (fdisk -l command). So you have two options to make it available:
- Reboot your machine
- Make the OS rescan all connected devices
In operational environments, the first option is not considerable. So we have to choose the second approach:
To do so you have to write “- – -” to /sys/class/scsi_host/host*/scan files:
for filename in /sys/class/scsi_host/host*; do
echo "- - -" > $filename/scan
done
after that you will find the new device in the fdisk -l command’s results.
If you add a new disk to your OS, you won’t find this device in the device list (fdisk -l command). So you have two options to make it available:
- Reboot your machine
- Make the OS rescan all connected devices
In operational environments, the first option is not considerable. So we have to choose the second approach:
To do so you have to write “- – -” to /sys/class/scsi_host/host*/scan files:
for filename in /sys/class/scsi_host/host*; do echo "- - -" > $filename/scan done
after that you will find the new device in the fdisk -l command’s results.