[dm-crypt] UUID question

David Li w.david.li at gmail.com
Tue Dec 18 17:46:22 CET 2012


cryptsetup luksUUID <dev> also shows UUID, Perhaps this is the luks UUID
that is independent of the partition format.


On Tue, Dec 18, 2012 at 12:57 AM, Arno Wagner <arno at wagner.name> wrote:

> On Tue, Dec 18, 2012 at 09:12:01AM +0100, Marc Ballarin wrote:
> > Am 18.12.2012 01:36, schrieb Arno Wagner:
> > >On Mon, Dec 17, 2012 at 04:10:50PM -0800, David Li wrote:
> > >>Hi, I wonder if the dm-crypt partition UUID (shown in blkid -p <dev>)
> can
> > >>be used to uniquely associate it with the set of keys the partition
> will
> > >>need. Are there any cases that the UUID would change during the
> partition's
> > >>lifetime?
> > >
> > >The UUID is actually a filesystem attribute, not a partition
> > >attribute...
> >
> > This depends on the partition format in use. For example GPT, and
> > maybe others, provide an additional UUID for partititons (actually
> > GPT even supports Labels):
> >
> > $ sudo blkid -p /dev/sda1
> > /dev/sda1: LABEL="data_usb"
> > UUID="9b70c4bf-6b40-4be3-9cb7-030db682ad35" VERSION="1.0"
> > TYPE="ext4" USAGE="filesystem" PART_ENTRY_SCHEME="gpt"
> > PART_ENTRY_UUID="3d18a590-d329-4a82-be02-c3588098d625"
> > PART_ENTRY_TYPE="0fc63daf-8483-4772-8e79-3d69d8477de4"
> > PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048"
> > PART_ENTRY_SIZE="3907027087" PART_ENTRY_DISK="8:0"
> >
> > Whereas dos/mbr does not:
> >
> > $sudo blkid -p /dev/sda1
> > /dev/sda1: UUID="b786a3a4-26e7-4765-aed1-9bc472522c06" VERSION="1.0"
> > TYPE="ext4" USAGE="filesystem" PART_ENTRY_SCHEME="dos"
> > PART_ENTRY_TYPE="0x83" PART_ENTRY_FLAGS="0x80" PART_ENTRY_NUMBER="1"
> > PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="63997952"
> > PART_ENTRY_DISK="8:0"
> >
> > While the GPT UUID should never change, it might happen if some
> > bogus resizing tool is used.
> >
> > So, if a LUKS-UUID is available I would always prefer it and only
> > fall back to partition UUIDs when not using LUKS.
> >
> > Regards,
> > Marc
>
> Interesting. Seems (again), my view of things is too simplistic ;-)
>
> Anyways, the gist is that change of UUIDs is not something that
> should ordionarily happen during the lifetime of whatever
> carries it.
>
> Arno
> --
> Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno at wagner.name
> GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
> ----
> One of the painful things about our time is that those who feel certainty
> are stupid, and those with any imagination and understanding are filled
> with doubt and indecision. -- Bertrand Russell
> _______________________________________________
> dm-crypt mailing list
> dm-crypt at saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20121218/3bc92ad0/attachment.html>


More information about the dm-crypt mailing list