27.12.2012 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sbin/vgscan<br />

# wait <strong>for</strong> vgscan<br />

$UDEVSETTLE<br />

/sbin/vgchange -a y $VG_NAME<br />

mount_cloned_image_lvm $CLONE_LINK<br />

else<br />

link_one $target_linux_id $DASD_ROOT $CLONE_LINK W<br />

set_online $CLONE_LINK<br />

mount_cloned_image $CLONE_LINK<br />

fi<br />

modify_cloned_image<br />

umount_cloned_image<br />

if [ -n "$VG_NAME" ]; then<br />

/sbin/vgchange -a n $VG_NAME<br />

unlink_disks $DASD<br />

else<br />

set_offline $CLONE_LINK<br />

unlink_one $CLONE_LINK<br />

fi<br />

# Autolog the clone unless AUTOLOG has been set to "n"<br />

[ "$AUTOLOG" = "y" ] && autolog<br />

echo "Successfully cloned $source_linux_id to $target_linux_id"<br />

Appendix B. Source code 263

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!