Operating System - HP-UX
1834294 Members
2528 Online
110066 Solutions
New Discussion

Cloned BootDisk, Booted off Clone But....

 
SOLVED
Go to solution
Alzhy
Honored Contributor

Cloned BootDisk, Booted off Clone But....

I cloned my bootdisk to another disk (same Geometry/Kind) on a different controller. I boot off of the cloned Disk by specifying the PATH.. Booted Fine but LVM still points to the original BootDisk.. System is fine however.

How could I fix this so when I am booted off the clone, it really uses this cloned disk and LVM points to this clone?

Or am I getting ambitious here? I know I can use MirrorDisk/UX but coming from a different flavour of UNIX... thanks!

I am actually searching for even faster ways to setup vPars and nPars boot systems...

Hakuna Matata.
17 REPLIES 17
James R. Ferguson
Acclaimed Contributor

Re: Cloned BootDisk, Booted off Clone But....

Hi Nelson:

You can use 'setboot' to set your primary and secondary boot paths. For instance:

# setboot -p 10/0.6.0 -b on
# setboot -a 10/8.0.2 -b on

Should you wish to determine the device from which you booted, do:

# echo boot_string/S|adb /stand/vmunix /dev/mem

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Cloned BootDisk, Booted off Clone But....

lvlnboot -v

This output must be correct prior to running a boot test. Its good to run the boot disk.

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
Alzhy
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

I indeed am booted off the Clone Disk (c4t0d0). lvlnboot shows the config still points to the original Bootisk.. c0t6d0.

So how could I fix this so when booted off this disk path (the clone) - LVM (lvlnboot) is pointing to this disk?



