From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Mon, 31 Aug 2009 21:13:11 +0200 (CEST) Message-ID: <4A9C20C4.9070704@redhat.com> Date: Mon, 31 Aug 2009 21:13:08 +0200 From: Milan Broz MIME-Version: 1.0 References: <4A9AA6DA.6000406@archlinux.org> In-Reply-To: <4A9AA6DA.6000406@archlinux.org> Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Subject: Re: [dm-crypt] [Request] cryptsetup option to fix leftovers from old filesystems List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Thomas_B=E4chler?= Cc: dm-crypt@saout.de, util-linux-ng@vger.kernel.org Thomas B=E4chler wrote: > We have encountered a problem with blkid that is caused by cryptsetup=20 > not cleaning superblocks of old filesystems on luksFormat. The problem=20 > has been fixed in 1.0.7, however old LUKS volumes still suffer from this = > problem. Please read this thread for details: >=20 > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2563 >=20 > 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. >=20 > I'm not very familiar with the LUKS code or on-disk format, so I would=20 > be greatful if anyone who is would implement such a feature. Thanks for=20 > 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 ar= ea with possible old signature (at least this works for swap/luks signature mi= smatch): dd if=3D/dev/zero of=3D bs=3D512 seek=3D2 count=3D6 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