SOLVED Yet another Newbie Wants to add TrueNAS to my fstab

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
I've seen multiple other threads on this already, and I've gotten to where mount -alv doesn't throw any errors. No, now it just tells me "ignored".

So, here is my fstab entries:
Code:
//192.168.0.104/mnt/FirstNAS/house   /media/sappha58  cifs  username=sappha58,password=xxxxxxxx,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev       0       0
//192.168.0.104/mnt/FirstNAS/sappha58   /media/sappha58  cifs  username=sappha58,password=xxxxxxxx,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev       0       0


Code:
So when I do the following:
sappha58@intrepid:~$ mount -alv
/                        : ignored
/boot                    : already mounted
/boot/efi                : already mounted
/home                    : already mounted
none                     : ignored
/media/sappha58          : ignored
/media/sappha58          : ignored


I used to use SAMBA, and I do install the client so I can access my TrueNAS, but SAMBA became a royal pain in the neck. I am loving my NAS, as I can access it from any machine in my network (Linux Mint 22, Windows 10, and Android phones). Yes, I can go to my network icon and mount them that way, but I'd really like to add them to my fstab and have them automount.

Thoughts?
Thanks!
 
Last edited by a moderator:

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
So I keep hunting for answers, and found a mount command and tried it. Here's the result:

Code:
sappha58@intrepid:~$ mount -t cifs //192.168.0.104/mnt/FirstNAS/sappha58 -o username=sappha58,password=XXXXXXXX/media/sappha58
mount.cifs: permission denied: no match for /media/sappha58 found in /etc/fstab
 
Last edited by a moderator:

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
I keep hunting. I had tried to use .smbcredentials to remove my username/password from fstab, but it wasn't working. I ran across a webpage just a few minutes ago showing that the file needs domain, too, thusly:

username=yourusername
password=yourpassword
domain=yourdomain

Once I added domain, it no longer complains about the credentials file.

I'm still getting the following error, though:
mount.cifs: permission denied: no match for /media/sappha58 found in /etc/fstab

help?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,297
Well, I see a couple of problems, aside from the fact that your first post is in a small enough font to be nearly illegible. It also looks like you're trying to mount two different shares to the same mountpoint, which I wouldn't expect to work. Does the mountpoint (i.e., the directory of /media/sappha58/) even exist on your system? Does your user have rwx permissions for that directory? Does your user have permission to mount filesystems?
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
Good questions; thanks! And sorry about the small font. First time poster and all.

Yes, the directory /media/sappha58 does exist on the system. I do have rights to mount to it, as every time I boot the machine, it automatically mounts an external USB drive, which shows in that directory (as well as my desktop.) So I guess that answers the third question, as well.

That's a big part of why I'm puzzled. I have had other USB drives I've inserted (flash as well as actual hard drives) and they also show up in this directory. So I thought that would be fine.
 

CJRoss

Contributor
Joined
Aug 7, 2017
Messages
137
I just use Autofs instead of bothering with fstab. Although I'm not sure that would help with your issue.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,060
aside from the fact that your first post is in a small enough font to be nearly illegible
Fixed that. Too bad tiny fonts can occasionally be used for comedic effect, because they can be a pain to deal with.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,060
I just use Autofs instead of bothering with fstab. Although I'm not sure that would help with your issue.
Good tip. Works great over LAN, though the setup is kinda weird if you haven't done it before.
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
I just use Autofs instead of bothering with fstab. Although I'm not sure that would help with your issue.

I went and looked up Autofs for Linux Mint 22, and I found
Code:
https://forums.linuxmint.com/viewtopic.php?t=377630

Which a reply to the OP there said, in part, "The mount point cannot be in your home directory or under /media so in this example I set it under /mnt.
noauto,x-systemd.automount == replicates the "mount when accessed" feature of the original autofs.
x-systemd.idle-timout=30 replaces the timeout=30 of the old autofs."

So I guess I need to shift away from the /media mount-point. I'll try it after work tonight and report back.
 

CJRoss

Contributor
Joined
Aug 7, 2017
Messages
137
Good tip. Works great over LAN, though the setup is kinda weird if you haven't done it before.

The setup was definitely a bit confusing to figure out and get sorted, but since then it's been rock solid and I don't ever think about it unless I need to add another share.

Not sure what you mean about working great over LAN. Can you clarify?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,060
I mean that it works less great if the network connection back to the NAS is unstable (e.g. moving around between WiFi networks).
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
Okay, I'm back. I've changed my fstab entries:
Code:
//192.168.0.104/mnt/FirstNAS/house              /mnt/sappha58  cifs    credentials=/etc/samba/.smbcredentials-rlp,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev       0       0
//192.168.0.104/mnt/FirstNAS/sappha58           /mnt/sappha58  cifs    credentials=/etc/samba/.smbcredentials-rlp,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev       0       0


Still gets ignored by "mount -alv".

Tried
mount -t cifs //192.168.0.104/mnt/FirstNAS/sappha58 -o credentials=/etc/samba/.smbcredentials-rlp /mnt/sappha58
and got
mount.cifs: permission denied: no match for /mnt/sappha58 found in /etc/fstab

