I created a encrypted volume on top of software raid1. These are my steps:
1. Create logical partition on sda
2. Create logical partition on sdb (same size)
3. Change type to partition to 'fd' for both partitions
4. Check that the both partitions are same size and type
fdisk -l /dev/sda && fdisk -l /dev/sdb
5. partprobe
6. Make sure there are no remains from previous RAID installations on /dev/sdb by running:
mdadm --zero-superblock /dev/sda6
mdadm --zero-superblock /dev/sdb6
7. mdadm --create /dev/md4 --level=1 --raid-disks=2 /dev/sda6 /dev/sdb6
8. watch cat /proc/mdstat
9. update mdadm.conf
mdadm --examine --scan | grep mdx >> /etc/mdadm.conf
10. Load twofish module
[root@localhost ~]# modprobe twofish
11. # cryptsetup -y -c twofish-cbc-essiv:sha256 create ftdata /dev/md4
Enter passphrase:
Verify passphrase:
12. mkfs.ext3 -b 4096 -R stride=8 /dev/mapper/ftdata
13. mkdir /ftdata
14. Mount the encrypted volume:
mount -O noatime /dev/mapper/ftdata /ftdata
It mounts successfully this first time. When I cd /ftdata, I can see the lost+found dir
Now, I unmount the volume
cd ~
Code:
umount /ftdata
cryptsetup remove ftdata
And now, if I try to setup my encrypted volume like this:
Code:
[root@localhost ~]# cryptsetup create ftdata /dev/md4
Enter passphrase:
mount -O noatime /dev/mapper/ftdata /ftdata
I get this error:
mount: you must specify the filesystem type
So I do:
Code:
mount -t ext3 /dev/mapper/ftdata /ftdata/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/ftdata,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
The dmesg | tail shows this:
Code:
[root@localhost ~]# dmesg | tail
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8
Bluetooth: HIDP (Human Interface Emulation) ver 1.1
eth0: no IPv6 routers present
kjournald starting. Commit interval 5 seconds
EXT3 FS on dm-0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
padlock: VIA PadLock not detected.
hfs: unable to find HFS+ superblock
VFS: Can't find ext3 filesystem on dev dm-0.
So why is it that I can't mount my encrypted volume after the first time? I am giving the correct password when it asks to. Any insights? Thanks for your help in advance.