Trying to add TrueNAS in fstab in Linux Mint or ubuntu so it automounts and into user

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
Using Linux Mint 21 at the moment but want to auto mount mt TrueNAS at boot.
Just haven't figured out how to add in fstab to do that.
I can mount it manually by clicking "NETWORK", then "truenas" then either user directories I have in there input UN, Domain, PW. and files are there.
So how do I put that in the etc/fstab so auto boot into user.
I have my QNAS input as such.
//192.168.1.8/Download /media/DUDENETNAS1 cifs username=xxxxx,password=xxxxx,nounix,auto,user,uid=1000 0 0
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Maybe it'll help if you tell us exactly what your problem/error is. From a quick glance, it looks like that should work.
 

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
Maybe it'll help if you tell us exactly what your problem/error is. From a quick glance, it looks like that should work.
That is a QNAP nas that works fine, just don't know how that would be for the Truenas
is it:?
//192.168.1.7/media/truenas /smb:// trunas.local/ cifs username=xxxxx,password=xxxxx,nounix,auto,user,uid=1000 0 0
or
//network/truenas.local
not sure how to do it.
Also if i look at properties of the folder on truenas location is smb://truenas.local/ the volume is "foldersname on truenas.local"

I've tried several things but have blown up booting several times, so trying to avoid that.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
That is a QNAP nas that works fine, just don't know how that would be for the Truenas
is it:?
//192.168.1.7/media/truenas /smb:// trunas.local/ cifs username=xxxxx,password=xxxxx,nounix,auto,user,uid=1000 0 0
or
//network/truenas.local
not sure how to do it.
Also if i look at properties of the folder on truenas location is smb://truenas.local/ the volume is "foldersname on truenas.local"

I've tried several things but have blown up booting several times, so trying to avoid that.
So let me clarify this. So you are trying to mount your TrueNAS share (is it also CIFS?) on your Linux Mint client? Which computer is 192.168.1.7? Which IP is your NAS on?

I just mounted my TrueNAS SMB share on my LinuxMint laptop with this entry:
Code:
//nas.ip.add.ress/myshare /mnt/tmp cifs username=user,password=password,uid=1000 0 0


I'm not sure what that /smb:// is up there in what you copied, but I'm pretty sure that doesn't belong there.
 
Last edited:

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
So let me clarify this. So you are trying to mount your TrueNAS share (is it also CIFS?) on your Linux Mint client? Which computer is 192.168.1.7? Which IP is your NAS on?

I just mounted my TrueNAS SMB share on my LinuxMint laptop with this entry:
Code:
//nas.ip.add.ress/myshare /mnt/tmp cifs username=user,password=password,uid=1000 0 0


I'm not sure what that /smb:// is up there in what you copied, but I'm pretty sure that doesn't belong there.
Ok I'm trying here: I'm kind of a noob.
The Truenas ip is 192.168.1.7.
Yes when on a Linux Mint or any Linux client I see it and can mount it going to Network, truenas, and see both folders/directories at that point.
To get there I click Network, truenas then the folders are there.
When on a windows client I see it in Network, double click it and there are the folders/directories. properties say FolderName (\\TRUENAS)
Not sure if that is cifs or not.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Ok I'm trying here: I'm kind of a noob.
The Truenas ip is 192.168.1.7.
Yes when on a Linux Mint or any Linux client I see it and can mount it going to Network, truenas, and see both folders/directories at that point.
To get there I click Network, truenas then the folders are there.
When on a windows client I see it in Network, double click it and there are the folders/directories. properties say FolderName (\\TRUENAS)
Not sure if that is cifs or not.
So, on your Linux Mint /etc/fstab, you should do this (this is pulled from my own Linux Mint laptop):

Code:
//192.168.1.7/your_truenas_share_name /path/to/your/local/mint/folder cifs username=user,password=password1,uid=1000 0 0


A few things here to clarify:
  • your_truenas_share_name is the name of your SMB share that you specified in your TrueNAS web UI under Sharing -> Windows Shares (SMB).
  • /path/to/your/local/mint/folder is the folder on your Linux Mint machine. It could be any folder you made anywhere.
  • user is the username you made on TrueNAS web UI under Accounts -> Users, password1 is your password for it.
  • uid is the user id of your Linux Mint user you're using. You can get this number from the Linux Mint terminal by typing id user
That should about cover it. Let me know if you need further clarification.
 
