pfSense crash after Blackout



  • Hi People,
    I have an APU 2C4 with pfsense version 2.4.4 bios 4.10.0.0
    pfsense is installed on SSD msata with ZFS file system.
    here is the problem, after a blackout my system doesn't boot correctly anyway, and i must reinstalled it from scratch.
    I checked with serial cable and there is the video output:
    FreeBSD/amd64 (Amnesiac) (ttyu0)

    Warning: Failed loading Zend extension 'opcache.so' (tried: /usr/local/lib/php/20131226/opcache.so (Cannot open "/usr/local/lib/php/20131226/opcache.so"), /usr/local/lib/php/20131226/opcache.so.so (Cannot open "/usr/local/lib/php/20131226/opcache.so.so")) in Unknown on line 0

    Warning: PHP Startup: Unable to load dynamic library 'session.so' (tried: /usr/local/lib/php/20131226/session.so (Cannot open "/usr/local/lib/php/20131226/session.so"), /usr/local/lib/php/20131226/session.so.so (Cannot open "/usr/local/lib/php/20131226/session.so.so")) in Unknown on line 0

    what is happened ? how can i resolve for the future blackout ?
    I use ZFS because i know that is a strong file system but...
    tell me
    bye





  • Your filesystem is damaged. Not even ZFS is guaranteed to survive a sudden power off condition intact if the underlying disk hardware is not enterprise class. Most consumer-level disks (even SSDs) will tell the operating system something is written to disk before it actually is. This is a result of internal caching within the disk electronics itself. So if power is lost at the right time, data can get scrambled even using ZFS.

    You always need a UPS on a computer, and most certainly on a firewall. You also need to run one of the UPS packages available for pfSense (nut or apcupsd) with a connection to the UPS so that the UPS can signal the firewall when battery exhaustion is near and the firewall can shutdown gracefully.

    I'm not a ZFS expert. There may be some command in ZFS that is similar to the old fsck command used by UFS. Google would be your friend.

    Another option is to attempt to grab the config.xml file from the firewall and perform a fresh install while importing the old configuration.



  • @bmeeks said in pfSense crash after Blackout:

    Your filesystem is damaged. Not even ZFS is guaranteed to survive a sudden power off condition intact if the underlying disk hardware is not enterprise class. Most consumer-level disks (even SSDs) will tell the operating system something is written to disk before it actually is. This is a result of internal caching within the disk electronics itself. So if power is lost at the right time, data can get scrambled even using ZFS.

    You always need a UPS on a computer, and most certainly on a firewall. You also need to run one of the UPS packages available for pfSense (nut or apcupsd) with a connection to the UPS so that the UPS can signal the firewall when battery exhaustion is near and the firewall can shutdown gracefully.

    I'm not a ZFS expert. There may be some command in ZFS that is similar to the old fsck command used by UFS. Google would be your friend.

    Another option is to attempt to grab the config.xml file from the firewall and perform a fresh install while importing the old configuration.

    I recently had a self-induced power cut while I was vacuuming and must have accidentally hit the power button on the surged protector. Rebooted and my ZFS was running down the screen (scramble). Good thing I had a recent backup...did fresh install and restored config. Thought this ZFS was made of iron...not so it seems.



  • @NollipfSense :

    Found some posts elsewhere on the web that provided an explanation of why, sometimes, even ZFS can die. It has to do with the internal electronics of the disk drives themselves. Many provide caching, and some of those that do cache report a "write complete" operation to the OS when in reality the write is still sitting in the onboard cache of the drive controller. While the actual write happens a few milliseconds later, if power goes out at that very instant the data could in fact be lost. Many enterprise class disk drives have specially designed power storage capacitors integrated into their electronics for precisely this reason. They provide a half second's worth of power to allow flushing of any cache data. Cheaper consumer-level drives cut out this feature to save a few cents on the per-unit cost.



  • @bmeeks Got to get me a UPS!



  • @NollipfSense said in pfSense crash after Blackout:

    @bmeeks Got to get me a UPS!

    I highly recommend it. Can save you from a mini disaster during a blackout or even temporary power blip.


Log in to reply