1

Running Ubuntu 14...

"14.04.5 LTS, Trusty Tahr"

...with Ubuntu zfs...

libzfs2/trusty,now 0.6.5.11-1~trusty amd64 [installed,automatic]
mountall/trusty,now 2.53-zfs1 amd64 [installed,upgradable to: 2.53-zfs1]
ubuntu-zfs/trusty,now 8~trusty amd64 [installed]
zfs-dkms/trusty,now 0.6.5.11-1~trusty amd64 [installed]
zfs-doc/trusty,now 0.6.5.11-1~trusty amd64 [installed,automatic]
zfsutils/trusty,now 0.6.5.11-1~trusty amd64 [installed]

I've set the NFS share using ...

zfs set sharenfs="rw=@1xx.xxx.xxx.0/255.255.254.0,rw=@10.0.0.0/24" zpool/datashare

...but when I query I only get ON/OFF reporting...

root# zfs get  sharenfs zpool/datashare
NAME             PROPERTY  VALUE     SOURCE
zpool/datashare  sharenfs  off       local

root# zfs get  sharesmb zpool/datashare
NAME             PROPERTY  VALUE     SOURCE
zpool/datashare  sharesmb  on        local

Is there any way to get a full reporting of the sharenfs options?

BurningKrome
  • 525
  • 2
  • 12
  • 22

1 Answers1

3

According to the Oracle docs for ZFS:

As in the previous releases, you display the value of the sharenfs property by using zfs get sharenfs property or by using the zfs get all command syntax.

# zfs get sharenfs rpool/fs1 NAME PROPERTY VALUE SOURCE rpool/fs1 sharenfs on local

The new share information is available by using the zfs get share command.

# zfs get share rpool/fs1 NAME PROPERTY VALUE SOURCE rpool/fs1 share name=rpool_fs1,path=/rpool/fs1,prot=nfs local

The new share information is not available in the zfs get all command syntax.

Try this:

# zfs get share zpool/datashare
Jim L.
  • 655
  • 4
  • 11
  • Unfortunately, that lists all the properties for the datastore, but not the details of any individual property. I.e. It tells me that `sharenfs` is indeed `YES` but does not tell me that it was shared with certain IP addresses allowed (like `zfs set sharenfs="rw=@xxx.xxx.xxx.200/255.255.255.255" zpool/datashare`). I can deduce some information about what was used with the `set sharenfs` command from the `exportfs` output - but there's a lot of options that can be put in during the set, that aren't displayed there. – BurningKrome Jun 06 '19 at 07:25