Operating System - HP-UX
1833159 Members
3074 Online
110051 Solutions
New Discussion

replace non root vg mirror disk

 
SOLVED
Go to solution
Etienne Holm
Frequent Advisor

replace non root vg mirror disk

My primary mirror on vg01 failed.
I have a spare disk on the system
What is the safest way to add this disk to the
volume groupe and mirror the current disk, and then remove the failed disk from the volume group so that I can replace it on me next scheduled maintanace slot?
12 REPLIES 12
Corthouts Carlo
Valued Contributor

Re: replace non root vg mirror disk

Hi,

Best way to go about this is to
add the disk to the volumegroup.
Extend the mirror to the new disk with the
command lvextend.
split off the the other mirrordisk and remove it from the volumegroup with lvreduce.

This way you have your system continuesly mirrored and you can remove the disk very quickly when you are able to next time.
Etienne Holm
Frequent Advisor

Re: replace non root vg mirror disk

Just the question I have.
Do I first add the new disk to the mirror
and then do a lvreduce
and then to do a vgreduce to remove the disk from the volume groupe.

If I first do the mirror what number do I do with the lvextend -m ?
Corthouts Carlo
Valued Contributor

Re: replace non root vg mirror disk

Hi,

The value of -m should be the total number of mirrors.

You will have 2 mirrors so it should be 2.

Regards,


PS : Wherever I lay my hat is my home.....But where is that hat
Sanjay_6
Honored Contributor

Re: replace non root vg mirror disk

Hi Etienne,

Try this link,

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=914fb76903bc930c2d/screen=ckiDisplayDocument?docId=200000058036738

Take a printout for future reference.

Hope this helps.

Regds
Patrick Wallek
Honored Contributor

Re: replace non root vg mirror disk

Is the disk that failed a hot-swappable disk? If so, you can just replace it, do a 'vgcfgrestore -n vg01 /dev/rdsk/c?t?d? and then do a 'vgsync vg01'.
Marcin Wicinski
Trusted Contributor

Re: replace non root vg mirror disk

Hi !
The best way is to replace the failed disk and restor vg configuration with vgcfgrestore command.
Marcin Wicinski
Etienne Holm
Frequent Advisor

Re: replace non root vg mirror disk

what I need to do is to restor the mirror onto the new (spare) disk I have on the system. I have not shut down the system.

I added the spare disk to the volume group (vg01)
The main problem I have is do I create a mirror onto the new disk in the group before I brake the mirror on the failed disk so that I can remove the disk out of the volume groupe. so that I can replace it at a later stage.
Etienne Holm
Frequent Advisor

Re: replace non root vg mirror disk

The disk is not a hotswap so I will have to down the server to replace it
Roger Baptiste
Honored Contributor

Re: replace non root vg mirror disk


hi,

yes, since it is not hotswap,
you would have to bring the system down, replace the disk
(with the correct settings),
do a vgcfgrestore and later vgsync on vg01.

hth
raj
Take it easy.
Etienne Holm
Frequent Advisor

Re: replace non root vg mirror disk

To clarify what I am attempting
situation:
/dev/dsk/c0t8d0 is mirrored to /dev/dsk/c1t2d0
I have a spare disk in the system /dev/dsk/c1t4d0.
/dev/c0t8d0 failed.

What i have done so far is to add c1t4d0 to the vg01 and did a lvextend (lvextend -m 3 /dev/vg01/lvol1 /dev/dsk/c1t4d0)

now can I do a
lgreduce -m 2 /dev/vg01/lvol1 /dev/dsk/c0t8d0
and then do a vgreduce /vgo1 /dev/dsk/c0t8d0
To remove the disk from the volume group.
Patrick Wallek
Honored Contributor
Solution

Re: replace non root vg mirror disk

Yes, you could give those steps a try. But if the disk is completely bad and not responding then the steps may, or may not, complete successfully.
Sanjay_6
Honored Contributor

Re: replace non root vg mirror disk

Hi,

You should not have to reduce the mirror, reduce the vg and those things at all. What you could have done is removed the bad disk and restore the vgcfg info for the bad disk to the new disk at a different add,

say /dev/dsk/c0t8d0 - bad disk
Mirrored to /dev/dsk/c1t2d0

dev/dsk/c1t4d0 - spare disk

/dev/dskc/c0t8d0 - failed

Remove c0t8d0, then do vgcfgrestore,

vgcfgrestore -n /dev/vg01 -o /dev/rdsk/c0t8d0 /dev/rdsk/c1t4d0

Then do a vgchange to include the disk,

vgchange -a y /dev/vg01

now do a vgsync,

vgsync /dev/vg01

This will rebuild the mirror on the new disk. Do a "man vgcfgrestore" for more info on vg cfg restoration to an alternate disk than the original disk.

Hope this helps.

Regds