goldfish2
June 30th, 2008, 01:51 PM
To set up my encrypted raid I ran the following commands:
#Creates raid with missing drive
mdadm --create /dev/md0 --level 5 -n 3 /dev/sda1 /dev/sdc1 missing
#Puts random noise on drive
dd if=/dev/urandom of=/dev/md0 bs=1M
#Adds the twofish kernel module
modprobe twofish
lsmod |grep twofish
echo "twofish" >> /etc/modules
#Creates the Encrypted drive
cryptsetup -y -c twofish-cbc-essiv:sha256 create TowerRaid /dev/md0
#Format the mapped drive
mkfs.ext3 -b 4096 -R stride=8 /dev/mapper/TowerRaid
#Mount
mount -O noatime /dev/mapper/TowerRaid /mnt/raid
#Add my last drive after copying over old data
mdadm /dev/md0 -a /dev/sde1
#Saves raid configuration
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
#watch raid creation progress
watch cat /proc/mdstat
My issue:
The pseudo-device /dev/mapper/TowerRaid has disappeared
I can recreate it by running:
cryptsetup -c twofish-cbc-essiv:sha256 create TowerRaid /dev/md0
But don't know what configuration file to put this in so it will mount automatically (and theoretically ask for my password sometime during the boot process)
Thanks,
GoldFish2
#Creates raid with missing drive
mdadm --create /dev/md0 --level 5 -n 3 /dev/sda1 /dev/sdc1 missing
#Puts random noise on drive
dd if=/dev/urandom of=/dev/md0 bs=1M
#Adds the twofish kernel module
modprobe twofish
lsmod |grep twofish
echo "twofish" >> /etc/modules
#Creates the Encrypted drive
cryptsetup -y -c twofish-cbc-essiv:sha256 create TowerRaid /dev/md0
#Format the mapped drive
mkfs.ext3 -b 4096 -R stride=8 /dev/mapper/TowerRaid
#Mount
mount -O noatime /dev/mapper/TowerRaid /mnt/raid
#Add my last drive after copying over old data
mdadm /dev/md0 -a /dev/sde1
#Saves raid configuration
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
#watch raid creation progress
watch cat /proc/mdstat
My issue:
The pseudo-device /dev/mapper/TowerRaid has disappeared
I can recreate it by running:
cryptsetup -c twofish-cbc-essiv:sha256 create TowerRaid /dev/md0
But don't know what configuration file to put this in so it will mount automatically (and theoretically ask for my password sometime during the boot process)
Thanks,
GoldFish2