migmedia.net

linux

ZFS Swap disk

2017-08-03
Tags: zfs

Creates a Swap-Partititon for Linux on a zfs-volume.

zfs create -V 8G -b $(getconf PAGESIZE) -o compression=zle -o logbias=throughput \
-o sync=always -o primarycache=metadata -o secondarycache=none \
-o com.sun:auto-snapshot=false tank/ROOT/swap

mkswap /dev/zvol/tank/ROOT/swap
swapon /dev/zvol/tank/ROOT/swap

This can lead to problems due to zfs and kernel are fighting for ressources to free memory.