On Sun, Jul 19, 2020 at 6:18 PM Joshua M. Clulow <j...@sysmgr.org> wrote:

> On Sun, 19 Jul 2020 at 13:59, Judah Richardson
> <judahrichard...@gmail.com> wrote:
> > Raspberry Pi 3 Model B+ running Raspberry Pi OS Stable, hostname
> > RaspberryPi3ModelPlus.lan (The .lan is the standard fill-in domain name
> for
> > networks that don't have an FQDN, such as a home network like mine). IP
> > address is 192.168.0.107
>
> The "lan" TLD is, while in somewhat common use, definitely not a
> standard as far as I know.  The standard domain name that has been set
> aside for home network use is "home.arpa", as per RFC 8375:
>
>     Special-Use Domain 'home.arpa.'
>     https://tools.ietf.org/html/rfc8375
>
> Using "lan" might not cause you any problems, but there is not currently
> any guarantee that it won't show up as a "real" gTLD in the public DNS
> one day.  This has already happened at least once, when Google decided
> to register "dev".
>
> > I ran the following:
> >
> > # zfs set sharenfs='rw=192.168.0.107,root=RaspberryPi3ModelBPlus.lan'
> rpool1
>
> First, if you don't have proper local DNS infrastructure set up that can
> resolve your chosen names to IPs and also back again (e.g., test with
> "nslookup" or "dig") I would encourage you to stick to IP addresses for
> now as those will definitely work.  In your example you have used both
> an IP address and a hostname for your "sharenfs" property: I'd pick just
> one or the other, and I would probably start with IPs unless DNS is
> absolutely solid locally.
>
Thanks, switched to using IP addresses only.

>
> Second, your IP address syntax is, I think, not quite right.  As per
> share_nfs(1M), it should start with an "@" sign; e.g., from that manual
> page:
>
>        When specifying individual IP addresses, use the same @
>        notation described above, without a netmask specification.  For
>        example:
>
>              rw=@172.16.132.14

Correct. Fixed that too.

>
>
> > # zfs share rpool1
> > # share -F nfs /rpool1
>
> If you're using the "sharenfs" property, I wouldn't expect you to use
> the "share" command -- and indeed running it will probably then override
> whatever you had set in the sharenfs property previously.  From our
> share(1M) manual page, in NOTES:
>
>     If share commands are invoked multiple times on the same filesystem,
>     the last share invocation supersedes the previous—the options set by
>     the last share command replace the old options.
>
Ah, TIL

>
> In general, for NFS server things to work, you'll want to make sure the
> NFS server SMF service is online; i.e.,
>
>     svc:/network/nfs/server:default
>
> There are other services as well as this primary one (for the lock
> manager and other components) so you'll probably just want to make sure
> everything that shows up in "svcs -a | grep nfs" is online.  Once those
> are online, I'd expect the "sharenfs" property on a ZFS dataset to be
> all you need to set and you shouldn't need to run "zfs share" either.
>
> > I ran # mount -t nfs -o proto=tcp,port=2049 192.168.0.71:/ /mnt as the
> > official docs say. rpool1 mounts just fine; but I can't browse it, even
> as
> > root on the Pi:
> >
> > # cd rpool1
> > bash: cd: rpool1: Permission denied
>
> I imagine one of two things has happened: either, DNS is not working
> quite right, so the IP-based "rw" you used above takes effect but the
> name-based "root" property does not; or, the subsequent "share" command
> you ran (with no properties) has clobbered the effect that "sharenfs"
> had, and you're back to the default of no access or read-only access or
> something like that.
>
> One diagnostic tool that can help is "showmount -e $SERVER_IP" which you
> should be able to run on both the Linux machine (I believe) and the
> server.  It ought to print out a summary of what is currently exported,
> and will probably include the list of properties (rw, root, etc)
> currently in effect.
>
>
> Cheers.
>
> --
> Joshua M. Clulow
> http://blog.sysmgr.org

OK, thanks to the @IP_Address correction, I'm finally able to browse the
NFS mount on the Pi. For future reference:

*OI Server:*

# zfs set sharenfs='rw=@ClientIPAddress/32,root=@ClientIPAddress/32' rpool1
# zfs share rpool1

*RPi 3B+ Client:*

# mount -t nfs -o proto=tcp,port=2049 ServerIPAddress:/ /RPiMountPath

Thanks very much for the assistance, everyone :)

>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss@openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
>
_______________________________________________
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to