s chown ian:ian "${dirs[@]}"
if [[ $HOSTNAME == treetowl ]]; then
- tu /etc/fstab <<'EOF'
-/dev/disk/by-id/ata-TOSHIBA_MD04ACA500_84REK6NTFS9A-part1 /i btrfs noatime,subvol=i 0 0
+ # partitioned it with fai partitioner outside of fai,
+ # because it\'s worth it to have 1% space reserved for boot and
+ # swap partitions in case I ever want to boot off those drives.
+ # as root:
+ # . /a/bin/fai/fai-wrapper
+ # eval-fai-classfile /a/bin/fai/fai/config/class/51-multi-boot
+ # fai-setclass ROTATIONAL
+ # export LUKS_DIR=/q/root/luks/
+ # # because the partition nums existed already
+ # fai-setclass REPARTITION
+ # /a/bin/fai/fai/config/hooks/partition.DEFAULT
+
+ # just the first in the btrfs raid
+ dev=ata-TOSHIBA_MD04ACA500_84REK6NTFS9A-part1
+ tu /etc/fstab <<EOF
+/dev/mapper/crypt_dev_$dev /i btrfs noatime,subvol=i 0 0
EOF
else
tu /etc/fstab <<'EOF'
/q/i /i none bind 0 0
+EOF
+
+ tu /etc/crypttab <<EOF
+crypt_dev_$dev /dev/disk/by-id/$dev /q/root/luks/host-treetowl discard,luks
EOF
fi
/i/k /k none bind 0 0
EOF
+
+
if ! mountpoint /kr; then
s mkdir -p /kr
s chown ian:traci /kr