root@fhd002a0 # echo boot_string/S|adb /stand/vmunix /dev/mem
boot_string:
boot_string: disk(0/0/2/0/0/4/0.0.0.0.0.0.0;0)/stand/vmunix
root@fhd002a0 # lvlnboot -v vg00
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (0/0/0/2/0.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0


Hakuna Matata.
James R. Ferguson
Acclaimed Contributor

Re: Cloned BootDisk, Booted off Clone But....

Hi (again) Nelson:

As I noted in my first post, you must use 'setboot' to fix the primary (and optionally the alternate) boot disk path. The values specified are written into stable storage. You can use 'setboot' without further arguments or options to see your current settings.

Regards!

...JRF...
Alzhy
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

James,

Okay I've used "setboot -p" to this clone OS disk's path. I am now rebooting -- When I boot up, will my lvlnboot/vgdisplay output now show that vg00 now points to this clone disk/path ?that whilst booted of this BOOTPATH (or Clone Disk).

What I am attempting to do really is to clone an existing bootdisk (say at c0t6d0), copy it to say c4t0d0. And when I am booted off c4t0d0, vg00 would show c4t0d0 and not c6t0d0 in the configs... I'd like to clone my "Golden" bootdisk to other cNtNdN's so I could boot off of them indepenetly and their system volume groups point to thoses disks...



Hakuna Matata.
Alzhy
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

BTW, what block size are you using using dd to "clone" disks in HPUX environments? Without a blocksize directive, cloning is very slow and the buses become IO bound.. I found a block size of 64K as the most optimal -- am able to clone a 36 GB disk in just about 30 minutes..

dd if=/dev/rdsk/c0t6d0 of=/dev/rdsk/c0t4d0 bs=65536

Thanks!
Hakuna Matata.
Alzhy
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Still the same... setboot just sets the default boot path right? my lvlnboot still point to the path of the bootdisk where I cloned from... Any fix to this?

Hakuna Matata.
Tim Adamson_1
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Use lvrmboot to remove the boot, root, swap, and dump details and then use lvlnboot to set the details back again.


Tim.

Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Tim Adamson_1
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Use lvrmboot to remove the boot, root, swap, and dump details and then use lvlnboot to set the details back again.


Tim.

Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Jayan_2
Advisor

Re: Cloned BootDisk, Booted off Clone But....

hi ,

If u have cloned using mirror disk ux
u must do lvllnboot -b / -d /-s /-r atlast
lvlnboot -R (to update the auto file ). followig this use mkboot and mkboot -a with autofile string having hpux -lq

regards
Jayan
Work whole souled so as to god
Ravi_8
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Hi,

power on the m/c, interrupt the boot process.

specify the cloned disk as boot, get into single user mode.
#mount -a
#vgscan -a -v
#shutdown -r now

may solve this problem
never give up
Massimo Bianchi
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

or try to use the lvrmboot and re-create them all...

Massimo

Bernhard Mueller
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Hi,

if you simply dd'ed the disk in order to clone, then this disk is of use only if you put it at the HW path of your original boot disk. Because you already seen that all the LVM data on it reflect your *original* disk, HW-paths, vg name, disk devices, same for /etc/fstab.

So you have the choice to physically swap the disks or, instead of using dd, you setup a backup root vg with temporarily mounted filesystems to which you copy all your root vg filesystems (and change /etc/fstab on the copy to use backup root vg filesystems). From such a disk you could boot without swapping the disks.

Regards,
Bernhard

Alzhy
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Guys and (gals?), thanks for your inputs so far.

Just to make it clear:

- The clone I am not booting from the source's orginal HW Path
- I am indeed able to boot and indeed am able to verify that I am indeed booted off said disk on its path BUT lvm/lvlnboot still points to the source disk.

What I am after are the actual gyrations (if possible) to "totally" BE on that disk - ie. lvlnboot and vgdisplay showing that very disk.

On Solaris, I go through mounting that disk from miniRoot (boot net or cdrom), doing a devfsadm to correct the device trees and finally editing my Disksuite or /etc/vfstab configuration to point to the correct path -- after which my "Clone" boot's just right.

I am in search for the exact same process to find a way or rapidly replicating a server's bootdisk in nPar/vPar environments. DD the "master disk" to a different boot disk, plug that disk in to the target vPar/nPar/server and boot off from it... I know Ignite-UX is the right way to do this (in fact I must say it is better than Solaris Jumpstart/FLAR) but I am just curious if such equivalent method exist -- instead of the Ignite Approach...


Thanks, Gracias, Ta, Arigato, Shi-shi, Salamat.
Hakuna Matata.
Kent Ostby
Honored Contributor
Solution

Re: Cloned BootDisk, Booted off Clone But....

Nelson --

YOU MUST ONLY DO THIS WHILE BOOTED OFF OF YOUR CLONED DISK. IF YOU DO IT OFF OF YOUR "USUAL" DISK, YOU'RE SYSTEM WILL BECOME UNBOOTABLE. :-)

I believe that you need to re-import the disk and change the lvlnboot information. The reason for this is that you want the lvmtab on the "cloned" disk to point at /dev/dsk/c0t4d0 but it points at /dev/dsk/c0t6d0.

Here is what you what do:

boot into LVM maintanence mode from your cloned disk:

From hpux prompt type:

hpux -lm

Then vgexport the root volume group:

vgexport /dev/vg00

Then recreate the vg00 group and node for your system:

mkdir /dev/vg00
mknod group c 64 0x000000

Then vgimport your disk:

vgimport /dev/vg00 /dev/dsk/c4t0d0

Next, take care of the lvnboot information:

vgchange -a y /dev/vg00
lvrmboot -r /dev/vg00
lvlnboot -d /dev/vg00/lvol2
lvlnboot -s /dev/vg00/lvol2
lvlnboot -r /dev/vg00/lvol3
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
sync
sync
reboot

This should take care of it.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Alzhy
Honored Contributor

Re: Cloned BootDisk, Booted off Clone But....

Thank you very much Kent!

Precisely the steps I was looking for...
Hakuna Matata.
Scott Tinsley
Advisor

Re: Cloned BootDisk, Booted off Clone But....

Here is what I did to use a clone that was created by making a BCV copy of a boot disk on an EMC Symmetrix, restoring the BCV copy to a new standard device and then using the new standard device to boot a different nPar on a RP8400. Not sure if it is all "necessary" but it works for me. Disregard the ALT volume group related commands. We have a local disk for fail safe. I was just getting it back.

See attachment