SOLVED Unable to open database /data/freenas-v1.db

fireburst

Cadet
Joined
Jul 25, 2022
Messages
8
Hi,
I noticed recently I cannot get any report email with smart report etc. It says
"Error: unable to open database ‘/data/freenas-v1.db’: unable to open database file" when I try to run script with shell command.

Everything looks good with zpool status.

What is the reason of this error? I can backup config file manually. Is there any way to copy backup file to data folder (to restore freenas-v1.db file)?

Also, when I login with root account I cannot reach mnt folder in shell. I cannot see mnt folder when I list the folders. But I can reach this folder (all folders) if I login with other admin account that I created.
Why I cannot reach mnt folder with root account?

Version: FreeNAS-11.3-U5

Thank you for your help.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
What is the reason of this error?
Seems obvious enough...

Perhaps permissions are messed up on your root filesystem somehow.

If you can back up your config, then do so, reinstall and restore the config to get back to what should be "normal".
 

fireburst

Cadet
Joined
Jul 25, 2022
Messages
8
Thank you for your answer.

I can backup my config. I was also using script for backup, so I have past backups too.

I've never tried reinstall boot drives before. I have ZFS pools, datasets for a long time. I guess backup only config file is enough. I didn't encrypt my zfs pools. I have snapshots but I think it is not important at this point.

I will reinstall then.
 

fireburst

Cadet
Joined
Jul 25, 2022
Messages
8
Sorry for new reply in a row.

I reinstalled and restored config. When I try to run scripts with shell command still it says "Error: unable to open database '/data/freenas-v1.db': unable to open database file". So, it is unable to run script.

I don't know which parts are affected with this error. I have cron jobs send email about zpool status etc. I only noticed I cannot get status report etc.

Do you have any suggestions?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Seems like the problem is in your config.

Depending on the complexity, it may be easier to just start fresh and create it again.

Trying to go back to older configs could also be an option to shortcut that as you said you have them.
 

fireburst

Cadet
Joined
Jul 25, 2022
Messages
8
Sorry for the late reply.
I actually solved the problem with the older config. Although both configs are the same, the old one worked.

Thank you!
 
Top