I am wanting to encrypt the mirrored drives in my server using Geli. I currently use gmirror to mirror them. I have read some of the geli articles on this forum (thanks bbzz!) but this is how I did it for a mirrored system. Most articles/how tos are for a single drive.
Any way, here is what I have done. I have two 320GB drives in this test machine. Here are the steps:
When I rebooted I was prompted with a passphrase prompt and the system booted ;-)
I see you get 3 attempts at entering your passphrase...what happens after this?
Would appreciate any feedback regarding these steps outlined as this is my first geli mirror system (using dump to restore).
Thank you!
PS: Whats the correct way of *completely* wiping ALL info from a hard drive? Not just data and partitions but gmirror/gpart/boot code/etc?
Any way, here is what I have done. I have two 320GB drives in this test machine. Here are the steps:
Code:
glabel label MirrorDisk0 /dev/ada0
glabel label MirrorDisk1 /dev/ada1
gmirror load
gmirror label -v RootMirror0 /dev/label/MirrorDisk0 /dev/label/MirrorDisk1
gpart create -s MBR mirror/RootMirror0
gpart add -t freebsd -a 4k -s 768m mirror/RootMirror0 (mirror/RootMirror0s1)
gpart add -t freebsd -a 4k mirror/RootMirror0 (mirror/RootMirror0s2)
gpart create -s BSD mirror/RootMirror0s1
gpart create -s BSD mirror/RootMirror0s2
gpart add -t freebsd-ufs -a 4k mirror/RootMirror0s1
gpart add -t freebsd-ufs -a 4k mirror/RootMirror0s2
gpart bootcode -b /boot/mbr mirror/RootMirror0
gpart bootcode -b /boot/boot mirror/RootMirror0s1
gpart set -a active -i 1 mirror/RootMirror0
glabel label -v encrypt mirror/RootMirror0s2
geli init -b -s4096 -l256 /dev/label/encrypt
kldload geom_eli
geli attach /dev/label/encrypt
gpart create -s bsd /dev/label/encrypt.eli
gpart add -t freebsd-ufs -s 293g /dev/label/encrypt.eli
gpart add -t freebsd-swap /dev/label/encrypt.eli
newfs mirror/RootMirror0s1a
newfs -j /dev/label/encrypt.elia
cd /mnt
umount /tmp
mount -w /dev/da0a /tmp
mount -t ntfs /dev/da1s1 /media
mount /dev/label/encrypt.elia /mnt
restore -rf /media/restore.dump
/mnt/boot/loader.conf:
geom_eli_load="YES"
vfs.root.mountfrom="ufs:/dev/label/encrypt.elia"
/etc/fstab:
/dev/label/encrypt.elia / ufs rw 1 1
/dev/label/encrypt.elib none swap sw 0 0
mount /dev/mirror/RootMirror0s1a /tmp
cp -Rvp /mnt/boot /tmp/
When I rebooted I was prompted with a passphrase prompt and the system booted ;-)
I see you get 3 attempts at entering your passphrase...what happens after this?
Would appreciate any feedback regarding these steps outlined as this is my first geli mirror system (using dump to restore).
Thank you!
PS: Whats the correct way of *completely* wiping ALL info from a hard drive? Not just data and partitions but gmirror/gpart/boot code/etc?