Oracle Blog

Chris Gerhard's Weblog

ZFS root file system

As Tabriz
has pointed out you can now do “boot and switch” to get
yourself a ZFS root file system so to give this a bit of a work out
I flipped out build system to use it. It has a compressed root file
system now.

The instructions Tabriz gives are slightly different if you are using
live upgrade to keep those old UFS boot environments in sync. For a
start if you use a build 37 BE that is not currently the one you are
booted off for the source of your new zfs root file system then you
don't have to do all the steps creating mount points and /devices.

So steps 6, 7 and 9 distil to:

lumount a build 37 archive on /a:

lumount
-n b37 /a

Copy that archive into /zfsroot;

# cd /a# find . -xdev
-depth -print | cpio -pvdm /zfsroot

You
do have to take greater care when updating the boot archive as that
may not live on the currently booted boot environment but apart from
that it was a breeze. The system has been up for almost a week and I
have a clone of a snapshot that is also bootable just in case I mess
up the original. Doing that was as simple as taking the clone and
editing /etc/vfstab and /etc/system in it to reflect it's new name.
Then building it's boot archive.