-bash-3.2$ zfs share tank cannot share ''tank'': share(1M) failed -bash-3.2$ how do i figure out what''s wrong? This message posted from opensolaris.org
jason wrote:> -bash-3.2$ zfs share tank > cannot share ''tank'': share(1M) failed > -bash-3.2$ > > how do i figure out what''s wrong? > >Create a file system and share that. Ian
# zfs list NAME USED AVAIL REFER MOUNTPOINT tank 1010M 227G 1010M /tank # zfs create tank/storage cannot share ''tank/storage'': share(1M) failed filesystem successfully created, but not shared # zfs list NAME USED AVAIL REFER MOUNTPOINT tank 1010M 227G 1010M /tank tank/storage 18K 227G 18K /tank/storage # zfs share tank/storage cannot share ''tank/storage'': share(1M) failed # This message posted from opensolaris.org
jason wrote:> # zfs list > NAME USED AVAIL REFER MOUNTPOINT > tank 1010M 227G 1010M /tank > # zfs create tank/storage > cannot share ''tank/storage'': share(1M) failed > filesystem successfully created, but not shared > # zfs list > NAME USED AVAIL REFER MOUNTPOINT > tank 1010M 227G 1010M /tank > tank/storage 18K 227G 18K /tank/storage > # zfs share tank/storage > cannot share ''tank/storage'': share(1M) failed > # >Either the sharenfs or sharesmb property must be on. -- richard
# zfs set sharenfs=on tank/storage cannot share ''tank/storage'': share(1M) failed # i''m fairly certain i installed the nfs stuff, and it looks like the rpc stuff is running http://www.student.cs.uwaterloo.ca/~jouellet/netstat.txt This message posted from opensolaris.org
On Feb 17, 2008 3:37 PM, jason <jouellet at uwaterloo.ca> wrote:> # zfs set sharenfs=on tank/storage > cannot share ''tank/storage'': share(1M) failed > #I ran into a similar problem and was unable to resolve it. Here''s some output that might be relevant: # zfs get sharesmb,sharenfs NAME PROPERTY VALUE SOURCE data sharesmb on local data sharenfs off local # truss -f zfs set sharesmb=on data ... 19454: ioctl(12, ZFS_IOC_SHARE, 0x08043B40) Err#2114 cannot share ''data'': smb add share failed # zfs set sharenfs=on data cannot share ''data'': smb add share failed # share data at data /export/data rw "" Might the in-kernel sharetab be somehow corrupt? I can''t find what this constant means, it looks like it''s defined in truss but not used anywhere else... Jason, are you getting the same return value when you try to set sharesmb=on? Will
> what is the output of "dfshares"? If it complains about rpc > program not registered, that means nothing is shared. > > also check to see if services are enabled, though share will try > to start these for you. Check "svcs -a | grep network/nfs" and > see if there are 7 services listed, but perhaps disabled. > -- richard# dfshares nfs dfshares:unknown: RPC: Program not registered # svcs -a | grep network/nfs disabled 15:32:25 svc:/network/nfs/status:default disabled 15:32:25 svc:/network/nfs/nlockmgr:default disabled 15:32:25 svc:/network/nfs/cbd:default disabled 15:32:25 svc:/network/nfs/mapid:default disabled 15:32:25 svc:/network/nfs/client:default # okay, so nfs isn''t setup properly nothing in the NFS doc. seems to work # svcadm enable network/nfs/server svcadm: Pattern ''network/nfs/server'' doesn''t match any instances # # share -F nfs -o ro /tank/storage Invalid protocol specified: nfs #> Jason, are you getting the same return value when you try to set sharesmb=on# zfs set sharesmb=on tank/storage cannot share ''tank/storage'': share(1M) failed SMB: Unable to enable service # i''ll worry about smb when i get nfs working This message posted from opensolaris.org
> You''re missing the server bits, check for the following packages: > SUNWnfsskr, SUNWnfssr, and SUNWnfssu > -- richardi added those packages and rebooted then did # svcadm enable network/nfs/server but nfs still doesn''t work # zfs share tank/storage cannot share ''tank/storage'': share(1M) failed # svcs -a | grep network/nfs disabled 18:41:52 svc:/network/nfs/status:default disabled 18:41:52 svc:/network/nfs/nlockmgr:default disabled 18:41:52 svc:/network/nfs/cbd:default disabled 18:41:52 svc:/network/nfs/mapid:default disabled 18:41:52 svc:/network/nfs/client:default disabled 18:42:03 svc:/network/nfs/rquota:default offline 18:44:59 svc:/network/nfs/server:default # dfshares nfs dfshares:unknown: RPC: Program not registered This message posted from opensolaris.org
i got all nfs/server dependancies online, but nfs/server is disabled because "No NFS filesystems are shared" # svcs -l nfs/server fmri svc:/network/nfs/server:default name NFS server enabled false (temporary) state disabled next_state none state_time Sun Feb 17 21:40:41 2008 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 (online) dependency optional_all/none svc:/network/rpc/gss (online) dependency require_all/error svc:/system/filesystem/local (online) # svcs nfs/server STATE STIME FMRI disabled 21:40:41 svc:/network/nfs/server:default # cat /var/svc/log/network-nfs-server:default.log [ Feb 17 18:33:54 Disabled. ] [ Feb 17 18:33:54 Rereading configuration. ] [ Feb 17 18:44:59 Enabled. ] [ Feb 17 21:13:43 Executing start method ("/lib/svc/method/nfs-server start"). ] cannot share ''tank'': share(1M) failed cannot share ''tank/storage'': share(1M) failed chmod: WARNING: can''t change /etc/dfs/sharetab No NFS filesystems are shared [ Feb 17 21:13:43 Method "start" exited with status 0. ] [ Feb 17 21:13:43 Stopping because service disabled. ] [ Feb 17 21:13:43 Executing stop method ("/lib/svc/method/nfs-server stop 67"). ] [ Feb 17 21:13:48 Method "stop" exited with status 0. ] [ Feb 17 21:33:43 Enabled. ] [ Feb 17 21:33:43 Executing start method ("/lib/svc/method/nfs-server start"). ] cannot share ''tank'': share(1M) failed cannot share ''tank/storage'': share(1M) failed chmod: WARNING: can''t change /etc/dfs/sharetab No NFS filesystems are shared [ Feb 17 21:33:43 Method "start" exited with status 0. ] [ Feb 17 21:33:43 Stopping because service disabled. ] [ Feb 17 21:33:43 Executing stop method ("/lib/svc/method/nfs-server stop 72"). ] [ Feb 17 21:33:48 Method "stop" exited with status 0. ] [ Feb 17 21:37:33 Enabled. ] [ Feb 17 21:37:33 Executing start method ("/lib/svc/method/nfs-server start"). ] cannot share ''tank'': share(1M) failed cannot share ''tank/storage'': share(1M) failed chmod: WARNING: can''t change /etc/dfs/sharetab No NFS filesystems are shared [ Feb 17 21:37:33 Method "start" exited with status 0. ] [ Feb 17 21:37:33 Stopping because service disabled. ] [ Feb 17 21:37:33 Executing stop method ("/lib/svc/method/nfs-server stop 74"). ] [ Feb 17 21:37:38 Method "stop" exited with status 0. ] [ Feb 17 21:40:36 Enabled. ] [ Feb 17 21:40:36 Executing start method ("/lib/svc/method/nfs-server start"). ] cannot share ''tank'': share(1M) failed cannot share ''tank/storage'': share(1M) failed chmod: WARNING: can''t change /etc/dfs/sharetab No NFS filesystems are shared [ Feb 17 21:40:36 Method "start" exited with status 0. ] [ Feb 17 21:40:36 Stopping because service disabled. ] [ Feb 17 21:40:36 Executing stop method ("/lib/svc/method/nfs-server stop 76"). ] [ Feb 17 21:40:41 Method "stop" exited with status 0. ] my share command still doesn''t work # share /tank/storage Could not share: /tank/storage: invalid protocol This message posted from opensolaris.org
> Try sharing something else, maybe: > share -F nfs /mnt > > After that, you should see the services started. > Once you get that to work, then try sharing the > zfs file systems. Your problems aren''t zfs related... > at least not yet. > -- richard# share -F nfs /mnt share: illegal option -- F Usage: share [-o options] [-d description] pathname [resource] # share -F nfs /home share: illegal option -- F Usage: share [-o options] [-d description] pathname [resource] # share -F nfs /tank/storage share: illegal option -- F Usage: share [-o options] [-d description] pathname [resource] maybe i''m missing some packages? how do i find out what packages i need for a particular service or program? i have the ZFS admin. guide and the basic admin. guide, but they don''t mention what packages are needed or how to install anything This message posted from opensolaris.org
Hi, Jason, Could you succeed by these steps? # zpool create tank <vdev> # zfs set sharenfs=on tank # share - at tank /tank rw "" The nfs server will be enable automatically while there''s any shareable dataset exist, (sharenfs or sharesmb = on) jason wrote:> -bash-3.2$ zfs share tank > cannot share ''tank'': share(1M) failed > -bash-3.2$ > > how do i figure out what''s wrong? > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-- Regards, Robin Guo, Xue-Bin Guo Solaris Kernel and Data Service QE, Sun China Engineering and Reserch Institute Phone: +86 10 82618200 +82296 Email: robin.guo at sun.com Blog: http://blogs.sun.com/robinguo
that doesn''t work it looks like something maybe corrupt, maybe something didn''t get installed properly or i have a bad disc, for some reason my share command doesn''t have an -F option i''m going to get a new disc and reinstall everything thanks for the help everyone This message posted from opensolaris.org