DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Avoiding fsck.ext4 destruction of crypto_luks data
@ 2012-12-27  6:12 Emily Williams
  2012-12-27  9:35 ` ken
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Emily Williams @ 2012-12-27  6:12 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]

Today I made a rather large mistake, running fsck.ext4 on the raw volume
(/dev/sdk1) instead of the mapped volume
(/dev/mapper/whatever-i-choose-to-call-it). I assume it is not possible to
recover from this once it is done and the cryptosetup lukeOpen passphrase
no longer works.

I'd like to avoid this ever happening in the future. Is there any way to
put in safeguards to minimize the chance of this ever happening again?

I've found very few references to this problem after a lot of searching -
below is one I did find that at least made me think I wasn't going crazy -
so I'm guessing I'm just doing something silly that makes fsck.ext4 think
that the raw volume is actually something it should take a whack at fixing,
instead of saying something sensible like "that doesn't look like an ext4
filesystem, go away", which as far as I can see should be the case - it's
encrypted, so it shouldn't "look like" anything except crypto_luks metadata
and random data in no discernible format. And yet fsck.ext4 seems to be
behaving as though it sees an ext4 filesystem with errors.

From: poptones
Subject: (not LUKS) why did fsck on an encrypted source work?
Date: 2005-11-15 06:26:26 GMT (7 years, 6 weeks, 5 hours and 28 minutes ago)

Accidentally (yes, I was still a little rattled from the earlier mistake) I
ran this on /dev/md0 instead of /dev/mapper/md0. After a couple of hours it
began the final pass and I saw it report moving files - about 20,000 object
moved to /lost&found.

Somewhat perplexed and confused, and learning not to play with new toys
when overtired,
-Emily

[-- Attachment #2: Type: text/html, Size: 1820 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-12-31 12:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27  6:12 [dm-crypt] Avoiding fsck.ext4 destruction of crypto_luks data Emily Williams
2012-12-27  9:35 ` ken
2012-12-27  9:52 ` Arno Wagner
2012-12-28 14:46   ` Sven Eschenberg
2012-12-28 15:04     ` Arno Wagner
2012-12-28 19:22       ` Milan Broz
2012-12-29  7:06         ` Arno Wagner
2012-12-29  9:05           ` Milan Broz
2012-12-29 11:52             ` Arno Wagner
2012-12-30  8:42         ` Sven Eschenberg
2012-12-30  9:39           ` Milan Broz
2012-12-30 10:53             ` Arno Wagner
2012-12-30 12:08               ` Sven Eschenberg
2012-12-30 12:25                 ` Milan Broz
2012-12-30 13:19                   ` Arno Wagner
2012-12-30 16:59       ` Emily Williams
2012-12-30 18:49         ` Matthias Schniedermeyer
2012-12-30 19:45         ` Arno Wagner
2012-12-31  6:37           ` Sven Eschenberg
2012-12-31 12:40         ` Richard
2012-12-27 20:29 ` Richard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox