The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM
The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM
The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Attention: If you do not have FLASHCOPY support, you can use the Linux dasdfmt and dd<br />
commands. You must first enable the 1<strong>10</strong>0-1<strong>10</strong>1 and 2<strong>10</strong>0-2<strong>10</strong>1 disks with the chccwdev -e<br />
command, then determine the newly created device nodes with the lsdasd command:<br />
# chccwdev -e 1<strong>10</strong>0-1<strong>10</strong>1,2<strong>10</strong>0-2<strong>10</strong>1<br />
Setting device 0.0.1<strong>10</strong>0 online<br />
Done<br />
...<br />
# lsdasd<br />
...<br />
0.0.1<strong>10</strong>0 active dasdf 94:20 ECKD 4096 2347MB 600840<br />
0.0.1<strong>10</strong>1 active dasdg 94:24 ECKD 4096 2347MB 600840<br />
0.0.2<strong>10</strong>0 active dasdh 94:28 ECKD 4096 2347MB 600840<br />
0.0.2<strong>10</strong>1 active dasdi 94:32 ECKD 4096 2347MB 600840<br />
In this example the source minidisks (1<strong>10</strong>0-1<strong>10</strong>1) are named /dev/dasdf and /dev/dasdg,<br />
while the target minidisks (2<strong>10</strong>0-2<strong>10</strong>1) are named /dev/dasdh and /dev/dasdi. Format the<br />
target devices with the dasdfmt command using a 4096 byte (4KB) block size:<br />
# dasdfmt -b 4096 -y -f /dev/dasdh<br />
Finished <strong>for</strong>matting the device.<br />
Rereading the partition table... ok<br />
# dasdfmt -b 4096 -y -f /dev/dasdi<br />
...<br />
Now that the devices have been <strong>for</strong>matted, you can copy the volumes of the golden image<br />
with the dd command, again using a block size of 4K (4096) bytes:<br />
# dd if=/dev/dasdf of=/dev/dasdh bs=4096<br />
...<br />
# dd if=/dev/dasdg of=/dev/dasdi bs=4096<br />
...<br />
<strong>The</strong>n bring the devices offline so the new file systems will be recognized when brought<br />
back online:<br />
# chccwdev -d 1<strong>10</strong>0-1<strong>10</strong>1,2<strong>10</strong>0-2<strong>10</strong>1<br />
...<br />
Detach the source disks<br />
Now that you no longer need the source disks linked, detach them:<br />
# vmcp det 1<strong>10</strong>0-1<strong>10</strong>1<br />
1<strong>10</strong>0-1<strong>10</strong>1 DETACHED<br />
Activate the target disk with the root file system<br />
Activate the minidisk at real device address 2<strong>10</strong>0 which has the root file system in the first<br />
partition:<br />
# chccwdev -e 2<strong>10</strong>0<br />
Setting device 0.0.2<strong>10</strong>0 online<br />
Done<br />
Mount the newly copied root file system<br />
► Use the lsdasd command to show the minidisks that are accessible. <strong>The</strong> target root file<br />
system is on the disk accessed as virtual device address 2<strong>10</strong>0:<br />
# lsdasd<br />
Bus-ID Status Name Device Type BlkSz Size Blocks<br />
==============================================================================<br />
Chapter 9. Configuring RHEL 6 <strong>for</strong> cloning 149