raid10 replace docs, various fixes
[automated-distro-installer] / README
diff --git a/README b/README
index 3e6123b51c2ef09566d1c740010769115b7c0bad..9899ed31c32b18e35b0ceee819fcab2d89984e73 100644 (file)
--- a/README
+++ b/README
@@ -81,6 +81,28 @@ fai-wrapper # use fai classes outside of fai. sourced, not called.
 faiserver-disable # Disable the fai nfs server exports
 fresize # resize swap or boot partitions in a host
 
+# Replacing a raid 10 disk
+
+pxe-server -S HOST fai
+ssh root@HOST
+cat >p
+PASSWORD HERE(ctrl-d ctrl-d)
+for d in /dev/disk/by-id/ata*part1; do cryptsetup luksOpen --key-file p $d crypt_dev_${d##*/}; done
+# btrfs replace disk # i forget the actual command
+x=(/dev/mapper/*part1); mount -o subvol=root_trisquelflidas $x /mnt
+mount -o subvol=boot_trisquelflidas /dev/sda3 /mnt/boot
+for x in dev proc sys; do mount -o bind /$x /mnt/$x; done
+chroot /mnt /bin/bash
+# replace disk in fstab
+# replace disk in /etc/crypttab
+update-grub
+update-initramfs -u
+mount /a
+/a/exe/keyscript-on
+exit
+reboot
+
+
 
 License stuff:
 The license for the project is GPLv2 or later, mostly because fai is and