Operating System - HP-UX
1827801 Members
2244 Online
109969 Solutions
New Discussion

Cloning a system questions

 
SOLVED
Go to solution
dictum9
Super Advisor

Cloning a system questions


I have an Itenium machine I want to clone using LVM.

My thinking is, you have to:

* lvsplit on each logical volume,

* remove the hot swappable hard drive and insert it into the target machine in place of the root drive

* Reboot the target machine


I am missing any steps?

15 REPLIES 15
dictum9
Super Advisor

Re: Cloning a system questions

Clarification - when I say remove, I mean remove the hard drive that used to be the mirror HD. Not the primary.

Coolmar
Esteemed Contributor
Solution

Re: Cloning a system questions

Steven E. Protter
Exalted Contributor

Re: Cloning a system questions

Shalom,

Accept the fact that it problabe won't work, you have missed nothing.

There are hardware paths build into the boot process and unless these machines are identical this idea may not work.

The tool to clone systems with is called Ignite.

We've cloned many systems this way, even unlike systems with Ignite Golden Images.

Your procedure is unsupported and will more often than not fail.

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
dictum9
Super Advisor

Re: Cloning a system questions

I forgot to say that these are identical Itenium machines with identical drives. Both rx2600.

DCE
Honored Contributor

Re: Cloning a system questions



I would recommend using igite - I have sucessfully used it to clone from one system to another (albeit, they are similar systems). It works quite well, and is easy and quick.

Moving the drive probably will not work, unless the systems are identical, and even then, you might encounter some problems.

dictum9
Super Advisor

Re: Cloning a system questions


OK, I understand that when I do lvsplit, it will create lvol_back or such, and I still won't have vg00 when I boot off that mirrored disk on the new machine.

How about using "dd"?

DCE
Honored Contributor

Re: Cloning a system questions



If I remember correctly, dd has been used by others to make a periodic backup copy of the root disk. This usually has been discussed in threads for poeple who did not have mirror-ux installed

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1083682
John Guster
Trusted Contributor

Re: Cloning a system questions

It sounds like a backout plan needs be executed: mirrored root disks splited, kernel changed failed, system needs boot from the splited disk...
1. insert the drive to the new system
2. boot to lvm mood
3. vgchange -a n vg00; vgexport vg00;vgimport -v vg00 /dev/dsk/c?t?d?(the disk as H/W layout is identical on both machines)
4. vgdisplay -v vg00 (use vgreduce -f vg00)
5. update /etc/fstab (mount /usr) to make /dev/vg00/lvolb(or whatever vgdisplay -v vg00 shows, you need know which lvol is for which fs)
6. vgcfgback vg00
7. lvlnboot -v (certainly it has wrong info, use lvrmboot -r vg00;lvlnboot -b /dev/vg00/???; do -r -s -d as you wish; check with lvlnboot -v vg00)
8. setboot -p point to the disk
9. vi /stand/bootconf to point to the disk
10 shutdown -ry 0

It will work. good luck! Cheers
Jacques Carriere
Regular Advisor

Re: Cloning a system questions

The following command will work.
rx2600 ia64 Itanium box HPux 11.23

1 - break the mirror and move the disk to the new box and boot.

Then recreate the mirror on both servers.

2- OLR exist in 11.23 and maybe you should use it.
# pvchange -a N /dev/dsk/c.t.d.s2
# pvdisplay -v /dev/dsk/c.t.d.s2
pull the disk out and boot your other server from it. The follow the proceedure to mirror the disk.

#Once your 2nd server is properly mirrored, Now perform a
#pvchange -a N /dev/dsk/c.t.d.s2 to remove the original original disk to bring back to the 1st server.

Put it back in the 1st server
#vgcfgrestore -F -n /dev/vg00
#vgchange -a y /dev/dsk/c.t.d.
#vgsync /dev/vg00 (will re_mirror)

--------------------
Another way,

#make_tape_recovery
-a /dev/rmt/0m (use -a if not using default tape drive)
-x inc_entire=vg00 -i

Once the tape is complete, boot the 2nd workstation using this tape.

Jacques


dictum9
Super Advisor

Re: Cloning a system questions



OK, I cloned the system using Ignite.
I only did vg00.

there are other Volume Groups on the SAN that need to be copied over. What's the strategy for that? Do I use vgexport/vgimport?
James R. Ferguson
Acclaimed Contributor

Re: Cloning a system questions

Hi:

> There are other Volume Groups on the SAN that need to be copied over. What's the strategy for that? Do I use vgexport/vgimport?

If by 'copy' you mean disassociated from one server and attached to another, then, yes, you will need to use 'vgexport' and 'vgimport'.

Begin by 'vgexport'ing your volume group(s) from the old server. If you have alternate paths (pvlinks) I like to use the 'vgexport' syntax that collects the device paths in a file. Thus:

# vgexport -v -m /tmp/vg01_mapfile -f /tmp/vg01_paths /dev/vg01

Having connected the physical devices to the new server; reboot that server to create device files for the new disks; and edit the file containing the disk paths from the old server to present the correct device files for the 'vgimport':

# vgimport -v -m /tmp/vg01_mapfile -f /tmp/vg01_paths /dev/vg01

The rationale for importing using a path list is that you can balance the alternate paths on the new server so that alternate links can be established on different disk controllers in one step from the onset.

Regards!

...JRF...
isaac_loven
Frequent Advisor

Re: Cloning a system questions

Check out HP's new Tool: Dynamic Root disk, to clone vg00. I have used it to clone and mirror 6 pairs of disks for preparation of Vpars.

Search for DRD in software.hp.com
Isaac
skt_skt
Honored Contributor

Re: Cloning a system questions

Try this way:-
Pre-requisites : MirrorDisk/UX software installed in the server.
Sufficient space in a different group of disks for mirroring.

=> Create a spare lv ( temporary one ) to fill up the existing free space of the VG.
=> Add adequate spare disks to the VG.
=> lvextend -m 1 /dev/vgname/lvname
=> lvdisplay -v /dev/vgname/lvname |grep -I stale
To make sure there is no stale LVs.
=> Make sure that there is no data modification happening
In case of a db file system halt the database.
=> lvsplit /dev/vgname/lvname
This will create two lvs as /dev/vgname/lvname and /dev/vgname/lvnameb
Michael Steele_2
Honored Contributor

Re: Cloning a system questions

Pulling a spare boot disk with lvsplit is usually how we do upgrades between test and production servers for application releases and O/S upgrades. Doesn't always work though. That's why we have a test machine. But we always consider it before other alternatives.

It's also a disaster recovery procedure that is often included. Especially when restoring an ignite backup server. (* It has to go up before any others can restore from it. *)
Support Fatherhood - Stop Family Law
Steven E. Protter
Exalted Contributor

Re: Cloning a system questions

Shalom again,

I still like Ignite Golden Images.

Its more work.

Its less hardware dependent.

Its more reliable.

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