svcadm fails to enable nfs/server

When trying to enable nfs/server, I keep getting this message that another entity has disabled the service but I cannot find where the problem is.

hostname:> svcadm -v enable -s svc:/network/nfs/server
svc:/network/nfs/server:default enabled.
svcadm: Instance "svc:/network/nfs/server:default" has been disabled by another entity.

svcs doesn't really tell me anything about what the problem is. In fact, svcs says that it is disabled by an administrator.

hostname:> svcs -xv nfs/server
svc:/network/nfs/server:default (NFS server)
 State: disabled since Tue Aug 12 19:59:12 2008
Reason: Disabled by an administrator.
   See: Sun Message ID: SMF-8000-05
   See: man -M /usr/share/man -s 1M nfsd
Impact: This service is not running.

Checking the log doesn't give me anything to go on either.

 
hostname:> cat /var/svc/log/network-nfs-server\:default.log | tail -10
[ Aug 12 13:16:45 Enabled. ]
[ Aug 12 13:16:49 Disabled. ]
[ Aug 12 13:17:37 Enabled. ]
[ Aug 12 13:17:43 Disabled. ]
[ Aug 12 13:21:42 Enabled. ]
[ Aug 12 13:21:46 Disabled. ]
[ Aug 12 13:24:30 Enabled. ]
[ Aug 12 13:24:34 Disabled. ]
[ Aug 12 19:59:01 Enabled. ]
[ Aug 12 19:59:12 Disabled. ]
 

Can anyone point me in the right direction to find out why this svc keeps getting disabled?

What about services that nfs/server is dependent on? You might want to check svcs -d nfs/server to make sure that all necessary processes are running.

 
hostname:> svcs -d nfs/server
STATE          STIME    FMRI
disabled        0:49:04 svc:/network/rpc/keyserv:default
online          0:49:06 svc:/milestone/network:default
online          0:49:39 svc:/system/filesystem/local:default
online          0:49:40 svc:/network/rpc/bind:default
online          0:49:40 svc:/network/nfs/mapid:default
online          0:49:40 svc:/network/nfs/nlockmgr:default
online          0:49:41 svc:/network/rpc/gss:default
 

When I looked at this, I thought ... great, just start keyserv. But I don't think that's the cause of the problem. Even when I use the recursive option for svcadm if fails to start. Plus, this is one server in a redundant pair. On the mate server, svcs -d shows the same thing (except for difference in STIME) but nfs/server comes online in the mate. On this server, it briefly comes online and then quickly goes disabled again.

The logs have now changed. Yesterday they were only showing Enabled/Disabled, now they look like this:

[ Aug 13 09:27:42 Executing start method ("/lib/svc/method/nfs-server start") ]
[ Aug 13 09:27:42 Method "start" exited with status 0 ]
[ Aug 13 09:28:01 Stopping because service disabled. ]
[ Aug 13 09:28:01 Executing stop method ("/lib/svc/method/nfs-server stop 2393") ]
[ Aug 13 09:28:01 Method "stop" exited with status 0 ]
[ Aug 13 09:34:43 Enabled. ]
[ Aug 13 09:34:43 Executing start method ("/lib/svc/method/nfs-server start") ]
[ Aug 13 09:34:43 Method "start" exited with status 0 ]
[ Aug 13 09:34:57 Stopping because service disabled. ]
[ Aug 13 09:34:57 Executing stop method ("/lib/svc/method/nfs-server stop 2409") ]
[ Aug 13 09:34:58 Method "stop" exited with status 0 ]
[ Aug 13 09:35:22 Enabled. ]
[ Aug 13 09:35:22 Executing start method ("/lib/svc/method/nfs-server start") ]
[ Aug 13 09:35:23 Method "start" exited with status 0 ]
[ Aug 13 09:35:36 Stopping because service disabled. ]
[ Aug 13 09:35:36 Executing stop method ("/lib/svc/method/nfs-server stop 2419") ]
[ Aug 13 09:35:36 Method "stop" exited with status 0 ]
[ Aug 13 09:36:29 Enabled. ]
[ Aug 13 09:36:30 Executing start method ("/lib/svc/method/nfs-server start") ]
[ Aug 13 09:36:30 Method "start" exited with status 0 ]
[ Aug 13 09:36:46 Stopping because service disabled. ]
[ Aug 13 09:36:46 Executing stop method ("/lib/svc/method/nfs-server stop 2435") ]
[ Aug 13 09:36:46 Method "stop" exited with status 0 ]

Have you set anything to share in the /etc/dfs/dfstab ?

Here is /etc/dfs/dfstab on the working server:

hostname_b:> cat /etc/dfs/dfstab
# THIS LINE DEFINES THE COMMENT CHARACTER FOR THIS FILE BUT WILL NOT BE INCLUDED
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.37/25,root=@xx.yyy.zzz.37/25 -d 'Sxxxxxx Billing' /billing
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.37/25,root=@xx.yyy.zzz.37/25 -d 'Sxxxxxx TMM' /stats
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.37/25,root=@xx.yyy.zzz.37/25 -d 'Sxxxxxx DB Backups' /dbbackup
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.37/25,root=@xx.yyy.zzz.37/25 -d 'Sxxxxxx Event Logs' /space/event
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx

And from the non-working server:

hostname:> cat /etc/dfs/dfstab
# THIS LINE DEFINES THE COMMENT CHARACTER FOR THIS FILE BUT WILL NOT BE INCLUDED
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.35/25,root=@xx.yyy.zzz.35/25 -d 'Sxxxxxx Billing' /billing
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.35/25,root=@xx.yyy.zzz.35/25 -d 'Sxxxxxx TMM' /stats
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.35/25,root=@xx.yyy.zzz.35/25 -d 'Sxxxxxx DB Backups' /dbbackup
/usr/sbin/share -F nfs -o rw=@xx.yyy.zzz.35/25,root=@xx.yyy.zzz.35/25 -d 'Sxxxxxx Event Logs' /space/event
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx
/usr/sbin/share -F nfs -o rw -d "" /space/sxxxxxx

While I don't think it has anything to do with the problem, I'm thinking those last 9 duplicated lines can be deleted.

Even though the nfs server never stays online, the mounts to this server are created.

Thanks for your time, guys. After talking to one of the admin guys over a 2 day period, he finally tells me there's a daemon running that kills nfs whenever it finds it running (unless one of two other processes had started it and were still active). Some security audit. And there are only two approved processes for enabling nfs.

I have followed this thread and i have exactly the same problem. all my outputs resemble yours.

what deamon was killing your nfs services?

Please post your /etc/dfs/dfstab

If there are no share resources listed then the nfs/server is not going to start. Actually the moment you start the service it start and lookout for sharable resources in /etc/dfs/dfstab and if there is no work to perform automatically this services get disabled.

svcadm -D nfs/server dependent service to see what service are disabled enable it
or
svcadm enable -rst nfs/server