Add new LUN or Disk, or Resize the LUN or Disk on a Linux without a reboot

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.

Solution

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,

/sys/class/scsi_host/host1/proc_name:mptspi

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.

Solution

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.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top