User Tools

Site Tools


quickreference:zfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
quickreference:zfs [2018/12/14 22:44]
rodolico
quickreference:zfs [2019/06/15 16:35] (current)
rodolico
Line 12: Line 12:
 service zfs start service zfs start
 </​code>​ </​code>​
 +
 ==== Create a zpool ==== ==== Create a zpool ====
 Now that we have ZFS running, we'll create a zpool, the basic container for all of our stuff. In this case, I want to use the raidz2 for redundancy (two drives are used for checksumming). Since I don't know the correct names for everything, I'll egrep /​var/​run/​dmesg.boot to find them Now that we have ZFS running, we'll create a zpool, the basic container for all of our stuff. In this case, I want to use the raidz2 for redundancy (two drives are used for checksumming). Since I don't know the correct names for everything, I'll egrep /​var/​run/​dmesg.boot to find them
Line 30: Line 31:
 echo '/​dev/​zvol/​storage/​swap none swap sw 0 0' >> /etc/fstab echo '/​dev/​zvol/​storage/​swap none swap sw 0 0' >> /etc/fstab
 swapon /​dev/​zvol/​storage/​swap swapon /​dev/​zvol/​storage/​swap
 +</​code>​
 +
 +NOTE: you can add space to this swap area in real time, if you do it at a time when the swap is not necessary to the continued operating of the machine. Simply turn off swap, increase the volume size, then turn swap back on again.
 +
 +<code bash>
 +# turn off swap
 +swapoff /​dev/​zvol/​storage/​swap
 +# increase volume size to 4G
 +zfs set volsize=4096M storage/​swap
 +# check that it worked
 +zfs get volsize,​reservation storage/​swap
 +# turn swap back on (could also use swapon /​dev/​zvol/​storage/​swap,​ but I'm lazy)
 +swapon -aL
 </​code>​ </​code>​
  
quickreference/zfs.txt ยท Last modified: 2019/06/15 16:35 by rodolico