Score:-1

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

cn flag

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 - https://i.postimg.cc/vH8vxZLP/1050-AM-Help.jpg - 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..

https://i.postimg.cc/1tQFhymh/samba.jpg

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




Organic Marble avatar
us flag
When I edit my working fstab file and put the colon after the URL in a cifs mount, it then fails when I do a sudo mount -a with `mount error: could not resolve address for 192.168.1.2:: Unknown error` Remove colon, it works again. Suggest you get rid of the colons. Also suggest you paste your fstab file in your question as text, there is no need to have it as a picture.
muru avatar
us flag
Then use pastebinit to post to paste.ubuntu.com, or use SSH and get a local terminal.
muru avatar
us flag
Oh, this is a Mint VM. Linux Mint is off-topic here.
muru avatar
us flag
`192.168.0.46:/nfs/Movies /mnt/nas/Movies nfs credentials=/home/plex/smbpassword,vers=1.0` is the closest you came to a correct NFS mount. The options (`credentials=/home/plex/smbpassword,vers=1.0`) have nothing to do with NFS, though - you're using SMB options with NFS. Fix those to use options to be something suitable for NFS (just try `defaults` for a start, `nfsvers` if you need to set the version).
JohnWick avatar
cn flag
[Screenshot](https://i.postimg.cc/TPszhT2K/sshaccess.jpg) **BECAUSE** *You need at least 10 reputation to post more than 8 links.*
Score:1
it flag

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.

JohnWick avatar
cn flag
Thanks for your comment. I've been trying this and that since originally posting. I've already moved away from using the **media folder**. Currently I'm putting commands into **/etc/fstab** and running **sudo mount -a** from the command line. If that then doesn't work I'm running **sudo systemctl daemon-reload** and re-editing fstab. Currently I've got **//192.168.0.46:nfs/Music /mnt/nas/Music credentials=/home/plex/smbpassword,vers=2.0,ro** in my **/etc/fstab** file, but it's erroring with **mount.nfs: Failed to resolve server //192.168.0.46: Name or service not known**. My NAS is ix4-200d
Organic Marble avatar
us flag
I don't know if this is part of the problem or not, but in my working fstab file, I have `//192.168.1.2/Data` Note the `/` after the URL, not a `:`
waltinator avatar
it flag
Does `/mnt/nas/Music` exist? Does the server export the `Music` subdirectory?
waltinator avatar
it flag
Please [edit] your post to add new information, properly formatted. Information added via comments is hard for you to format, hard for us to read and ignored by future readers (who have better answers). Please click [edit] and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our way to help you improve your question. All facts about your system and problem should go in the Question with [edit]. You may click on any of these [edit] links to [edit] your question.
JohnWick avatar
cn flag
OK, thank-you.. I will re-Edit original post
Score:0
cn flag

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.

David avatar
cn flag
This is a direct word for word repeat of a very old answer already on the site.
JohnWick avatar
cn flag
Thanks for sharing the link David, appreciated ;-D
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.