On Tue, Oct 24, 2006 at 08:01:21PM +0100, Dick Davies wrote: > I started sharing out zfs filesystems via NFS last week using > sharenfs=on. That seems to work fine until I reboot. Turned > out the NFS server wasn't enabled - I had to enable > nfs/server, nfs/lockmgr and nfs/status manually. This is a stock > SXCR b49 (ZFS root) install - don't think I'd changed anything much. > > Shouldn't a ZFS share be permanently enabling NFS?
By default, NFS servers are configured with 'auto-start' behavior. So, if you look at the services when nothing is shared, you'll see: # svcs -l nfs/server fmri svc:/network/nfs/server:default name NFS server enabled false (temporary) state disabled next_state none state_time Wed Oct 11 13:48:08 2006 logfile /var/svc/log/network-nfs-server:default.log restarter svc:/system/svc/restarter:default contract_id dependency require_any/error svc:/milestone/network (online) dependency require_all/error svc:/network/nfs/nlockmgr (online) dependency optional_all/error svc:/network/nfs/mapid (online) dependency require_all/restart svc:/network/rpc/bind (online) dependency optional_all/none svc:/network/rpc/keyserv (disabled) dependency optional_all/none svc:/network/rpc/gss (online) dependency require_all/error svc:/system/filesystem/local (online) However, these services have a special 'auto_enabled' boolean property: # svcprop -p application/auto_enable nfs/server true This property indicates that regardless of the current state of nfs/server, if you invoke share(1M) (either manually or through 'zfs share -a'), then the server will be automatically started. By default, the system should have been in this state, with nfs/server enabled but temporarily disabled. Did you explicity 'svcadm disable nfs/server' beforehand? It may be that the start method (which contains the 'zfs share -a' invocation) will not run, and the auto-enable behavior will not be triggered. However, an explicit invocation of share(1M) will always trigger the server to be started, unles you turn off the 'auto_enabled' property. ZFS certainly could do the equivalent of a 'svcadm enable nfs/server', but it shouldn't need to, nor is it clear that ZFS should do anything different than if you had placed something into /etc/dfs/dfstab. I'd like to understand how exactly this happened, though. This may also overlap with a (soon to be completed) rewrite of how shares are managed and tracked in Solaris. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss