Re: zfs sharenfs woes
- Reply: Rick Macklem : "Re: zfs sharenfs woes"
- Reply: void : "Re: zfs sharenfs woes"
- In reply to: void : "Re: zfs sharenfs woes"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Jul 2025 14:37:31 UTC
On Tue, Jul 22, 2025 at 7:06 AM void <void@f-m.fm> wrote: > > On Tue, Jul 22, 2025 at 06:16:36AM -0700, Rick Macklem wrote: > >On Tue, Jul 22, 2025 at 6:10 AM void <void@f-m.fm> wrote: > >> > >> I have a problem getting sharenfs working. showmount -e displays an empty list. > >> > >> On the server (15-current-n278914) 192.168.1.102 > >> > >> /etc/rc.conf : > >> # NFS > >> rpcbind_enable="YES" > >> nfs_server_enable="YES" > >> mountd_enable="YES" > >> > >> # zfs get sharenfs data/testnfs > >> > >> data/testnfs sharenfs maproot=root -alldirs -network 192.168.1.100/32 local > >> > >> in /etc/zfs/exports : > >> > >> /data/testnfs -maproot=root -alldirs -network 192.168.1.100/32 > > >I would have expressed exporting to a single client by just specifying > >"192.168.1.100" instead of "-network 192.168.1.100/32", but I'm not > >sure if what you did is a problem? > > I'm not sure either. If I change it to 192.168.1.100 is it still prefixed > by "-network" ? No, but you seemed to try it and it didn't help. If it worked before, it should still work. I cannot see any reason why it would not work? > > It did work before - all this is subsequent to upgrading to main-stabweek-2025-Jul > so at this stage I'm unsure if it's something in the upgrade that's a problem or > something has changed that I've not accounted for. > > >Did you look in /var/log/messages to see if mountd reports any error? > >(Such as not liking 192.168.1.100/32 above.) > > mountd[97329]: mount request denied from 192.168.1.100 for /data/testnfs Expected if it is not exported. However, mountd should throw out a message when an exports line fails. Try doing "service mountd reload" and then see if that has generated any message in /var/log/messages. rick > > On the client, > > % doas mount -t nfs 192.168.1.102:/data/testnfs /mnt > [tcp] 192.168.1.102:/data/testnfs: Permission denied > > % doas showmount -e 192.168.1.102 > Exports list on 192.168.1.102: > > (empty) > > If I set, on the server > > % doas zfs set sharenfs="maproot=root -alldirs 192.168.1.100" data/testnfs > > then, to make sure > > % cat /etc/zfs/exports | ug testnfs > /data/testnfs -maproot=root -alldirs 192.168.1.100 > > then, stop everything nfsd > > # service mountd stop > Stopping mountd. > Waiting for PIDS: 97329. > > # service rpcbind stop > Stopping rpcbind. > Waiting for PIDS: 85322. > > # service nfsd stop > Stopping nfsd. > Waiting for PIDS: 34878 35066. > # > > in /var/log/messages on the server, I see > > nfsd[34878]: rpcb_unset failed > > Start all of nfsd it starts everything else > > # service nfsd start > NFS on reserved port only=YES > NFSv4 is disabled > Starting rpcbind. > Starting mountd. > Starting nfsd. > # > > On the client: > > % doas showmount -e 192.168.1.102 > Exports list on 192.168.1.102: > > (empty) > > I ran 'zfs share -a' and also 'zfs share data/testnfs'. I see > mountd[1148]: mount request denied from 192.168.1.100 for /data/testnfs in > '/var/log/messages' on the server > > -- > >