Clone 1 Hard disk fromIBM Intellipoint server with AIX 5.x

Hello to all,
Im having a new task in a new world (AIX - IBM Servers)

I have an IBM Server (Type - 9111-285 very old one) with one Hard disk (73 GB 10 K) with AIX 5.x, and I need to clone the existing disk to another with the same specifications.

Could you please give me some advice in order to do that ?
Does exist some software to do that ?
Some hardware device that I could use ?

Any documentation, procedures, steps ?

Thanks in advance ?

Really Apreciated.

Trev

If your server has onlyy one disk it must have only one VG - "rootvg". You should see both disks as (perhaps) "hdisk0" and "hdisk1" when you enter:

lspv

If you don't see the second disk: run cfgmgr and if you still don't see it you have some hardware problem you need to fix because the system doesn't know about your disk.

Once you see the second disk you run:

extendvg rootvg hdisk1

to add the second disk to the rootvg and then run

mirrorvg rootvg hdisk1

which will create a mirror image of the first disk to the second. Update the boot image of the second disk by:

bosboot -ad hdisk1

and include the second disk into the bootlist of the hardware with:

bootlist -m normal hdisk0 hdisk1

I hope this helps.

bakunin

2 Likes

Ill test your recomendations this Monday, Ill tell you the result. Thanks !!!

Worked perfectly !!! Thank you very much !!!!

After I cloned the hdisk0 to hdisk1, I tried to clone from hdisk1 to a new disk (hdisk2), doing the same procedure, but replacing the hdiskX, and receive the message

Open failure on hdisk0
Seek failure on hdisk2

What happened here ?

Thanks again

Good!

Are you meaning you (pyhsically) removed hdisk0, put some other disk in and repeated? Well this is destined to fail:

With AIX you have all disks controlled by the LVM: you can't just rip out a disk and expect it to work. By "controlled by LVM" i mean: on the disk itself is a block (the "VGDA", volume group descriptor area) which states of which disks ("PV"s in LVM speak) the VG is comprised of. A copy of this VGDA si on each disk and if you rip one out the LVM recognizes that there is one missing (and which one that is).

If you wanted to clone the data (to another system or for archiving purposes) you won't get anywhere with the mirrorvg command, you need a different procedure: mksysb or savevg . (Notice that there is a splitvg command now, but only in recent AIX versions, not in AIX 5.x.)

You can store the contents of a single VG to a file or tape using the savevg command. In fact this is a customized backup -format backup of the VGs contents plus some additional information. From such an image you can use the restvg command to restore the VG onto new media (even on a new system). The disks used don't need to be exactly the same as in the original, they just have to provide some minimum requirements (if the LVs where mirrored you will need two disks, etc.).

Instead of a savevg you can also use a mksysb command. Basically this is a savevg rootvg (so everything said above applies) but with some additional information and a boot block. It is possible to boot a newly created system with such a mksysb -image and restore the contents of the rootvg while doing so. Since the rootvg contains everything relevant for the system you have a method of cloning/restoring a system completely from such an image.

Notice that the boot image is NOT added if you save the mksysb image to a file. You can still boot from a boot medium and then use the file to restore the system but you boot directly from the image only if it is on a DVD, tape or similar.

I hope this helps.

bakunin

If you are cloning to a physical server in the same network, it is worth unplugging the network cable whilst you do it else the restored server will immediately cause IP conflicts. Correct the IP definitions before reconnecting the cable.

If you are cloning to an LPAR, de-configure the network card then after the restore completes add it back in (probably need a boot) and set up the network definitions then.

It causes a panic when strange things start happening in production whilst you are recovering your clone.

I hope that this helps,
Robin

Thank you for your answers. (Ill need to study this commands :D)

What Ive done works perfect as you suggested.

Server 1 (IBM aix 5.x with special application)

Server 2 (Same IBM model, with 1 new disk same as used by server 1)

Server 3 (Same IBM model, with 1 new disk, same as used by server 1)

Did the procedure, put the new disk in server 1, run the commands, take out the new disk, put it on server 2 and everything ok. Server 2 is a clone from server 1. Of course I need to change some network parameters to work (Ip, etc). Tested the application and works fine.

Tried to do the same procedure with server 3 based on the new disk cloned (server 2) and receive the errors mentioned.

Maybe it will work if I try to do the same procedure but instead of use the cloned disk, use the original (server 1) and the new from server 3 ?
Thanks again.

OK, now i got it: you were trying to clone a server. This is far easier done (and much more reliably so) by using the following information:

Investigate the mksysb command. It creates a backup image of a rootvg , but enriched by boot code and other information necessary to isntall a system from this image. You need a tape drive or disk space outisde of your rootvg to do it.

Result of the mksysb is a system image, basically a file. If it is written to some special devices (DVD, tape) it is bootable and you can use it on another system (doesn't even have to be identical, just sufficiently similar) to boot this and install it to a copy of the system from which you took it.

If you use any other device as a target (including a disk file) this will not be bootable by itself so you will need a boot media to boot the system and then you are able to still use the file as a source of installation arriving at the sasme result as above.

I hope this helps.

bakunin