Looks an easy mistake? cifs_mount failed w/return code = -2 /etc/fstab

I'm fairly new to Ubuntu and I'm attempting to create a Plex Server, I've done the install but I cannot mount my NAS?!?!.. I've decided to log into a Mint VM and to use the command line to try to identify the problem. Subsequently I was unsucessful and I'm now attempting it on my actual text based installation of Ubuntu Server VM.

Looks like a simple directory/file syntax error as it's saying the directory doesn't exist.

Admittedly I may have done something wrong so I took a screenshot with everything applicable on screen. Hopefully, this will tell you what you need to know? If not I'll be fairly quick at replying as I'm hoping to get this sorted today. (That was yesterday.)

My thanks in advance for your help/replies!

Unable to post images (less than 10 Rep points) therefore here's a Postimg link instead.




08/02/22 EDIT : Here are a number of other 'resources' which may help you understand my problem?




08/02/22 EDIT, EDIT :


You will notice there when attempting a CIFs share the source (NAS) is listed as //192.168.0.46/directory

You will see that when attempting an NFS share the source (NAS) is listed as //192.168.0.46:/directory - (Colon B4 directory) Seemingly this is normal for NFS shares...

My colon image attached - (Not literally PMSL)

FSTAB examples:

#CIF Shares - NOT WORKING / TRIED TESTED:

//192.168.0.46/nfs/Music /mnt/nas/Music cifs credentials=/home/plex/smbpassword,vers=1.0,iocharset=utf8,_netdev 0 0

ERRORs with 'CIFS VFS: cifs_mount failed w/return code = -2
mount error(2): No such file or directory'


192.168.0.46/nfs/Music /mnt/nas/Music cifs credentials=/home/plex/smbpassword,vers=1.0,iocharset=utf8,_netdev 0 0

ERRORs with 'mount.cifs: bad UNC (192.168.0.46/nfs/Music)'


//192.168.0.46/public/Music /mnt/nas/Music cifs credentials=/home/plex/smbpassword,vers=1.0,iocharset=utf8,_netdev 0 0

ERRORs with 'CIFS VFS: cifs_mount failed w/return code = -2
mount error(2): No such file or directory'


//192.168.0.46/public/Music /mnt/nas/Music cifs credentials=/home/plex/smbpassword,vers=1.0,iocharset=utf8,_netdev 0 0

ERRORs with 'mount.cifs: bad UNC (192.168.0.46/nfs/Music)'


#NFS Shares - NOT WORKING / TRIED TESTED:

//192.168.0.46:/nfs/Movies /mnt/nas/Movies nfs credentials=/home/plex/smbpassword,vers=1.0

ERRORs with 'mount.nfs: Failed to resolve server //192.168.0.46: Name or Service not known'


//192.168.0.46/nfs/Movies /mnt/nas/Movies nfs credentials=/home/plex/smbpassword,vers=1.0

ERRORs with 'mount.nfs: remote share not in 'host:dir' format'


192.168.0.46:/nfs/Movies /mnt/nas/Movies nfs credentials=/home/plex/smbpassword,vers=1.0

ERRORs with 'mount.nfs: mount system call failed'




My apologies, I'm struggling to get to grips with these methods of formatting,
09/02/22 EDIT - Just addressing that now!

What doesn't help is yes I can ping the NAS perfectly fine, however, I don't know the correct directory structure to assign it to..

Using FTP the directory is (as you've seen from my first picture) /pools/A/A0/xxx

Using NFS the directory is /nfs/xxx

Using CIFS there is an unconfirmed possibility the directory is /public/xxx according to that similar question I linked earlier.




It's as simple as for me to be able to mount the NAS then Plex itself will see/read and that will be my problem dealt with.. just a simple thing (LMAO)




09/02/22 EDIT :


Replying to @Muru - - Is there any way to extend the TTL of this? I will go an try it using a smaller directory in the mean time.

EDIT :

I've just tried it with the Music directory (literally that only has 2 x Music videos (MPG files, 300MB each) and that times out as well).

EDIT :

I've just ran smbclient -L //192.168.0.80 on myself. It came back with smbclient SMB1 disabled -- no workgroup available. I've just edited /etc/samba/smb.conf and added the line client min protocol = NT1 below the workgroup name. After restarting the smbd & nmbd services I now get the following..

Basically, smbXcli_negprot_smb1_done: No compatible protocol selected by server
protocol negotiation failed: NT-STATUS_INVALID_NETWORK_RESPONSE
Unable to connect with SMB1 -- no work group available.

My question is now, would that explain the network mount timeouts? or am I just going off down another rabbit hole?

EDIT :

Interestingly enough, I just tried the following command:

sudo mount 192.168.0.46:/Music /mnt/nas/Music -t nfs

(Knowingly that the path was wrong as it should be 192.168.0.46:/nfs/Music) and it still timed out.. doesn't even seem to be communicating with the NAS, yet it'll ping the NAS fine..

I've just gained access to my NAS through a secret menu and enabled SSH. Maybe if I knew what I was doing this could help? Screenshot link attached.. well it would of been but apparently You need at least 10 reputation to post more than 8 links so Please see comments for screenshot. Thanks


Guys.. I give you all this wealth of information.. yet you cannot help me.. I'm amazed.. ;-x

5

2 Answers

It's complaining that the directory /media/nas doesn't exist. The /media file structure is used by the automounter, and shouldn't be used by anybody else.
Instead, sudo mkdir -m 0755 -p /mnt/nas and use /mnt/nas.

5

OK, so although this isn't 100% solved, I've reworked what I was trying to achieve and gone about it in a different manner.

I decided to connect to my NAS from a Windows PC, so that I could 'right click properties' it to view it's UUID. With that piece of information I could mount it using the UUID instead of it's IP address in /etc/fstab. It still didn't work, but I feel it got me a stage further down the path.

The way I've currently got this working is using a round about method, I've made a new 4TB VM partition to copy the contents of the NAS onto. Then I can use the NAS itself as a backup medium, as it's not directly connected. By creating a directory (/NAS) which is mounted to the actual VM (admittedly using Linux Mint) using this line in my /etc/fstab

/dev/sdb1 /NAS auto nosuid 0 0

This works and my additional NAS partition is then mounted into the VM under /NAS.

Yes it's not idea, and is reliant on the individual having enough space to be able to create an additional NAS partition but it does have the benefit of having a backup medium that can be accessed over FTP.

These NAS drives (mine being an Iomega IX4-200d) are quite unique and difficult to manage so hopefully this information will benefit somebody. The majority of the helpful community doesn't seem to have a clue about the trials and tribulations of working with such devices.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like