Last edited:

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
tried all these with no joy.
sudo mount //TRUENAS /media/TrueNAS/ -o user=user,pass=pass
sudo mount.cifs //192.168.1.7 /TRUENAS /media/TrueNAS/ -o user=user,pass=pass
sudo mount.cifs //TRUENAS /media/TrueNAS/ -o user=user,pass=pass
sudo mount //192.168.1.7 /TRUENAS
 

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
So, on your Linux Mint /etc/fstab, you should do this (this is pulled from my own Linux Mint laptop:

Code:
//192.168.1.7/your_truenas_share_name /path/to/your/local/mint/folder cifs username=user,password=password1,uid=1000 0 0


A few things here to clarify:
  • your_truenas_share_name is the name of your SMB share that you specified in your TrueNAS web UI under Sharing -> Windows Shares (SMB).
  • /path/to/your/local/mint/folder is the folder on your Linux Mint machine. It could be any folder you made anywhere.
  • user is the username you made on TrueNAS web UI under Accounts -> Users, password1 is your password for it.
  • uid is the user id of your Linux Mint user you're using. You can get this number from the Linux Mint terminal by typing id user
That should about cover it. Let me know if you need further clarification.
Thanks I’ll post results later.
 

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
Wow this shouldn’t be this hard.
Ok here is what I’ve gathered so far and still get Nothing or failed boot:
On the UI of TrueNAS:
Shares tab:Windows (SMB) Shares
Name=Name Path=/mnt/Storage/Folder. Under Creds User=name 1000 the the other user is 1002
On Linux client PC I made directory. /media/TrueNAS with 2 users folders Inside that.
——-
Question
your code://192.168.1.7/myshare /mnt/tmp cifs username=user,password=password, uid=1000 0 0
is /myshare / is that the name on share?
and is mnt/tmp your complete path /mnt/Storage/Name

Here is what I‘ve tried:
//192.168.1.7/Name /media/TrueNAS cifs username=user,password=password,uid=1000 0 0
//192.168.1.7/Storage /media/TrueNAS cifs username=user,password=password,uid=1000 0 0
among many others, just think I‘ll scrap it for now till I can get my head around this a little better.
or load and old laptop with live cd so I don’t keep breaking boot.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Wow this shouldn’t be this hard.
Ok here is what I’ve gathered so far and still get Nothing or failed boot:
On the UI of TrueNAS:
Shares tab:Windows (SMB) Shares
Name=Name Path=/mnt/Storage/Folder. Under Creds User=name 1000 the the other user is 1002
Ok, so this tells me, your /etc/fstab entry on your Linux Mint, so far, should be:
Code:
//192.168.1.7/Name /media/TrueNAS/user1000 cifs username=user1000,password=password1000,uid=1000 0 0
//192.168.1.7/Name /media/TrueNAS/user1002 cifs username=user1002,password=password1002,uid=1002 0 0

Note that uid=1000 is NOT the id that's on your TrueNAS. This should be the uid of whichever user you plan to use that share with on your Linux Mint machine. Again, do [lCode]id mint_user[/lCode] to find out that id number. Depending on how your Linux Mint machine is setup, it may actually NOT be 1000 and 1002. Again, NOT the TrueNAS uid.

On Linux client PC I made directory. /media/TrueNAS with 2 users folders Inside that.
——-
Question
your code://192.168.1.7/myshare /mnt/tmp cifs username=user,password=password, uid=1000 0 0
is /myshare / is that the name on share?
myshare is the name listed under Name on TrueNAS shares tab.

and is mnt/tmp your complete path /mnt/Storage/Name
/mnt/tmp is the LinuxMint folder name you created, which are /media/TrueNAS/user1000 and /media/TrueNAS/user1002.

Here is what I‘ve tried:
//192.168.1.7/Name /media/TrueNAS cifs username=user,password=password,uid=1000 0 0
//192.168.1.7/Storage /media/TrueNAS cifs username=user,password=password,uid=1000 0 0
among many others, just think I‘ll scrap it for now till I can get my head around this a little better.
or load and old laptop with live cd so I don’t keep breaking boot.
I feel like you're probably confusing the uid on TrueNAS vs the one from Mint. It should be the uid of the user on Mint.
If you don't want to break boot, you can try the commands manually on the Mint terminal like so:
Code:
mount -t cifs -o username=user,password=password //192.168.1.7/Name /media/TrueNAS/user1000
 

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
Ok, so this tells me, your /etc/fstab entry on your Linux Mint, so far, should be:
Code:
//192.168.1.7/Name /media/TrueNAS/user1000 cifs username=user1000,password=password1000,uid=1000 0 0
//192.168.1.7/Name /media/TrueNAS/user1002 cifs username=user1002,password=password1002,uid=1002 0 0

Note that uid=1000 is NOT the id that's on your TrueNAS. This should be the uid of whichever user you plan to use that share with on your Linux Mint machine. Again, do [lCode]id mint_user[/lCode] to find out that id number. Depending on how your Linux Mint machine is setup, it may actually NOT be 1000 and 1002. Again, NOT the TrueNAS uid.


myshare is the name listed under Name on TrueNAS shares tab.


/mnt/tmp is the LinuxMint folder name you created, which are /media/TrueNAS/user1000 and /media/TrueNAS/user1002.


I feel like you're probably confusing the uid on TrueNAS vs the one from Mint. It should be the uid of the user on Mint.
If you don't want to break boot, you can try the commands manually on the Mint terminal like so:
Code:
mount -t cifs -o username=user,password=password //192.168.1.7/Name /media/TrueNAS/user1000
SOLVED
Thank you thank you,
HERE IS WHAT WORKED
Code:
//192.168.1.7/thesharename /media/TrueNAS/thesharename/ cifs username=thesharename,password=password,nounix,auto,user,uid=1000 0 0
 
Last edited:

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
Thanks again,
One quick question Whattteva, how do you get your signature to collapse like that?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Thanks again,
One quick question Whattteva, how do you get your signature to collapse like that?
Cheers!!! :smile: :smile: :smile:
The answer is you use spoiler tags like the following. Of course, get rid of the extra spaces I put there on the spoiler tag.

Code:
[ SPOILER="TrueNAS CORE 13.0-STABLE" ]
Put extra stuff here.
[/SPOILER]
 

keithsplace

Dabbler
Joined
Feb 4, 2022
Messages
22
Cheers!!! :smile: :smile: :smile:
The answer is you use spoiler tags like the following. Of course, get rid of the extra spaces I put there on the spoiler tag.

Code:
[ SPOILER="TrueNAS CORE 13.0-STABLE" ]
Put extra stuff here.
[/SPOILER]
Thanks again, and also anyone following or with same issue, I have it showing in Conky as well with this:
Code:
${color orange}TrueNAS:${color}${fs_size /media/TrueNAS/Sharename} / ${fs_used /media/TrueNAS/Sharename}
${color}${fs_bar /media/TrueNAS/Sharename}
 
Top