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

    Is ZFS worth it if i only have one physical disk ?

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    19 Posts 8 Posters 6.1k 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.
    • bingo600B
      bingo600
      last edited by

      I was wondering if i should use ZFS instead of UFS on my new installs.

      I only have one 64G mSata disk, so i suppose snapshots are out of the question. I have 8G Ram , so extra ZFS memory usage shouldn't be an issue.

      What is the advantages of ZFS for me ?
      More robust if power fails ?
      Anything else ?

      I have absolutely no experience w. ZFS , so i hope a "Guided install" will ask or select the right questions.

      /Bingo

      If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

      pfSense+ 23.05.1 (ZFS)

      QOTOM-Q355G4 Quad Lan.
      CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
      LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

      fireodoF 1 Reply Last reply Reply Quote 0
      • fireodoF
        fireodo @bingo600
        last edited by

        @bingo600

        Simple answer: Yes! Much more robust in case of power outage. It make sense even on little disk.

        Regards,
        fireodo

        Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
        SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
        pfsense 2.8.0 CE
        Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

        IsaacFLI 1 Reply Last reply Reply Quote 2
        • bingo600B
          bingo600
          last edited by

          @fireodo
          Thanx

          I'll give ZFS a try on my 2.4.4-p3 restore test on monday.

          Are there any other, features (ZFS Single disk) , that i could benefit from ?

          /Bingo

          If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

          pfSense+ 23.05.1 (ZFS)

          QOTOM-Q355G4 Quad Lan.
          CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
          LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

          1 Reply Last reply Reply Quote 0
          • IsaacFLI
            IsaacFL @fireodo
            last edited by

            @fireodo said in Is ZFS worth it if i only have one physical disk ?:

            @bingo600

            Simple answer: Yes! Much more robust in case of power outage. It make sense even on little disk.

            Regards,
            fireodo

            I have heard the exact opposite. That you need a UPS if you are using ZFS because it does not handle power loss as well as UFS.

            I don’t know who to believe since not an expert on this.

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

              Not sure where you heard that UFS was better than ZFS for power losses.. But that is not right, ZFS is the better choice for loss of power situations that is for sure.

              You should always try and avoid sudden loss of power to be honest.. But if that is concern zfs would be better choice..

              UFS hates sudden loss of power that is for damn sure..

              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

              IsaacFLI 2 Replies Last reply Reply Quote 1
              • sherpagoodnessS
                sherpagoodness
                last edited by

                ive heard you could run 'zfs set copies=2 zroot' after installer that way you have an additional data set to run scrubs against even though you're single disk. don't know if it does anything actually seeing as I've never had any issues

                IsaacFLI 1 Reply Last reply Reply Quote 0
                • IsaacFLI
                  IsaacFL @johnpoz
                  last edited by

                  @johnpoz

                  I don't know who to believe one way or the other. I haven't seen a whitepaper any where that recommends one way or the other. There could be one but I always give up looking.

                  What I heard from my friend Betty down at the Piggly Wiggly is that ZFS is only more reliable if you have it with 2 disks or have it write 2 copies. Problem is, the pfSense doesn't get written with 2 copies during install.

                  My other friend Loretta down at the Walmart says she had a power loss with ZFS and it wouldn't boot and there were no zfs tools to help recover the data.

                  My other friend Darrel says never use UFS cause it is FULL of bugs and it is a wonder it works at all.

                  I see on the FreeBSD forums they recommend on using ZFS for servers only and not desktops because of the resource overhead.

                  Than being said, I am using ZFS for my pfSense on a Dell OptiPlex with an SSD and 8G of RAM and a UPS.

                  I think it doesn't matter for pfSense. Just keep a pfSense install image handy and keep config backed up.

                  1 Reply Last reply Reply Quote 0
                  • IsaacFLI
                    IsaacFL @sherpagoodness
                    last edited by

                    @sherpagoodness said in Is ZFS worth it if i only have one physical disk ?:

                    ive heard you could run 'zfs set copies=2 zroot' after installer that way you have an additional data set to run scrubs against even though you're single disk. don't know if it does anything actually seeing as I've never had any issues

                    What I heard that this will only help for files that are written after installation so the pfSense itself won't have the additional data to scrub against.

                    sherpagoodnessS 1 Reply Last reply Reply Quote 0
                    • IsaacFLI
                      IsaacFL @johnpoz
                      last edited by

                      @johnpoz said in Is ZFS worth it if i only have one physical disk ?:

                      UFS hates sudden loss of power that is for damn sure..

                      ZFS hates sudden power loss too but RAID helps to mitigate.

                      1 Reply Last reply Reply Quote 0
                      • V
                        viragomann
                        last edited by

                        My home installation of pfSense using ZFS had to suffer about 30 power outages till now. pfSense started smoothly again after each one.

                        1 Reply Last reply Reply Quote 0
                        • sherpagoodnessS
                          sherpagoodness @IsaacFL
                          last edited by

                          @IsaacFL well if you go through an in-place upgrade, eventually almost every file will get touched or close to

                          1 Reply Last reply Reply Quote 0
                          • bingo600B
                            bingo600
                            last edited by bingo600

                            I just installed a 2.4.5-p1 on a testmachine w zfs, and 1 mSATA 64GB disk.

                            The only ZFS parameter i changed (had to) , was :
                            Pool Type/Disks : - I had to select the mSATA as a stripe disk
                            Is that the correct choice for a 1 disk system ?

                            None of them really makes sense (i think) , or can one really stripe on just one disk ?

                            /Bingo

                            If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                            pfSense+ 23.05.1 (ZFS)

                            QOTOM-Q355G4 Quad Lan.
                            CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                            LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                            1 Reply Last reply Reply Quote 0
                            • bingo600B
                              bingo600
                              last edited by

                              Does no one have any tips/recommendations for setting up ZFS on one HDD

                              Is my selection of the HDD as stripe enough , or is there any other "smart things" to do. on a 64GB mSATA disk setup

                              /Bingo

                              If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                              pfSense+ 23.05.1 (ZFS)

                              QOTOM-Q355G4 Quad Lan.
                              CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                              LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                              DaddyGoD 1 Reply Last reply Reply Quote 0
                              • DaddyGoD
                                DaddyGo @bingo600
                                last edited by

                                @bingo600 said in Is ZFS worth it if i only have one physical disk ?:

                                Does no one have any tips/recommendations for setting up ZFS on one HDD

                                Hi,

                                We only install pfSense with ZFS!!!
                                Nothing special anyway ...

                                There are 16GB versions installed and 32, 64 and more recently since smaller SSDs are not available 128GB
                                32GB is perfectly enough!

                                It is a good idea to boost SWAP during installation if you have low RAM and that is it.

                                Cats bury it so they can't see it!
                                (You know what I mean if you have a cat)

                                1 Reply Last reply Reply Quote 0
                                • bingo600B
                                  bingo600
                                  last edited by bingo600

                                  @DaddyGo

                                  I have 8G Ram & 64GB mSata in all my prod. units (i3-7100U)
                                  So i'm not Ram constrained.

                                  Thank you for the reassurance.

                                  /Bingo

                                  If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                  pfSense+ 23.05.1 (ZFS)

                                  QOTOM-Q355G4 Quad Lan.
                                  CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                  LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                  DaddyGoD 1 Reply Last reply Reply Quote 0
                                  • DaddyGoD
                                    DaddyGo @bingo600
                                    last edited by

                                    @bingo600 said in Is ZFS worth it if i only have one physical disk ?:

                                    So i'm not Ram constrained.

                                    In addition to 8GB of RAM, I used to upgrade the basic 2G SWAP to 4G, it's harder later and you don't know when and what you want to run šŸ˜‰

                                    Cats bury it so they can't see it!
                                    (You know what I mean if you have a cat)

                                    1 Reply Last reply Reply Quote 0
                                    • bingo600B
                                      bingo600
                                      last edited by

                                      I'll take it into advice ..

                                      But once my FW starts to need to swap , i'd think hard about why i need that much Ram , and prob disable some of the "unneded" stuff that has to be active on the poor fella.

                                      Waste Cycles on inspecting/forwarding packets , not on swapping.

                                      /Bingo

                                      If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                      pfSense+ 23.05.1 (ZFS)

                                      QOTOM-Q355G4 Quad Lan.
                                      CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                      LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                                      1 Reply Last reply Reply Quote 0
                                      • JeGrJ
                                        JeGr LAYER 8 Moderator
                                        last edited by

                                        Don't know where that stuff from ZFS comes from, but we had installed several dozens of devices for multiple customers over the year and as soon as ZFS was available jumped ship and used it. Had the same stupid discussion with prejudices with our distri that argued that "ZFS is for storage and RAID and those boxes you install don't have that and so ZFS is bonkers". Had to slap him in the face with our statistics that clearly showed customers calling us for support for problems (when filesystem related) ALWAYS had UFS. Mostly power failure/shutdowns etc. as explained by @johnpoz

                                        My own lab box at home was failing recently with 2.5-dev tests and I was like "Damn that's now the first time I have a filesystem bug/failure due to hard reset/reboots with ZWF..." - only to realize after rebooting and debugging that I did forget to install the device after installing the 2.5-snapshot with ZFS - so it was running UFS again - and promptly failed and wiped my config to 0 bytes after a kernel panic and hard reset. After reinstalling with ZFS I had multiple panics in 2.5-dev environments (IPv6 / WAN related mostly) and hard resets - not ONE disk/filesystem failures.

                                        So those friends and hearsay people may well go with UFS if they like, I won't touch it with a five-foot-pole anymore :)

                                        Cheers
                                        \jens

                                        Don't forget to upvote šŸ‘ those who kindly offered their time and brainpower to help you!

                                        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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

                                          So knock on wood I have not had any issues, well one on a old 2440 that had lost power.. But normally all the pfsense I have are on good ups, and normally stable power anyway.

                                          But I have planned on my own 4860 to move to zfs when 2.5 comes out and take the time to upgrade to that.. Just going bring it up on zfs then.

                                          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
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.