Discovering new LUNs on Linux

Discovering new LUNs on Linux without rebooting

When you add new LUNs in VMWare to a Linux server you will not see them right away.  A reboot will solve this problem, however rebooting is not always possible.  If this is a production server, you will have to schedule the reboot, and coordinate it with the team.  This takes time.  An easy way to get around this is to do a manual rescan of the iscsi bus.

Viewing what iscsi hosts are available

Finding new LUNs

This command will show you all the hosts available on the system.  If you wish to see which ones are new, we run the following command:

Performing the manual scan

The results of the grep command show us host2 and host3.  We can then use this information to do a manual scan.

You will not see anything returned however if you issue an lsblk or format -l you will see the new LUNs that had been added to the VM by your virtualization team, all without needing to reboot.

I hope this article helps you out when you need it.  For myself, this was helpful as I needed to expand LVM volumes and I did not want to reboot the servers before hand.  If you have any questions or comments, please feel free to write them in the comments section below.


Ivan Windon – RHCSA

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.