Zfs overview

From wikinotes

Overview

ZFS management is broken into 3 layers.

zpool Volume Manager. A pool can be composed of one or more VDEVs
VDEV

Virtual Device. Can use various GEOM-providers (raw-disk, geli-partition, gpt-partition, ....)
Because of small differences in disk sizes (not all 6TB disks have exactly the same number of MBs),
it is recommended that you use gpt-partitions, and leave yourself some extra MB at the end of the disk.

zfs Filesystem/Partition creation, mounting, compression etc.

Parity Data

A VDEV that is composed of multiple disks can store parity data so that if one disk fails, it can be rebuilt. There are various types of VDEVs, some can be expanded, some cannot.

The rule of thumb is to a number of disks that can be represented by the following formula: 2n + (raidZ-level).

ex:

# ===========================================================
# recommended num of disks for different raidZ configurations
# ===========================================================

# raidZ-2  -  (2n + 2)
3, 5, 7, ...

# raidZ-3  -  (2n + 3)
5, 8, 11, ...

Mounting ZFS

ZFS manages it's own mounts. You do not add it to your fstab, you simply import the pool and it manages mounts on it's own.

You can also temporarily import a zpool, which is more similar to mounting.