Operating System - HP-UX
1833827 Members
2301 Online
110063 Solutions
New Discussion

Create and sync alternate boot disk without mirror/ux

 
SOLVED
Go to solution
Richard Ross
Regular Advisor

Create and sync alternate boot disk without mirror/ux

Hi,

I looking for a process to manually mirror the boot disk (8gb disk) onto a unused 8gb disk and setup the 2nd disk to be a valid alternate boot device. This is for a 11.0 server and mirror/ux is not an available option.

Thanks
17 REPLIES 17
goldboy
Trusted Contributor

Re: Create and sync alternate boot disk without mirror/ux

Richard,

Mirroring would be the best way to go, you can use DD to create an exact copy of the disk (you would have to do it any time you want to have an updated one).

the following link, talks about the same issues:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=997928&admit=-682735245+1172270325189+28353475

T
"Life is what you make out of them!"
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

Tal,

Thanks .. The post you pointed out was to perform the following:

dd if=/dev/rdsk/XXXX of=/dev/rdsk/YYYY bs=32768k

It looks like if you go this route, you need to move the 'dd' copied disk to the primary disk slot then boot normally.

The one piece that makes this difficult is the server is 300 miles away and I only have a connection trough a terminal server.

Any other suggestions? Possibly a procedure that defines the disk as a alternate boot disk that I can just boot from?


goldboy
Trusted Contributor

Re: Create and sync alternate boot disk without mirror/ux

Richard,
this is the down side of not using the mirror software.
If you have the capability to test it, i would use the setboot command and set the disk as an alternate boot path and try to boot from it.

I think a co worker of mine tried it and it failed but i wil check on this and get back to you next week.

T
"Life is what you make out of them!"
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

I did find thins .. Just a fast read through .. It should work ..

Duplicating an LVM Boot Disk (cpio method)
==========================================
* Assuming current LVM boot disk is on c1t2d0 and you want to duplicate to c2t2d0.
# pvcreate -B /dev/rdsk/c2t2d0
# mkdir /dev/vgroot
# mknod /dev/vgroot/group c 64 0x010000
# vgcreate /dev/vgroot /dev/dsk/c2t2d0
# mkboot /dev/rdsk/c2t2d0
# mkboot -a "hpux" /dev/rdsk/c2t2d0
# lvcreate -C y -r n -n lvol1 /dev/vgroot
# lvextend -L 84 /dev/vgroot/lvol1 /dev/dsk/c2t2d0
==> creating and extending boot lv (/stand)
# lvcreate -C y -r n -L 2048 -n lvol2 /dev/vgroot
==> creating swap LV
# lvcreate -C y -r n -n lvol3 /dev/vgroot
# lvextend -L 6544 /dev/vgroot/lvol3 /dev/dsk/c2t2d0
==> creating and extending root lv (/)
** Repeat "lvextend" for the rest of your LVs with "lvcreate -L -n /dev/vgroot" first.
# lvlnboot -b lvol1 /dev/vgroot
# lvlnboot -r lvol3 /dev/vgroot
# lvlnboot -s lvol2 /dev/vgroot
# lvlnboot -d lvol2 /dev/vgroot
==> update BDRA for boot, root, swap and dump LVs.
# newfs -F hfs /dev/vgroot/rlvol1 ==> /stand must be hfs
# newfs -F vxfs /dev/vgroot/rlvol3
# mkdir /newstand
# mount /dev/vgroot/lvol1 /newstand
# cd /stand
# find . -xdev -depth -print|cpio -pxdm /newstand
# umount /newstand
# mkdir /newroot
# mount /dev/vgroot/lvol3 /newroot
# cd /
# find . -xdev -depth -print|cpio -pxdm /newroot
# cd /newroot/etc
# vi fstab
==> edit appropriately
# lvlnboot -R
==> resync vg headers
# setboot -p 0/0/2/0.2.0
==> change prim boot path to new disk (c2t2d0)

Duplicating root disk using dd method
=====================================
Using c1t6d0 and creating vg01 for example.
# pvcreate -B /dev/rdsk/c1t6d0
# mkboot /dev/rdsk/c1t6d0
# mkboot -a "hpux" /dev/rdsk/c1t6d0
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/c1t6d0
# vgdisplay -v /dev/vg00 | more
==> For example ..lvol1=84MB (/stand)
lvol2=256MB (swap)
lvol3=140MB (/)
lvol4=500MB
lvol5=64MB
# lvcreate -L 84 -C y -r n -n lvol1 /dev/vg01
==> repeat for lvol2(256MB) & 3(140MB) (need to be contigous)
# lvcreate -L 500 -n lvol4 /dev/vg01
==> repeat for lvol5 (64MB)

Copy with dd (except swap - lvol2)
# dd if=/dev/vg00/rlvol1 of=/dev/vg01/rlvol1 bs=1024k
==> repeat for lvol3->5

