Skip to content

ZFS root file system

April 18, 2006

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.

: pod5.eu FSS 1 $; df -h / Filesystem             size   used  avail capacity  Mounted on tank/rootfs             19G   2.9G    16G    16%    / : pod5.eu FSS 2 $; 

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.


# zfs list NAME                   USED  AVAIL  REFER  MOUNTPOINT tank                  2.90G  15.8G     9K  /tank tank/rootfs           2.90G  15.8G  2.89G  legacy tank/rootfs@works     2.38M      –  2.77G  – tank/rootfs@daytwo    1.71M      –  2.88G  – tank/rootfs@daythree  1.89M      –  2.88G  – tank/rootfs@dayfour    576K      –  2.89G  – tank/rootfs2            51K  15.8G  2.88G  legacy tank/scratch          98.5K  15.8G  98.5K  /tank/scratch tank/scratch@x            0      –  98.5K  – # 

Whilst many the features that get released by a ZFS root file system are easy to predict the beauty of it in action is something else.


Tags: topic:[opensolaris] topic:[zfs]

Advertisements

From → Solaris

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: