Operating System - HP-UX
1834651 Members
2529 Online
110069 Solutions
New Discussion

Re: Steps required to break the mirrior

 
jkumar
Advisor

Steps required to break the mirrior

Hi All,

I have some patching activity on my hp-ux box,As i dont have ignite backup with me I need to break the mirrior before activity .so some one pls give me the steps to break the mirrior and use that disk when my primary got failed to boot after the patch installation.

Jai...
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor

Re: Steps required to break the mirrior

The best (and safest) way to break the mirror is to first assert the quorum override on the primary boot disk via
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cXtYdZ

where cXtYdZ corresponds to your boot disk.

Now shutdown and remove your mirror disk and boot. If the mirror disk ain't in the box, one hard to try really hard to alter its contents.

I actually prefer to leave the disk mirrored while patching (after all you could have a disk failure then) and instead do a lifeboat copy to another disk before patching.
If it ain't broke, I can fix that.
Matti_Kurkela
Honored Contributor

Re: Steps required to break the mirrior

Well...

To "break the mirror", so that the off-lined disk remains bootable and valid:

1.) Sanity check: verify that the bootloader exists on both halves of the mirrored system disk (PA-RISC: lifls /dev/rdsk/, Itanium: efi_ls -d /dev/rdsk/s1).
If it doesn't, read HP's document "When Good Disks Go Bad" and redo your mirror using the proper procedure.
The bootloader is not on the LVM-managed disk area, so it is not mirrored automatically.

2.) shutdown system
3.) unplug one of the system disks
4.) restart system using "-lq" boot option
(otherwise it will not boot; this option should be set as default when the system was originally mirrored)

If the patch operation fails:
1.) shutdown system
2.) unplug the disk that has the failed installation
3.) re-plug the disk that contains the good installation
4.) restart system (this makes the event timestamps on the good installation newer than on the bad one, so the system won't sync in the wrong direction if/when it tries to resync the mirror automatically)
5.) reinstall the other disk and re-mirror using the normal system disk mirror procedure for your architecture, as listed in document "When Good Disks Go Bad".

Document "When Good Disks Go Bad":
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

You might also want to check out "Dynamic Root Disk": it's a free product from HP. It could be described as "Ghost for HP-UX", if you're familiar with that disk cloning software of the PC world.
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=DynRootDisk

MK
MK
jkumar
Advisor

Re: Steps required to break the mirrior

Thx for the info,,,

But we are on Offshore support and we cant able to unplug or plug the disk.Is there any way to do it from offshore.

Jai
skt_skt
Honored Contributor

Re: Steps required to break the mirrior

why cant you split the mirror(lvreduce -m 0) to each of the LVs mirrored.

When you are good to go do "lvextend -m 1"
Torsten.
Acclaimed Contributor

Re: Steps required to break the mirrior

I guess the "lvreduce" is NOT the procedure you need, but you can have a look at "lvsplit".

If you are running 11.23 or 11.31 have a look at dynamic root disk (DRD).

This tool will clone the vg00 to a "cold standby" disk. Now you can patch this cold standby copy, example:

# drd runcmd swinstall -s ...

Once this is done, you can activate the clone and boot from.
In case of any problems just boot from the original disk - this remains unchanged.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
so_2
Regular Advisor

Re: Steps required to break the mirrior

Hi,
do an lvdisplay to see if any stale extends.

Then run the comamnds as below.

sync; lvsplit /dev/vg00/lvdump
sync; lvsplit /dev/vg00/lvol8
sync; lvsplit /dev/vg00/lvol7
sync; lvsplit /dev/vg00/lvol6
sync; lvsplit /dev/vg00/lvol5
sync; lvsplit /dev/vg00/lvol4
sync; lvsplit /dev/vg00/lvol2
sync; lvsplit /dev/vg00/lvol1
sync; lvsplit /dev/vg00/lvol3

"/" must be split LAST!

S.O
jkumar
Advisor

Re: Steps required to break the mirrior

Hi SO,

Sounds Good ,Is this enough to break mirrior or i need to do some thing in /etc/fstab etc ...

jai,,
Tim Nelson
Honored Contributor

Re: Steps required to break the mirrior

If you do the lvsplit method then there is other stuff to do in order to get the split mirror to boot.

i.e.
all lvols on split will now be called lvol1b, lvol2b, lvol3b, etc.. but the lvlnboot and fstab still reference lvol1, lvol2, lvol3 etc..

You must mount the now split lvol1b, edit the fstab, I forget how to fix the lvlnboot. Might be a lvm maintenance mode thing IF you end up using the mirror.

Also need to change the boot handler for the split disk to use -lq as mentioned earlier.

jkumar
Advisor

Re: Steps required to break the mirrior

HI,

Can some pls update the final step needs to be performed after this lvsplit ( exact steps )

jai
Torsten.
Acclaimed Contributor

Re: Steps required to break the mirrior

You cannot get "exact" steps unless you tell about your hardware and OS release.

# model
# uname -a

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!