[SOLVED] NFS Share to VM

Dataninja

Member
Apr 24, 2023
36
5
8
I'm very new to proxmox and experimenting with various things to get acclimated with the tool and I've hit a wall with setting up NFS share to my VM. I setup an Ubuntu server (20.04) in a VM, installed docker and setup plex through docker compose. I'd like to setup an NFS share to folder /home/dataninja/plex/media so I can access the media that's currently on my Qnap NAS.

  • Qnap NFS has been setup and the IP associated with the VM and Proxmox has been added (192.168.X.X)
  • showmount -e 192.168.X.X (Qnap IP) in the host and the VM shows the media folder available on my Qnap NAS
  • nfs-commons has been installed
my fstab looks like this where the uid/gid matches my Qnap ID and the ~/.smbcredentials houses my username and password

Code:
192.168.X.X:/media   /home/dataninja/plex/media   nfs credentials=/home/dataninja/.smbcredentials,uid=1001,gid=100,defaults   0   0

I keep getting the following error when running:

Code:
sudo mount -a
mount.nfs: an incorrect mount option was specified
 
Last edited:
Hi,

There seems to be a bit of a mix-up between NFS and CIFS/SMB:
  • credentials, uid and gid are options for mount.cifs, which is the tool for mounting CIFS and SMB shares.
  • But showmount shows mounts for NFS servers, and the third column of your /etc/fstab specifies a nfs filesystem type. This is why mount.nfs is executed and why it prints an error -- it doesn't understand the credentials, uid and gid mount options.
It sounds like your NAS might support both protocols, so you'd just need to decide for one of them and change the /etc/fstab accordingly. See e.g. [1] for more details on NFS and [2] for details on CIFS/SMB.

[1] https://wiki.archlinux.org/title/NFS#Client
[2] https://wiki.archlinux.org/title/samba#Client
 
Hi,

There seems to be a bit of a mix-up between NFS and CIFS/SMB:
  • credentials, uid and gid are options for mount.cifs, which is the tool for mounting CIFS and SMB shares.
  • But showmount shows mounts for NFS servers, and the third column of your /etc/fstab specifies a nfs filesystem type. This is why mount.nfs is executed and why it prints an error -- it doesn't understand the credentials, uid and gid mount options.
It sounds like your NAS might support both protocols, so you'd just need to decide for one of them and change the /etc/fstab accordingly. See e.g. [1] for more details on NFS and [2] for details on CIFS/SMB.

[1] https://wiki.archlinux.org/title/NFS#Client
[2] https://wiki.archlinux.org/title/samba#Client
Thank you for the assistance and the links. They were helpful.

I was able to setup the NFS Share using and adjusted the /etc/fstab to match. As you mentioned I may have been using the combination of both which is why it wasn't working. I'm still confused why the following worked without and username or PW. I suppose because I set the permission of the NFS share on the Qnap side and specific to the IP of the VM.

Code:
sudo mount -t nfs 192.168.X.X:/Downloads /home/dataninja/plex/media
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!