Add New Disk to RedHat-based Linux without reboot

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:

  1. Reboot your machine
  2. 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:

  1. Reboot your machine
  2. 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.