/mnt/sappha58 exists, with the proper owner/privs deployed.

I am missing *something*, and I expect it's likely to be quite trivial. Something akin to holding my mouth wrong. Thoughts?
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
285
Code:
//192.168.0.104/mnt/FirstNAS/house

I think your mount path from TrueNAS is incorrect. Are you sharing the entire /mnt directory from TrueNAS and trying to mount a subdirectory inside, or are you trying to mount a directory you have directly shared?

I think the share path should be //192.168.0.104/share_name - So if you shared a directory named house, the path in your fstab should be //192.168.0.104/house

Here's a working example from my server

This share from TrueNAS is being auto-mounted with fstab on a Linux client
1707570005022.png


In the fstab on my Linux client, I have the following
Code:
//truenas/backups /mnt/backups cifs credentials=/etc/samba/credentials/troy,users,iocharset=utf8,rw,x-systemd.device-timeout=10,_netdev 0 0

And my credentials file looks like this
Code:
username=troy
password=super-secrete-password



Also...
Yes, the directory /media/sappha58 does exist on the system. I do have rights to mount to it, as every time I boot the machine, it automatically mounts an external USB drive, which shows in that directory
You can not simultaneously mount multiple shares (or devices) to the same directory. You should create a separate directory for each thing you want to mount.

Instead of this
Code:
//192.168.0.104/mnt/FirstNAS/house              /mnt/sappha58  ...
//192.168.0.104/mnt/FirstNAS/sappha58           /mnt/sappha58 ...

Try something like
Code:
//192.168.0.104/mnt/FirstNAS/house              /mnt/house  ...
//192.168.0.104/mnt/FirstNAS/sappha58           /mnt/sappha58 ...
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
Sorry I've taken so long to respond; I work evenings and just got up a bit ago.

Based on your recommendations, I've changed my fstab entries thusly:
Code:
# TrueNAS mounts
//192.168.0.104/house     /media/nas-house     cifs  credentials=/etc/samba/.smbcredentials-rlp,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev  0  0
//192.168.0.104/sappha58  /media/nas-sappha58  cifs  credentials=/etc/samba/.smbcredentials-rlp,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev  0  0


And I should've realized I didn't need the full TrueNAS path to get to my folders. Thanks, that helps!

I'm still getting error messages from mount. It has been a *very* long time since I dug into it, so I've forgotten a lot. Here's what I'm getting now:
Code:
sappha58@intrepid:~$ mount -vl nas-house
mount: nas-house: can't find in /etc/fstab.
sappha58@intrepid:~$ mount -vl sappha58
mount: sappha58: can't find in /etc/fstab.
sappha58@intrepid:~$ mount -avl
/                        : ignored
/boot                    : already mounted
/boot/efi                : already mounted
/home                    : already mounted
none                     : ignored
/media/nas-house         : ignored
/media/nas-mydir         : ignored


As you can see, it already recognizes the mount points, but somehow can't find the path in fstab.
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
WOAH, Nellie!

After my last response above, I rebooted. Surprise, surprise, surprise - things work! But now I'm looking at double icons on my home screen.
NAS mounts.jpg
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,297
sappha58@intrepid:~$ mount -vl nas-house
I'm pretty sure you'd want to mount the full path: mount /media/nas-house
/media/nas-mydir : ignored
Where does this come from? You haven't shown us any nas-mydir mount point as yet.

It's probably worth pointing out that this is not a TrueNAS problem; it's a client problem. Whatever support resources exist for your client OS would likely be a better place to ask than here. But with that said...

Some of your options look odd to me. FWIW, here's what I have on a Debian machine that mounts a SMB share from my NAS:
Code:
//192.168.1.10/media /mnt/media cifs vers=3.0,noserverino,credentials=/root/.smbcredentials

Maybe it'd be worth trying to simplify your fstab entry and see if that works.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
285
sappha58@intrepid:~$ mount -vl nas-house

Based on your latest fstab, I think you'd want
Code:
mount -vl /media/nas-house


For the double icons - which Linux distro are you using? If I remember correctly, some distro's like Ubuntu (or Ubuntu-based), depending on the desktop environment, will create an icon for anything mounted under /media, and they also create an icon because there is an entry in your fstab. I think if you change from /media to /mnt in your fstab, you will only have one set of icons.
 
Last edited:

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
I changed the entries to /mnt/nas-house and /mnt/nas-sappha58. I was able to sudo mount both.
Based on your latest fstab, I think you'd want
Code:
mount -vl /media/nas-house


For the double icons - which Linux distro are you using? If I remember correctly, some distro's like Ubuntu (or Ubuntu-based), depending on the desktop environment, will create an icon for anything mounted under /media, and they also create an icon because there is an entry in your fstab. I think if you change from /media to /mnt in your fstab, you will only have one set of icons.
Things are progressing. I have got the two directories to mount, so this is good. Then I got double icons; I'll talk about that shortly.

I am on Linux Mint 21.3, Virginia, using Mate desktop.
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
Thanks everyone for your assistance with this! I'll deal with the rest of it elsewhere. I appreciate y'all!
 
Top