1823913 Members
3463 Online
109667 Solutions
New Discussion юеВ

Split Boot Mirrors

 
SOLVED
Go to solution
Steve Andrews_6
Frequent Advisor

Split Boot Mirrors

We are gtiing ready to add patches to a rx4640 Itanium system running HP-UX 11.23. Before patching the system we want to split the vg00 root mirror in order to preserve the current HP-UX Operating system and reduce the risk of patching. Does anyone have proper documentation on splitting off the mirror so that both disks are bootable just in case the patches fail and corrupt the primary Operating system?
In God We Trust
10 REPLIES 10
Jakes Louw
Trusted Contributor
Solution

Re: Split Boot Mirrors

Steve, there is a standard doc that explains this somewhere.
However, the process is pretty simple:
1) determine the root mirror disk ID, using "lvdisplay -v /dev/vg00/lvol1": the two disks are named at the beginning of the output, as well as in the extent listing.
2) Perform an "ioscan -fn" and record the hardware path of the root mirror disk
3) execute "lvsplit /dev/vg00/lvol1" which will then rename the mirror portion of the lvol as "/dev/vg00/lvol1b" (if my memory serves me correctly...)

You will need the Hardware path for the mirror if you need to boot from that disk...
However, there are some other issues:
- /etc/fstab will not be correct, so I doubt if you will get the server up further than single-user or LVM maintenance mode.
- you might need to modify the /etc/fstab file on the root mirror disk to reflect the name of the new split mirror BEFORE you start your patching. For this, you will need to mount that split lvol on a dummy mount-point and vi the file, which will be /dummy_fs/etc/fstab.
Trying is the first step to failure - Homer Simpson
Steven E. Protter
Exalted Contributor

Re: Split Boot Mirrors

Shalom,

I recommend doing a make_tape_backup or a make_tape_recovery

Restoring vg00 from either is quite simple though consumes a bit of time.

splitting mirrors is to touchy a thing in my opinion and possibly more risky than the patch itself.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
dictum9
Super Advisor

Re: Split Boot Mirrors

The command I use to split mirrors is
lvreduce.



Shahul
Esteemed Contributor

Re: Split Boot Mirrors

Hi,

If your root disks are hot pluggable and server is physically reachable, I would recommend to pull out boot mirror till the patching is completed and tested. If things go horribly wrong, you can unplug primary and insert mirror and boot through that, else you can plugg it later and sync.

Best of luck
Shahul
DCE
Honored Contributor

Re: Split Boot Mirrors

another option:

ensure hpux-lw is your boot string on both drives

shutdown the system and disconnect the mirror drive

bring the system up and lv/vgreduce the now defunct mirror

shutdown the system and plug the mirror drive back in

install your patches

if the patch install corrupts the boot disk, you can reboot, interrupt the boot process and specify the old mirror disk.

if the install is good, you can add the old mirror back to the vg00 and re-mirror it.

Re: Split Boot Mirrors

Another (unsupported) way:
- lvreduce and vgreduce the mirror
- use dd from the pv raw device to the
empty mirror disk
- patch your OS
- in case it is OK, pvcreate and remirror
- in case it is KO, switch off, swap the
drives and boot the copy

Alessandro Bocchino
http://www.risolve.com
We work in the dark, we do what we can, we give what we have, our doubt is our passion, and our passion is our task - the rest, is the madness of art - Henry James
Chauhan Amit
Respected Contributor

Re: Split Boot Mirrors

Hi Steve,

In order to protect your operating system while patching your boot disk, do the following:

1. Use lvsplit to create new logical volumes of all vg00 based LVs. Note the new LV names.

2. Mount the split lv for the root filesystem. After creating a backup copy, update the split /mnt/etc/fstab to reflect all the split lvs instead of the originals.

3. Execute setboot to verify that the system sees the alternate boot disk as a valid boot path.

4. Add Patches

5. If you need to eliminate the patching, boot from the alternate disk and execute

lvmerge -A n ${upgraded_lvs} ${split_lvs}

then restore the backed up copy of /etc/fstab
Then reboot to start using the old OS again.


-Amit
If you are not a part of solution , then you are a part of problem
m saravanan
Valued Contributor

Re: Split Boot Mirrors

Dear Steve..

Atleast twice in a week we are doing such activity (split mirror disk as a contingency plan). We r following this steps only.

- for safety reason, take two sets of Ignite Backup

- Dowuble check the AUTO string for the following entry,
"hpux -lq"
use the following command for checking
# lifcp /dev/rdsk/cxtxdx:AUTO -

- check the alternate boot path
# setboot

- Check completely that all LVs are in sync.

- Try booting the server from Mirror Disk, to check the proper working.

- Shutdown the server, simply remove the Mirror disk from the server.

- Boot the server, do ur patch installation

- Once everything is ok, if the server is capable of Hotswap HDD simply insert the Mirror HDD, do fresh "ioscan", run "insf -e", start the synchronization "vgsync /dev/vg00".
Note: normally vgsync starts automatically.

