Re: Mirroring- LVM

 
SOLVED
Go to solution
Shakeer_1
Occasional Advisor

Mirroring- LVM

Hi,

Can somebody please revert with the step by step procedure to replace a bad disk in mirror.
situation: the disk is hot swap, my onsite hardware engineer replaced the disk. i did ioscan -fnC, still it shows the old info on the disk..
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: Mirroring- LVM

Hi,

# vgcfgrestore -n vgxx /dev/rdsk/cxtydz

# vgsync /dev/vgxx

Regards,
Robert-Jan
Kent Ostby
Honored Contributor

Re: Mirroring- LVM

vgcfgrestore -n /dev/vgAA /dev/rdsk/cXtYdZ
vgchange -a y /dev/vgAA

The vgchange will recognize and resync the disks.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kyris
Frequent Advisor

Re: Mirroring- LVM

Sending you a very basic instruction list which should hopefully help u.

kyris

shankar_3
Advisor
Solution

Re: Mirroring- LVM

hi shkeer,

Before scanning the harddisk you should reduce the pv from miiror vg.

steps below..

I.Removing the Ghost disk

#vgdisplay /dev/vgXX

#strings /etc/lvmtab

#vgreduce -f /dev/vgXX

II. Steps to recreate root mirror

1. reduce the mirror

#for i in lvol1 lvol2 lvol3 ..(all mirroor lv)
> di lvreduce -m 0 /dev/vgxx/$i /dev/dsk/cXdXtX (failed disk)
> done

2.View the lvs

#lvdisplay -v

If your using distributed then remove all PVs from mirror

3.Add new disk and scan with ioscan

4.Restore LVM header to the new disk and reactivate the vgXX that belongs to disk.

#vgcfgrestore -n vgXX /dev/rdsk/cXtXdX (new disk)
#vgchange -a y vgXX

5. recreate LIF & BDRA on the new disk
to createLIF files(ISL,AUTO.HPUX,LABEL)
#mkboot -l /dev/rdsk/cXtXtx
#lifls /dev/rdsk/cXtXtx (to verify)

To write the content the AUTO file
#mkboot -a "hp-ux -lq (;0)" /stand/vmunix /dev/rdsk/cXtXdX

here -lq for disabling the quarm.

#lifcp /dev/rdsk/cXtXdX:AUTO (to verify)

#pvdisplay -v /dev/dsk/cXtXdX

6.Extend the mirror

#for i in lvol1 lvol2 lvol3 ..(all mirroor lv)
> di lvextend -m 1 /dev/vgxx/$i /dev/dsk/cXdXtX (failed disk)
> done


To write LABEL file(i.e. set root,boot,swap,dump)

this information already done by vgcfgrestore

#lnlnboot -r /dev/rootvg/lvol3
#lnlnboot -b /dev/rootvg/lvol1
#lnlnboot -s /dev/rootvg/lvol2
#lnlnboot -d /dev/rootvg/lvol2

#lnlnboot -v to verify
#lvdisplay -v
#vgdiplsy -v vgXX


Removing the Ghost disk

#vgdisplay /dev/vgXX

#strings /etc/lvmtab

#vgreduce -f /dev/vgXX

With Cheers,
Shankar
Shakeer_1
Occasional Advisor

Re: Mirroring- LVM

Dear all,

Thank you all for the extended support, and have assigned appropriate points to all of u. Special thanks to shankar for the comprehensive information.