Identify SAN disks not in use

Hello,

How can I identify SAN disks not in use by the OS?

Thank you.

asanchez,

Are you using any volume manager in the OS end.

Well, we're managing around 1200 servers with a variety of unix-like OS (rhel, suse, centos, ibm aix, sunos and hp-ux).

And there are some with LVM, some with VxVM and some with none (fs's mounted directly to fdisk /dev/sdX partitions).

There is also multipathing with some systems.

To not make it more difficult, I'm trying to resolve it first in the RHEL case (LVM, VxVM and none).

If the OS is not using a SAN disk then generally it will not have any knowledge of such a disk.

The OS can tell you what disks it is using, what disks are on the hardware it is running on, etc.

So in RHEL, how do I know whether a SAN disk is or is not being used by the OS?

try looking in the /etc/fstab

If it is not there, then run the command:

mount

If the disk is not referenced in either place, it is not mounted, and likely not being used.

As I mentioned in your other thread (this is kind of a dup btw)... using lsof is probably what you want.

As mentioned SAN disks not used by the OS are not seen in the OS. If you ask for the presented disks, those can be checked from the SAN end.

You can check man multipath and /sys/class/fc_host/{hba cards info here} for used disks :slight_smile:

asanchez,

Install sg3_utils RPM file, which will give you lot of commands. One special command sg_map will reveal you the mapping details from which you can find whether the disk is used by OS or not.

Other option is not use the utility build my the SAN array companies.In case of EMC it is inq.linux which can be easily downloadble and can be executed.