2

How to share the whole zpool (including child filesystems) via nfs?

Using the belowzfs filesystems:

NAME               USED  AVAIL  REFER  MOUNTPOINT
backup             7.22T  6.83T  3.94T  /backup
backup/compressed  3.28T  6.83T  3.28T  /backup/compressed

When backup is shared directly using nfs-kernel-server, it's contents are available from nfs-clients. Unfortunately the 'compressed folder' (backup/compressed) shows up however it's contents does not.

If backup/compressed is shared using sudo zfs set sharenfs=on backup/compressed or nfs-kernel-server, the folder is still inaccessible.

I have confirmed that both filesystems have been shared:

showmount -e
Export list for node1:
/backup/compressed *
/backup            *

How to share the zfs filesystem and it's child filesystems using nfs?

Update:

cat /proc/fs/nfsd/exports returns:

# Version 1.1
# Path Client(Flags) # IPs
/   192.168.1.0/24(ro,root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,uuid=4093d757:04e84107:a4f18396:1f6546f3,sec=1)
/backup/compressed  192.168.1.0/24(rw,root_squash,all_squash,sync,wdelay,no_subtree_check,anonuid=1000,anongid=1000,uuid=5beeba85:0006e861:00000000:00000000,sec=1)
/backup 192.168.1.0/24(ro,root_squash,sync,no_wdelay,no_subtree_check,v4root,uuid=093f132b:00211eeb:00000000:00000000,sec=1)
/backup/compressed  192.168.2.0/24(rw,root_squash,all_squash,sync,wdelay,no_subtree_check,anonuid=1000,anongid=1000,uuid=5beeba85:0006e861:00000000:00000000,sec=1)
  • What is the content of /proc/fs/nfsd/exportfs? Add it to your question. – Thomas Jul 8 '17 at 10:45
  • @Thomas I updated the post with the details of /proc/fs/nfsd/exports – Greg Jul 8 '17 at 11:43
  • According to that the /backup/compressed is exported as read-write and should be accessible. The /backup folder is read-only. What exactly do you mean by not accessible? Try to remount the NFS share on the client and try to mount the /backup/compressed folder directly with mount -t nfs <your-server-ip>:/backup/compressed <mount-point>. – Thomas Jul 8 '17 at 12:03
  • 2
    Just repeating @Thomas really but have you actually mounted the compressed folder on the client? These are two separate filesystems so need sharing and mounting independently. – USD Matt Jul 8 '17 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.