Need some help with NFS

mgrenier25

Cadet
Joined
Feb 4, 2021
Messages
3
Hi everyone,

I have an old HP z800 workstation running Proxmox 6.3-2.
I have set up a TrueNAS-SCALE-22.02-RC.1 VM on it.
Passed some drives to the TrueNAS vm using qm set $vm# -$scsi# /dev/disk/by-id/$diskid#
Created a Raidz2 pool using said drives
Created 2 datasets, one for a Windows SMB share and another one for a Linux NFS share
Enabled both SMB and NFS from the TrueNAS WebUI
I can access the SMB share without issues, but the NFS is another story.
I added $serverip:/mnt/$NFSsharepath /mnt/$mountpath nfs defaults 0 0 to my /etc/fstab on a Debian laptop I want to access the NFS share from
But if I run the mount command I don't see the NFS filesystem listed
I confirmed NFS service is running on the server using systemctl status nfs-ganesha
Running showmount -e $serverip on the laptop shows the server IP, path to share, and (everyone)
Creating a test file on any of the machines is only visible on the machine I used to create it.

I'm no Linux expert and English is not my main language
If you guys need more info I'd be happy to try and provide it to the best of my knowledge
Any idea what I did wrong? Besides probably everything?

What should I try next? I'm open to ideas
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Passing drives as you described to your SCALE VM is OK for testing, but you need to pass through a HBA with drives attached for proper use.

In SCALE nfsv4 exports work, so for the "NFS service" just check both "Enable NFSv4" and "NFSv3 ownership mode ... " (avoids messing with id mapping and domain matching). When you add a NFS share you'll want to use the "advanced options" to configure the user/group mappings and set the security to "sys".

The Web UI creates the nfs export definition which is in /etc/ganesha/ganesha.conf, e.g:

Code:
root@truenas:/etc/ganesha# cat ganesha.conf


NFS_CORE_PARAM {
    Bind_addr = 192.168.0.22;
}
NFSV4 {
    Allow_Numeric_Owners = true;
    Only_Numeric_Owners = true;
}
EXPORT_DEFAULTS {
    SecType = sys;
}
     

     
     
EXPO
root@truenas:/etc/ganesha# cat ganesha.conf


NFS_CORE_PARAM {
    Bind_addr = 192.168.0.22;
}
NFSV4 {
    Allow_Numeric_Owners = true;
    Only_Numeric_Owners = true;
}
EXPORT_DEFAULTS {
    SecType = sys;
}
     

     
     
EXPORT {
    Export_Id = 1;
    Path = /mnt/Spool/mpdata;
    Protocols = 3, 4;
    Pseudo = /mnt/Spool/mpdata;
    Transports = TCP;
    Access_Type = None;
    CLIENT {
        Clients = 192.168.0.0/24;
        Access_Type = RW;
    }
    Squash = RootSquash;
     
    Anonymous_Uid = 0;
    Anonymous_Gid = 0;
    FSAL {
        Name = VFS;
    }
}
RT {
    Export_Id = 1;
    Path = /mnt/Spool/mpdata;
    Protocols = 3, 4;
    Pseudo = /mnt/Spool/mpdata;
    Transports = TCP;
    Access_Type = None;
    CLIENT {
        Clients = 192.168.0.0/24;
        Access_Type = RW;
    }
    Squash = RootSquash;
     
    Anonymous_Uid = 0;
    Anonymous_Gid = 0;
    FSAL {
        Name = VFS;
    }
}


Test with a CLI mount, e.g:

Code:
chris@kubuntu:~$ sudo mount -vvv -t nfs 192.168.0.22:/mnt/Spool/mpdata /home/chris/NFS
mount.nfs: timeout set for Sat Oct 30 07:07:52 2021
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.22,clientaddr=192.168.0.201'
chris@kubuntu:~$ sudo umount /home/chris/NFS
 
Top