[SOLVED] Issues Mounting NAS Drive

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
BearV

[SOLVED] Issues Mounting NAS Drive

Post by BearV »

Hey all,

I'm new to Linux in general so please bare with me here; I have been reading and attempting solutions for most of the afternoon also until I've finally decided to ask for help, so I hope you can assist. The issue is most likely simple, but I'm having a real issue getting my WD NAS to mount with a symbolic link, mainly for Plex to discover and add as a library.

I have tried both smb and cif /etc/fstab edits:

Code: Select all

//server/public/Movies  /user/Movies  smbfs username=linuxmint,password=password 0 0
and,

Code: Select all

//server/public/Movies /user/Movies cifs auto,iocharset=utf8,uid=1000,gid=users,file_mode=0775,dir_mode=0775 0 0

Code: Select all

//server/public/Movies   /user/Movies cifs    uid=1000,gid=users,dir_mode=0755,file_mode=0755 0 0
Followed by 'sudo mount -a'

The result is an error reading "Mount: uknown filesystem type 'smbfs'", even with cifs. After this I tried installing the cifs package again through the terminal with the '# apt-get install cifs-utils' command, same issue, and I also tried getting Samba with' # apt-get install smbfs' - which displays an error saying the package is no longer available.

Now for some reason mounting and sharing a folder between LM and a Windows 10 Tablet works fine with editing the /etc/samba/smb.conf? Yet the NAS just won't mount.

I've got to be overlooking something simple here. Any helpful advice?



Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: Issues Mounting NAS Drive

Post by WharfRat »

Hello BearV Image

Welcome to Linux Mint and the Linux Mint forum :)

Does server resolve to an to IP address entry in /etc/hosts :?:

And you need, I believe, a credentials file with your user and password or username= and password= options e.g.,

sudo mount -t cifs //192.168.1.1/nas/ /media/nas -o credentials=/home/bill/.smbcredentials,uid=1000,gid=1000

and in fstab something like

//192.168.1.1/nas /media/nas cifs credentials=/home/bill/.smbcredentials,uid=1000,gid=1000,noauto,nofail,user 0 0
BearV

Re: Issues Mounting NAS Drive

Post by BearV »

Thankyou!

That worked perfectly. That was driving me crazy, I knew it'd be rather simple.

I don't suppose there would be a GUI for adding other shares in the future by any chance?
WharfRat

Re: Issues Mounting NAS Drive

Post by WharfRat »

BearV wrote:I don't suppose there would be a GUI for adding other shares in the future by any chance?
To be honest with you I've never looked into a gui for such functions.

There is a gshare package that's described as a "Easy user-level file sharing for GNOME", but it might not be compatible with the Mate or Cinnamon desktops.

Also I'm not sure it can setup cifs/samba shares.

I just did a repo search and turned-up system-config-samba which is a "GUI for managing samba shares and users" so you might want to look in to that :wink:
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

So I've run into another issue - the mounting is working and accessible, however whenever I power off or restart my PC it's not keeping them in place. It's also still listing the fstab paths under the network but giving the error 'mount: /mnt/nas: No such file or directory' when I select them, yet it mounts with the terminal entry regardless.

How do I address this issue?
Last edited by BearV on Fri Oct 27, 2017 4:31 pm, edited 1 time in total.
WharfRat

Re: [SOLVED] Issues Mounting NAS Drive

Post by WharfRat »

BearV wrote:So I've run into another issue - the mounting is working and accessible, however whenever I power off or restart my PC it's not keeping them in place. It's also still listing the fstab paths under the network but giving the error 'mount: /mnt/nas: No such file or directory' when I select them, yet it mounts with the terminal entry regardless.

How do I addres this issue?
What does your fstab entry look like now and do you have a /mnt/nas folder :?:
BearV

Re: Issues Mounting NAS Drive

Post by BearV »

So the fstab entry is essentially the same as you posted, just pointing to my paths.

//192.168.1.1/nas /media/nas cifs credentials=/home/usr/.cifscredentials,uid=1000,gid=1000,noauto,nofail,user 0 0

The directories all exist and are mounting, they're just not retaining after a restart.
WharfRat

Re: [SOLVED] Issues Mounting NAS Drive

Post by WharfRat »

What kind of nas device are you using :?:

My 192.168.1.1 example is a Linksys 1900AC router with an esata or USB connection that can serve as networked storage.

Unless you have a router or NAS device that you setup with that IP, I'm a little confused with that fstab entry :?
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: Issues Mounting NAS Drive

Post by altair4 »

BearV wrote:So the fstab entry is essentially the same as you posted, just pointing to my paths.

//192.168.1.1/nas /media/nas cifs credentials=/home/usr/.cifscredentials,uid=1000,gid=1000,noauto,nofail,user 0 0

The directories all exist and are mounting, they're just not retaining after a restart.
Nor will they. That line in fstab states noauto.

Here is how the line WharfRat wrote works:

** Something under /media produces a mount icon on the desktop if your desktop allows it and also on the side panel of your file manager.
** The noauto / user options makes the mount icon actionable - Select it to mount. The whole thing is seamless.

