Did you know  45Drives offers free  public and private  webinars ?
Click here to learn more  & register!
ZFS Best Practices

Mitch gives his take on the 5 best practices that you should consider for the administration of your ZFS storage pools.

5 Best Practices for ZFS

  1. ZFS INSTALLS: Alright, so for best practice number one we're going to talk about ZFS installs. So you're always going to want to install ZFS on a 64-bit kernel. While you may be able to get it working on a 32-bit kernel, you're gonna run into some stability issues, and that's because the way that CFS handles virtual memory address space. So just as a hard and fast rule, stick with 64-bit kernels.

  2. RAM: Alright, so for rule number two, we're going to talk about RAM. Now you're always going to want to use ECC memory with your ZFS storage pool, and that's because ZFS can actually use ECC memory to ensure data consistency. So the ZFS ark is built into RAM, and it's used as a high-performance read cache which stores the system's most frequently and most recently used data. So the more RAM you can put in the system, the better.

    So you're gonna hear lots of different rules thrown around like one gigabyte of RAM for one terabyte of storage, but it really all comes down to your specific use case. Just know that by default, half of your available RAM is going to be used for your Ark and if you plan on implementing an L2 Ark it's gonna be for every 100 gigabytes of L2 Ark, 2 gigabytes of system RAM is going to be used to map that L2 Ark.

  3. Disk Scurbbing: Alright so for rule number three we're gonna talk about disk scrubbing, and no I don't mean taking your disks out bringing them over to the sink and scrubbing them with the rest of your pants. Okay, so all jokes aside, ZFS scrub is the best way to handle the dreaded bit rot. Every time ZFS reads a block, it compares that block to its checksum and then automatically fixes it if need be. However there may be data that you write to your ZPool and then it doesn't get read again for a very long time.

    Fortunately, this data is not then automatically protected from bit rot. This is the reason why we have data scrubs. It's best practice to schedule at least one scrub a month, and some may want to do it as often is even one time a week, although this isn't completely necessary. While you can still use your ZPool during a scrub, you may want to schedule these for off hours or downtime because while it's not too intensive, it does handle some IO on your disks.

  4. VDEV's and ZPools: Alright for best practice number four, we're going to talk about VDEV’s and ZPools. now there are many different ways to set up VDEV’s and ZPools with different parities, different striping, and different mirroring. So for that reason I'm not really going to go into those, but I'm just going to give you some do's and don'ts for you to use on your VDEV’s.

    So first, you definitely want to try to keep all the VDEV’s in your pool the same size. If you don't do this, ZFS will end up using one VDEV more than the others, which can lead to some performance issues. So next I would recommend if your data is extremely mission-critical and you don't follow very stringent backup protocols, you're going to want to use at least a Raid-Z2 to give you to parity discs in your VDEV’s. So due to the reselling process being extremely stressful on the discs, if you have a Raid-Z1 and you have a disk go down, this is prime time for another disc to drop out as it's so stressful on the discs. So you're definitely going to want to consider at least the Raid-Z2 for your VDEV’s if it's crucial data.

  5. ZFS Snapshots: So for best practice number 5 I want to talk about ZFS snapshots. They truly are a wonderful thing. So essentially, they're just a read-only copy of your data. These can be created nearly instantly and initially consume no additional disk space within your pool. While this may sound like magic, it's actually very real.

    So as that active data set begins to Change, the snapshot will then begin to grow in size as it continues to refer the original data. Snapshots are amazing because they allow you to keep many versions of the same file. You can set snapshots to run completely automatically on a set schedule. Remember however, these are never a replacement for a proper backup.

Alright, so those are some best practices for administering your ZFS storage pools. If you have any questions or comments, be sure to leave it in the comment section down below, and if you're not subscribed, be sure to hit that subscription because we put videos like this out every single week. Alright guys we'll see you on the next one.

Discover how 45Drives can work for you.

Contact us to discuss your storage needs and to find out why the Storinator is right for your business.

Contact 45Drives