Operating System - HP-UX
1835238 Members
2233 Online
110078 Solutions
New Discussion

Re: Replacing mirrored drive

 

Replacing mirrored drive

We're running hpux 10.20 on a D220 server. I've got a db drive that's gone bad (ioscan shows that the S/W State is NO_HW, which to me from past experience means the drive is bad and needs to be replaced). Everything as far as the end user is concerned is fine. The bad drive is invisible because we have the VG's on this bad drive mirrored to another drive. My question is, if/when we have the bad drive replaced, what do I need to do if anything. Will the mirrored drive continue to be used until a system reboot? Also, if a reboot happens before the bad drive is replaced, will there be problem because the quorum not being correct?





6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: Replacing mirrored drive

The replacement steps are not automatic but if you will search for Document ID KBAN00000347 it cover all the combinations and permuations of mirrored/unmirrored boot/non-boot disk replacements.

Your machine can keep running in this state indefinitely without problems but the volume group will not activate automatically; you will need to manually activate the volume group with a vgchange -a y -q n /dev/vgxx to force quorum override.

If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: Replacing mirrored drive

Hi Glenn,

If this is a hot swap disk, do this,

Pull out the defective disk, Wait for a minute, put back a new disk, wait for a couple of minutes for the disk to get sensed and activate itself. Login into the system, do a vgcfgrestore to this disk,

vgcfgrestore -n vg_name /dev/rdsk/cxtydz

Now reactivate the vg so that the disk gets activated in the vg,

vgchange -a y /dev/vg_name

now sync the mirror,

vgsync /dev/vg_name

Once the mirrors have been synced, do a vgdisplay to see the status of this disk and lv's, the lv's should say its status as available/synced where it was originally showing available/stale.

Hope this helps.

Regds

Jeff Schussele
Honored Contributor

Re: Replacing mirrored drive

Hi Glenn,

A lot depends on just what VG the drive is in.
Let's assume it's NOT vg00 - so it won't be bootable. This would be the order I'd follow.

1) lvreduce -m 0 the disk out af all LVs it's mirroring.
2) Replace the disk - may require power down depending on what type enclosure it's in.
3) pvcreate the new disk.
4) vgextend the new disk into the VG.
5) lvextend -m 1 the disk into all LVs in the VG. This could take some time per LV & overall depending on LV size/number & will put some load on the disks - may want to do this off-hours.

And no if it's not the vg00 VG then quorum will not be an issue & yes the system will continue to use the 2nd disk. Only thing that could go wrong is if the 2nd disk goes down while you're running w/o a mirror.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
MANOJ SRIVASTAVA
Honored Contributor

Re: Replacing mirrored drive

Hi Glenn

It is better you

1.Bring down the system.
2.Replace the drive.
3.Vgcfgrestore the drive to the volume group.
4.vgsync the volume group.


Manoj Srivastava




BFA6
Respected Contributor

Re: Replacing mirrored drive

If the disk is showing in as ioscan as NO_HW, then you probably can't do any LVM commands on it.
So as stated before if it's hot swappable, pull out the disk & replace with good one.
Do an ioscan to make sure you can see the replacement.
vgcfgrestore -n /dev/vgname cXtXdX
vgchange -a y /dev/vgname
vgsync /dev/vgname

Hilary
Sanjay_6
Honored Contributor

Re: Replacing mirrored drive

Hi Glenn,

IF the disk you want to replace is a non hot-swap disk, you will have to bring the system down to replace the disk. Once you boot the system back, you may have to activate the vg for this defective disk manually if there is a quorum problem (if there are only two disks in this vg, you may have a quorum prob.). to avtivate a vg without quorum, use,

vgchange -a y -q n /dev/vg_name

Or you can try,

vgcfgrestore -n vg_name /dev/rdsk/cxtydz
vgchange -a y /dev/vg_name
vgsync /dev/vg_name
mount -a

You can also refer to the doc referred by Clay. I haven't looked at that yet, but i know a doc of that kind exists. had looked at it before.

Hope this helps.

Regds