1846752 Members
5792 Online
110256 Solutions
New Discussion

redo mirroring

 
SOLVED
Go to solution
Ionut Grigorescu_2
Super Advisor

redo mirroring

Hi,

I have tried to redo mirroring of the root disk, because the mirror disk wasn't set as bootable. I have performed the following steps:

first:

vgreduce /dev/VG00 /dev/dsk/cXtXdX get previous mirrored disk from vg00

next:

Make it a valid bootable PV disk
# pvcreate -fB /dev/rdsk/cXtXdX

Make it a bootable Lvol disk
# mkboot -l /dev/rdsk/cXtXdX

Place the autoboot string on the mirror as well on the original boot disk ( use low quorum)
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cXtXdX
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cXtXdX


# cd /usr/sbin/diag/lif


mkboot -b updatediaglif -p ISL -p AUTO -p HPUX -p LABEL /dev/rdsk/cXtXdX


# vgextend /dev/VG00 /dev/dsk/cXtXdX


# lvextend -m 1 /dev/VG00/lvol1 /dev/dsk/cXtXdX


Well, here I've received an error message
lvextend: not enough free PE available.
Failure possibly caused by contiguous policy...

attached the output from vgdisplay and pvdispla
If it weren't for STRESS I'd have no energy at all
7 REPLIES 7
Jean-Louis Phelix
Honored Contributor

Re: redo mirroring

Hi,

When you did your vgremove, /dev/dsk/c3t6d0 has been removed from /etc/lvmpvg. Add it again (or you should have used -g option of vgextend perhaps). I Think that your lvols are PVG-strict.

Regards.
It works for me (© Bill McNAMARA ...)
Stefan Farrelly
Honored Contributor

Re: redo mirroring

I think youve added an extra step I never use;
mkboot -b updatediaglif -p ISL -p AUTO -p HPUX -p LABEL /dev/rdsk/cXtXdX

I think this could be upsetting the layout at the start of the disk which causes the mirroring to fail. Try the pvcreate, mkboot -l, vgextend, then lvextend -m 1 and see if that works ok.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Jean-Louis Phelix
Honored Contributor

Re: redo mirroring

Hi,

Wanted to go too fast ... it was removed from lvmpvg during vgreduce, not vgremove !

Regards
It works for me (© Bill McNAMARA ...)
S.K. Chan
Honored Contributor

Re: redo mirroring

I think if you want to maintain PVG-strict setup you got to put c3t6d0 into a separate PVG (say scsi3_6). What you can do is hand edit /etc/lvmpvg file and include it in. You "lvmpvg" file may look like this ..
VG /dev/vg0
PVG scsi2_6
/dev/dsk/c2t6d0
PVG scsi3_6
/dev/dsk/c3t6d0
Now do a "vgdisplay -v vg00" again and see if you got a new PVG defined. If yes proceed with the lvextend like so ..
# lvextend -m 1 /dev/vg00/lvol1 scsi3_6
ie telling it to mirror to the "added" PVG, thus maintaining the PVG strictness.

Finally the updating of ODE (mkboot -b updatediaglif ..), you got to pay close attention to it. If you system is running 64bit you got to use "updatediaglif2" file instead. For instance ..
# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/cXtXdX
Regardless this should not be the cause of the error you're seeing.

Ionut Grigorescu_2
Super Advisor

Re: redo mirroring

I performed
#vgextend -g scsi2_6 /dev/vg00 /dev/dsk/c3t6d0
then
#lvchange -s g /dev/vg00/lvol1
.
.
.
#lvchange -s g /dev/vg00/lvol6
then I received the same error! Do I have to move lvmtab BEFORE vgreduce and after vgreduce to perform a vgscan -a?
If it weren't for STRESS I'd have no energy at all
S.K. Chan
Honored Contributor
Solution

Re: redo mirroring

You CANNOT include c3t6d0 in the same PVG and later change the LV bahavior to mirror as strict PVG and expect it to work. Like I said before if you want to maintain the PVG strictness put c3t6d0 in a different PVG (not scsi2_6). You don't have to do anything to lvmtab file if the vgreduce is successful. Check it with ..
# strings /etc/lvmtab
to make sure you're still in a consistent state.
Ionut Grigorescu_2
Super Advisor

Re: redo mirroring

You're right. I have to read more about LVM...
Now it works fine,thank you! case closed.
If it weren't for STRESS I'd have no energy at all