russel053/ 十月 4, 2018/ Proxmox VE

SWAP:

zfs create -V 64G -b $(getconf PAGESIZE) -o compression=zle -o logbias=throughput -o sync=always -o primarycache=metadata -o secondarycache=none -o com.sun:auto-snapshot=false RAID/swap
mkswap -f /dev/zvol/data/swap
echo /dev/zvol/data/swap none swap defaults 0 0 >> /etc/fstab
swapoff -av
zfs destroy rpool/swap
swapon -av

Log:

cp -rp /var/log /data/var/log
mv /var/log /var/log.bak
ln -s /data/var/log /var/log

Temp:

cp -rp /var/tmp /data/var/tmp
mv /var/tmp /var/tmp.bak
ln -s /data/var/tmp /var/tmp

Cache:

cp -rp /var/cache /data/var/cache
mv /var/cache /var/cache.bak
ln -s /data/var/cache /var/cache
Share this Post