Mounting NFS drive

Discussion about using NAS on Linux and Unix OS.
Locked
userman93
Starting out
Posts: 31
Joined: Wed Feb 10, 2021 9:38 pm

Mounting NFS drive

Post by userman93 »

I am trying to mount my qnap NFS drive on a debian server. I've tried multiple variations of this command, but have had no success so far. What am I doing wrong?

Code: Select all

mount -t nfs 192.168.0.9:/pve-backup /mnt/qnap/ -o vers=4
mount.nfs: access denied by server while mounting 192.168.0.9:/pve-backup
I tried adding username=x,password=y, but get this error: mount.nfs: requested NFS version or transport protocol is not supported.
I've enabled NFS v2,3 and 4. I tried defining my credentials as options, and tried vers={2,3,4}, and none of those work: mount.nfs: an incorrect mount option was specified
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: Mounting NFS drive

Post by Mousetick »

Is /pve-backup the full path to the shared folder on the NAS? That seems unlikely so you may want to fix that first. The correct path is probably /share/pve-backup.

And then you may want to take a look at these pages if that still doesn't work:
Mounting a Shared Folder on a Linux Computer
Talk:Mounting an NFS share on Ubuntu
User avatar
OneCD
Guru
Posts: 12010
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Mounting NFS drive

Post by OneCD »

Mousetick wrote: Thu Feb 11, 2021 9:58 am Is /pve-backup the full path to the shared folder on the NAS? That seems unlikely so you may want to fix that first. The correct path is probably /share/pve-backup.
That's true, except QNAP's NFS server allows clients to specify share-names without the [/share] bit. It's a neat feature: I wish I knew how to replicate it on my Debian server. :geek:
userman93 wrote: Thu Feb 11, 2021 9:48 am I am trying to mount my qnap NFS drive on a debian server. I've tried multiple variations of this command, but have had no success so far. What am I doing wrong?

Code: Select all

mount -t nfs 192.168.0.9:/pve-backup /mnt/qnap/ -o vers=4
mount.nfs: access denied by server while mounting 192.168.0.9:/pve-backup
Just tried connecting from my Debian 10.8 workstation to a newly created NFS share here on my test NAS, and it worked first-time (this is also the first-time I've enabled NFS on this NAS):

Code: Select all

$ sudo mount -t nfs 10.0.0.3:/pve-backup /mnt/qnap/ -o vers=4
$ df /mnt/qnap/
Filesystem           Type  Size  Used Avail Use% Mounted on
10.0.0.3:/pve-backup nfs4  2.5T  148M  2.5T   1% /mnt/qnap
  • Did you enable NFSv4 in the QTS Control Panel -> Network & File Services -> Win/Mac/NFS -> NFS Service tab -> "Enable NFS v4 Service"?
  • Did you tick the 'access right' checkbox? QNAP have hidden this under 'NFS Host Access' for each shared folder. Even if you don't change any permissions here, you must tick the 'access right' checkbox to enable the share to be exported by the NFS server.
  • Remember to use 'showmount' on your client device to check your NAS is actually exporting its shares:

    Code: Select all

    $ sudo showmount -e 10.0.0.3
    Export list for 10.0.0.3:
    /Public     *
    /pve-backup 10.0.0.10
    

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
userman93
Starting out
Posts: 31
Joined: Wed Feb 10, 2021 9:38 pm

Re: Mounting NFS drive

Post by userman93 »

Interesting... Ran a showmount -e against the IP of the qnap nas device, and got nothing in return... that might be an issue....
Please see attached images.
2021-02-11_08-02.png
2021-02-11_08-01.png
You do not have the required permissions to view the files attached to this post.
User avatar
OneCD
Guru
Posts: 12010
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Mounting NFS drive

Post by OneCD »

userman93 wrote: Thu Feb 11, 2021 9:03 pm Interesting... Ran a showmount -e against the IP of the qnap nas device, and got nothing in return... that might be an issue....
Did you tick the 'access right' checkbox for your share? Can you post a screenshot of this setting?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
userman93
Starting out
Posts: 31
Joined: Wed Feb 10, 2021 9:38 pm

Re: Mounting NFS drive

Post by userman93 »

I don't see that as an option.
2021-02-11_13-29.png
You do not have the required permissions to view the files attached to this post.
User avatar
OneCD
Guru
Posts: 12010
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Mounting NFS drive

Post by OneCD »

userman93 wrote: Fri Feb 12, 2021 2:30 am I don't see that as an option.
Click on the folder properties icon, then examine the drop-down box near the top of the next screen. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
OneCD
Guru
Posts: 12010
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Mounting NFS drive

Post by OneCD »

Oops, didn't have my new NAS powered-up to check this before posting earlier. :oops:

The correct icon is called "Edit Shared Folder Permission":

Image

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
userman93
Starting out
Posts: 31
Joined: Wed Feb 10, 2021 9:38 pm

Re: Mounting NFS drive

Post by userman93 »

Out of curiosity, what are all of these other shared folders, like Download, and Multimedia? Is there a way to delete them? They seem to be auto-created.
User avatar
OneCD
Guru
Posts: 12010
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Mounting NFS drive

Post by OneCD »

userman93 wrote: Fri Feb 12, 2021 3:03 am Out of curiosity, what are all of these other shared folders, like Download, and Multimedia? Is there a way to delete them? They seem to be auto-created.
They are default shares created by QTS and are needed for its own operation. Don't remove them. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Locked

Return to “Linux & Unix (NFS)”