Operating System - HP-UX
1834931 Members
3311 Online
110071 Solutions
New Discussion

replacing a mirrored disks

 
SOLVED
Go to solution
Ray Herbig
Advisor

replacing a mirrored disks

Hello. I have 4 disks 2 mirroring the other two in vg00. I'll call them group A and groupB. One of the disks in group A is failing. My question is if the disk dies what is the best way to remove it. I'm thinking vgreduce vg00 . When I replace it, would a vgcfgbackup / vgcfgrestore -n vg00 vgcfgrestore -n vg00 . Then run vgsync. Sound ok? OR when I add the new disks should I go through the whole remirroring process.

Thanks.
9 REPLIES 9
Patrick Wallek
Honored Contributor

Re: replacing a mirrored disks

If you vgreduce the disks out of the VG then you will have to do a vgextend to put the new disks back in the VG.

I think the best bet would be to put in the new disk, do the vgcfgrestore and then vgsync. The once caveat is if the disk that is failing is set up as a boot disk. If that is the case then you will need to do a mkboot on the new disk to make sure it is bootable if you need it.
Wieslaw Krajewski
Honored Contributor

Re: replacing a mirrored disks

Hi,

To do vgreduce you must have removed disk free. So you should un-mirror LVs that are on the removed disk (all physical extents on this disk should be unused).
Then you can add new disk and remirror all these logical volumes.volumes.
I think this is the simplest way.
Of course if you can remove mirror copies from the failing disk.

Rgds.
Permanent training makes master
James R. Ferguson
Acclaimed Contributor
Solution

Re: replacing a mirrored disks

Hi Ray:

# Shutdown your system and replace the disk that is failing.

Boot into single user mode and override the quorum, as:

# ISL> hpux -is -lq /stand/vmunix

# vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtYdZ

# mkboot /dev/rdsk/cXtYdZ

# mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/CXtYdZ

# lvlnboot -R

# lvlnboot -v #...to verify all is as desired...

# vgchange -a y /dev/vg00

# vgsync /dev/vg00

# shutdown -ry 0

...JRF...
Ray Herbig
Advisor

Re: replacing a mirrored disks

Here's a crummy graphic. A&B are disk groups and 1 and 2 are the disks in the group. Group B mirrors group A.
A B
[1][2] [1][2]
Disk 1 in both groups is bootable. disk 1 in both groups also contain boot, root and swap.
The disk I want to replace is disk 2 in group A. In order to do that, the data is going to have to be remirrored to group A 1&2.
When I run vgcfgrestore, (after if vgextended vg00) it should restore my vg setup and vgsync should sync the data. I shouldn't have to play around with making disk 1 bootable again should I? I would think the boot area should already be there. OR does vgcfgrestore blow that away?
MANOJ SRIVASTAVA
Honored Contributor

Re: replacing a mirrored disks

No it doesnt blow up the boot area . What u are trying is correct .

Manoj Srivastava
Wieslaw Krajewski
Honored Contributor

Re: replacing a mirrored disks

Hi again,

Luckily the failed disk is not bootable one.
So after adding new disk to vg00 (vgextend) remirror only those LVs, that had mirrored copies on the failed disks.

But if you couldn't unmirror LVs because it was impossible to communicate with failed disk, after vgcfgresoring should use command lvsync for every LV that had mirror copies physical extents) on the failed disk.

Rgds.
Permanent training makes master
James R. Ferguson
Acclaimed Contributor

Re: replacing a mirrored disks

Ray:

I don't believe that you ever indicated which disk as faulty in your original post. The procedure I cited was a general case.

I agree that you should be able to do the 'vgcfgrestore', 'vgchange' & 'vgsync' after you have replaced the faulty disk and not have to exercise the 'mkboot' nor 'lvlnboot' steps.

...JRF...
Thierry Poels_1
Honored Contributor

Re: replacing a mirrored disks

quote
One of the disks in group A is failing. My question is if the disk dies ....
unquote
If the disk dies ..??? If it's failing, replace it immediateley!!! jeeez. Don't keep on working with disks which make noise like hell, or are starting to fail.
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Ray Herbig
Advisor

Re: replacing a mirrored disks

I like working with failing disks..it gives me meaning. The sound of a head crashing on a platter..music to my ears. Actually the disk started sending out scsi resets yesterday and I lvreduced the mirror to the other working pair. I would like to thank you guys for the imput.