Operating System - HP-UX
1833597 Members
4168 Online
110061 Solutions
New Discussion

replace disk in mirrored stripeset ?

 
SOLVED
Go to solution
Christian Schulze
Regular Advisor

replace disk in mirrored stripeset ?

Hi peers,
I have to replace a failed Hot-Swap-disk in a mirrored stripeset. I read the man pages, but could not find my special(?) case.

I use extend-based mirrored stripes. The Volume was created this way:

Volumegroup
vgcreate -g PVG0 /dev/vgdb /dev/dsk/c1t3d0 /dev/dsk/c1t2d0

vgextend -g PVG1 /dev/vgdb /dev/dsk/c4t3d0
vgextend -g PVG1 /dev/vgdb /dev/dsk/c4t2d0

and LV
lvcreate -D y -s g -m 1 -L 500 -n oradata /dev/vgdb

so as far as I know you can create this only in one single step. It is not possible to first create a stripe set over some disks and afterwards mirroroing this set on some other disks ...


Now I need to replace one disk ... the manual says to reduce the disk from the vg, replace it, and mirror it back onto

this seems to be a contradiction to me

So what would be the right steps for me ?

Christian
never touch a running system
5 REPLIES 5
LucianoCarvalho
Respected Contributor
Solution

Re: replace disk in mirrored stripeset ?

hi,

I follow this steps when I have to replace a mirror disk.

1 - Replace the disk

2 - restore lvm information
#vgcfgrestore -n /dev/vgxx /dev/dsk/cxtxdx

3 - reactivate the vg
#vgchange -a y vgxx

4 - resync the vg
#vgsync vgxx


best regards
Armin Feller
Honored Contributor

Re: replace disk in mirrored stripeset ?

An easy way to do this is like follows (not realy supported and only if you have a hot-swap-disk):

?? remove the disk you want to change
?? run 'vgchange -a y vgXY'
?? insert the new disk
?? run 'vgchange -a y vgXY' again
?? run 'vgcfgrestore ...'
?? run 'vgsync vgXY'

Regards ...
Armin
Christian Schulze
Regular Advisor

Re: replace disk in mirrored stripeset ?

Thanks

I would like to do it this way, but all manuals keep saying first to lvreduce ...

I have a running Oracle DB in this vg which is very important to us.

Of course I have a backup, archivelogs and all other things needed for a recovery (and it worked some weeks ago)

I think I will try it tomorrow morning ...

Christian


- I will assign points tomorrow after lunch !
never touch a running system
Patrick Wallek
Honored Contributor

Re: replace disk in mirrored stripeset ?

There is absolutely no reason to lvreduce / vgreduce the bad disk out of the VG. It may not work anyway if the disk it totally bad.

The steps you have been given work and work quite well.

For more information check out the "Software Recovery Handbook" located here: http://www2.itrc.hp.com/service/iv/node.do?node=prod%2FWW_Start%2FN1%7C16 and check out "Chapter 16: LVM". It goes over the steps to recover hot swap drives, though it, too, says to lvreduce, which I disagree with.
Christian Schulze
Regular Advisor

Re: replace disk in mirrored stripeset ?

Thanks to all

vgcfgrestore and vgsync worked

This saved my weekend ...

Christian
never touch a running system