Operating System - HP-UX
1833871 Members
1599 Online
110063 Solutions
New Discussion

Re: Root disk mirroring question

 
Travis Harp_1
Advisor

Root disk mirroring question

Hello everyone,
I have a system that I'm attempting to add a secondary off line mirror for the root disk.
My goal is to have a mirror that is brought into sync every month but not constantly updated like the primary mirror.

The reasoning is that we could restore from a data loss faster if we could copy the data from the secondary mirror then restore the rest from Netbackup.

Without saying too much (that could be read) I'm not saying that I think this is the best way to handle the situation but it's the mandate that has been handed down.

My question is how would I go about setting up such a mirror?
Since this has very limited uses it's not something I've looked into much.

Any direction would be most appreciated.
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Root disk mirroring question

Shalom,

for 11.11

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

Its very simlar for 11.23 most of this will work there as well.

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
Patrick Wallek
Honored Contributor

Re: Root disk mirroring question

You can do a copy via dd. Have a look at Clay Stephenson's response in this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1060083

Travis Harp_1
Advisor

Re: Root disk mirroring question

Thanks for the quick response.

It looks to me like the first option is a standard mirror which would be modified as soon as a change is made to the primary.

What we are looking for is something like a third mirror that you would take off-line for a data backup and then re-sync after the backup.
The difference is that we want to sync it up every month then stop synching until the next month..

The dd option is something I've thought about but if memory serves dd doesn't check for bad blocks so it might introduce corruption.

Is there a way to set an interval for synching the mirror?
Patrick Wallek
Honored Contributor

Re: Root disk mirroring question

No, there is not any way to a sync interval for a mirror. Once it is mirrored it will stay in sync.

Another option may be rsync, but that could be very slow, at least the first time.

My preference would be dd.
Geoff Wild
Honored Contributor

Re: Root disk mirroring question

Sure - you can do a third mirror - then use lvsplit to take it out - wait a month - then lvmerge.

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.
John Guster
Trusted Contributor

Re: Root disk mirroring question

set up a root cron runs once a month. Set up a 3rd disk as boot disk and 2nd mirror copy. lvsplit /dev/vg00/lvol9...do for each LVs, do lvol3 last, a month late do lvmerger /dev/vg00/lvol9b /dev/vg00/lvol9, do for each LVs, then lvsplit right after it. make sure do vgsync before each lvsplit...
You better off make a ignite tape once a week....hard to convenice up manager...

Cheer
A. Clay Stephenson
Acclaimed Contributor

Re: Root disk mirroring question

I would certainly do just the 1 mirror + the dd'ed lifeboat -- and you are better protected than with a 3rd mirror. If you are truly concerned about dirty blocks (although I have never had a lifeboat fail to boot after the automatic fsck's are performed) then there is a fix for that as well. Temporarily vgimport as (/dev/vg31 for example) the lifeboat disk and then activate the VG. You probably have to override quorum and then do an fsck on each of the filesystem. You have that data in your current vg00 and then deactivate the VG. You now have a completely fsck'ed and marked clean boot lifeboat. The real key to making lifeboats is to choose a time when the system is relatively quiescent.
If it ain't broke, I can fix that.