Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Legacy ZFS mounts



I would like to commit a change soon that will add support for legacy
ZFS mounts.  That is, those where the ZFS property mountpoint=legacy.
This will allow one to specify ZFS mounts in /etc/fstab and will allow
the use of critical_local_filesystems in /etc/rc.conf.  Basically you
could have a ZFS /var and /use if you wanted.  The support for this is
already pretty much present in the base code inherited from OpenSolaris.
If the zfs command is linked to a command called "mount" in
Solaris-world it will act like a classic mount command (mostly).  In
NetBSD-world, this can be changed to be linked to mount_zfs and placed
in /sbin and it will do the same thing if the code is altered to
recognize mount_zfs instead of mount.

The change is in two parts, the first is to allow mount_zfs to be
recognized instead of mount, hard link /sbin/zfs to /sbin/mount_zfs and
provide for a man page.  All of the stuff in distrib is dealt with.  In
addition, a new /etc/rc.d script comes into existence called zfs and a
new variable for /etc/rc.conf called 'zfs' which must be set to YES to
get zvols or use ZFS at all.  Further, /etc/rc.d/mountall is altered to
look for the zfs variable and do the usual "zfs mount" stuff if it is
YES.

The second part of the change has to do with the fact that /sbin/zfs and
/sbin/zpool link libraries from /usr/lib, when they both probably should
get libraries from /lib.  So, a number of the Makefiles for the ZFS
libraries got "USE_SHLIBDIR=yes" added to them.  The only library
outside of the ZFS support libraries that also had to have this is
libpthread.  In all cases compatibility links are automatically put in
/usr/lib, so nothing that exists in the system or from pkgsrc breaks.
This is all based upon prior art that is used already.

All of this can be found at:

https://www.netbsd.org/~brad/legacy_zfs_mounts

as two tar files.  One is the mount_zfs change and the other is the
library move, or really just an adjustment.


I have been running test -current systems with this change for a while
without any apparent problems.  It will also apply cleanly to 9.0.

I won't get to committing this for a few days.





-- 
Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org


Home | Main Index | Thread Index | Old Index