Score:1

Cannot mount ZFS pool on remote host

mg flag

I have (for testing purposes using a USB-attached drive) setup a ZFS pool that I would like to share via NFS to one client.

Note that I pretty much followed the information from this post which is not working as suggested: https://www.hiroom2.com/2016/05/18/ubuntu-16-04-share-zfs-storage-via-nfs-smb/

Note that I am new to this on Linux so may be asking some schoolboy questions and I am new to posting here so learning all of the this formatting as I go!

ZFS host is Ubuntu 20.04. and the client is also Ubuntu Desktop 20.04.

On the ZFS host I have created the pool called:

usb-WD_Elements_25A3_33574A394C31574A-0:0_pool

This pool is mounted locally on the ZFS host as:

/mnt/zfs/testusb/

I can use the mountpoint and have tested exporting the pool and importing on another PC and it works well.

Now I want to share this pool from one host to a client using NFS so I enabled ZFS's sharenfs by using:

zfs set sharenfs="[email protected]/24" usb-WD_Elements_25A3_33574A394C31574A-0:0_pool

&

zfs get sharenfs | grep usb

shows me:

usb-WD_Elements_25A3_33574A394C31574A-0:0_pool   sharenfs  [email protected]/24  local

df -k | grep usb outputs:

usb-WD_Elements_25A3_33574A394C31574A-0:0_pool     16T  5.2T   11T  33% /mnt/zfs/testusb/

zfs list | grep usb outputs:

usb-WD_Elements_25A3_33574A394C31574A-0:0_pool    5.15T  10.7T     5.15T  /mnt/zfs/testusb/

All good!!

I now go to the client PC (logged in as sudo -s) and run:

mount 176.1.1.2:usb-WD_Elements_25A3_33574A394C31574A-0:0_pool /mnt/zfs/testusb/

And I get:

mount.nfs: access denied by server while mounting 176.1.1.2:usb-WD_Elements_25A3_33574A394C31574A-0:0_pool

I'm clearly missing something but as this is my first time sharing a ZFS filesystem I am not sure what I've done wrong.

Thanks in advance!

us flag
Just to be sure, could you try `zfs set sharenfs="[email protected]/24" usb-WD_Elements_25A3_33574A394C31574A-0:0_pool`?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.