Automating installs of ZFS mount-root
To make my life easier while testing ZFS on root, I wrote a simple script to automate the installation, as documented on Tabriz's blog, which you should read before going any further...
As with anything new like this, I'm going to apply a strong disclaimer : this works for me on the machines I've tried it on, but YMMV -- make a backup of data you care about on your system, cross your fingers before running it and think happy thoughts!
For the script to work, you need to run it as root on an x86/x64 machine with a fresh install or upgrade of Solaris Express from nv_37 upwards (not just BFUd to that level, but optionally with any BFUs after that date). Give the script arguments of disks or slices with enough space to install your root filesystem, and those disks or slices must not be mounted when you run the script.
Whew. With all those disclaimers disclaimed, you can get the script here - all comments welcome!
Updated 12th May 2006: Fixed a problem with the script not understanding comment lines in /etc/vfstab. Works fine now.
Updated 16th May 2006: Carl suggested a few things in the comments, so I've updated the usage message, and added an exit 0 to be polite. (Thanks Carl!)
Updated 22nd May 2006: Clarifications on Carl's point mean I've now got the exit 0 in the right place :-)
Posted by Carl Brewer on May 16, 2006 at 09:13 AM IST #
Posted by Tim Foster on May 16, 2006 at 09:32 AM IST #
Posted by Carl Brewer on May 17, 2006 at 09:28 AM IST #
hey Carl,
My answer is an emphatic "yes" to all of your (excellent) questions - zfsroot is really at demo stage right now; it's not yet fully integrated and there's work going on to address all of your concerns, particularly with grub booting - zfs will be a 1st class citizen during boot, as much as ufs was for root filesystems. It'll be a while before that support's delivered. However, I know that Tabriz, Lori and Bill are working hard on this, though I don't yet know a timeframe (being merely an innocent bystander (or enthusiastic cheerleader) in all this: I'm a ZFS tester, as opposed to a core developer - but I'll get there one day!)
I'll have a look at the problems you're seeing with the script - I too have had to svcadm clear boot-archive to get beyond a particular stage of boot (which I had thought was a problem with too many entries in /boot/solaris/filelist.ram, but don't quote me on that just yet)
When I've a bit more time on my hands, I plan on investigating a bit more, and seeing if I can workaround the problem in the script, but as I say, for now, zfsroot is in the development stages [ although I for one am *already* finding it hugely useful :-) ]
Posted by Tim Foster on May 17, 2006 at 10:05 PM IST #
Posted by Carl Brewer on January 01, 2007 at 02:54 AM GMT #
Posted by Brian Rydzeski on January 29, 2007 at 03:21 PM GMT #
Brian - there's enough context for me to work out what's going on in your situation (line 156 for me, says "cat >> /zfsroot/etc/system <<END". Based on what you say, it could be the line 162, which reads:
"echo "etc/zfs/zpool.cache" >> /zfsroot/boot/solaris/filelist.ramdisk"
Now, if you don't have a /zfsroot/boot/solaris, then it sounds like something went wrong with the initial cpio of your ufs root to /zfsroot, but it's hard to tell...
Drop me a mail, I'll try to help.
Posted by Tim Foster on January 29, 2007 at 03:34 PM GMT #
Yep, things have seemed a bit slow alright - there's work going on the sparc side of things at the moment (can't use the grub-based solution on sparc), but us folks in zfs-test haven't been given official bits to exercise yet. It'd be nice if the dev guys were more public about their progress, I admit.
Posted by Tim Foster on January 29, 2007 at 03:38 PM GMT #
Posted by Brian Rydzeski on January 29, 2007 at 04:03 PM GMT #
Posted by Tim Foster on January 29, 2007 at 04:06 PM GMT #