?

Log in

No account? Create an account
encrypted filesystem - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

encrypted filesystem [Nov. 8th, 2004|02:23 pm]
Brad Fitzpatrick
My file server at home has a number of disks, 2 of which are notable:

SATA 250GB -- /dev/sda
SATA 250GB -- /dev/sdb

I'd partioned both disks into sd[ab][12], with partition one being 100 GB, and partition two being 150 GB.

I'd mirrored /dev/sda1 and /dev/sdb1 as /dev/md0 and have been ext3 atop that for some time for all my storage.

The remaining 150 GB per disk has just sat there. A few times I've used it for benchmarks, but it needed a new purpose.

Today I mirrored /dev/sd[ab]2 into /dev/md1 and then added /dev/md1 to an LVM volume group called "sata_raid".

From "sata_raid" VG I then created a 40GB logical volume (LV) called "e1b" -- encrypted 1 base.

Atop that, I ran dm-crypt/dmsetup and made an AES-encyrpted block device /dev/mapper/e1.

Atop that, I made an XFS filesystem and mounted it.

So far, all good.

Then I rsynced a bunch of data onto the encrypted mount and I lost my connection to my home machine.

I'm curious what happened, but I guess I won't find out until later today.
LinkReply

Comments:
[User Picture]From: matthew
2004-11-09 01:54 am (UTC)
heh, I think that you have one or two too many layers going on there. I'd be interested to see what b0rked though.

I haven't played with dm-crypt. Is it just as easy as that?
(Reply) (Thread)
[User Picture]From: brad
2004-11-09 01:57 am (UTC)
shutdown would've been easier.
(Reply) (Parent) (Thread)
[User Picture]From: matthew
2004-11-09 01:59 am (UTC)
oh, but it's the creative ways of taking the machine down that are the best.
(Reply) (Parent) (Thread)
[User Picture]From: adamthebastard
2004-11-09 01:54 am (UTC)
so what are the odds of you comming home to catastrophic data loss?
(Reply) (Thread)
[User Picture]From: brad
2004-11-09 01:56 am (UTC)
Shhhh. La la la la la la.

I don't hear you.
(Reply) (Parent) (Thread)
[User Picture]From: adamthebastard
2004-11-09 02:05 am (UTC)
you did rsync to another host before you started screwing with partitions on your HDDs didn't you?
(Reply) (Parent) (Thread)
[User Picture]From: brad
2004-11-11 12:15 am (UTC)
I never changed the partitions at all.
(Reply) (Parent) (Thread)
[User Picture]From: adamthebastard
2004-11-11 01:11 am (UTC)
while you didn't change the tables. You were still doing things with the current partitions that I consider screwing, like trying to group them and then encrypt them and then remount them and what not.

Had you done it on another harddrive without your data we wouldn't be having this conversation.

So, did you lose any data?
(Reply) (Parent) (Thread)
[User Picture]From: brad
2004-11-11 01:16 am (UTC)
So, did you lose any data?

Nope.

I wasn't doing anything with partitions that were in use.

The /dev/sdb2 and /dev/sda2 partitions had never been used. They were 150 GB each of nothingness.
(Reply) (Parent) (Thread)
[User Picture]From: kittyandmimmy07
2004-11-09 04:14 am (UTC)
I agree too much with mrwilson, I think it´s right... Loosing connection is ANNOYING, grrrrrr.....
(Reply) (Thread)
[User Picture]From: doubleyou
2004-11-09 04:21 am (UTC)
Er, nothing personal Brad, but you just gave me the overwhelming urge to back-up all my previous posts.

(kidding - but it's still something I need to do)
(Reply) (Thread)
[User Picture]From: toast0
2004-11-11 12:07 am (UTC)
Did you figure out what went wrong?

I assume you've been home by now. :)
(Reply) (Thread)
[User Picture]From: brad
2004-11-11 12:16 am (UTC)
Bad: schedule while atomic

Not sure whose fault. Didn't have sysrq support enabled. Will have to crash it again later w/ a new kernel and get a backtrace.
(Reply) (Parent) (Thread)