We often need to add or modify a disk to a running server. In this article, we will see how you can Add new LUN or Disk, or Resize the LUN or Disk on a Linux without a reboot
Scenario 1 – Add a new Disk or LUN
You have added a new disk / LUN to the running server and it is not appearing on the server.
We have to find the hostnumber first, by running the below commands.
grep mpt /sys/class/scsi_host/host?/proc_name
This will show you a result like the below one,
In my case, host1 is the one im looking for.
Now, run the below command and the disk will be detected.
echo "- - -" /sys/class/scsi_host/host1/scan
Scenario 2 – Expand or Resize current Disk or LUN
You have already a LUN / Disk attached to the server and you need to resize the same.
Once you have resized the LUN / Disk from the Storage, please run the below command
echo 1 > /sys/class/scsi_device/device/rescan
If you are facing any issues after running the command, please comment below.