When you changed the mount point to be under /mnt you broke the magic.

Possible options:

[1] Put the mount point under /media again - will also work if you put it in your home directory.

[2] Remove the noauto option so that it mounts at boot. This can be an issue since the networking stack on Mint occurs so late.

[3] Keep the line as it is with /mnt/nas but add an entry into your Startup Applications list:

Code: Select all

mount /mnt/nas
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

WharfRat wrote:What kind of nas device are you using :?:

Unless you have a router or NAS device that you setup with that IP, I'm a little confused with that fstab entry :?
Oops sorry guys I was just using the generic entry example WharfRat used just to show you. I also didn't realise the /mnt/ had an effect.

Mine is a WD My Cloud and the entry looks more like like this:
//mycloudwd/public/Movies /home/bearv/Movies cifs credentials=/home/bearv/.cifscredentials,uid=1000,gid=1000,noauto,nofail,user 0 0
Last edited by BearV on Fri Oct 27, 2017 8:39 pm, edited 1 time in total.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: [SOLVED] Issues Mounting NAS Drive

Post by altair4 »

Assuming you meant /home/bearv/Movies that will work but you have to remember how to access that share.

You can only mount it by accessing the "Movies" link under Network:
CIFS1.png
Not the one under My Computer:
cifs2.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

Yep. It does show under network but it gives the error 'mount: No such file or directory' when I select them, yet it mounts with the terminal entry fine.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: [SOLVED] Issues Mounting NAS Drive

Post by altair4 »

I've run out of time today but does your error message look like this:
Unable to mount Music
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
That will happen if you are trying to access a server or a share on that server that does not exist.

I cannot reproduce a 'mount: No such file or directory' error.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

Yeah sorry I'm not at home today either, but the error prompt is pretty much as I typed it:

'mount /directory/: No such file or directory'.

No more than that.

Like I said if I mount through the terminal with,

sudo mount -t cifs //mycloudwd/public/Movies /home/bearv/Movies -o credentials=/home/bearv/.cifscredentials,uid=1000,gid=1000

It mounts fine. So it exists.
WharfRat

Re: [SOLVED] Issues Mounting NAS Drive

Post by WharfRat »

After you mount it with the cl check the results of sudo blkid

It should list the device mounted to /home/bearv/Movies.

The problem with the fstab entry might be that you're using the wrong device address.
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

Ok, I'm home now and have had a chance to play with things. I have the mount icons actionable now. Sorry I feel a little stupid as it was because the credentials were actually in /root not in /home so I didn't have elevated privileges; That's what I get for writing something from memory while I was away.

However they're still not retaining after boot, even after removing noauto from the fstab entry.
WharfRat

Re: [SOLVED] Issues Mounting NAS Drive

Post by WharfRat »

After mounting the device in the terminal paste back sudo blkid and grep -v ^# /etc/fstab
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

sudo blkid:

Code: Select all

/dev/sda1: UUID="3F36-9B13" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="000d796e-3d1d-49f3-b02b-f2bea0c44733"
/dev/sda2: UUID="7ea0462e-5a35-4d7c-935a-5a9e1f1106ea" TYPE="ext4" PARTUUID="a84b7ea0-330f-4160-8f83-463104d503dd"
/dev/sda3: UUID="e41e8361-855a-43ad-9642-74a1178bf88d" TYPE="swap" PARTUUID="5b588b92-44fa-4485-ba50-291715dade21"
grep:

Code: Select all

UUID=7ea0462e-5a35-4d7c-935a-5a9e1f1106ea /               ext4    errors=remount-ro 0       1
UUID=3F36-9B13  /boot/efi       vfat    umask=0077      0       1
UUID=e41e8361-855a-43ad-9642-74a1178bf88d none            swap    sw              0       0

//wdmycloud/public/Movies /home/bearv/Movies cifs credentials=/home/.cifscredentials,uid=1000,gid=1000,nofail,user 0 0

//wdmycloud/public/Series /home/bearv/Series cifs credentials=/home/.cifscredentials,uid=1000,gid=1000,nofail,user 0 0
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: [SOLVED] Issues Mounting NAS Drive

Post by altair4 »

And how about:

Code: Select all

mount | grep cifs
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
BearV

Re: [SOLVED] Issues Mounting NAS Drive

Post by BearV »

Code: Select all

mount | grep cifs
//wdmycloud/public/Series on /home/bearv/Series type cifs (rw,nosuid,nodev,relatime,vers=1.0,cache=strict,username=bearv,domain=,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.178.29,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)
//wdmycloud/public/Movies on /home/bearv/Movies type cifs (rw,nosuid,nodev,relatime,vers=1.0,cache=strict,username=bearv,domain=,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.178.29,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)
//wdmycloud/public/Series on /home/bearv/Series type cifs (rw,nosuid,nodev,noexec,relatime,vers=1.0,cache=strict,username=root,domain=,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.178.29,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)
Locked

Return to “Networking”