How To Remove SAN Attached LUNs from RHEL 5 Servers Using powermt


It is one of those rare occasions where you get to reclaim SAN attached storage instead of giving more. From the EMC side of it you would think no problem. Remove the host from the storage group and un-mount and re-scan on the host and all is good, right? Well no, up rises device in use or not found and powermt check command won’t work. So how do we do it? Read on and see.


Several steps are needed to disconnect the storage from RHEL 5 / 6 server.

First edit /etc/fstab and comment out the related storage. Save the file.

Now we need to un-mount the storage. the is done using the umount command.

Now that we have un-mounted the storage we need to remove the logical volume, volume group and physical group for the SAN attached storage.

First find the logical volumes using the lvs command

Now using the lvremove command we can delete the logical volume.

Now that the logical volume we can delete the associated volume group. This is done with the vgremove command. From the previous step and the output from lvs command we know the volume group name, but before we remove the volume group we need to get the physical device name. We can get this running the pvs command.

From the output we see /dev/emcpowerb is the physical device for volume group vg_lp59_oraarch. So now we can delete the volume group

Now we can remove the physical device. This is completed with the pvremove command.

So we are now clean on the host side. Login to the storage server (VNX, VMAX) and remove the host from the storage group or the LUN in the storage group. Once completed log back into the server.


to clean all dead paths on the system to complete the process.


An issue has been averted and storage reclaimed in a few easy steps on RHEL. Hope this little tip helps you in your endeavors.

Leave a Reply

Your email address will not be published. Required fields are marked *

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