Operating System - HP-UX
1753747 Members
4865 Online
108799 Solutions
New Discussion

Steps to be followed while removing a lun in HP-UX 11.31 server allocated from hp 3par

 
rohithroki
Frequent Advisor

Steps to be followed while removing a lun in HP-UX 11.31 server allocated from hp 3par

Dear Team,

Kindly let me know the steps to be followed for removing a lun from hp-ux 11.31 server.

I have created PV,VG and LVM using the allocated lun.

Kindly let me know the standard procedure for de allocating the lun from the server.

Regards,

RKJ

1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: Steps to be followed while removing a lun in HP-UX 11.31 server allocated from hp 3par

First, do you want to move the data that is currently on that LUN to another LUN, or do you want to destroy it?

If you need to keep the data, you could add a new LUN to the same VG (pvcreate, then vgextend), and then either pvmove or mirror (if you have MirrorDisk) the contents of the old LV to the new LUN.

If you don't need to keep the data, you can just unmount and lvreduce the LV to make the LUN completely free when viewed with the pvdisplay command.

Once the pvdisplay command shows the LUN is completely free, you can vgreduce it out of the volume group.

Second question: do you need to scrub/overwrite the LUN to make sure the old data in it is definitely gone, or will the storage administrator do it for you if necessary?

If you need to scrub the LUN, and your HP-UX 11.31 is reasonably up to date, you can use "mediainit -S" command to scrub the LUN. The default scrubbing method seems to be equivalent to DoD 5220.22-M, method d). Should be good for anything less than "Top Secret".

Once the scrubbing is complete (or you don't need to do it), there are two ways to proceed.

One way is just tell the storage administrator to unpresent the LUN, and once that is done, the state of the LUN in the ioscan listing will change to NO_HW. Then use rmsf to remove any devices associated with the removed LUN: "rmsf -x" might do it all automatically for you. This is the easier way, as the system can automatically detect and clean up the device nodes of any removed LUNs but if you have automated system monitoring, having devices in NO_HW state might cause an unnecessary monitoring alert.

The other way is to first carefully rmsf the old LUN, and then let the storage administrator to unpresent it. Here you must be very careful to only rmsf the device nodes associated with that particular LUN: e.g. "rmsf -a /dev/disk/diskNN /dev/rdisk/diskNN" to remove the agile device nodes, and then either "rmsf -x" or a similar "rmsf -a" command for all the legacy disk device nodes of the removed LUN (depending on your SAN pathing, there might be more than one pair of legacy device nodes for a single LUN). With this way, the system is told "this LUN is going to go away" before it actually gets unpresented, so there should be no monitoring alerts.

MK