Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (38 sloc) 2.04 KB
Creating ZFS pool & filesystems
# Set ARC size (see software-notes for more details)
# Make permanent
echo 'options zfs zfs_arc_max=4294967296' > /etc/modprobe.d/zfs.conf
# Setting to use until next boot
echo 4294967296 > /sys/module/zfs/parameters/zfs_arc_max
# Specify -f to override "does not contain an EFI label but it may
contain partition" error
zpool create -f -o ashift=12 -O atime=off -O compression=lz4 banana
mirror /dev/disk/by-id/{ata-ST4000DM000-1F2168_S300FLR7,ata-ST4000DM000-1F2168_S300HGK5}
# Create descendant filesystem.
zfs create -o mountpoint=/ banana/home
# Use parent filesystem only to establish properties for descendants. Don't
# allow it to be mounted.
zfs set canmount=off banana
# Limit filesystem to 90% capacity. Performance degrades at >80% utilization.
# Note that if the filesystem becomes full, it may become impossible to delete
# files with ZFS. The canonical solution is to run "echo > /some/large/file" to
# truncate an existing large file and free up enough space to permit deletions.
zfs set quota=3.21T banana/home
# Set up automatic scrub by running "crontab -e" and adding this line. Note
# that full path to /sbin/zpool is required.
32 04 * * 6 /sbin/zpool scrub banana
Worthwhile resources