All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: "Thomas Bächler" <thomas@archlinux.org>
Cc: dm-crypt@saout.de, util-linux-ng@vger.kernel.org
Subject: Re: [dm-crypt] [Request] cryptsetup option to fix leftovers from old	filesystems
Date: Mon, 31 Aug 2009 21:13:08 +0200	[thread overview]
Message-ID: <4A9C20C4.9070704@redhat.com> (raw)
In-Reply-To: <4A9AA6DA.6000406@archlinux.org>

Thomas Bächler wrote:
> We have encountered a problem with blkid that is caused by cryptsetup 
> not cleaning superblocks of old filesystems on luksFormat. The problem 
> has been fixed in 1.0.7, however old LUKS volumes still suffer from this 
> problem. Please read this thread for details:
> 
> http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2563
> 
> What I would request is an option to "clean" the unused area in the LUKS 
> header up to the start of the payload, such that for example an old ext2 
> magic is removed. All that without destroying the used areas in the LUKS 
> header, of course.
> 
> I'm not very familiar with the LUKS code or on-disk format, so I would 
> be greatful if anyone who is would implement such a feature. Thanks for 
> your replies.

Hi Thomas,

I don't think we need implement any clean function, new version already
wipes that area.

Because visible LUKS header is written in first 2 sectors and keyslot
area always begins on 4k offset, you can use this command to wipe unused area
with possible old signature (at least this works for swap/luks signature mismatch):

dd if=/dev/zero of=<device> bs=512 seek=2 count=6

But please create backup before trying this... ;-)

(btw mkswap should clean LUKS signature too - try mkswap over old LUKS
and then blkid:-)

Milan
--
mbroz@redhat.com

  reply	other threads:[~2009-08-31 19:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30 16:20 [dm-crypt] [Request] cryptsetup option to fix leftovers from old filesystems Thomas Bächler
2009-08-31 19:13 ` Milan Broz [this message]
2009-08-31 21:33   ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9C20C4.9070704@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    --cc=thomas@archlinux.org \
    --cc=util-linux-ng@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.