Verify integrity (except swap)
# fsck -F hfs /dev/vg01/rlvol1
# fsck -F vxfs /dev/vg01/rlvol3
==> repeat for lvol4->5

Configure the BDRA
# lvlnboot -b lvol1 /dev/vg01
# lvlnboot -r lvol3 /dev/vg01
# lvlnboot -s lvol2 /dev/vg01
# lvlnboot -d lvol2 /dev/vg01

# mount /dev/vg01/lvol3 /tmp_mnt
# cd /tmp_mnt/etc
# vi fstab
==> change "vg00" to "vg01"
# cd /
# umount /tmp_mnt
Bill Hassell
Honored Contributor

Re: Create and sync alternate boot disk without mirror/ux

Note that when you use dd or any other method besides Nirror/UX to copy a disk, you are copying a live system with open files. This means that during bootup, you'll get lots of messages about running fsck to fix the mountpoints. A straight dd copy will ONLY work if you remove the old disk and put the copy into the same slot with the same SCSI address. Otherwise, you must use the above instructions. Also note that if the extra disk is significantly different (ie, part of a SAN) or cannot be used as a boot device (ie, a NAS disk), it will never work.


Bill Hassell, sysadmin
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

Thanks for the input .. I'll probably perform the 'Duplication' method .. Is there a difference between 'dd' and 'cpio' method?

I understand about the open files .. but this will be better than nothing.
Bill Hassell
Honored Contributor

Re: Create and sync alternate boot disk without mirror/ux

> Thanks for the input .. I'll probably perform the 'Duplication' method .. Is there a difference between 'dd' and 'cpio' method?

dd will be about 10 times faster. Whatever you choose, be sure to test the ability to boot from the 2nd disk. Otherwise, it's a waste of time.


Bill Hassell, sysadmin
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

LOL .. The server does not have Ignite, '/' is too small to install it and hasn't been rebooted in 560 days.
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

The only thing I see missing in the 'dd' procedure is the 'setboot -a' to the path of the disk. This would be required .. right?
Bill Hassell
Honored Contributor
Solution

Re: Create and sync alternate boot disk without mirror/ux

setboot -a is required if the current alternate bootpath does not match your extra disk's path.


Bill Hassell, sysadmin
James R. Ferguson
Acclaimed Contributor

Re: Create and sync alternate boot disk without mirror/ux

Hi Richard:

> LOL .. The server does not have Ignite, '/' is too small to install it and hasn't been rebooted in 560 days.

First, the installation of Ignite doesn't require a reboot. Second, Ingite is installed into '/opt' and uses some space in '/var'. Nothing is required for space in the '/' filesystem.

Since you don't have MirrorDisk/UX I agree with the idea of replicating a second disk from which you could potentially boot. *However*, an Ignite recovery tape would constitute additional insurance against a disasterous loss of your boot disk --- free to boot (...and no pun intended). Download and install Ignite from here:

http://www.docs.hp.com/en/IUX/download.html

...and make a recovery tape of vg00 thusly:

# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn

Regards!

...JRF...
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

James, Thanks .. I already tried installing Ignite and is failing space requirments on '/' The swagent log states it requires 100mb in '/' I thought this was weird as well ...
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

Looks like /opt/ignite was soft linked to a filesystem that no longer exists .. so it was defaulting to '/'. Attempting to install the depot today.

Thanks again for the help
James R. Ferguson
Acclaimed Contributor

Re: Create and sync alternate boot disk without mirror/ux

Hi Richard:

> Looks like /opt/ignite was soft linked to a filesystem that no longer exists .. so it was defaulting to '/'.

Ah, indeed. I verified this morning on one of my servers that only a few hundred bytes are required in the root directory for '/sbin/ch_hostname.d/ignite_ch_ip'. You can see this (after your installation) with:

# swlist -l file

Regards!

...JRF...
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

Again .. Thank you .. One more piece of help .. is the PAX patch required for Ignite .. Looks like there are 14 kernel pre-reqs for PAX .. Something I do not want to install without first having a backup .. Any way around the requirement?
James R. Ferguson
Acclaimed Contributor

Re: Create and sync alternate boot disk without mirror/ux

Hi Richard:

For 11.0 the 'pax' patch is PHCO_30150. You will need it for Ignite, but the patch has no pre-requistites or dependencies. You can verify this from the patch notes on the ITRC Patch database.

Regards!

...JRF...
Richard Ross
Regular Advisor

Re: Create and sync alternate boot disk without mirror/ux

James .. Thanks .. but I see that is does have 1 prereq .. which leads to .. well .. many ..

The patch mentions

Patch Dependencies:
s700: 11.00: PHKL_28202
s800: 11.00: PHKL_28202

which is not installed .. and that leads to another 13 or so PHKL patches. Looks like this server hasn't been patched since 1999.

Not a good situation