Subject: Using "dd" to Clone Partitions on a VIO Server
Audience: All
Date: April 12, 2006
A recent post on IBM's Linux on Power Forum shosw how to use "dd" to clone a pLinux partition on a Virtual I/O Server. I've tried
it with both AIX and Linux, and it takes about 10 minutes to clone
a new server**. Although I recommend NIM for cloning, there have
been times where this has come in handy. This is not supported
by IBM, so use at your own risk. (** AIX 5.3 ML3, SUSE 9, VIO 1.2.1, p520 FW=IBM,SF235_160, LV size = 10GB)
http://oss.gonicus.de/openpower/index.php/Cloning_partition_on_IBM_VIO_server
Here's the steps I used for cloning AIX.
- Prepare the AIX source partition
- Turn off TCP/IP ("smit chinet" or rmtcpip)
- Clear log files (errclear, rm /smit.*, etc)
- Shutdown the partition
- Create a profile for the clone partition on the HMC
- Clone the partition on the VIO server
- Read HMC profile changes
cfgdev (padmin id)
- Get the name and size of the source LV
lsvg -lv vgname
- Create clone LV with the same size as the source
mklv -lv vdiskclone datavg 10G
- Map the clone LV to the clone partition
lsmap -all # locate the vhost name of the virtual SCSI on the clone partition
mkvdev -vdev vdiskclone -vadapter vhost
- Run the "dd" command from the root id on the VIO sever
oem_setup_env
ls -al /dev/* # locate lv name of source partition, assume it's vdisk
time dd if=/dev/rvdisk of=/dev/rvdiskclone bs=8M
Be sure to use the raw device starting with "r" /dev/rvdisk
- Boot the clone partition
- Configure TCP/IP, hostname
- Reconfigure RSCT daemons (so DLPAR will work)
/usr/sbin/rsct/install/bin/recfgct
Bruce Spencer,
baspence@us.ibm.com
April 12, 2006