Friday fun with BFU and ZFS root
So, I just did a fun experiment with my new zfs root pool. I created that pool yesterday and decided it would be fun to bfu it again today, but to be able to revert back should anything go wrong.I took a snapshot
made a writable version:zfs snapshot rootpool/rootfs@prebfu
and then bfu'd that:zfs clone rootpool/rootfs@prebfu rootpool/rootfsbfu
/ws/onnv-gate/public/bin/bfu nightly-nd /rootpool/rootfsbfu
That seemed to go well, no conflicts overnight. Exited the bfu shell.
Now to make the root entry in vfstab of that new root file system correct, I edited the root file system line in
to look like:/root/rootfsbfu/etc/vfstab
and then added a new entry torootpool/rootfsbfu - / zfs - no -
as well:/rootpool/boot/grub/menu.lst
Which was a duplicate of the ZFS entry, excepting the title was different and the extra bootfs line was added.title Solaris ZFS-bfu bootfs rootpool/rootfsbfu root (hd0,1,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive
Then I took a deep breath and rebooted. I chose the un-bfu'd root from the GRUB menu first. It still worked. Good deal, I had a recovery path.
Rebooted again and selected the new bfu'd root. Got the expected Solaris banner, but it seemed to hang. :-( Power cycled and tried again, this time pausing to edit the boot entry to include
To make a long story short, after some thinking and several other reboots, Lori realizes that I've forgotten one step. Booted off the old root, I mark the new root as a legacy mountpoint with
For good measure, we also rebuild the boot archive on that file systemzfs set mountpoint=legacy rootpool/rootfsbfu
One last reboot, select the bfu'd root, and voila, I'm up and running. Too cool!bootadm update-archive -R /rootpool/rootfsbfu
It seems like a nice next step would be to maybe make a wrapper around bfu or perhaps to have bfu itself, if, say, -Z is set, do this procedure automatically, and make the bfu'd root the default choice in
( Mar 30 2007, 02:42:37 PM MDT ) Permalink Comments [1]
Post a Comment:
Comments are closed for this entry.



Posted by Darren Moffat on April 02, 2007 at 02:53 AM MDT #