skeggoeld, reginleif (2019-01-16)

Initialize SSD (da0)

  • Initialize disk partitioning
    gpart destroy -F da0
  • Configure disk partitioning as gpt
    gpart create -s gpt da0
  • Create boot block
    gpart add -s 1024 -t freebsd-boot da0
  • Create partition for ZFS, labeled with diskX (e.g. disk0, disk1, ...)
    gpart add -t freebsd-zfs da0
  • Writing bootcode into boot block
    gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0

Configure ZFS cache

  • rc
    cp /home/private/zfsusbcache/rc.d/zfsusbcache /usr/local/etc/rc.d/.
  • Add rc config
    zfsusbcache_enable="YES"
    zfsusbcache_pool="zroot"
    zfsusbcache_device="da0p2"
  • config secondarycache
    zfs set secondarycache=all zfs-file-system