Talk:Mounting an NFS share on Ubuntu
In Ubuntu 14.04, portmap
has been replaced with rcpbind
.
At any rate, the mount
command give here just produces a mount.nfs: an incorrect mount option was specified
error on the system I just tried it on. The share is set up to allow the user in question read/write access, and NFS host access turned on for this share in Edit Shared Folder Permission, so I'm not sure what the issue is yet. It is possible to mount the share with cifs. Have also tried adding the vers=3
option, after -o
and this did not fix the issue. SMcCandlish (talk) 10:53, 26 February 2016 (CST)
I had the same problem as the previous user...
mount.nfs: an incorrect mount option was specified
...it looks like the username and password options are not valid for nfs mounts. I tried using vers=5, and this time I did not get the error above, but the drive did not mount...
ryan@jonesdesktop:~$ sudo mount -vvv -t nfs -o username=ryan,password=removed,vers=5 192.168.0.101:ryan /home/ryan/ryannas
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "192.168.0.101:ryan"
mount: node: "/home/ryan/ryannas"
mount: types: "nfs"
mount: opts: "username=ryan,password=removed,vers=5"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "192.168.0.101:ryan"
mount: external mount: argv[2] = "/home/ryan/ryannas"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,username=ryan,password=removed,vers=5"
.....this output looks like everything went fine, but the drive is not mapped. If I remove the vers=5 option, it looks like my Ubuntu system defaults to vers=4, but then it gives me the "incorrect mount option" error...
ryan@jonesdesktop:~$ sudo mount -vvv -t nfs -o username=ryan,password=removed 192.168.0.101:ryan /home/ryan/ryannas
mount: fstab path: "/etc/fstab"
mount: mtab path: "/etc/mtab"
mount: lock path: "/etc/mtab~"
mount: temp path: "/etc/mtab.tmp"
mount: UID: 0
mount: eUID: 0
mount: spec: "192.168.0.101:ryan"
mount: node: "/home/ryan/ryannas"
mount: types: "nfs"
mount: opts: "username=ryan,password=removed"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "192.168.0.101:ryan"
mount: external mount: argv[2] = "/home/ryan/ryannas"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,username=ryan,password=removed"
mount.nfs: timeout set for Tue Dec 6 13:48:28 2016
mount.nfs: trying text-based options 'username=ryan,password=removed,vers=4,addr=192.168.0.101,clientaddr=192.168.0.20'
mount.nfs: mount(2): Invalid argument
mount.nfs: an incorrect mount option was specified
Has anyone figured out how to resolve this?
[The previous unsigned comment was posted by Rpjones007, 04:30, 7 December 2016 (UTC)]
- Yes. The following command worked for me:
sudo mount -vvv -t cifs -o username=yevgen,password=removed //10.0.0.3:/data /mnt/qnap/
- [The previous unsigned comment was posted by Yevgen, 08:01, 31 January 2017 (UTC)]
- That's a CIFS (SMB) mount, not an NFS mount. Totally different protocols. While knowing how to do that is useful, being able to do it with NFS is necessary sometimes. I did get NFS to work for a client. I can dig up the details.
Here it is. This worked in Ubuntu 14.04 and 16.04, and Xubuntu 16.04:
sudo mount -w -v -t nfs -o user=theusername qnap.ip.or.hostname:/path/sharename /mnt/sharename
- That's a CIFS (SMB) mount, not an NFS mount. Totally different protocols. While knowing how to do that is useful, being able to do it with NFS is necessary sometimes. I did get NFS to work for a client. I can dig up the details.
- and enter the password when prompted (or you can add it as a commandline parameter, but I prefer not to, since that makes it visible to anyone looking over your shoulder.
However, one must first set up the share on Qnap, and then enable NFS access to it as a share option, and ensure that its details are set correct (
Hope that helps. — SMcCandlish (talk) 19:23, 31 January 2017 (CST)no_root_squash
, or whatever), then create the local directory for the mount point, then do the abovemount
command. To make the share permanent, it needs a corresponding entry in the client machine's /etc/fstab (or an /etc/fstab.d/ file), too.
- and enter the password when prompted (or you can add it as a commandline parameter, but I prefer not to, since that makes it visible to anyone looking over your shoulder.