Parts if ZFS
If you want to understand ZFS, you should know about the components of ZFS, the correct naming and the associated properties.
Pool
All data is stored in a pool. A pool is build from one or more vdevs (virtual devices). The size of a pool can grow practically without limits by adding vdevs. The often used default name "tank" for a pool is a good synonym for its usage. Pool options:
- Single vdev (Pool is build from one vdev). This is similar to a conventional Raid-Array.
example: 11 disks that are organized as Raid-Z3. Best for storage up to 48TB (11 x 6TB) and Backup/Home/Media usage.
or other example: Single 3way mirror - best for a capacity up to 6 TB (3 x 6TB) with best data security
- Multiple Vdevs
For high capacity storage up to Petabytes or when you need high IOPS values you can add more vdevs to a pool. All data is striped over all vdevs in a Raid-0 manner to improve performance. IOPS (Performance with concurrent random read/writes) scales therefor with the number of vdevs
- Hotspare disks are defined on a pool level and replace a failed disk automatically
- SSDs can be added to a pool and used as L2ARC read cache to extent the RAM based ARC readcache
- DRAM or SSD disks can be added to a pool as a ZIL logdevice to increase performance of secure sync write. A ZIL is only needed and used when sync write is enabled.
vdev
You build a pool from one or more vdevs (virtual devices). A vdev is a single file or disk or build from multiple files or disks that are organized as a Raid. A Vdev cannot grow in size by adding more disks but you can replace all disks by larger ones to increase vdev size.
Vdev options
- Basic (single File or disk). A pool with one or multiple basic vdevs acts like a Raid-0 array without redundancy!
- Mirror (2way or n-way). ZFS reads from all disks simulaniously. Best for high IOPS usage and spindle based disks. With SSD only vdevs you should prefer Raid-Z due to usable capacity.
- Raid-Z1 (one parity disk, similar to Raid-5 but without write-hole problem. With any Raid-Z there is no need for a disc controller with BBU/battery). Best for 3 disks. You should avoid with larger or more disks due to rebuild time. (A loss of two disks = total loss of pool).
- Raid Z2 (two parity disks, similar Raid-6 but without write hole problem). Best number of disks per vdev is 4, 6 or 10 disks. Avoid more disks due to rebuild time. (A loss of three disks = total loss of pool).
- Raid Z3 (three parity disks). Best number of disks per vdev is 5, 7 or 11 disks. Avoid more disks due
to rebuild time. (A loss of three disks = total loss of pool). 19 disks for a single vdev pool may be acceptable for some backups systems.
Filesystem
You can create filesystems on a pool. They are similar to conventional disk partitions but without a fixed size. They can grow up to poolsize dynamically. Usage is limited and managed by reservations and quotas - this is called storage virtualisation. Filesystems are mounted as folders and you can share them via NFS or CIFS or other protocols. You can create thousands of filesystems on a pool without problem.
Zvol
A zvol is a resizable blockdevice (a virtual disk). You can create zvols on a filesystem and use it like a disk example as a Comstar target for FC/ IB/ iSCSI.
|