[dm-crypt] Strange kind of corruption on a dm-crypt device

Oren Held oren.held at gmail.com
Sat May 14 17:54:44 CEST 2011

Hi, I'm using dm-crypt for 2 years now and it's rather stable. I'm not using
luks but only 'cryptsetup create' method. Suddenly this morning, after an
unclean shutdown, I've encountered a strange 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. But not *totally* bad. 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 (kernel 2.6.38-2), which just got the
upgrade package for cryptsetup 1.3.0 yesterday. I'm not sure if my problem
has to do with the upgrade, but the timing makes me wonder. I did try
downgrading to 1.2.0 and to 2.6.37, but it didn't help. Any suggestion on
how to progress? anybody experienced something similar recently? I'm still
not sure if it's a real bug in cryptsetup/dm/kernel, or something broken
specifically in my place. 10x Oren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20110514/5ec7db7c/attachment.html>

More information about the dm-crypt mailing list