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

    [ER] ZFS Root & Swap system disk

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    17 Posts 8 Posters 10.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.
    • D
      daplumber
      last edited by

      I am a ZFS fanboi ever since I met it.  ::)  ;D  With that out of the way is there any chance of the ER? ZFS makes things like adding mirrored system disks, backup, snapshots, replication, etc. etc.all so easy and simple and does a darn good job on data protection even with a single disk. It might be a little heavy for embedded systems, but I doubt it. Someone with more embedded experience chime in? In any case that would probably best make it a selectable option on install?

      I know pfsense is not a NAS, but ZFS does make NAS functionality ridiculously easy to implement, so why not? ZFS makes divorcing whatever you're implementing from low-level devices a breeze, at least as far a "disk" type devices go.

      –--------
      This user has been carbon dated to the 8-bit era...

      1 Reply Last reply Reply Quote 0
      • rcfaR
        rcfa
        last edited by

        How does native BSD 8.3 or 9 support for ZFS look like? i.e. can regular BSD boot from ZFS? What is the licensing?

        I would think if BSD can do it, and it's "just" a matter of configuring pfSense to use it, it's one thing, but if it means putting proper ZFS support into BSD in the first place, it's likely a bit out there…

        In general, I do agree though about the merits of ZFS, even on single-disk devices, and even modern embedded systems are so powerful that it shouldn't be an issue, RAM shortage is probably more of an issue than CPU power, but my little Lanner Atom-D510 based box can hold 4GB RAM, so it doesn't take a high-end system for that to be feasible, particularly since we're not talking about an environment with heave write loads.

        1 Reply Last reply Reply Quote 0
        • D
          daplumber
          last edited by

          The kernel used by 2.1 already has the ZFS code and you can create non-root ZFS pools "out of the box". ZFS was in FreeBSD from 8.0 onwards (I think.)

          ZFS boot/root support is quite good, and install appears to be a create-zfs-pool-and-root-and-swap-and-then-install-to-them process. The documentation in the wiki is pretty clear:

          http://wiki.freebsd.org/RootOnZFS

          I'd suggest GPT, just because MBR is evil and why would you be installing other OS' onto your pfsense disk? :

          http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot

          ZFS is no longer even trademarked by Oracle (as of September 2011), and is Open Source under CDDL (MPL-alike) which is FreeBSD-compatible as far as I know, unlike those GPL fanatics over in penguin-world.

          If I knew a bit more about the pfSense and FreeBSD install process and/or had some time to dig into it I'd have a try at it myself, zfs is usually that easy, but alas…

          Mirrored USB boot sticks would appear to be a good fit for pfSense as well?

          –--------
          This user has been carbon dated to the 8-bit era...

          1 Reply Last reply Reply Quote 0
          • F
            feadin
            last edited by

            AFAIK ZFS uses more resources. Can you name a clear benefit of having it as the main filesystem in pfSense?
            Having a NAS or file server in a firewall is definitely not a good idea, see http://forum.pfsense.org/index.php/topic,10201.0.html.

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              <sekrit>Boot CD, fire up web browser, go to /installer/ on the box, and use the web installer which can already do zfs for you</sekrit>

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • D
                daplumber
                last edited by

                @jimp:

                <sekrit>Boot CD, fire up web browser, go to /installer/ on the box, and use the web installer which can already do zfs for you</sekrit>

                One re-install coming up…  ;D

                –--------
                This user has been carbon dated to the 8-bit era...

                1 Reply Last reply Reply Quote 0
                • rcfaR
                  rcfa
                  last edited by

                  @daplumber:

                  @jimp:

                  <sekrit>Boot CD, fire up web browser, go to /installer/ on the box, and use the web installer which can already do zfs for you</sekrit>

                  One re-install coming up…  ;D

                  Tempting…

                  What version of zpool does it use? One great advantage would be that with zevo installed on Mac OS X, I could if need be access the file system from my Mac.

                  Since I'm still on CF cards, how intense is the write load of zfs compared to UFS, I mean in terms of wearing out the cards...

                  1 Reply Last reply Reply Quote 0
                  • rcfaR
                    rcfa
                    last edited by

                    @jimp:

                    <sekrit>Boot CD, fire up web browser, go to /installer/ on the box, and use the web installer which can already do zfs for you</sekrit>

                    I assume a memstick will work just as well, right?

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      I don't know anything about the zfs version, it would be whatever is in the underlying OS.

                      And yes, memstick works too.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • D
                        daplumber
                        last edited by

                        @daplumber:

                        @jimp:

                        <sekrit>Boot CD, fire up web browser, go to /installer/ on the box, and use the web installer which can already do zfs for you</sekrit>

                        One re-install coming up…  ;D

                        I guess there's a reason it's sekrit: It doesn't work!  :o

                        Seriously, there's php warnings in the 2.1 version and although both 2.1 and 2.0.1 create ZFS root systems, both of them get stuck on "mountroot>". I did a fair amount of tinkering, including noting that nether creates a /tmp, but nothing could persuade those installs to find their roots.

                        If anyone wants to tinker: When the zfs install is finished, you'll have to "zfs set mountpoint=/mnt tank0" and then tinker away on the new ZFS root under "/mnt" and then "zfs set mountpoint=legacy tank0" before you reboot.

                        I suspect I may be running afoul of the zfs cache somewhere, but that's just a guess.

                        One other thing to watch out for is that apparently 8.3 doesn't know how to write crash dumps to a zfs swap volume, so you'll have to stick with a swap partition for that.

                        Color me disappointed.  :'( ??? :( :-[

                        One more point: ZFS (when it's available) is wonderful in a fast paced development/test environment because the Boot Environment (BE, beadm) is basically bootable root filesystem thinly provisioned snapshots with the only restriction being available space, and they're essentially instantaneous to take!

                        I can't help wondering that given the essential BSD-ness of Solaris if it wouldn't be easier to implement pfSense on OpenIndiana? ([url=http://openindiana.org/]http://openindiana.org/) Sigh. ZFS: it's crack for system and network administrators. Darn you big-O!  :P ;D

                        –--------
                        This user has been carbon dated to the 8-bit era...

                        1 Reply Last reply Reply Quote 0
                        • rcfaR
                          rcfa
                          last edited by

                          @jimp:

                          I don't know anything about the zfs version, it would be whatever is in the underlying OS.

                          Both BSD8.3 and Zevo 1.0.x use zpool version 28, so that's a good start.
                          There are other issues with mounting file systems, like how the file system is declared in the partition table, etc. but these things are relatively easy to fix, different, particularly newer (higher) zpool versions however would be a major obstacle. So at least that means it's conceptually feasible to mount a zfs pfSense file system in Mac OS X with Zevo installed.

                          Now, of course, that would mean a zfs install is doable in the first place…

                          Together with a drive that doesn't cheat when it comes to SMART statistics, ZFS makes a quite reliable solution even in a single-drive setup. So that would be very cool.

                          Could also be useful to have an external/additional drive exposed in a DMZ for non critical data, e.g. to remote-backup pictures while traveling, without poking file sharing holes through to the LAN.

                          1 Reply Last reply Reply Quote 0
                          • D
                            daplumber
                            last edited by

                            @rcfa:

                            Both BSD8.3 and Zevo 1.0.x use zpool version 28, so that's a good start.
                            There are other issues with mounting file systems, like how the file system is declared in the partition table, etc. but these things are relatively easy to fix, different, particularly newer (higher) zpool versions however would be a major obstacle. So at least that means it's conceptually feasible to mount a zfs pfSense file system in Mac OS X with Zevo installed.

                            Eh? There's always "legacy" for when you absolutely must have mounting not done automagically.

                            Partition tables should go the way of the dinosaur. A disk with a ZFS only with swap etc. as zfs volumes are not only more functional but easier to support if you're a low-level dev,

                            –--------
                            This user has been carbon dated to the 8-bit era...

                            1 Reply Last reply Reply Quote 0
                            • rcfaR
                              rcfa
                              last edited by

                              @daplumber:

                              @rcfa:

                              Both BSD8.3 and Zevo 1.0.x use zpool version 28, so that's a good start.
                              There are other issues with mounting file systems, like how the file system is declared in the partition table, etc. but these things are relatively easy to fix, different, particularly newer (higher) zpool versions however would be a major obstacle. So at least that means it's conceptually feasible to mount a zfs pfSense file system in Mac OS X with Zevo installed.

                              Eh? There's always "legacy" for when you absolutely must have mounting not done automagically.

                              Partition tables should go the way of the dinosaur. A disk with a ZFS only with swap etc. as zfs volumes are not only more functional but easier to support if you're a low-level dev,

                              Partition tables are here to stay, because e.g. EFI requires an EFI partition, otherwise the E in EFI goes away.
                              Not all partition tables are MBR ;)
                              The GPT that ZFS requires under BSD is also putting a partition table somewhere. The OS needs to know somehow what's on that disk, and until ZFS is the only file system an OS deals with, it needs a partition table to figure out what type of file system is present.
                              This has very little to do with swapping or not.
                              Besides, ZFS on OS X is a third party product because Apple dropped it like a hot potatoe after some patent troll company was about to sue them for billions of dollars if they were to adopt it. I hope in time these patents expire or are invalidated or the patent trolls go bankrupt, and Apple will get back into the ZFS game, but until then there is certainly no swapping to ZFS on OS X, because it's not an OS native file system.

                              Unfortunately, it just isn't as simple as it technically could be, because there's too much politics and greed in computing (or anywhere else for that matter).

                              1 Reply Last reply Reply Quote 0
                              • M
                                mhab12
                                last edited by

                                Great to see that this is being discussed.  I'm the latest ZFS fan boy and am thrilled to see that it [might] well be in 2.1.

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

                                  Hi guys,

                                  I agree that the ability to install pfsense onto an all zfs filesystem would be fantastic.

                                  It would be worth it just for the ability to set up mirrored drives alone, but there's also the ability to do snapshots.

                                  -Will

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tojaktoty
                                    last edited by

                                    Per jimp's sekrit I was able to install pfsense (DEVELOPMENT-i386-20120716-1907) onto a single zfs drive successfully but upon reboot I get to hearing the melody and then it hangs just before the welcome menu should appear.

                                    @daplumber:

                                    If anyone wants to tinker: When the zfs install is finished, you'll have to "zfs set mountpoint=/mnt tank0" and then tinker away on the new ZFS root under "/mnt" and then "zfs set mountpoint=legacy tank0" before you reboot.

                                    daplumber, what tinkering are you referring to between setting the mountpoints?

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      pfsenseftw
                                      last edited by

                                      Hi tojaktoty & daplumber,

                                      have either of you two had any success installing zfs as the filesystem on a pfsense installation in the meantime? I would be very interested in getting it going on my home setup :)

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