linux:filesystem:zfs
This is an old revision of the document!
Table of Contents
ZFS
zpool list zpool list <poolname> zpool status zpool status -x zpool status -v <poolname> zpool iostat zpool iostat -v zpool history
Adaptive Replacement Cache (ARC)
Rule of thumb:
2 GB + 1GB Cache per 1 TB Storage
Set Cache Min/Max
cat << 'EOF' > /etc/modprobe.d/zfs.conf options zfs zfs_arc_min=3221225472 options zfs zfs_arc_max=4294967296 EOF
update-initramfs -u && reboot
Setups
4x NVMe as VM datastore (Hypervisor installed on nvme0n1 and nvme1n1)
zpool create -o ashift=12 -O compression=lz4 -O atime=off -O xattr=sa -O local-datastore-nvme01 mirror /dev/nvme2n1 /dev/nvme3n1 mirror /dev/nvme4n1 /dev/nvme5n1
Parameters
ashift=12 # Aligns to 4K sectors (SSD optimal) autotrim=on # Enables TRIM for SSDs (optional - alternatively create cronjob running during off-peak hours) compression=lz4 # Transparent compression, fast atime=off # Disables access time writes xattr=sa # Stores xattrs in inode — good for VMs
linux/filesystem/zfs.1759871102.txt.gz · Last modified: by gsys