- if isdeb; then
- sudo cp /usr/share/doc/util-linux/examples/fstrim.{service,timer} /etc/systemd/system
- fi
- # does weekly trim
- sudo systemctl enable fstrim.timer
-
- # relatime is default, but it still significantly increases writes
- # in comparison because it writes on the first read after each
- # write.
- #
- dirs=(/i /mnt/{1,2,3,4,5,6,7,8,9})
- if ! frodo; then
- dirs+=(/q)
- fi
- s mkdir -p ${dirs[@]}
- s chown ian:ian ${dirs[@]}
- # ssh and probably some other things care about parent directory
- # ownership, and ssh doesn\'t allow any group writable parent
- # directories, so we are forced to use a directory structure similar
- # to home directories
- s chown root:ian /q
- s chmod 755 /q
-
- if treetowl; then
- # get uuids from blkid and lvdisplay
- # at times Ive done this through the installer. not anymore
- tu /etc/fstab<<'EOF'
-/dev/mapper/cswap1 none swap sw 0 0
-/dev/mapper/q /q ext4 noatime 0 2
-UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs noatime 0 2
-UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /mnt/btrfs_root btrfs noatime,subvolid=0 0 2
-EOF
- s mkdir -p /mnt/btrfs_root
- s dd of=/etc/crypttab <<'EOF'
-# i used to use UUID=<uuid> from cryptsetup luksUUID /dev/mapper/ianvg1-q
-# however, it doesn't work for lvm volumes when opening on the command line,
-# So, just using the thing which works both ways.
-q /dev/mapper/vg_treetowl00-lv01 none luks,discard,noauto
-# based on cryptsetup's README.Debian, and FAQ
-cswap1 /dev/mapper/vg_treetowl00-lv00 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256,hash=sha256,discard,noearly
-EOF
- s chmod 600 /etc/crypttab