WarningThis document is outdated, start with the FreeBSD Handbook's ZFS Quick Start Guide if you have not read it yet.

Ok, ZFS is now in the tree, what's now? Below you'll find some instructions how to quickly get it up and running.

April 8, 2008: Just because ZFS is in 7.0-RELEASE does *not* mean it works with the default GENERIC kernel! In fact, you are highly likely to experience kernel panics under any kind of load with ZFS and a GENERIC kernel. If you skipped reading Tuning Guide for ZFS, go back and do that before trying anything else in this document! While "tuning" may sound like something that is optional or perhaps only for performance, it is a requirement for stable FreeBSD 7.0-RELEASE ZFS.

December 2009: It is probably best to use ZFS only with FreeBSD 7.3 and newer versions.

With that said, on to getting started...

First of all you need some disks. Let's assume you have three spare SCSI disks: da0, da1, da2.

Ok, now we want to put /usr/ on ZFS and use some nifty file systems layout. I know you probably have some files already, so we will work on /tank/usr directory and once we are ready, we will just change the mountpoint to /usr.

# zfs create tank/usr

Create ports/ file system and enable gzip compression on it, because most likely we will have only text files there. On the other hand, we don't want to compress ports/distfiles/, because most files in this directory are already compressed:

Let's create home file system and my own home/pjd/ file system. I know we use RAIDZ, but I want to have directory where I put extremely important stuff, so I'll define that each block has to be stored in three copies:

I'd like to have directory with music, etc. that I NFS share. I don't really care about this stuff and my computer is not very fast, so I'll just turn off checksumming (this is only for example purposes! please, benchmark before doing it, because it's most likely not worth it!):

Yes, we set it only on tank and it will be automatically inherited by others.

Would be also good to be informed if everything is fine with our pool:

# echo 'daily_status_zfs_enable="YES"' >> /etc/periodic.conf

For some reason you still need UFS file system, for example you use ACLs or extended attributes which are not yet supported by our ZFS. If so, why not just use ZFS to provide storage? This way we gain cheap UFS snapshots, UFS clones, etc. by simply using ZVOLs.