1827769 Members
2940 Online
109969 Solutions
New Discussion

Re: Removing PV

 
kunjuttan
Super Advisor

Removing PV

How can I able to safely rmove a PV in an hp-ux box
6 REPLIES 6
SoorajCleris
Honored Contributor

Re: Removing PV

Is this PV part of LVM? or any other diskmanagement utilty?

If no, and hotswapable , just remove it.
If yes, and a part of LVM,

#take the backup of all the filesystem part of that.

#pvdisplay -v will show you which and all the lvs are part of it

Then umount the filesystem ( if not mirrord one)

then #lvreduce

Then #vgreduce

#your PV is free now.

just remove the alternate paths also by vgreduce, if it has multiple paths.

To remove the PVRA ,

#pvremove


If your disk is using for swap by swapon command , you may need to reboot the box.


Regards,
Sooraj

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
kunjuttan
Super Advisor

Re: Removing PV

I did all these things and removed the PV.But still if i am going for an ioscan,it is showing the device files and the status is NO HW.How can I remove this??
SoorajCleris
Honored Contributor

Re: Removing PV

Ok ,

You mean to say , you have removed the physical disk from the box and now you got a device file with NO_HW?

This is because the device file is still there in the device tree.

you can do an rmsf on the devicefile.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
kunjuttan
Super Advisor

Re: Removing PV

can u give me the command.What i did is ,

umonunt the fs
lvremove
vgreduce with all paths
vgremove
pvremove

now what is the command??
Matti_Kurkela
Honored Contributor

Re: Removing PV

For example:

If the disk device /dev/dsk/c12t3d4 is in NO_HW state because it has been disconnected, remove it with:

rmsf -a /dev/dsk/c12t3d4

MK
MK
Modris Bremze
Esteemed Contributor

Re: Removing PV

Or rmsf -H ['H/W path' from ioscan].