Operating System - HP-UX
1752567 Members
5269 Online
108788 Solutions
New Discussion юеВ

remove volume group with Secure Path

 
Rainer von Bongartz
Honored Contributor

remove volume group with Secure Path


does anybody have kind of a cook book how to
best remove a volume group which is under control of secure path.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
4 REPLIES 4
Armin Kunaschik
Esteemed Contributor

Re: remove volume group with Secure Path

Volume groups ARE NOT under control of secure path, disks ARE!

Remove the volume group as usual:
1. lvremove any volume
2. vgreduce
3. vgremove
4. rm -r /dev/

Step 3 is necessary to remove any vg headers from all disks. This might be useful if you present the disk to another system.

Remove disk devices with rmsf and unpresent/remove the disk.
I'm not sure, if an /sbin/spmgr delete is necessary instead of the rmsf. Your should give it a try :-)

My 2 cents,
Armin
And now for something completely different...
LucianoCarvalho
Respected Contributor

Re: remove volume group with Secure Path

You can also run vgexport to remove the vg.

#umount all lvol's from this vg
#vgchange -a n /dev/vgxx
#vgexport /dev/vgxx

Regards
Armin Kunaschik
Esteemed Contributor

Re: remove volume group with Secure Path

Use vgexport only, if you want to vgimport later (or you want to throw away the disks)!
If you want to re-use the disks, clean up before you leave! :-)
This may seem cosmetic, but is sometime very anoying.
You present the disks to another host and want to create a new volume group on it...
pvcreate will refuse to work because of a (still) present VG header on the disks.
You're forced to use pvcreate -f.
You do this a few times, start to always use -f and have your first really bad "Oooops, wrong disk"-experience.

My 2 cents,
Armin
And now for something completely different...
Dave Hutton
Honored Contributor

Re: remove volume group with Secure Path

I basically go with how Armin suggests. But I do use spmgr delete wwn. I find it cleaner, it does remove the special files and spmgr display shows everything correctly.

I think if you don't spmgr delete, it shows it still in spmgr displayed as a failed disk. I guess I've never gone down that route, like I said I use spmgr delete.