Growing a ZFS ZPool on FreeNAS, FreeBSD or Solaris on Hardware RAID



  • This seems to come up a lot and the very unhelpful FreeNAS community is, as always, completely useless. ZFS is an enterprise class filesystem and volume manager and does not have the weird "software RAID only" limitations that that community will do anything, it seems, to pointlessly promote.

    If you are using FreeBSD (or FreeNAS by natural extension) on hardware RAID, which would be the most common recommended deployment for a small business using this technology (and rarely would enterprises turn to something like FreeBSD for storage needs) you will find that growing the RAID array does not trigger any change in the size of your zpool and, by extension, your volumes and filesystems on top of it. This is normal and the same behaviour you would expect from any volume manager and filesystem on any platform - don't let the marketing mislead you, this is not something wrong with using hardware RAID.

    All we need to do is set ZFS' zpool to grow. Oracle makes ZFS and has great online documentation. According to Oracle, all we need to do is...

    zpool set autoexpand=on tank
    

    Where "tank" is the name of the zpool that we want to grow automatically. Ta da.

    ZFS Storage (Solaris, OpenSolaris, FreeBSD, NAS4Free, FreeNAS, etc.) on hardware RAID is a very good option if you need Solaris or FreeBSD as your storage operating system. While ZFS does provide an excellent software RAID choice, the normal decision factors between hardware and software RAID remain and there should be no special "ZFS on software RAID only" mentality as this shows a fundamental misunderstanding of ZFS, RAID and storage basics. Both are good choices for different scenarios.

    If you are using your zpool on a partition rather than directly on the raw block device, remember that you will need to expand that too - your block device on which the zpool is sitting is not expanded until you have done that.

    P.S. I have seen many FreeNAS fanatics point to a famous line in the FreeNAS docs that seems to suggest that software RAID is recommended but it does not. This myth stems from a basic misunderstanding of the "if" word in the statement. They simply state a specific case where software RAID is recommended, not a blanket statement.

    Test and let me know.



  • All the cool kids hang out at the zpool

    I know what you mean by the weird ZFS on software RAID only and I've never really understood that and never have followed it. It's one of those things like "MySQL doesn't have row level locking" that gets into pop IT/sysadmin/whatever culture and people repeat it for years and years even after it's apparent it certainly is not true anymore, if it ever was at all.



  • @tonyshowoff said:

    All the cool kids hang out at the zpool

    I know what you mean by the weird ZFS on software RAID only and I've never really understood that and never have followed it. It's one of those things like "MySQL doesn't have row level locking" that gets into pop IT/sysadmin/whatever culture and people repeat it for years and years even after it's apparent it certainly is not true anymore, if it ever was at all.

    The famous line is something like "if you want ZFS to manage the RAID, you need to not use a hardware RAID controller." It's completely obvious that it is only when the "if" is true and super obvious that the "if" is often not true. Like "if you want to go to the mall, you should drive there" doesn't imply that if you want to go to the park, that you can't walk there. Yet the Cult of ZFS crowd takes this one "if" case and expands it as if there is no "if" and all cases must be covered by it.



  • The FreeNAS community really shows just how important it is to avoid products like FreeNAS. It's built on good tech, but the issues are that the community is horrible, only tiny non-storage expert shops use it and it is broadly misunderstood. FreeNAS doesn't make any of the technology, they just repackage it. So the vendor and their community all lack the basic knowledge of what they have and the stuff that they repeat just gets worse and worse.

    If this was the FreeBSD community, talking about the same technologies, the answers and approaches would be completely different. Enterprises use FreeBSD every day. They do not use FreeNAS. Once you limit yourself to a "non-expert" product, the idea of using a community for assistance causes a breakdown in dangerous ways.