[dm-crypt] Stragen corruption on a dm-crypt device

oren at held.org.il oren at held.org.il
Sat May 14 17:43:22 CEST 2011


Hi,

I'm using dm-crypt for 2 years now (I don't use the luks headers), and
suddenly this morning, after a power failure (unclean shutdown), I've
encountered a weird problem:

When I use 'cryptsetup create homes /dev/mapper/myvg-homes' and enter the
passphrase, instead of creating a new dm device with a proper ext4 fs as
it used to, I get a bad device.

Fsck/mount fail to find the superblock. Also no backup superblocks are
available. I did try the 'mkfs -n' for finding the backup superblocks, for
fsck -b, but none of them works.
===================================================
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: The ext2 superblock is corrupt while trying to open
/dev/mapper/homes

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
===================================================

Why is this case strange? because when I read the device with my naked eye
(or with 'strings' command) I can see lots of plain, *unencrypted* file
content. so it seems like some kind of a limbo, decryption worked, but not
so well...

I'm using Debian unstable, which just got the upgrade for cryptsetup 1.3.0
yesterday. I'm not sure if it's related, but the timing makes me wonder.
I did try downgrading to 1.2.0, but it didn't help.

Kernel is Debian's 2.3.38-2.

Any ideas or directions? I'm still not sure if it's a real bug in
cryptsetup/dm/kernel, or something broken specifically in my place.

10x

Oren



More information about the dm-crypt mailing list