Getting a copy of a LDOM before patching

Gene Beaird <[email protected]> Mon, 12 Nov 2012 11:59:49 -0600
Newsgroups gmane.os.solaris.managers
Message-ID <[email protected]>
Greetings managers,

I'm trying to reach a solution for getting a backup of a LDOM before I install
a CPU cluster.  The control domain is running on Solaris 10.  The LDOMS
running on it are all Solaris 10.  The control domain is running Logical
Domain Manager v.2.0.  The filesystem that the LDOMs are built on is zfs, but
it looks like they did not create separate zfs filesystems for each LDOM, but
instead there are individual virtual disk image files for each LDOM residing
on the zfs filesystem:

Filesystem             size   used  avail capacity  Mounted on
pool2/ldoms/disks      900G   600G   300G    75%    /pool2/ldoms/disks
# ls -al
total 1225518650
drwx------   2 root     root           6 Feb  4  2011 .
drwxr-xr-x   3 root     root           3 Jan 17  2011 ..
-rw------T   1 root     root     156766306304 Nov 12 11:59 ldg0_1.vdisk
-rw------T   1 root     root     156766306304 Nov 12 11:59 ldg1_1.vdisk
-rw------T   1 root     root     156766306304 Nov 12 11:59 ldg2_1.vdisk
-rw------T   1 root     root     156766306304 Nov 12 11:59 ldg3_1.vdisk

I want to get a pre-patch copy of ldb0_1vdisk so I'm protected in case
something goes wrong with the patching.  I can't zfs snapshot just that vdisk
image, I'd have to snapshot the entire /pool2/ldoms/disks filesystem, which
would be nice, but 1. I don't have the disk space, and 2. the other three
running LDOMs would probably be damaged if we did a rollback several hours
later.  Since this is on Solaris 10, I don't have all the cool new vmadm
commands.  What can I do to get this backed up properly so we can quickly
restore if things go badly?

Can I simply shut down the LDOM and make a copy of the vdisk image using cp?
If so, do I need to unbind the ldom first?  What other precautions do I need
to make, and how would the recovery go?  Thank you.

Regards,

Gene Beaird,
Pearland, Texas