Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Best storage device for forced shutdown pfSense?

    Scheduled Pinned Locked Moved Hardware
    11 Posts 8 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LeetDonkey
      last edited by

      You'll most likely experience this regardless of the storage media used.

      If it is not possible to shut it down properly manually, how about a small UPS with enough juice to shut down pfsense in an orderly manner?

      1 Reply Last reply Reply Quote 0
      • S
        stormrage
        last edited by

        @LeetDonkey:

        You'll most likely experience this regardless of the storage media used.

        If it is not possible to shut it down properly manually, how about a small UPS with enough juice to shut down pfsense in an orderly manner?

        Does ups have a software to shutdown pfSense? I know there some ups supporting that only windows but are there any for FreeBSD too?  ;D

        1 Reply Last reply Reply Quote 0
        • E
          edmund
          last edited by

          You might want to consider booting from a CF card and keeping a backup copy of the boot slice - this isn't a solution, merely a way to repair the damage when you corrupt the default boot image.

          pFsense appears to support UPS shutdown via an addon but I've never managed to get it to work on my system.

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by

            Does ups have a software to shutdown pfSense? I know there some ups supporting that only windows but are there any for FreeBSD too?  ;D

            Take an small UPS from APC in use and this wont be occurring again.
            Yes there is a packet to be install on pfSense that supports APC and other UPSs.

            Any storage could be corrupted!

            To go with a read only marked medium is the only thing that might be helping you out.
            It could be a MicroDrive, CFCard or a  SDCard if you want.

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by

              SSD or HDD is your best bet for general purpose hardware. CF tends to not be all that reliable in that regard if it's rw mounted.

              If you're on current versions, I have my doubts that a power cycle would have corrupted anything. I just put a SG-4860 and SG-2440 running from eMMC through 1000 power cycles each this week, right after writing the passwd file, to re-test a different fix for passwd file corruption when power is lost shortly after writing the file in latest FreeBSD. 0 issue. Those boxes have been power cycled upwards of 20,000 times now. After we fixed missing fsync issues mid last year, I've yet to be able to corrupt a system. That's in more than a decade's worth of power offs if you do it once a day, and I'm intentionally doing it at the worst possible time.

              Granted, your SSD itself might have left that data in an inconsistent state. Or if you're running something like Squid that writes frequently, it may miss fsyncs and end up with inconsistent data, but that should only impact that specific service.

              What came up on the console when it wasn't working?

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                "we just flip the circuit breaker and every power in the office shuts down."

                That seems like a really horrific procedure…  So you don't have any other computers in this office?  What is the point of the router then?

                Or do those users shutdown their machines before they leave and the cb is pulled... Someone should really shutdown pfsense before you cut the power.  Or as mentioned get a ups, and have it shut down pfsense normally when it detects loss of AC...

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • C
                  cmb
                  last edited by

                  @johnpoz:

                  That seems like a really horrific procedure…  So you don't have any other computers in this office?

                  Yeah, I'd be a lot more concerned with desktops and servers, they're generally going to be writing to their disks a lot more and hence have many more opportunities to leave inconsistent files behind if you're just pulling the plug on them.

                  1 Reply Last reply Reply Quote 0
                  • L
                    localhostx
                    last edited by

                    Use any SATA or SAS disk with a SAS controller that has battery on it. This particular controllers write the data on fly to the disk when a sudden power outage happens.

                    you can find SAS controllers with battery starting from 50$ and going up to few thousand dolars.

                    http://www.ebay.com/itm/462594-001-HP-Smart-Array-P212-ZM-8-Port-SAS-SATA-RAID-Controller-w-Battery/172112080048?_trksid=p2047675.c100011.m1850&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D35828%26meid%3Df8c2d9e359a444e1ac0d20ae8550cedb%26pid%3D100011%26rk%3D5%26rkt%3D10%26sd%3D141813859748

                    1 Reply Last reply Reply Quote 0
                    • R
                      robi
                      last edited by

                      Does your apliance have an (ACPI) power button? What happens if you shortly press it?
                      If you're lucky enough with your hardware, pressing the power button would initiate normal shutdown.

                      On the other side, I would try a NanoBSD installation (using CF card, USB stick or internal DOM). If your storage media is fast enough, you can have the default option to keep it mounted RO while running. That way, during power loss, it's less likely that anything in the operating system wants to write to the disk.

                      If not, also try with mounting /tmp /var etc. to RAM. (see System: Advanced: Miscellaneous, for NanoBSD these are in RAM by default, but for full installs they are not). The goal would be to reduce disk writes as much as possible - and NanoBSD is the closest way to achieve that.

                      1 Reply Last reply Reply Quote 0
                      • R
                        robi
                        last edited by

                        Another idea would be to get a RaspberryPI with a big button beside it. Write a small script on the PI to remotely shutdown your pfSense through network (pfSense would also need a small server script for that). Teach your boss to hit the big button first before he leaves, and wait until the LEDs on the appliance go down. And cut power afterwards.
                        Oh - and keep a couple of PIs for spare in the drawer  ::)

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.