CLI configurations?

CPP-IT

Dabbler
Joined
Aug 14, 2017
Messages
43
I'm fairly sure this is somewhere in the forum, but my search-fu didn't bring in the results I was looking for so ... I'm gonna ask this dumb noob question.

When I SSH into the FreeNAS and change to the root account I get the following warning:

Code:
FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+3b66a34f3aa(HEAD): Wed Feb 27 14:31:54 EST 2019

        FreeNAS (c) 2009-2019, The FreeNAS Development Team
        All rights reserved.
        FreeNAS is released under the modified BSD license.

        For more information, documentation, help or support, go here:
        http://freenas.org
Welcome to FreeNAS
freenas% su -
Password:

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

root@freenas[~]#


My question is about this line: Warning: settings changed through the CLI are not written to the configuration database and will be reset on reboot.

What does or does not get written from the terminal?

Further, if change is desired to be made via a terminal or terminal like command is that something that your API was meant to do?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The short version is most changes will cause trouble (weird behavior in the GUI or worse). The major exception is iocage, which works both from the CLI and the GUI.

Further, if change is desired to be made via a terminal or terminal like command is that something that your API was meant to do?
Yes, that's the point of the API.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
freenas% su -
Password:

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

root@freenas[~]#[/CODE]

My question is about this line: Warning: settings changed through the CLI are not written to the configuration database and will be reset on reboot.

What does or does not get written from the terminal?

FreeNAS was meant to be an appliance and users aren't really supposed to be poking around "inside." However, it is written on top of a UNIX variant, so you *can* poke around.

Basically there isn't that much you can do at the terminal to alter conventional UNIX things that are likely to survive a reboot, and of those that do, those are likely to be wiped out by an update. The FreeNAS middleware takes all the configured settings out of its own database, and makes changes that are appropriate to the FreeBSD base system to "make it work" as the user has indicated through the GUI.

So for example, if you fat finger an IP address in the GUI and lose connectivity to your NAS GUI, yes you can go into the CLI and manually set an IP address with "ifconfig", but that will vanish the next time you change networking via the GUI or reboot. FreeNAS isn't aware of the change you did by hand with ifconfig, and while it could potentially scan for such changes, the list of possible things you can twiddle from the CLI is dismayingly endless.

So anything you want to stick around needs to be fed to the GUI, or to the API, which will happily cause your FreeNAS to retain those settings through reboots and upgrades. You can potentially even tinker directly with the database from the CLI but this is probably a bad idea.
 

CPP-IT

Dabbler
Joined
Aug 14, 2017
Messages
43
@jgreco Thank you for your insights!

I'm learning FreeBSD as a tangent to this. I chose FreeNAS for our office, since most of the users are less likely to dig in and get their hands dirty with some terminal commands.

This is by no means to say I'm 'good' at this, just more interested than the average user. ;)
 
Top