Newbie and Fstab

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Hello,

I am starting with TrueNas and I don't understand why my fstab comes back to the initial config at each reboot.
For exemple:

I set:

/dev/da1p1 /mnt/diskint ufs rw 0 0 0

When I reboot only the default line remains:
fdescfs /dev/fd fdescfs rw 0 0

Thanks :)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Config at the CLI is potentially going to be overwritten... as you are told every time you open the CLI.

Code:
Welcome to TrueNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.


If you want that change to be there on every boot, you need to script it with sed or similar and run that script as a post-init.
 

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Thanks for the quick reply. I just need to add a new hard disk with a mount point :)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
To add to @jgreco's post - ZFS is the only file system supported for storage in TrueNAS. Even if you manage to add a UFS filesystem like in your fstab entry, you will not be able to use it for any services.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
To add to @jgreco's post - ZFS is the only file system supported for storage in TrueNAS. Even if you manage to add a UFS filesystem like in your fstab entry, you will not be able to use it for any services.

That might not be strictly true; NFS, for example, would probably work, but I expect there would be problems with SMB because of all the ZFS- and iX-specific module work done by @anodos ... however, it is certainly skeezy and also risky to have disks attached that the middleware does not understand.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
As far as I know the middleware prohibits configuring any share on anything but a configured ZFS pool. I'm not 100% confident I am correct.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
As far as I know the middleware prohibits configuring any share on anything but a configured ZFS pool. I'm not 100% confident I am correct.

You are certainly correct in that it attempts to do so. But it is a weak willed error prone attempt; it is happy to accept a non-ZFS submountpoint.

Code:
root@nas0:/mnt/storage0 # mkdir shareme
root@nas0:/mnt/storage0 # mount -t tmpfs tmpfs /mnt/storage0/shareme
root@nas0:/mnt/storage0 # df shareme
Filesystem 1K-blocks Used   Avail Capacity  Mounted on
tmpfs        3964904    4 3964900     0%    /mnt/storage0/shareme


Then go to webUI and share that via NFS

Code:
root@nas0:/mnt/storage0 # grep shareme /etc/exports
/mnt/storage0/shareme


Ta da, non-ZFS share shared. We worked this out at some point for a fellow who wanted iSCSI file extents on UFS, which definitely works (or at least worked). I would not expect this to work for SMB due to all the ZFS-specific stuff.
 

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Ok, thanks for the replies. So I did that so far:

truenas2.png


I created one pool with on disk (I know the risk).
My need is to:

Backup my data form my cloud subscription to my local hard disk in a folder named pcloud
Backup my data from my laptop to my local hard disk in a folder named laptop

Is that possible ?

Many Thanks
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Backup my data form my cloud subscription to my local hard disk in a folder named pcloud
using a cloud sync task (based on having created a cloud credential first)

Backup my data from my laptop to my local hard disk in a folder named laptop
Many ways to do that, but SMB share and using Windows backup to point at that share is the one that's already there.

Is that possible ?
Yes, see above, maybe create a dataset for each of those if you would like to have different snapshot frequencies, permissions, recordsizes or otherwise keep the data separate.
 

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Now am able to share with NFS et SMB. I have just another question.
I have installed the plugin Motion and I want to save the record in a specific folder: /mnt/diskint/camera but doesn't work.

However in /mnt it works, I do not understand why :-/

 

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Ok in looking deeper, I found that I need to create a Jail what I've done so and mount a point, but :

I want that my record from camera goes to /mnt/diskint/camera so I need to select the below source and select the default folder of records in MotionEye (/var/lib/motioneye/ but I don't find the path in the below destination.

truneas.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
There's nothing wrong with typing a path if you know it's there or you want it to be created.
 

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Thanks. To be honest I do not understand ... and my need seems easy, at least on Linux OS.
I would like that the path of my records of my cameras is /mnt/diskint/camera.

Untitled 2.png


But it doesn't work when I try to do it via Jails to mount points.
When I try to set the path /mnt/diskint/camera and I save it shows
/mnt/diskint/iocage/jails/camerafolder/root/mnt/diskint/camera

Untitled 3.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Looks to me like you have it backwards... hence not working.

Source is /mnt/diskint/camera

Destination is /mnt/diskint/iocage/jails/wheteverJailRunsMotionEye/root/var/lib/motioneye

You need to think of jail mounts as mounting storage into the jail, not the other way around.
 

rjcb

Dabbler
Joined
Jun 19, 2023
Messages
12
Ok, so I try to progress :)
I did that :

Untitled 5.png

Untitled 4.png


but my records are in mnt/diskint/iocage/jails/Portier/root/var/lib/motioneye and when I set this path in the first screen it doesn't take it :(
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
OK, I see what's happening... you're trying to add a mount to the wrong jail (you're in camerafolder when trying to add that mount).
 
Top