Notes on ZFS

I’ve recently upgraded my NAS to a HP N54L microserver and I decided it was time to migrate to ZFS. Luckily enough, ZFS on Linux became stable enough with version 0.6.3 to be used in production so this was good timing. ZFS is an interesting file system, it uses quite a bit of RAM but it is very flexible and provides per-block checksumming. A nice presentation can be found here:

To get me started, I followed this guide: It contains the basic setup commands and also provides a fix for the potential problems you can encounter with 4096-byte sector harddisks (most modern drives have this). Be aware that this guide doesn’t set a default mountpoint for the pool, this means specifying each filesystem mounptoint yourself (or just enable the default pool mountpoint). Some additional tips/notes can be found here:

To get more in-depth information, there is an excellent manual provided by Oracle (never thought I’d ever say that..) here: It covers most scenarios and contains a lot of examples. In my case, I started out with a pool on 1 drive, moved my data to it and then converted the pool to RAID-1 using the ‘zpool attach’ syntax. All this is covered in the manual.

Overall, I’m pretty satisfied with ZFS. I’ve skipped the native ‘exportnfs’ and ‘exportsmb’ functionality and just configured my /etc/exports and /etc/samba/smb.conf files myself, I heard there are still some bugs to be worked out in this department so I went the manual route. Also, the ability to specify that some filesystems should store two copies of each file (under the hood) is pretty cool and especially valuable for important data :)

Don’t forget to ‘cron’ a weeky ‘zpool scrub’ and not to fill the pool over 80/90% (opinions vary it seems).