Wednesday, November 28, 2007

Live snapshot of a Solaris Zone

If you for any reason want to make a live snapshot of a running zone in Solaris the best way would probably be to use snapshot facilities of the underlying filesystem. But if that is not an option for any reason it can be done with CPIO. While there are no guaranties for the state of the data that are sequentially copied, it might be of some use for example upgrade tests. I have used this to test upgrade of a few local zones just to see that the process works.

I've seen other methods of doing this on the net, but they did not work for me, they did not include directories such as /proc which are mounted with a pseudo filesystem when the zone is running. This method also excludes files of type socket, since cpio is unable to handle them, they should be recreated by their applications

# find <zoneroot> ! -fstype ufs -prune -o -fstype ufs ! -type s | cpio -ocm -O /var/tmp/<zone>.cpio

If you plan on using the unarchived image for upgrade tests, make sure the mnttab is empty, if its size is !0 live upgrade will fail.

I have used this on zones located on VxFS (god forbid, not my choice, nothing against VxFS but one should not put the zoneroot on anything other that UFS for now if upgrading is of interest).

Sunday, November 25, 2007

Extreme server makeover

I've spent some time recently upgrading my old workhorse a Sun Ultra 2, the last real Sun machine made in my opinion ;) It might not be as fast as the new fancy servers but i really don't know what i would do with all the CPU-cycles for things like SSH, Apache and mail. And after all these years we have grown emotionally attached. Now things should keep running smooth well into the next decade. Getting ZFS, DTrace and Zones on my outside server is also nice.

2x USI @ 200MHz
512MB of primary memory
Solaris 9

2x USII @ 400MHz
1.5GB of primary memory
Solaris 10U4