[SOLVED] How to identify the New LUN assigned to redhat system ? If there is multiple devices or LUN already
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to identify the New LUN assigned to redhat system ? If there is multiple devices or LUN already
I have requested for a new LUN assignation of 100GB on my RedHat system. But there is already many devices which have size with 100GB, so how to identify the new lun on the system with size of 100GB.
It should be the one without a UUID. The blkid utility will list known devices with their UUID - but an uninitialized lun will not have a UUID.
A bit tricky, but compare the first column of the blkid output and the last column of the contents of /proc/partitions.
The /proc/partitions will list all devices and their size - as well as any partitions on those devices. The new one should be the entry in /proc/partitions that doesn't exist in blkid list.
Now, this is assuming the device is known as after a reboot. It is possible to force a rescan of devices (https://blogs.it.ox.ac.uk/oxcloud/20...e-new-storage/), but that may depend on your controllers (works for SAS/SATA, but I don't know how fibre channel devices would go).
There are sometimes faster ways but they depend on knowing how the system is configured first.
One is knowing if all devices are given partitions. Thus for sdx in /proc/partitions there will be an sdx<n> where n is the partition on device sdx.
The new device will not be partitioned, so there will only be the sdx entry - unless someone already partitioned it...
Even the method I gave first is vulnerable to that - the person creating the lun may have initialized it to verify it was working properly... And that might give it a UUID.
Just as a suggestion, you might want to change your username using the instructions at the top of the page here, lest your email inbox ends up with a boatload of SPAM in the very near future. The "Contact Us" form is here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.