FreeNAS internals documented?

Status
Not open for further replies.

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
Hi there,

are there any FreeNAS internals documented? In particular I am looking for database schemas and examples.

I know, that FreeNAS works best, when users only do what designers and programmers intended and don't mess around and end up crying for help about an totally messed up system they had produced. But sometimes, something might occur, which had not been on the programmers mind and that something leaves the user in an unacceptable situation, which a new FreeNAS version is not likely to cure.

Well I created and deleted a user account through the GUI, like times before. But this time, trying to recreate the deleted user, I get:

[middleware.exceptions:38] [MiddlewareError: Operation could not be performed. pw: login name `jdoe' already exists ]

But neither the GUI shows this jdoe user nor /etc/passwd. Seems he is only in the virtual world of FreenNAS's databases.

Running "FreeNAS-9.2.1.5-RELEASE-x64 (80c1d35)". Rebooting doesn't help.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not really. The "documentation" you are looking for is also called "the source code". :/

If I were you I'd do two things:

1. Check the consistency of your database. I made a guide on how to do this in the how-to section somewhere. It's a one-line command that tells you if your database is corrupted.
2. Put in a bug ticket and see what the devs have to say.
 

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
Checked the database consistency. Result: ok

Still, the middleware error persists. Although I am not afraid of a little bit db schema reverse engineering, I have never touched sqlite3 before nor do I have any spare time yet (especially to recover if I do harm to the database ;-)

I really will appreciate any knowledge from someone who has dealt with FreeNAS users in the database before and is willing to give me a jump start by providing example sqlite commands, table structures and schema explanations as far as he knows. Doesn't have to be perfect, doesn't have to be complete. I think I can handle it. I am also reading my PM's, if you don't feel comfortable posting your insides publicly.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm not aware of anyone that has database experience in the forums. Generally it's something you should shy away from. In all seriousness if you put in a ticket at bugs.freenas.org and ask how to delete the database entry someone will probably give you the applicable commands. ;)
 

DataMover

Explorer
Joined
Feb 18, 2014
Messages
50
Ah, yes, you have said before....

Sorry, must have forgotten your advice in a blink of the eye. Today, maybe my headache is to blame...

I will go the bugs route.
 
Status
Not open for further replies.
Top