/etc/exports loses changes on reboot (NFS)

Whiskey

Dabbler
Joined
Jul 10, 2021
Messages
29
I always had one line in my /etc/exports for one NFS share, but recently I needed a second. Adding it was no problem, but whenever the system is rebooted, the 2nd line disappears (first stays in place). I'm running FreeNAS-11.3-U5 and I'm editing the file from the command line. I'm really puzzled by what could be going on here, so any help or pointers are appreciated.

On another note, the whole move to TrueNAS passed me by completely (nice to have a NAS that runs that stable, didn't need support in a long while). Happy to see there still is a FreeNAS subforum (but I guess I should update to TrueNAS core now at some point now)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I'm editing the file from the command line

What you see every time you open the command line:
Code:
Welcome to FreeNAS

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



I don't understand where your confusion is coming from.

If you want to have things persist through reboots and updates, you need to set them from things that are held in the config db... like a pre-init script or command that would employ sed or something like that to insert your desired contents every time.
 
Last edited:

Whiskey

Dabbler
Joined
Jul 10, 2021
Messages
29
Thanks for the reply. I usually connect via SSH and funnily enough the welcome message there does not show that warning. But that would explain things.

Was wondering how I got that first line in there then and it was dead simple: there is a page for Sharing in the UI with an NFS section. So I should just have taken a closer look at the UI pages. Thanks for putting me on the right track, guess I learned my lesson ;-)
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I usually connect via SSH and funnily enough the welcome message there does not show that warning
Not sure what you did to stop it, but what I copied there was from an SSH session.
 
Top