+
+### disabled
+if [[ $HOSTNAME == kdxxxxxxxxx ]]; then
+ # 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
+
+ devs=(
+ ata-TOSHIBA_MD04ACA500_84REK6NTFS9A-part1
+ ata-TOSHIBA_MD04ACA500_84R2K773FS9A-part1
+ ata-TOSHIBA_MD04ACA500_8471K430FS9A-part1
+ ata-TOSHIBA_MD04ACA500_8481K493FS9A-part1
+ )
+ first=true
+ for dev in ${devs[@]}; do
+ if $first; then
+ first=false
+ tu /etc/fstab <<EOF
+/dev/mapper/crypt_dev_$dev /i btrfs noatime,subvol=i,noauto 0 0
+/dev/mapper/crypt_dev_$dev /mnt/iroot btrfs noatime,subvolid=0,noauto 0 0
+EOF
+ fi
+ tu /etc/crypttab <<EOF
+crypt_dev_$dev /dev/disk/by-id/$dev /q/root/luks/host-kd discard,luks
+EOF
+ if [[ ! -e /dev/mapper/crypt_dev_$dev ]]; then
+ cryptdisks_start crypt_dev_$dev
+ fi
+ done
+ # note, could do an else here and have some kind of mount for /i
+ # on other hosts.
+fi
+