Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clone system with alt_disk_copy

Status
Not open for further replies.

cipaera

Technical User
May 14, 2007
24
NL
Hello everyone!

I would like to clone an AIX 5.3 system (p510) to a target
systemB, which is physc. identical to the source systemA (of
course except e.g. serial number) using alt_disk_copy-disks.

After alt_disk_copy -d "hdisk3 hdisk4"
the source systemA looks like this:
hdisk0 rootvg active
hdisk1 rootvg active
hdisk3 altinst_rootvg active
hdisk4 altinst_rootvg active

My questions are:
- How can I use hdisk3 & hdisk4 as active rootvg on the
target systemB?

- Does the following procedure look right:
Source systemA (AIX 5.3, hdisk0(A) hdisk1(A) mirrored, hdisk3 hdisk4)
1. unmount all mount points (/dev/alt_hd4, /dev/alt_hd1,
/dev/alt_hd10opt, /dev/alt_hd3, /dev/alt_hd2,
/dev/alt_hd9var, /dev/alt_fwdump
2. varyoffvg altinst_rootvg(deactivate vg)
3. exportvg altinst_rootvg (exports vg's definition from a
set of pv)
4. rmdev -dl hdisk3 & hdisk4
-> disconnect the disk, move over to target systemB
Target systemB (AIX 5.3, hdisk0(B) hdisk1(B) mirrored)
1. plug in the 2 disks & cfgmgr (assuming hdisk3 & hdisk4)
2. importvg -y altinst_rootvg hdisk3 hdisk4
3. mount all the mountpoints (look at point 1. on source
systemA)
4. bootlist -m normal hdisk3 hdisk0
5. reboot

- Could anyone correct that and or add steps I forgot?

Thanks in advance.

cipaera
 
You need to use "-O" option with alt_disk_copy to do this. According to the man page of alt_disk_copy

"Performs a device reset on the target altinst_rootvg. This causes the alternate disk install to not retain any user-defined device configurations. This flag is useful if the target disk or disks become the rootvg of a different system (such as in the case of logical partitioning or system disk swap)"
 
Hi HarryNair...

thanks for the info.
I'll be able to test it first on monday... so I have to wait until then.

Meanwhile... do you know, whether there is a way to easily unplug/deactivate the "altdisks"?
(a way, which doesn'trequire to unmount all the mount points of altdisk_rootvg one by one/
unmount /dev/alt_*)

Best regards
 
Here we go.

1. Unmount all the filesystems which are in altinst_rootvg
2. Varyoff altinst_rootvg

DO NOT EXPORT THE VOLUME GROUP altinst_rootvg

3. Remove the altinst_rootvg volume group definitons from ODM database.

alt_rootvg_op -X

If the target volume group is varied off at the time this operation is executed, only the ODM definitions associated with the target volume group are removed. The actual volume group data is not removed.

4 . Remove the disk definitions

rmdev -dl hdisk2
rmdev -dl hdisk3

5. Correct you bootlist on the existing system

Once you have moved the disks to target system

6. Restart the server . Go to SMS - Select the new disk as the boot device and start the system
 
Hi HarryNair,

thanks for the procedure.

After I plugged the altinst_rootvg-disks into the target system, I got a
problem configuring them. :(

Here is what I've done (after I detached the disks from the source system):
1. plugged the disks into the target (running) system
2. # cfgmgr (ok -> hdisk2 & hdisk3)
3. # importvg -n -y altinst_rootvg hdisk2 (result: done but conflicts with
the mountpoints; eg. /)
4. # bootlist -m normal hdisk2 hdisk0
5. # shutdown -Fr (the boot process stopped whith following messages:
+ echo rc.boot: executing "mount /"
+ 1>> /tmp/boot_log
+ mount -f /
+ 2>& 1
exec(/usr/sbin/mount,-f,/){77880,110716}
+ tee -a /../tmp/boot_log
exec(/usr/bin/tee,-a,/../tmp/boot_log){90160,69668}
exec(/sbin/helpers/jfs2/mount,-V,jfs2,-o,rw,/dev/hd4,/){82016,77880}
mount: /dev/hd4 on /: No such file or directory
+ print 1
+ 1> /../tmp/rc
+ read rc
+ 0< /../tmp/rc
+ [ 1 -ne 0 ]
+ loopled 0x557 ROOT MNT FAILED
exec(/usr/lib/methods/showled,0x557,ROOT MNT FAILED){90162,69668}
showled
)

My questions now are:
- after I plugged the disks into the target system, how should I proceed
to configure them as rootvg disks?
- should I (after I attached the disks) directly reboot the system and go to
the sms menu to let the system start from the new disk (hdisk2)?

Best regards
 
Please do not do any export or import commands on altinst_rootvg

You need to use alt_rootvg_op command instead

If you want to import the volume group on the second sysytem
use

alt_rootvg_op -W -d hdisk2

--
OR
---

Select the boot device from SMS menu and just boot the system from hdisk2
 
Hello HarryNair,

sorry for my very late reaction.
And thanks for your help. It does work.

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top