Operating System - HP-UX
1826399 Members
4356 Online
109692 Solutions
New Discussion

Create copy of boot disk - How?

 
SOLVED
Go to solution
John Robben
Advisor

Create copy of boot disk - How?

In my N-Class server, I have 2 internal disks:

/dev/dsk/c1t6d0
SEAGATE ST39204LC
PE Size 4MB
Total PE 2169

/dev/dsk/c2t6d0
SEAGATE ST39103LC
PE Size 4MB
Total PE 2170

The first disk listed (c1t6d0) contains vg00, and is the boot disk. The second disk (c2t6d0) is unused.

I'd like to create a "copy" of the boot disk on the unused disk, in case of a boot disk failure (which I just went through, and was *NOT* fun.)

I'd like to be able to refresh the copy in an automated way, best case nightly, worst case weekly.

There is no budget for MirrorDisk/UX, so I'm looking for alternatives.

Any and all suggestions welcome/appreciated.

vg00 configuration attached.

15 REPLIES 15
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Create copy of boot disk - How?

I prefer to do this on identical disks but yours should be close enough.

This is my 'lifeboat' technique and works very well and it protects you from things that mirrors don't: 1) Really, really bad patches 2) Your own stupidity.

Cron a job to run weekly (or nitely) preferably during a relatively quiescent period:
(e.g. 0300 Sundays)

dd if=/dev/rdsk/c1t6d0 of=/dev/rdsk/c2t6d0 bs=8000k

This will copy everything on the disk. Because the filesystems are mounted, you won't get an absolutely clean copy (an automatic fsck will be invoked on boot from the lifeboat) but I've never had one of these to fail me.

When you need the lifeboat, you shutdown, remove the boot disk, and put the lifeboat in its place and boot normally. Again, it will fsck but will then come on up.

I actually do this on all my servers in addition to mirroring. It's a much faster recovery then IgniteUX.

If it ain't broke, I can fix that.
John Robben
Advisor

Re: Create copy of boot disk - How?

I assume that I could also interrupt boot and choose the "lifeboat" disk as an alternate boot disk as well?

We are "discouraged" (read prohibited) from touching hardware here.

Thanks,

John
Michael Tully
Honored Contributor

Re: Create copy of boot disk - How?

If it turns to crap, make sure that you have a regular rotation of an ignite tape, just in case. Here's the best way to create one, and of course the software is free on many of the CD supplied, or from here:

http://www.software.hp.com/products/IUX/download.html

To create an interactive ignite tape:

# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn (assuming your tape drive is /dev/rmt/0m, also make note of the use of the no-rewind device)
Anyone for a Mutiny ?
John Robben
Advisor

Re: Create copy of boot disk - How?

We already do the ignite tape in an automated daily cron.

That's how I recovered during the recent boot disk failure.

Not a "spotless" recovery, but after I cleaned up the duplicate FC & LAN device driver files it worked.

Thanks for the reminder though!

Regards,

John

Michael Tully
Honored Contributor

Re: Create copy of boot disk - How?

I see no reason at all not to have the lifeboat as an alternative disk.

We're discouraged too, but it doesn't stop me from doing much.... (about the hardware) ;^))
Anyone for a Mutiny ?
MANOJ SRIVASTAVA
Honored Contributor

Re: Create copy of boot disk - How?

Well the best alternative which is a true redudnancy is to do a ignite tape , and recreate it on the sencond disk . leave the second disk connected in the mahcine . In case of the root disk failure let the system boot form the secondary disk ,this way there will be no lifeboat hiccups .


Manoj Srivastava
John Robben
Advisor

Re: Create copy of boot disk - How?

Perfrmed operation as recommended. System booted from "alternate" drive. The issue I had was it the filesystems from the "primary" disk were active when I booted from the "alternate" Aree there some lvlnboot commands I'll need to issue to make the filesystems on the "alternate" disk active?

Thanks,

John

