SOLVED NFS share mount on Ubuntu 20.04

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
Hi,

I created a dataset called nextcloud to host next cloud data. I assigned the user to be nextcloud and denied everyone else.
I then created the NFS share as normal
Here is my share looks like in TrueNas:
Code:
root@truenas[~]# cat /etc/exports
/mnt/tank/nextcloud -alldirs -network 192.168.1.0/24


When I try and mount it in Ubuntu using:
Code:
sudo mount 192.168.1.167:/mnt/tank/nextcloud /home/username/nextcloud_mounted/ -vv

I get the following error:
Code:
mount.nfs: timeout set for Fri Mar 12 15:35:00 2021
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.167,clientaddr=192.168.1.171'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.1.167,clientaddr=192.168.1.171'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=192.168.1.167,clientaddr=192.168.1.171'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.1.167'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.167 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.167 prog 100005 vers 3 prot UDP port 916
mount.nfs: mount(2): Input/output error
mount.nfs: mount system call failed


On the TrueNas logs I am seeing these:
Code:
Mar 11 22:53:19 truenas 1 2021-03-11T22:53:19.127907+00:00 truenas.local mountd 74970 - - mount request denied from 192.168.1.171 for /nextcloud

What am I doing wrong?
 
Last edited:

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
Try to use maproot user to root and mapgroup user to wheel

Code:
cat /etc/exports
/mnt/tank/nextcloud -alldirs -maproot="root":"wheel" -network 192.168.1.0/24


For the mounting use -o tcp,vers=3 to skip NFS4 and UDP
Code:
mount -o tcp,vers=3 -vv 192.168.1.167:/mnt/tank/nextcloud /home/username/nextcloud_mounted/
 

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
Try to use maproot user to root and mapgroup user to wheel

Code:
cat /etc/exports
/mnt/tank/nextcloud -alldirs -maproot="root":"wheel" -network 192.168.1.0/24


For the mounting use -o tcp,vers=3 to skip NFS4 and UDP
Code:
mount -o tcp,vers=3 -vv 192.168.1.167:/mnt/tank/nextcloud /home/username/nextcloud_mounted/

Hi thanks,

It is working now. Had to change the maproot user and group name in the share via Advanced options and it is working and mounting fine. i.e.: cat /etc/exports V4: / -sec=sys /mnt/tank/nextcloud_data -maproot="my_user":"my_group" -alldirs -network 192.168.1.0/24

The nextcloud folder now without any issues using the following:
Code:
sudo mount -t nfs -o tcp,vers=3 192.168.1.167:/mnt/tank/nextcloud_data /home/username/test/ -vvvv
 
Last edited:
Top