From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com [209.85.216.50]) by mail.saout.de (Postfix) with ESMTP for ; Tue, 14 Sep 2010 23:37:04 +0200 (CEST) Received: by qwb7 with SMTP id 7so4409233qwb.37 for ; Tue, 14 Sep 2010 14:37:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100914203233.GA4559@tansi.org> References: <20100914173332.GB32723@tansi.org> <20100914203233.GA4559@tansi.org> Date: Tue, 14 Sep 2010 23:37:03 +0200 Message-ID: From: Ma Begaj Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [dm-crypt] WD20EARS (4KB sector size) lost Luks header after reboot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de >> root@road:/dev/disk/by-uuid# =A0grep -ob --binary-files=3Dtext LUKS /tmp= /sdm >> 32256:LUKS >> >> or grep directly on /dev/sdm >> >> [ 32256 ] should be offset. >> >> What should I do with this? > > This confirms that you did create the LUKS container at the > right place, namely the LUKS header is at 64 x 512 B offset. 64x512 =3D32768 32768 !=3D 32256 512 bytes is partition table? should it be 32780? I am probably missing something. I just tested it on other LUKS disks and every disk gives 32256 which means that this offset is OK. > This seems to be some bizzarre issue with your system not detecting the > partitions right and LUKS is actually working as expected. grep -ob --binary-files=3Dtext LUKS /dev/sdm1 /dev/sdm1 does not return anything although it should return "0:LUKS". but grep on /dev/sdm returns "32256:LUKS" > > Ok, lets do some triage. > > - What Linux, what kernel version? 2.6.29.4, vanilla I have a few other HDDs in this machine, some of them with LUKS, raid5 with LUKS etc. This is the only disk with LUKS on USB (others are intern/SATA) but that should not be the reason. > - Any special set-up like virtuzlization? > - Any special partition management system? No to both. I think it has something to do with 4Kb sector size and some kind partition table incompatibilty with the kernel. or maybe mkfs.xfs did something because I did not use "-b 4096" (block size in XFS is 4kB by default). LUKS header starts obviously where it should if I look at /dev/sdm. I don't know enough about partition tables and headers but it looks like /dev/sdm1 is starting little bit too far and LUKS header stays before the beginning of /dev/sdm1 (first partition). Only obvious reason (at lease for me) for this could be in this 4Kb sector size. Thanks M.