Sridhar Bhaskarla
Honored Contributor

Re: Create copy of boot disk - How?

Did you create a mirror and boot or did you boot from the "life boat" disk?.

If the second is the case, then there is no way the filesystems of the primary disk will be mounted.

You just need to make sure that you interact with bootadmin and properly select the path to the life boat disk.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
John Robben
Advisor

Re: Create copy of boot disk - How?

I did the following:

# setboot
Primary bootpath : 0/0/2/0.6.0
Alternate bootpath : 0/0/2/1.6.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)

shutdown -ry 0

Interrupt boot

bo alt

Interact with ISL? > no

I had a vg that was not in the /etc/lvmrc, so I edited the /etc/lvmrc to add it. Then another reboot, this time i didn't interrupt.

The /etc/lvmrc file was correct on the primary.

Next test was:

touch /home/root/i_shouldnt_see_you_when_i_reboot.txt

shutdown -ry 0

Interrupt boot

bo alt

Interact with ISL? > no

ll /home/root

there is the file.
Brian M Rawlings
Honored Contributor

Re: Create copy of boot disk - How?

I like the lifeboat drive, I'll have to try that in the lab. BTW, I always thought the LIF area had a block size of 2k... But I guess 'dd' with a block size of 8k would still be fine, for block sizes that are evenly divisible into 8k.

One other possibility that occurs to me, depending on OS version, is the Veritas Volume Replicator "Lite" that is included for free on 11i. It provides mirroring capability, including for boot volumes, for free.

Since it is fully supported, even though the lifeboat/dd concept is thoroughly tested in the real world (via the "Clay Testing Lab" TM), and should work fine, I'd probably opt for the VVR lite.

Regards, --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)
Sridhar Bhaskarla
Honored Contributor

Re: Create copy of boot disk - How?

Two more questions from the previous message.

1. The /etc/lvmrc file was correct on the primary.

Does this mean you saw the modified lvmrc on the primary disk after changing it during the alternate boot?.

If you saw the unmodified lvmrc on the primary boot, then your test was successful.

2. /home/root/i_shouldnt...

Where is /home located?. Is it right in the vg00 or on external volume group?. If it is on the external volume group, then the test is not valid.

Real test would be to pull out the primary disk and then boot from the alternate. But make sure you have a good make_tape_recovery tape before attempting to do it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Create copy of boot disk - How?

Warning guys: I never said that you could boot a lifeboat using alterate path. The whole idea is that the lifeboat is expected to be in the slot (HW path) that the source disk was originally in.
If not, the lvmtab is incorrect.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: Create copy of boot disk - How?

Oh..my..my.. Clay had the catch. I should have read the entire thread. My mind was always going to the mirror disk theft process that I am used to where both the disks would be part of lvmtab.

You could always boot from alternate disk even with this process. You would need to boot in lvm maintenance mode, export vg00 and import it back with the disk and then run lvlnboot commands for boot, root, swap and dump areas. That will allow you to boot from the alternate disk. However, puttting it back in the primary slot is much easier and safer way.

Also, do not ever hardcode the disk path in the auto string. "hpux -lq" can you save you from a lot of headaches.

If your autostring was hardcoded with the disk path, then that could be the reason why you booted from the alternate disk without any errors.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Brian M Rawlings
Honored Contributor

Re: Create copy of boot disk - How?

Come on, Clay. We were expecting the adb sequence needed to fix the bits on the disk to use the alternate slot's HW path...

Just kidding, that makes perfect sense. Lifeboat sounds good, unless there is a bogus rule about sysadmins touching hardware. My sympathies, John...

8^) --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)
Brian M Rawlings
Honored Contributor

Re: Create copy of boot disk - How?

Regarding my first suggestion, sorry, but I misread some sales blurb. I just checked, and the 'lite' version of VVM that comes for free only provides a very pretty GUI for managing volumes, but does not provide mirroring. So, that's out (for free, at any rate).

Regards, --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)