zil on root devices?

Brian Behlendorf behlendorf1 at llnl.gov
Tue May 17 18:10:48 EDT 2011


Yes and no.  You could probably use a raid-z rpool if you were careful
to place /boot on a mirrored zfs pool or a non-zfs device.  The issue is
that grub needs to be able to access your initramfs and kernel.  At the
moment grub can't read from a raid-z pool.  But once you have booted in
to the initramfs you have a fully functional zfs implementation and
access to all the devices.

-- 
Thanks,
Brian 

On Tue, 2011-05-17 at 12:08 -0700, Christ Schlacta wrote:
> Could the same restriction be relaxed for raid-zn and striping on 
> similar grounds?
> 
> On 5/17/2011 10:36, Brian Behlendorf wrote:
> > Here's what zfs_ioc_vdev_add() has to say about root intent log devices:
> >
> >          /*
> >           * A root pool with concatenated devices is not supported.
> >           * Thus, can not add a device to a root pool.
> >           *
> >           * Intent log device can not be added to a rootpool because
> >           * during mountroot, zil is replayed, a seperated log device
> >           * can not be accessed during the mountroot time.
> >           *
> >           * l2cache and spare devices are ok to be added to a rootpool.
> >           */
> >          if (spa_bootfs(spa) != 0&&  nl2cache == 0&&  nspares == 0) {
> >                  nvlist_free(config);
> >                  spa_close(spa, FTAG);
> >                  return (EDOM);
> >          }
> >
> > This is interesting because these look like restrictions imposed on
> > Solaris because of how it boots the system.  A Linux system boots
> > differently and shouldn't have these particular issues.  The Linux code
> > does not use mountroot, this code in fact was removed, and we do have
> > full access to the zil device.  So on first glance this looks like a
> > Solaris restriction we could relax under Linux.  Commenting out the
> > above check would allow you to try it at your own risk.
> >
> 



More information about the zfs-discuss mailing list