Strange behaviour after powerloss

Status
Not open for further replies.

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Dear community, I'm going crazy with a strange behaviour after powerloss.
I have one CIFS and one NFS share and now my FreeNAS 9.2.1.5 box takes a long time to enter into these shares. Seems something like the disks goes in standby, but in the settings I see Always On for all disks. So first o enter into CIFS share my PCs take at least 10 seconds. After entering all goes fine, but if I wait for a while I have to wait again to enter. The same from my media player that use NFS share.
Trasnfer speed is ok, scrubs doesn't report any issue, and the ZFS volume is healty. I rebooted twice the box without result. I also tried to create a new CIFS share, but with the same result.

Could someone help me to understand what's wrong NOW on my FreeNAS box? I never experienced something like that, maybe I have to reinstall the freenas software?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Sudden, uncontrolled powerloss is *never* a good thing. You may now have defective hardware, you may have damaged your pool, or you could have corrupted your configuration files. Have you tried a new thumbdrive? (You can still keep your old pool by simply importing it).
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
scrub is finished right now and the result (below) report a good pool status.
FreeNAS is installed on a little 32Gb SSD, at this point I'll reinstall FreeNAS in other SSD disk and import config and pool.

Code:
[root@nas] # zpool status -v
  pool: tank
state: ONLINE
  scan: scrub repaired 0 in 3h25m with 0 errors on Fri May 16 19:30:44 2014
config:
 
        NAME                                            STATE    READ WRITE CKSUM
        tank                                            ONLINE      0    0    0
          raidz1-0                                      ONLINE      0    0    0
            gptid/7e2dbbbe-8074-11e3-b603-6805ca18bc94  ONLINE      0    0    0
            gptid/7ec1e511-8074-11e3-b603-6805ca18bc94  ONLINE      0    0    0
            gptid/7f56a34a-8074-11e3-b603-6805ca18bc94  ONLINE      0    0    0
 
errors: No known data errors
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Patch does not resolve my issue, however I applied it just in case! ;)
To definitely solve the problem I re-installed from scratch to other SSD disk. At this point, restoring pool and configuration just bring back the issue, so I restore to the factory default and then configure my box from scratch. This action finally solved the CIFS and NFS share delay.
Most probably something goes wrong with FreeNAS config during power loss, I also analize the log and find a lot of smbd service error during access attempts.

EDIT: I'm not able to change the thread title as SOLVED.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Here's a couple of suggestions to prevent this in the future. Get a UPS and configure FreeNAS to shutdown gracefully in the event of a power failure.

Backup your configuration file on a regular basis. The file is located here: /data/freenas-v1.db Create a cron job or use one of the scripts on the forum to back it up. If the current file is bad, just grab the last copy of it.
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Well, I'm at home and I 'm not experiencing so many power loss. Anyway, this is a first time that I got this specific issue, and sure I'll create a cron script to store daily the configuration and keep at least the last two weeks.
Just a question. In case I need to restore, I can use the GUI, anyway, is the same if I overwrite the old freenas-v1.db file and then restart? Are there any other action to do?
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Yes, using the GUI for the restore is the preferable way to restore the configuration. No other actions are necessary.

cyberjock recently created a script to check the database. You might want to incorporate it too.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Just a question. In case I need to restore, I can use the GUI, anyway, is the same if I overwrite the old freenas-v1.db file and then restart? Are there any other action to do?

No, you don't just overwrite the file. You must do the upgrade from the GUI.

You *do* know that we've had people lose power on their box because they didn't have a UPS and the lost their pool permanently, right? We aren't recommending UPS because it's some "nice thing to have". People have had catastrophic data loss from not using a UPS.
 

Lucas Rey

Contributor
Joined
Jul 25, 2011
Messages
180
Yep! You just convinced me to buy an UPS. ;)
Do you have an advice about a cheap model? I see on UPS drive list a lot of models and brands, could you please help me to restrict at least to one brand?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Both APC and Cyberpower are pretty common and relatively inexpensive. Unfortunately the best advice I can give you is look at the list of NUT supported models as there's so many brands and models and depending on where you are in the world your options might be damn near zero.
 
Status
Not open for further replies.
Top