zil on root devices?

Brian Behlendorf behlendorf1 at llnl.gov
Tue May 17 13:36:37 EDT 2011


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.

-- 
Thanks,
Brian 

On Tue, 2011-05-17 at 02:58 -0700, Uncle Stoatwarbler wrote:
> On 16/05/11 23:51, Steve Costaras wrote:
> >
> > root pools cannot have a seperate log device.
> 
> Yes, I know that. The question is why.
> 
> >
> >     -----Original Message-----
> >     *From:* Uncle Stoatwarbler [mailto:stoatwblr at gmail.com]
> >     *Sent:* Monday, May 16, 2011 05:31 PM
> >     *To:* zfs-discuss at zfsonlinux.org
> >     *Subject:* zil on root devices?
> >
> >     I've just tried to add a ssd as write-intent log on my zfs-on-root
> >     installation and it won't let me do it (presumably because the ssd
> >     may not be available on reboot, etc etc). Is the issue
> >     insurmountable? AB
> 



More information about the zfs-discuss mailing list