If the server is not capable of hotswap, shutdown the server, put the mirror HDD back in slot & boot the server,

- If ur patch installation activity is not successfull or if u want to revert back the system using mirror disk,
* shutdown the system
* Insert the Mirror HDD
* Boot the system through Mirror HDD (as a Pri Path). Now, the sync will occur from Mirror HDD to Orig HDD

Hope it'll help u.


Regds,
Saravanan
Adisuria Wangsadinata_1
Honored Contributor

Re: Split Boot Mirrors

Hi Steve,

I'm agreed with SEP, it's very easy if you want to use Ignite/UX features by using make_tape_recovery to have a preserve of current HP-UX Operating system. Because if something wrong happened on your patching, you can revert back immediate by boot from the Ignite/UX backup tape.

But if you insist to use split the mirror, you can use the steps below :

1. Get a list of all the logical volumes in vg00 :
# cat /etc/fstab

2. Get the boot definitions from vg00 :
# lvlnboot -v

3. Make sure all writes to the disk have taken place:
# /usr/sbin/sync

4. Split all the logical volumes in vg00 :
# sync;lvsplit /dev/vg00/lvol1
Repeat for other lvols

5. Do a filesystem check on each split logical volume :
# fsck -F hfs /dev/vg00/lvol1b

6. Now mount the split root logical volume to the mount point /newroot. Then
edit the fstab to use the split logical volumes.

# mkdir /newroot
# mount /dev/vg00/lvol3b /newroot
# vi /newroot/etc/fstab #change to lvolb's
# cat /newroot/etc/fstab

7. Remove the current boot definitions and add the split logical volumes:

# lvrmboot -r /dev/vg00
# lvlnboot -b /dev/vg00/lvol1b /dev/vg00
# lvlnboot -r /dev/vg00/lvol3b /dev/vg00
# lvlnboot -s /dev/vg00/lvol2b /dev/vg00
# lvlnboot -d /dev/vg00/lvol2b /dev/vg00

8. Change the bootconf file to reflect the new boot disk and update
the
boot definitions again:

# mount /dev/vg00/lvol1b /newroot/stand
# vi /newroot/stand/bootconf #change root disk definition in this file
# lvlnboot -R /dev/vg00

9. Reboot the system and interrupt the boot sequence in order to boot from the
split disk:

#shutdown -ry now

interrupt boot sequence
boot from split mirror disk

If the split logical volumes need to be merged back to the original logical
volumes, but the data that is on the split logical volume is the data that
needs to be perserved, do the following steps:

1. Merge logical volume so that "lvolb" is primary.

# lvmerge /dev/vg00/lvol1 /dev/vg00/lvol1b

Repeat it for other lvols

2. Update the boot definitions again and view them for accuracy:

# lvlnboot -R /dev/vg00

# shutdown -ry now

interrupt boot sequence
boot from alternate boot disk
interact with ISL:
ISL> hpux -is (;0)/stand/vmunix # boot single user

3. Reboot the system and interrupt the boot sequence:

# shutdown -ry now

interrupt boot sequence
boot from alternate boot disk
interact with ISL:
ISL> hpux -is (;0)/stand/vmunix # boot single user

4. Move all of the lvolb device files to lvol device files:

# cd /dev/vg00
# ls
group lvol1b lvol4b lvol7b rlvol11 rlvol3b rlvol6b
lvol10 lvol2b lvol5b lvol8b rlvol1b rlvol4b rlvol7b
lvol11 lvol3b lvol6b rlvol10 rlvol2b rlvol5b rlvol8b

# mv lvol1b lvol1
# mv lvol2b lvol2
# mv lvol3b lvol3
# mv lvol4b lvol4
# mv lvol5b lvol5
# mv lvol6b lvol6
# mv lvol7b lvol7
# mv lvol8b lvol8
# mv rlvol8b rlvol8
# mv rlvol7b rlvol7
# mv rlvol6b rlvol6
# mv rlvol5b rlvol5
# mv rlvol4b rlvol4
# mv rlvol3b rlvol3
# mv rlvol2b rlvol2
# mv rlvol1b rlvol1

5. View the boot definitions again:
# lvlnboot -v /dev/vg00

If desired the dump device can be changed to use the c1t4d0
device using:

# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
# lvlnboot -R

6. Edit the /etc/fstab again and change lvolb's back to lvols:

# mount -F vxfs /dev/vg00/lvol7 /usr
# vi /etc/fstab #Make changes
#cat /etc/fstab

7. Reboot the system again and let it come up on it's own:

# shutdown -ry now

As you can see the split mirror is quite troublesome compare if you want to use 'make_tape_recovery'.

Hope you can consider your steps.

Cheers,
AW

now working, next not working ... that's unix
Steve Andrews_6
Frequent Advisor

Re: Split Boot Mirrors

Thanks to everyone, we will evaluate all the answers and assign points accordingly.
In God We Trust