Operating System - HP-UX
1834208 Members
2726 Online
110066 Solutions
New Discussion

Procedure to remove bad disk

 
Raynald Boucher
Super Advisor

Procedure to remove bad disk

Hello all,

We experienced a disk failure a while back on disk that were no longer in use. The volume group contained 2 mirrored disks (ie 4 disks).
The interim solution adopted then was to umount the affected filesystems and disable the volume group using vgchange.

I am tasked with actually removing these drives together wit a bunch of other ones that are unused and I'm looking for the sure and safe way to do it.

My plan is to perform lvremove, vgremove, pvremove and then remove the disks.
Is this possible or do I have to somehow reactivate the disabled volume group first?

Thanks

RayB
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Procedure to remove bad disk

Hi Ray:

You can use 'vgexport' to remove the LVM device files and volume group information from '/etc/lvmtab'.

Regards!

...JRF...
AnthonySN
Respected Contributor

Re: Procedure to remove bad disk

find attached a very good doc from HP.
Raynald Boucher
Super Advisor

Re: Procedure to remove bad disk

Thanks for the quick response.

vgexport says it removes the VG informaion from lvmtab but writes nothing on the disk(s).
Can I just physically remove the disks after without risking problems next time I reboot?

Will I be able to reuse / reinitialize the good disk(s) at a later time?

Re: Procedure to remove bad disk

Hi

Question, do you have the disk in mirror? if does, reduce the mirror by using lvreduce -m 0 and replace the faulty disk, then use /usr/sbin/vgcfgrestore -n -o where the first device is the other disk in the mirror and the second one is in which you want to restore the data in.
Then use vgsysnc
to re-sync the mirror again.

I also can recommend you this excelet document to approach disk problems in hpux.
rariasn
Honored Contributor

Re: Procedure to remove bad disk

Hi RayB:

Your plan is good.

- lvremove
- vgremove
- pvremove
- Remove disk

and

- remove special files (rmsf)
- ioscan -fn

rgs,