Monday, July 28, 2008
ZFS boot, Live Upgrade, and bfu
ZFS boot is now available in Solaris Express for both x86 and SPARC. (It's been available for a while for x86 (OpenSolaris uses a ZFS boot, and the package manager (IPS) makes good use of it), but only recently became available for SPARC.) Having gotten used to it on my laptop (running OpenSolaris), I finally converted my home machines to use a ZFS root file system.
Woohoo! Life is much simpler now! Well, okay, certain tasks that I perform frequently have become much simpler and take far less time. Specifically, when I've done a build of Solaris and want to BFU my system (i.e., upgrade my system to the build that has just finished), the process takes much less time than it used to.
As background, I use Live Upgrade (LU) on my systems at home. I keep one boot environment (BE) as a "pristine" copy of a recent Solaris Express release so I'll always have something to boot from. I have another BE that I use for BFU purposes so that I have an environment I can trash.
So here are the steps I used to perform to BFU my system:
In the above, the BE creation step is the expensive one. I don't think I've ever timed it, but it's on the order of one hour, which pushes the whole process to an hour and a half or so.
With a ZFS root file system and a version of Live Upgrade that makes use of the features ZFS, life becomes simpler. What LU does with ZFS is use snapshots and clones to copy an existing BE. The differences are then thus:
So a process that took about an hour and a half now takes less than ten minutes. Woohoo!
Woohoo! Life is much simpler now! Well, okay, certain tasks that I perform frequently have become much simpler and take far less time. Specifically, when I've done a build of Solaris and want to BFU my system (i.e., upgrade my system to the build that has just finished), the process takes much less time than it used to.
As background, I use Live Upgrade (LU) on my systems at home. I keep one boot environment (BE) as a "pristine" copy of a recent Solaris Express release so I'll always have something to boot from. I have another BE that I use for BFU purposes so that I have an environment I can trash.
So here are the steps I used to perform to BFU my system:
- Reboot onto the pristine BE, if I'm not already.
- Destroy and recreate the BFU BE as a copy of the pristine version. (This is mostly paranoia, so that I avoid any cross-pollination between two different builds I've done. This is probably unnecessary, but I can't avoid the paranoia.)
- BFU the newly-created BE.
- Reboot onto the BFU BE.
In the above, the BE creation step is the expensive one. I don't think I've ever timed it, but it's on the order of one hour, which pushes the whole process to an hour and a half or so.
With a ZFS root file system and a version of Live Upgrade that makes use of the features ZFS, life becomes simpler. What LU does with ZFS is use snapshots and clones to copy an existing BE. The differences are then thus:
- I don't need to reboot onto the pristine BE. I only needed the reboot to get off the BE that I was about to destroy. (Although note that I could avoid the reboot by simply having three or more BE's.) Because BE's are created as clones, I'm not limited to using existing disk partitions. I can create as many as I want.
- I don't need to destroy the existing BFU BE. See the previous item.
- Creating a new BFU BE takes about three minutes, not an hour. (There's additional work done by LU, so it's not quite as quick as simply cloning existing ZFS file systems, but it's significantly faster.)
- There are no significant differences in the BFU step, and I still have to reboot onto the new BE.
So a process that took about an hour and a half now takes less than ten minutes. Woohoo!