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 NameDescription
libnvpair3linuxSolaris name-value library for Linux
libpam-zfsPAM module for managing encryption keys for ZFS
libuutil3linuxSolaris userland utility library for Linux
libzfs4linuxOpenZFS filesystem library for Linux - general support
libzfsbootenv1linuxOpenZFS filesystem library for Linux - label info support
libzfslinux-devOpenZFS filesystem development files for Linux
libzpool5linuxOpenZFS pool library for Linux
python3-pyzfswrapper for libzfs_core C library
pyzfs-docwrapper for libzfs_core C library (documentation)
zfs-dkmsOpenZFS filesystem kernel modules for Linux
zfs-dracutOpenZFS root filesystem capabilities for Linux - dracut
zfs-initramfsOpenZFS root filesystem capabilities for Linux - initramfs
zfs-testOpenZFS test infrastructure and support scripts
zfs-zedOpenZFS Event Daemon
zfsutils-linuxcommand-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

[]:https://nex7.blogspot.com/2013/03/readme1st.html