Booting from ZFS raidz

George Hartzell hartzell at alerce.com
Thu Apr 16 10:09:44 PDT 2009


Ollivier Robert writes:
 > According to Stefan Bethke:
 > > Created a GPT label and one partition on each of the three drives:
 > > 
 > > 	gpart create -s gpt $1
 > > 	gpart add -b 34 -s 128 -t freebsd-boot $1
 > > 	gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 $1
 > > 	gpart add -b 512 -s 41900000 -t freebsd-zfs $1
 > > 	gpart list $1
 > 
 > Coming back to this thread, I'm playing with this setup (and the script
 > mentioned in another thread).  When I try to
 > 
 > zpool set bootfs=tank
 > 
 > with tank containing a raidz array, zpool refuses to set the property,
 > saying it is not available.  Using the same commandline on a mirror works.

In Doug's original email announcing raidz boot support,

  http://kerneltrap.org/mailarchive/freebsd-fs/2008/12/17/4441084

he says:

   Currently the ZFS kernel code refuses to allow you to set the
   bootfs pool property on raidz pools (because Solaris can't boot
   from them).  This means that you are limited to booting from the
   root filesystem of the pool for now (it shouldn't be hard to relax
   this restriction). The root filesystem of the pool should contain a
   directory /boot with the usual contents which must include a
   /boot/loader which was built with the 'LOADER_ZFS_SUPPORT' make
   option.

Which jsut means that you need a populated boot directory at the top
of the tank (e.g. /data/boot).  If you're using the
create-zfsboot-gpt.sh file that was posted here recently, you'll need
to rework it a bit, since it puts the root dir at /data/ROOT/data.

g.


More information about the freebsd-fs mailing list