Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1s7QYgyPJ-xp for ; Fri, 21 Dec 2012 02:24:07 +0100 (CET) Received: from mps1.wohnheimg.uni-frankfurt.de (mps1.wohnheimg.uni-frankfurt.de [141.2.118.239]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Fri, 21 Dec 2012 02:24:07 +0100 (CET) Received: from localhost ([127.0.0.1] helo=ssl.verfeiert.org) by mps1.wohnheimg.uni-frankfurt.de via ESMTP (Exim) (envelope-from ) id 1TlrLL-0000fY-Cz for dm-crypt@saout.de; Fri, 21 Dec 2012 02:24:07 +0100 Message-ID: <851f7c3b7952cf38eb38f727e9bb8f87.squirrel@ssl.verfeiert.org> In-Reply-To: <50D2F37C.1000000@gmx.com> References: <50D2F37C.1000000@gmx.com> Date: Fri, 21 Dec 2012 02:24:07 +0100 From: "Sven Eschenberg" MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [dm-crypt] UUID question Reply-To: sven@whgl.uni-frankfurt.de List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Hi Yaron, Old bugs it seems. Neither my gentoo box, nor a Ubuntu 12.10 showed the behavior you describe. Can you verify that the entries under /dev/disk/by-uuid/ are softlinks on Lucid? Regards -Sven On Thu, December 20, 2012 12:16, Yaron Sheffer wrote: > Hi Sven, > > a quick correction: blkid is (surprisingly) not smart enough, and your > command line results in duplicates. Both the /dev (e.g. /dev/sdg) and > the equivalent /dev/disk/by-uuid are listed. > > So you want to use: > > blkid -t TYPE="crypto_LUKS" -s UUID /dev/disk/by-uuid/* > > (tested on Ubuntu 10.04 Lucid). > > Thanks, > Yaron > > On 12/20/2012 01:00 PM, dm-crypt-request@saout.de wrote: >> Date: Thu, 20 Dec 2012 00:30:23 +0100 >> From: "Sven Eschenberg" >> To: dm-crypt@saout.de >> Subject: Re: [dm-crypt] UUID question >> Message-ID: >> <18e39b1120b315e7553bdb330e5103c5.squirrel@ssl.verfeiert.org> >> Content-Type: text/plain;charset=utf-8 >> >> cryptsetup luksUUID will return the luks header's UUID if >> holds a luks header, and yes, this should usually not change the same >> way >> as the UUID of a filesystem souldn't. >> >> There's 2 problems though: >> >> 1.) You'd have to know in advance or iterate over all possible >> (non >> locked) blockdevices (which is what blkid usually does anyway for you) >> >> 2.) a blockdev could possibly hold a luks header and still be part of a >> md >> device (depending on metadata version), you'd better hope that the md >> device is set up already, when you issue your cryptsetup commands. >> >> Concerning the original question: >> >> The UUID within the LUKS header should not change throughout the LUKS >> volume's lifetime, except for enforced changes (as noted before). >> >> To associated keys based on luks UUID, using something like: >> 'blkid -t TYPE="crypto_LUKS" -s UUID' >> is probably a good starting point, as it gives you the UUID to retrieve >> the keys based on the UUID and the device inode you'd use on further >> calls >> to cryptsetup etc. - The rest is just a little shell magic ;-) >> >> Regards >> >> -Sven >> >> > > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt >