Contents of NFS Share not visible on Ubuntu 20.04 client

lukazy88

Dabbler
Joined
Jul 7, 2021
Messages
13
Hi everyone,

I have troubles with a NFS share I want to setup. I'm running TrueNAS-12.0-U4 and the client is a Ubuntu 20.04 VM that is running within TrueNAS.

I have several HDDs that are NTFS and that are filled with data. I want to make that data accessible to the Ubuntu VM without moving/wiping my disks.

My plan was the following.
  1. Create the MountPoint
    1. I created a new dataset within a pool (pool1) that was already set up called "MountLocation"
  2. Create & Set User
    1. I added a user nfsshare (uid=1003) along with his new group nfsshare (gid=1003) and set this user and group as the owner of this dataset
  3. Mounting the HDDs
    1. I mounted the first HDD in a ssh session on the TrueNAS machine with the following command:
      1. ntfs-3g -o uid=1003,gid=1003 /dev/ada1p2 /mnt/pool1/MountLocation/Toshiba-12TB
        1. I use the user & group ID of the user nfsshare
  4. Creating the Share
    1. made a NFS Share to the location /mnt/pool1/MountLocation
    2. checked the boxes for all directories and read only
    3. set Mapall User & Mapall Group to the user & group nfsshare
    4. and put in my network to the authorized list
  5. Connect to the share on the Ubuntu Client
    1. I connect to the NFS Share via this command:
      1. sudo mount -t nfs 192.168.1.10:/mnt/pool1/MountLocation /mnt/TrueNASHDDs
    2. doing a ls -la /mnt/TrueNASHDDs now shows the folder Toshiba-12TB (which I mounted inside /mnt/pool1/MountLocation/ within TrueNAS)
So far so good. The problem now is that my Ubuntu client cannot see inside or access the /mnt/TrueNASHDDs/Toshiba-12TB folder.
Any ideas why this might be the case?

I know that directly mounting a HDD within TrueNAS is not the "normal" way to go but I dont have space to import this HDD to so I have to leave all data intact but still be able to share it to the VM. Since with bhyve you can only add a zvol I cannot directly attach the HDD to the VM.

regards
lukazy
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
TrueNAS isn't designed to share anything other than what's on it's ZFS pools.

The reason it doesn't work may also be that NFS will only share out contents that are within the same filesystem (even need to be from the same dataset within ZFS, so getting it to share NTFS via mount/link is very unlikely to work).

You will need to find a way to have another disk somewhere to facilitate the transfer to ZFS.
 

lukazy88

Dabbler
Joined
Jul 7, 2021
Messages
13
I know it is nor designed that way but I thought it might work anyway. I got myself an HBA and will try passing this through to my VM to eliminate the problems I hope.
 
Top