Operating System - HP-UX
1834178 Members
2718 Online
110064 Solutions
New Discussion

Spliting mirrored root disk

 
SOLVED
Go to solution
Jay_122
Advisor

Spliting mirrored root disk

I am going to be applying patches and would like to split the mirrors on my root disk to save a copy as a backup. What is the best way to do this? I have already created an ignite tape. Any help would be appreciated.
9 REPLIES 9
Mic V.
Esteemed Contributor

Re: Spliting mirrored root disk

Assuming you're using MirrorDisk, check out lvreduce (lvreduce -m 0):

man lvreduce
http://docs.hp.com/en/B2355-60103/lvreduce.1M.html

This might make interesting reading:

http://docs.hp.com/en/5990-8172/ch06s02.html#cdebgaei

Regards,
Mic
What kind of a name is 'Wolverine'?
A. Clay Stephenson
Acclaimed Contributor

Re: Spliting mirrored root disk

lvreduce -m 0 will remove the mirroring -- not exactly what you want to do should you need to replace the original data.

First, I'll assume that you have done a
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cXtYd0 on both your primary and alternate boot disks so that you can boot from either one without quorum. Next, shutdown and remove/disconnect the alternate drive. You can now reboot and install your patches. When you are finished, shutdown and reinstall the removed disk and boot. Issue a vgsync /dev/vg00 and you are done.

However, this is NOT the way I do it because I never want to leave any drive unmirrored so my method is to do a raw disk copy of the primary drive to an identical disk to create a lifeboat.
If it ain't broke, I can fix that.
Camel_1
Valued Contributor

Re: Spliting mirrored root disk

consider to run ignite backup before making any OS change.

Simon
Trond Haugen
Honored Contributor

Re: Spliting mirrored root disk

I would recomend BOTH splitting the mirror AND Ignite backup.
After all two different backup/fallback methodes are better than one.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Florian Heigl (new acc)
Honored Contributor
Solution

Re: Spliting mirrored root disk

Shutdown
Remove the mirror disk
boot with hpux -lq
Patch
reboot
test

Reinsert the mirror disk,
ioscan -fnCdisk # disk found?
for lv in `vgdisplay -v /dev/vg00 | grep "LV Name" | awk '{print $3}'`
do
lvsync $lv
done
lvdisplay /dev/vg00/lvol* | grep -c stale
# must return 0
yesterday I stood at the edge. Today I'm one step ahead.
Florian Heigl (new acc)
Honored Contributor

Re: Spliting mirrored root disk

Uh, maybe I should better add this for clarity :)
if 'test' fails, shutdown and boot with -lq from the mirror disk only, then sync to the old 'original'
yesterday I stood at the edge. Today I'm one step ahead.
Geoff Wild
Honored Contributor

Re: Spliting mirrored root disk

You can use lvsplit, apply patches, reboot (more then likely) and if happy - lvmerge.


lvsplit - split mirrored LVM logical volume into two logical volumes

lvmerge - merge two LVM logical volumes into one logical volume

man them for more info

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jannik
Honored Contributor

Re: Spliting mirrored root disk

Jay_122
Advisor

Re: Spliting mirrored root disk

Thanks to all!!