OpenZFS Filesystem
With OpenZFS you get RAID, partitioning, volume management and fstab/exports files, all in one integrated system. You also get Atomic snapshots, Flexible replication and transparent compression. Install ZFS.
Key Concepts
Administration of ZFS is performed through the zpool (for pool level) and zfs (for dataset level) commands.
VDEV
Many block devices are combined to make VDEV. We generally use HDDs to make VDEV but in theory you can use partitions and the like. You cannot change number of devices in existing VDEV. So you can’t add new hard drives to a VDEV after it is initially created.
Recommendations:
- Instead of Hot spares, include the disk in the vdev!
- Use between 3 and 12 disks for each vdev.
- For 3 drives a three-way mirror vdev is best.
Recommended numbber of disks for raidz2 are 6 to 8. For more than 8 disks raidz3 is recommended. With large capacity drives of today, raidz1 is not recommended.
Zpool
Zpool consists of one or more VDEVs. Zpool can not survive loss of VDEVs so each VDEV should handle redundency itself.
Useful Commands
Check all properties of dataset
zfs get all tank Troubleshooting
If the pool is being written to then you should expect to see cpu and I/O by consumed by the txg_sync thread.
Arc stats
cat /proc/spl/kstat/zfs/arcstats Pool to Disk Latency Histograms:
zpool iostat -w ZFS Packages as used by debian:
| Package Name | Description |
|---|---|
| libnvpair3linux | Solaris name-value library for Linux |
| libpam-zfs | PAM module for managing encryption keys for ZFS |
| libuutil3linux | Solaris userland utility library for Linux |
| libzfs4linux | OpenZFS filesystem library for Linux - general support |
| libzfsbootenv1linux | OpenZFS filesystem library for Linux - label info support |
| libzfslinux-dev | OpenZFS filesystem development files for Linux |
| libzpool5linux | OpenZFS pool library for Linux |
| python3-pyzfs | wrapper for libzfs_core C library |
| pyzfs-doc | wrapper for libzfs_core C library (documentation) |
| zfs-dkms | OpenZFS filesystem kernel modules for Linux |
| zfs-dracut | OpenZFS root filesystem capabilities for Linux - dracut |
| zfs-initramfs | OpenZFS root filesystem capabilities for Linux - initramfs |
| zfs-test | OpenZFS test infrastructure and support scripts |
| zfs-zed | OpenZFS Event Daemon |
| zfsutils-linux | command-line tools to manage OpenZFS filesystems |
Zfs Ref:
https://calomel.org/zfs_raid_speed_capacity.html http://storagemojo.com/2007/02/26/netapp-weighs-in-on-disks/
Cheap M/B Options discussed here: https://forums.servethehome.com/index.php?threads/cheapest-motherboard-cpu-with-ecc-for-running-freenas-for-doing-backups.4694/page-3
