OpenSolaris

Printable Version Enter a New Search
Bug ID 6576474
Synopsis cannot share directory on zfs filesystems with mountpoint set to legacy
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:zfs
Keywords
Responsible Engineer Mark Shellenbaum
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_69
Fixed In snv_69
Release Fixed solaris_nevada(snv_69) , solaris_10u6(s10u6_01) (Bug ID:2156407)
Related Bugs
Submit Date 3-July-2007
Last Update Date 29-April-2008
Description
Bfu to onnv-gate:2007-07-02, it cannot share any directory while use zfs /,
return 32 or share get no amy shared record.

# mkdir /abc
# share /abc
Could not share: /abc: system error
# echo $?
32
# share /tmp
# echo $?
# share
#

# more /etc/motd
Sun Microsystems Inc.   SunOS 5.11      onnv-gate:2007-07-02    Jul. 02, 2007
SunOS Internal Development:  gk 2007-07-02 [onnv-gate]
bfu'ed from /ws/onnv-gate/archives/i386/nightly on 2007-07-02
Sun Microsystems Inc.   SunOS 5.11      snv_66  October 2007
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
rootpool/rootfs      7225344 4596074 2628332    64%    /
/devices                   0       0       0     0%    /devices
/dev                       0       0       0     0%    /dev
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 3442616     860 3441756     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/usr/lib/libc/libc_hwcap1.so.1
                     7224406 4596074 2628332    64%    /lib/libc.so.1
fd                         0       0       0     0%    /dev/fd
swap                 3441968     212 3441756     1%    /tmp
swap                 3441796      40 3441756     1%    /var/run
/dev/dsk/c1t9d0s0    15434050 4854969 10424741    32%    /ufsroot
After some investigation, I notice that, if disable nfs/server manually,
it cannot enable again

# svcadm disable nfs/server
# svcadm enable nfs/server
# echo $?
0
# svcadm refresh nfs/server
# echo $?
0
# svcs -a | grep nfs
disabled        0:42:06 svc:/network/nfs/cbd:default
disabled        0:42:06 svc:/network/nfs/mapid:default
disabled        0:42:35 svc:/network/nfs/rquota:default
disabled        0:47:21 svc:/network/nfs/server:default
online          0:46:52 svc:/network/nfs/status:default
online          0:46:52 svc:/network/nfs/nlockmgr:default
online          0:46:52 svc:/network/nfs/client:default
#  tail /var/svc/log/network-nfs-server:default.log
[ Jul  3 00:46:52 Stopping because service disabled. ]
[ Jul  3 00:46:52 Executing stop method ("/lib/svc/method/nfs-server stop 92") ]
[ Jul  3 00:46:57 Method "stop" exited with status 0 ]
[ Jul  3 00:47:16 Enabled. ]
[ Jul  3 00:47:16 Executing start method ("/lib/svc/method/nfs-server start") ]
No NFS filesystems are shared


        /usr/sbin/sharemgr start -P nfs -a

        # Start up mountd and nfsd if anything is exported.

        if /usr/bin/grep -s nfs /etc/dfs/sharetab >/dev/null; then
                startnfsd=1
        fi

        # If auto-enable behavior is disabled, always start nfsd

        if [ `svcprop -p application/auto_enable nfs/server` = "false" ]; then
                startnfsd=1
        fi

I tried the above commands manually,
# /usr/sbin/sharemgr start -P nfs -a
# echo $?
0
# /usr/bin/grep -s nfs /etc/dfs/sharetab
# echo $?
2
# svcprop -p application/auto_enable nfs/server
true

So the issue may caused by /etc/dfs/sharetab not exist
If there're shared records, svcadm disable/enable will not hurt nfs/server,
but if there's no any shared records, nfs/server just cannot enable again.
The issue looks only happen on zfs /,

# zfs set sharenfs=on testpool.106430/testfs.106430
# svcadm disable nfs/server
# svcs -a | grep nfs/server
disabled        1:54:29 svc:/network/nfs/server:default
# svcadm enable nfs/server
# svcs -a | grep nfs/server
online          1:54:50 svc:/network/nfs/server:default
# share
-@testpool.106  /testdir106430   rw   ""  

# svcadm disable nfs/server
# share
# zfs set sharenfs=off testpool.106430/testfs.106430
# svcadm enable nfs/server
# svcs -a | grep nfs/server
disabled        1:55:31 svc:/network/nfs/server:default

Then, at that point, I could not share any legacy directory of ufs,

# mkdir /var/tmp/abc
# share /var/tmp/abc
Could not share: /var/tmp/abc: system error
# echo $?
32
Work Around
N/A
Comments
N/A