SOLVED Yet another Newbie Wants to add TrueNAS to my fstab

CJRoss

Contributor
Joined
Aug 7, 2017
Messages
139
I mean that it works less great if the network connection back to the NAS is unstable (e.g. moving around between WiFi networks).

Interesting. I would have thought Autofs would automatically handle reconnecting better. I'm wired so I've never tried it.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Well, it's down to what the desktop environment is doing. If the right sequence of actions takes place, it's easiest to reboot to get it working again.
 

Becca Putman

Dabbler
Joined
Feb 8, 2024
Messages
12
One last entry from me in this thread. I got the basic mounts working nicely, but I could not write to the drives. I did some looking up on a couple of Linux forums, and got it working. So for anyone in the future who is having trouble like I had, here is the final result with instructions on how to do it:
Code:
# TrueNAS mounts
//<<IP to your TrueNAS>>/<<TrueNAS share name>>     /media/<<directory on your machine>>     cifs  rw,uid=1000,gid=1000,credentials=/etc/samba/.smbcredentials,users,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev  0  0


Notes for fstab
~~ ~ ~~ ~ ~~ ~ ~~ ~
Bear in mind that I've changed names above to more generic names. Look for things enclosed in chevrons, thusly: <<your username>>. Copying this verbatim will not work.

Using admin privs, copy the fstab file in the /home/<<your username>>/notes-to-do directory into the /etc directory. (My notes-to-do directory holds all the stuff I add onto Linux after install it. Again.)

Using admin privs, go into /media and create however many directories you need, each called different names that you'll want to use. Make sure they have the same ownership and priviliges as the /media/<<directory on your machine>> directory does.

Using admin privs, create a .smbcredentials (again, use your own naming conventions) and put it someplace safe. I put mine in /etc/samba. That credentials file needs to contain:
Code:
username=<<your username>>
password=<<your password>>
domain=<<your domain name>>


Make sure that the TrueNAS machine is up and running.

Reboot your Linux box.
 
Last edited:
Top