Unable to get a unraid NAS share to mount in Ubuntu

I am trying to setup fstab so that my Ubuntu 20.04.2 LTS install will mount the share to /mnt/NAS.

So far I have had no luck with the mount command of anything I can think of to put in fstab. The only way I have been able to mount it is though the file explorer. This works great but I need it on file system so steam can see it for game installs.

sudo mount -t xfs mount pathtoshare
mount: mount point does not exist.

Also tried to edit the fstab file with
pathtoshare mount xfs defaults 0 2

I had to edit the above so it would not count as a link.

Any ideas on what I am missing?

https://wiki.ubuntu.com/MountWindowsSharesPermanently

What kind of file share?

Here’s the problem: you need to create the mount point first.

sudo su #to gain permanent root privileges
mkdir /mnt/NAS
chmod 777 /mnt/NAS #this allows all other users to access the directory
mount /mnt/NAS /path/to/share

Study the man page for the mount command for the correct syntax, I’ve noticed you had too many arguments.

HTH!

We are presuming this:

sudo mount -t xfs mount pathtoshare

Is a mistype of

sudo mount -t xfs mountpoint pathtoshare

As in:

sudo mount -t xfs 192.168.1.2:/mnt/user/RemoteShare /mnt/LocalShare

[derp, I got the source and target the wrong way round]

Thank you for the ideas I tried the following

sudo mount -t xfs /mnt/NAS 192.168.1.200:/mnt/user/test
mount: 192.168.1.200:/mnt/user/test: mount point does not exist.

I also tried it like this

sudo mount -a /mnt/NAS 192.168.1.200:/mnt/user/test
mount: /mnt/NAS: special device //192.168.1.200/test does not exist.

Also the mount point does exist I created it with a mkdir command but I did not give it 777 permissions. I can try that but it does not seem like that should be needed. Also I don’t really want the directory to be owned by root. I did try it to see if it would help and it did not.

/mnt$ ls -l
total 8
drwxrwxrwx 2 root  root  4096 Jul 24 21:09 NAS

As for the type of share it seems to be xft. I just left that as default when I created it in unraid. If there is a command to test this I can make sure.

Log in to 192.168.1.200 and check /mnt/user/test exists and is read- and writeable.
chmod +rwx /mnt/user/test

To change ownership of the directory, assuming the user name is larry and has a group with the same name:
chown larry:larry /mnt/user/test

You may need to adjust the mount command:
mount /mnt/NAS 192.168.1.200:/test
You can safely skip the -t option, mount is clever enough to figure out which file system is used and appends it automagically.

1 Like

I SSHed in the unraid server and remote into the the directory I am trying to mount

root@Tower:/mnt/user# ls-l
total 0
drwxrwxrwx 1 nobody users 112 Apr 30 11:49 test/

I remoted in though the same server I am trying to mount that share too to rule out any network issues. But it all seems to be there and in the same syntax I am using for the mount command.

I did also try the command how you recommended but not luck.

/mnt$ sudo mount /mnt/NAS //192.168.1.200:/test
mount: //192.168.1.200:/test: mount point does not exist.

How are you making the folder available?

Sharing through samba, or NFS?

Or sftp?

2 Likes

I am able to access the share in three ways so far.

  1. SSH into the unraid server with putty
  2. Login to the unraid server though a web browser
  3. I can mount the drive though the Ubuntu file explorer. When I do it this way it gets mounted as smb://tower.local/test/ I can mount it the same way in command line as well.

Mounting it as smb work flawlessly and I can access all my files that way, but it is not persistent though a reboot. I also cant access a smb mount though steam to use as a game library

Here you go, have a read:
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

More reading:
https://help.ubuntu.com/community/Fstab

I have read though the fstab documentation and have been able to get other drives to mount on boot with it. I have had no luck with using it with smb shares.

The smb,conf file is new to me honestly not even sure where that would be located. Not sure if this would be helpful in my case. It seems to only allow read only access to the share unless I am misreading it.

I tried the following in the fstab file, but nether of the following lines seem to have helped.

//192.168.1.200/test  /mnt/NAS  xfs  defaults    0        2
smb://192.168.1.200/test /mnt/NAS xfs uid=1000,gid=1000  0  0

This is my fstab line for a network share with credentials:

//192.168.0.XX/Scratch /mnt/Server/Scratch cifs credentials=/root/server_creds,iocharset=utf8,uid=1000,gid=1000,file_mode=0775,dir_mode=0775 0 0

if your using samba i don’t think the filesystem matters; You also need cifs-utils installed on the ubuntu client.

Any Luck?