Revisiting ZFS and FreeNAS in 2019



  • So I poked a bit on things @xrobau.
    I can't imagine FreeNAS has improved. but maybe it has.

    It is certainly not something I have considered in recent history.
    843021f1-aacb-417a-8da5-d8304ffc3208-image.png

    Also Clearly IP's current job listing for a software developer: https://docs.google.com/forms/d/e/1FAIpQLScmwk2SdunbH4RDvvbfZeWv5IAu-vxzeyTjGHZEbf5JRWVKqg/viewform

    The desirable list does not mean much. But I did notice the last line of bonus skills.
    0367fae5-4769-4c40-b89b-c5fdc049c418-image.png



  • @xrobau with years as a storage engineer, we use FreeNAS as the gauge of what "bad storage" looks like. It's not slick or good, it's so bad it's been the basis of many "how not to make software" talks. It's high risk, low benefit.

    https://smbitjournal.com/2015/07/the-jurassic-park-effect/

    https://smbitjournal.com/2014/05/the-cult-of-zfs/

    As someone called in because people got caught by the FreeNAS/ZFS hype and lost all their storage, I can tell you, this is the "red flag" of bad system design that we look for. It has none of the requirements you'd want for production usage. The parts you see as cool features are just the obvious default underlying OS and filesystem, nothing to do with FreeNAS. The parts that are dangerous are the parts that don't even matter. If you want a good storage system, ZFS and FreeBSD are fine, but you have to design HA around it. FreeNAS on its own not only doesn't do HA, it undermines it.

    FreeNAS isn't just bad as a concept, which it is - it is the most popular in a whole category that shouldn't really exist, but because of what it is, essentially all real world usages of it are really bad. It tends to be used in IPODs exacerbating the other problems that it starts out with.



  • And don't forget about FreeNAS 10!!

    The release that they had to pull back and discard when they found that it was losing data all the time.



  • We even have a guide to demystifying the myths that the FreeNAS community repeats commonly:

    https://mangolassi.it/topic/16526/common-myths-we-hear-from-the-freenas-community



  • Well wow that did kinda go off on a bit of a tangent. As a bit of a rebuttal, you're kinda getting confused and claming FreeNAS is a bunch of things it isn't. In fact, in that 'common myths' page is ... I dunno, random made up stuff?

    So let's take it from MY perspective - Basically, FreeNAS is a really snazzy front end to ZFS. That's it. It ALREADY comes with a bunch of scripts to monitor SMART, resilver, validate data integrity, and send me a warm-and-fuzzy email every week saying that everything is wonderful. That's pretty much it.

    So, Why is ZFS so cool? Because it has MULTIPLE checks on data integrity. In fact, the whole design of ZFS was based around integrity, not speed. If you want fast, you don't use ZFS (or, you throw a bunch of CPU and RAM and Disks and stuff at it).

    Data Integrity is BY FAR the most important thing in data storage today. If you have a HDD with bad cache ram on it, ZFS (and, to a lesser extent, btrfs) is the only thing that's going to warn you that something is wrong with that device (and it's not like this is uncommon - I've discovered two drives in the last year that were writing corrupt data). This happens.

    So, as a Solaris administrator from way back, let's go through a couple of the misapprehensions about ZFS in that document you linked!

    • ZFS Is an Alternative to RAID - Yes. It's a DIFFERENT TYPE of what normal people think of as 'RAID' - or specifically, RAID5/RAID6. They use Parity, and when a disk is broken/missing, it does calculations to figure out the missing data. ZFS uses copies of the data. Striping and Mirroring is obviously the same.
    • "ZFS Raid Levers aren't standard" - I have no idea what that means.
    • ZFS Does not work on hardware RAID - It DOES work. You just SHOULDN'T use it with Hardware RAID. In fact, Hardware RAID is a terrible idea, and has been so for many many years now. Until hardware RAID manufacturers start putting 3ghz Xeons on their RAID cards, software raid is always going to be faster (and - more importantly - much easier to recover from a hardware failure). But the design of ZFS is that it talks to the raw spinning disks. Adding other abstraction layers in the middle is counterproductive.
    • That bit rot affects people every day and only ZFS can protect you - No, btrfs can protect you, too. Apart from that, yes - it does. As I said above, twice in about 18 months for me, and I only have about 100 spinning disks. I'm not going to get into SSDs, because I've had terrible results with a couple that wildly skew the stats - but they've burned me so badly, that the only way I'm trusting SSDs these days is in a ZRAID2 (eg, 3 copies of the data on 3 devices).
    • ... Hardware RAID is useless - Yep, these days it's a terrible idea to use hardware RAID, unless you're prepared to keep identical hardware cards with identical firmware versions in stock, right next to every machine with hardware RAID. If you haven't been bitten by a hardware RAID card being unable to import a RAID when the previous card died, you're a lucky lucky person. Also, it's slower! Why do you want to ADD unreliability, and REMOVE speed? Hardware RAID is dead. It died many years ago 😎
    • "XXX is special" - Don't know why you think someone would say that. So let's just skip over that.
    • Scrubbing is special - Yes it is! If you have a disk that is faulty, scrubbing will pick it up and repair the damage. That can only happen with ZFS, because it has COPIES of the data, and every copy has a checksum. If one of the copies doesn't match the checksum, it'll repair it by writing over it with one of the good copies.

    The other two points aren't really relevant, and don't know where they're coming from.

    So, after that nerd braindump, I am your guest ZFS expert! Ask me anything 😎



  • @scottalanmiller Oh, and I forgot one of the most important things - live compression and decompression.

    "What?" I hear you say, "why would I want to compress and decompress my data, surely that will add an immense CPU load to my NAS!"

    No. Most people have no idea how much time their NAS's CPU sits around waiting for data to be returned from the disk (hint: a lot). Modern CPUs are blisteringly fast. So fast that compressing 16kb of data and writing 2kb to disk is often 10x faster than just writing 16kb of data to disk in the first place.

    This is also why hardware RAID is dead - modern CPUs do this in their spare cycles, while they're waiting for other things to happen.



  • @xrobau said in Changes at Sangoma:

    So, as a Solaris administrator from way back, let's go through a couple of the misapprehensions about ZFS in that document you linked!

    • ZFS Is an Alternative to RAID - Yes. It's a DIFFERENT TYPE of what normal people think of as 'RAID' - or specifically, RAID5/RAID6. They use Parity, and when a disk is broken/missing, it does calculations to figure out the missing data. ZFS uses copies of the data. Striping and Mirroring is obviously the same.

    Uhm, what do you mean by "ZFS uses copies of the data" when talking about parity based arrays? This makes zero sense, as no matter what special sauce the array is using, it still must do the parity calculations. Unless it's really running a RAID 1/10 as another layer on arrays.



  • @travisdh1 exactly! ZFS does not use parity. That seems to be where a bunch of this confusion is coming from.

    Traditional RAID uses parity. ZFS uses copies.



  • @xrobau said in Changes at Sangoma:

    • "ZFS Raid Levers aren't standard" - I have no idea what that means.

    Neither do the people saying it, but we hear it said all the time.



  • @xrobau said in Changes at Sangoma:

    @travisdh1 exactly! ZFS does not use parity. That seems to be where a bunch of this confusion is coming from.

    Traditional RAID uses parity. ZFS uses copies.

    FFS, what are you talking about? ZFS can use copies of data, but that's exactly what RAID1/10 is. Almost every reference I've seen on ZFS are with people using parity levels with it. ZFS is not magic, it still must calculate parity.

    What you're claiming is that ZFS can do nothing but mirrored drives



  • @travisdh1 maybe they mean RAID LEVELS? Not levers? Which is correct. ZRAIDx means there are X ADDITIONAL copies of the data. ZRAID2 has 3 copies of each chunk, spread across physical devices. The "X" number is how many HDDs the zraid can tolerate failing.

    The difference to RAID6 (for example) is that RAID6 has one copy of the data, but it's possible to figure out what the data was by looking at what remains and using the parity data to figure out what was on the missing disk(s)



  • @travisdh1 You still seem to be hung up on the RAID concept of parity. Truly, honestly, that's not how ZFS works. I cross my heart. It works on copies of data. Literal, exact, copies of the data.

    Unfortunately, THIS is where the 'ZFS Can't expand a volume' problem comes into play. Because the location of those copies (on the physical spindles) is made by hashing the size and number of volumes in a zraid (I'm kinda simplifying here, but work with me!)

    So if a ZRAID2 has 5 spindles, that means that a copy of block 1 of the zpool will be placed on spindle 1 at sector 10, 3 at sector 100 and spindle 5 at sector 500. The location of that doesn't need to be looked up, because it can be calculated.

    The 'expansion' problem comes about because if you add another spindle to that ZRAID2, suddenly block 1 would be on spindle 1 at sector 10, spindle 3 at sector 500 and spindle 6 at sector 1000 (or whatever). So the location of the data would be wrong, and everything falls apart.

    (Now, this is actually wrong, and there IS an index, but, that's advanced stuff, and this is good enough for you to get the idea).

    Does that make more sense?



  • @xrobau said in Changes at Sangoma:

    @travisdh1 maybe they mean RAID LEVELS? Not levers? Which is correct. ZRAIDx means there are X ADDITIONAL copies of the data. ZRAID2 has 3 copies of each chunk, spread across physical devices. The "X" number is how many HDDs the zraid can tolerate failing.

    The difference to RAID6 (for example) is that RAID6 has one copy of the data, but it's possible to figure out what the data was by looking at what remains and using the parity data to figure out what was on the missing disk(s)

    ZFS RAID levers aren't standard (they are very standard)

    What is so difficult to understand about this statement?



  • @travisdh1 I don't know what a RAID Lever is? Something to do with tuning?



  • @xrobau said in Changes at Sangoma:

    @travisdh1 I don't know what a RAID Lever is? Something to do with tuning?

    Geesh, you're so bad as Scott.



  • @travisdh1 Dude, I've been doing this for almost 30 years, and I swear I have never heard of 'RAID levers'. RAID levels, sure. Not Levers. Can you explain what you mean?



  • @xrobau said in Changes at Sangoma:

    @travisdh1 You still seem to be hung up on the RAID concept of parity. Truly, honestly, that's not how ZFS works. I cross my heart. It works on copies of data. Literal, exact, copies of the data.

    Unfortunately, THIS is where the 'ZFS Can't expand a volume' problem comes into play. Because the location of those copies (on the physical spindles) is made by hashing the size and number of volumes in a zraid (I'm kinda simplifying here, but work with me!)

    So if a ZRAID2 has 5 spindles, that means that a copy of block 1 of the zpool will be placed on spindle 1 at sector 10, 3 at sector 100 and spindle 5 at sector 500. The location of that doesn't need to be looked up, because it can be calculated.

    The 'expansion' problem comes about because if you add another spindle to that ZRAID2, suddenly block 1 would be on spindle 1 at sector 10, spindle 3 at sector 500 and spindle 6 at sector 1000 (or whatever). So the location of the data would be wrong, and everything falls apart.

    (Now, this is actually wrong, and there IS an index, but, that's advanced stuff, and this is good enough for you to get the idea).

    Does that make more sense?

    Not at all, because you are describing RAID 5/6. There is nothing special or different here.



  • @travisdh1 Ahh, yeah, there is a difference though.

    RAID5 and 6 recover data based on parity.

    ZFS recovers data based on reading a copy of the data from another spindle.

    So, if a disk fails in a RAID5 (of, say 5 disks), the machine has to read the data from the remaining 4 disks, and then calculate what is missing by figuring it out from the parity data.

    If a disk fails in a ZRAID2 (of, again, 5 disks), it just reads the data from one of the other 2 copies (which it knows the location of already).

    This is where the zraid stuff scales. You can have a ZRAID8 for example (requiring 9 or more disks), where there are 8 copies of the data. Literal copies. The data is replicated onto those disks. There are no parity calculations, as there are with RAID5 and 6.

    So, as long as you can get the idea of parity out of your mind, suddenly the zraid stuff makes sense.

    Think of it like a traditional RAID10, but instead of the stripe and mirror being fixed in place, the data is load balanced across the physical spindles, and there is more than one mirror.



  • @xrobau said in Changes at Sangoma:

    RAID5 and 6 recover data based on parity.
    ZFS recovers data based on reading a copy of the data from another spindle.

    That's literally the same thing stated two different ways. The data "on the other spindle" is read via parity. ZFS is literally RAID 5 and 6 (and 7), it's not an alternative to them. If ZFS does it, those RAID levels do it.



  • @xrobau said in Changes at Sangoma:

    So, if a disk fails in a RAID5 (of, say 5 disks), the machine has to read the data from the remaining 4 disks, and then calculate what is missing by figuring it out from the parity data.
    If a disk fails in a ZRAID2 (of, again, 5 disks), it just reads the data from one of the other 2 copies (which it knows the location of already).

    Yes, that's the same thing in both cases. The data on the disks in both examples is identical, what it can read from them is identical.



  • @xrobau said in Changes at Sangoma:

    This is where the zraid stuff scales. You can have a ZRAID8 for example (requiring 9 or more disks), where there are 8 copies of the data. Literal copies. The data is replicated onto those disks. There are no parity calculations, as there are with RAID5 and 6.

    This is REALLY off. First, ZRAID8 is not a thing. Where did you see that? That's not something that exists.

    Second, what you are talking about is RAID 1, we've had that forever. Every RAID system has that. ZFS isn't doing something special, nor does it scale. It's just the same RAID 1 as everywhere else.

    I've been teaching this exact thing since before ZFS was created. This isn't new, or ZFS, or RAID8. RAID 1 has always, since day one, been able to have has many copies of the data as you want. But since they are literally copies as you say, the one thing it can't possibly do is scale - no matter how many drives you add, the storage never gets bigger.



  • @xrobau said in Changes at Sangoma:

    So, as long as you can get the idea of parity out of your mind, suddenly the zraid stuff makes sense.

    No, because everything that people rave about with ZFS is its parity capabilities. Yes, ZFS can do RAID 0, 1, and 10, but so can everything else.

    What ZFS does special is that it is the sole implementation of triple parity, aka RAIDZ3, aka RAID 7. So if you keep thinking about parity, then ZFS offers that one, really isolated, unique case that is pretty cool. Without that, it's RAID is just run of the mill RAID like everyone else. And why we use ZFS' RAIDZ system as the reference standard for all RAID discussions - to specifically make sure no one can ever point to ZFS and say "see its better", because every time we say how RAID works, it's ZFS' implementation we look to.



  • @xrobau said in Changes at Sangoma:

    Think of it like a traditional RAID10, but instead of the stripe and mirror being fixed in place, the data is load balanced across the physical spindles, and there is more than one mirror.

    What you are describing here is just RAID 10 as it has always been. That it can be more than two disks in a mirror is standard and assumed when you say RAID 10.

    You aren't describing something special about ZFS, nor something that people use in the real world because it doesn't scale. It's too costly. So even though RAID 10 has done that for decades, it's unheard of to implement due to cost.

    ZFS does nothing to fix the limitations of RAID, RAIN continues to march forward for scalability. ZFS hasn't changed its RAID since 2005, and none of it (other than triple parity) was new or special then. It was all old hat.

    But these beliefs that ZFS is magic, that it breaks all the rules, that it isn't RAID, that it isn't the RAID we talk about... read the articles I linked. I covered every one of these things in the Cult of ZFS and Myths of ZFS articles already. This is well trodden territory. These are exactly the kinds of beliefs that are repeated about ZFS and cause things like FreeNAS and ZFS to be so risky - because the people implementing them are mostly not IT pros and don't understand the things that are being said.

    So you get a pool of "generally interested non-IT people" who hear about super basic RAID features, think that they are new and exciting, and repeat them as if they come from ZFS, then assign "magic" to ZFS for being so much cooler than they thought stock tech already was, and then treating it as magic rather than evaluating it logically or just asking experienced storage engineers why if this is magic and so amazing, it's not widely used and why FreeNAS is considered to be a flag for dangerously deployed storage.

    The problem with things like FreeNAS and ZFS is that they require a good amount of storage knowledge or else they can make it seem like they are special. So unfortunately, the only people who can safely use them are storage experts who really know this stuff. And those are exactly the group that would never use FreeNAS because it makes no sense.



  • @xrobau dont' get us wrong, we totally know that you are a developer, not IT. We know that these scam firms work hard to push this stuff because that's their bread and butter. They prey on exactly people like you, people without the time to be IT pros who get this stuff thrown on their plate because they are in an adjacent technical field and it seems like IT must be something that can be done casually on the side. So we totally understand why these marketing tricks that their community is playing work and why they seem like they must be legit. But keep in mind that that community has long been identified for its cult mentality and that their user base is self filtering - the nature of FreeNAS means that basically only non-IT pros even end up looking at it (full time IT people have no need for it) so there is no IT presence in their community to expose the false statements.

    This is a great example, though, of where bringing in IT folks, even for just fifteen minutes of info, can save hours or days of non-IT research. IT advisers would be able to tell you to avoid products like this, and give you quick lists of viable options off the cuff in minutes. IT advisory is cheap up front, and hella expensive to skip.

    One of the most important roles that IT plays in any organization is protecting the business from predatory vendors.



  • @xrobau said in Changes at Sangoma:

    So let's take it from MY perspective - Basically, FreeNAS is a really snazzy front end to ZFS. That's it.

    Right, a really dangerous front end that adds risk. ZFS is super simple to manage on its own, it's a file system. You don't need a fancy front end to any other file system, why would you need it for ZFS? Filesystems aren't things that should have GUIs.

    FreeNAS has been known to both...

    1. Cause huge data loss on its own.
    2. Set people up who used the GUI to not know how to manage ZFS when it is critical to do so - something FreeNAS doesn't keep a GUi for!

    So your point is exactly why it is bad. Having a "fancy GUI for ZFS" is exactly the problem. It doesn't add value, but it does add risk.



  • @xrobau said in Changes at Sangoma:

    It ALREADY comes with a bunch of scripts to monitor SMART, resilver, validate data integrity, and send me a warm-and-fuzzy email every week saying that everything is wonderful. That's pretty much it.

    Standard business class servers already do this in hardware. It's not bad that FreeNAS does that, it's just not as valuable as it sounds.



  • @xrobau said in Changes at Sangoma:

    So, Why is ZFS so cool? Because it has MULTIPLE checks on data integrity. In fact, the whole design of ZFS was based around integrity, not speed.

    This is what the marketing says. But basically every feature that ZFS touts is something we already have.



  • @xrobau said in Changes at Sangoma:

    ZFS Is an Alternative to RAID - Yes. It's a DIFFERENT TYPE of what normal people think of as 'RAID' - or specifically, RAID5/RAID6. They use Parity, and when a disk is broken/missing, it does calculations to figure out the missing data. ZFS uses copies of the data. Striping and Mirroring is obviously the same.

    RAID 5/6 are not what people think of as RAID. Not sure where you got that idea. Nor is ZFS an alternative in any way. It's standard RAID in every possible way. It does not vary from it in the least.

    This is CompTIA A+ stuff these days, not even IT knowledge. This is stuff required even for Best Buy techs. Our interns are required to go through this training before they even hit the IT classes. It's just "computing basics."

    But not only is ZFS standard RAID, but everything that people rave about with its RAID is specifically its parity.



  • @xrobau said in Changes at Sangoma:

    I'm not going to get into SSDs, because I've had terrible results with a couple that wildly skew the stats - but they've burned me so badly, that the only way I'm trusting SSDs these days is in a ZRAID2 (eg, 3 copies of the data on 3 devices).

    This is an emotional approach. Basically you are saying that you are doing really weird and reckless things because you've had some isolated, anecdotal problems from SSDs (or attributed to them.) Storage, or all things, is not a place to act emotionally. It's about data integrity. You've been stating how important data integrity is, but are then approaching this without a production mindset.

    ZRAID is not part of ZFS.

    Z-RAID is a Napp It product that no one has used or seen in the real world. http://napp-it.org/doc/downloads/z-raid.pdf

    ZFS has the RAIDZ system

    RAIDZ is RAID 5
    RAIDZ2 is RAID 6
    RAIDZ3 is RAID 7

    The RAID levels you are describing don't even have RAID names under ZFS, they are RAID 0, 1, and 10, but they are just called mirrored, striped and stripped mirrored VDEVs.

    Both the name "ZRAID" and the numbering system you are using "ZRAID8" do not exist within ZFS, nor would they have a purpose, nor do they make sense, nor do they have something that does exist to map to. I don't know what source information you are working from, but it is so far from the real world that it's not reasonable that someone is confused, it has to be someone trolling you.

    http://www.zfsbuild.com/2010/05/26/zfs-raid-levels/



  • @xrobau said in Changes at Sangoma:

    Scrubbing is special - Yes it is! If you have a disk that is faulty, scrubbing will pick it up and repair the damage. That can only happen with ZFS, because it has COPIES of the data, and every copy has a checksum. If one of the copies doesn't match the checksum, it'll repair it by writing over it with one of the good copies.

    You are again, showing the same basic "missing everything" points. ZFS is NOT special in having copies, and ZFS RAID 1 is not what ZFS means. Every RAID system out there has copies. Every. Single. One. In their RAID 1 implementations.

    They all scrub. Everybody. We have other threads literally right now today about people setting up their scrubbing on other systems that have everything you just described. This isn't some theory, this is how we all use our systems, every day.

    Edit: Also, here is the Linux Kernel MD documentation that shows how MD RAID is able to scrub and repair broken files using either parity or mirroring. So this shows that ZFS isn't special, that the copy mechanism can't be what does it, and parity can't be a limitation.


Log in to reply