[dm-crypt] crypt_get_uuid does not work as expected with plain volumes
gmazyland at gmail.com
Mon Jan 21 12:42:21 CET 2013
On 01/18/2013 07:29 PM, .. ink .. wrote:
> The source code and the test show crypt_get_uuid does not work as
> expected with plain volumes but does with truecrypt volumes and luks
> volumes. The expected behavior is to return NULL on volumes that do
> not support UUID.
> with plain volumes,instead of "NULL",crypt_get_uuid returns
> "PLAIN-XYZ" where "XYZ" is the last component of the mapper path.
Hm. That function is confusing.
There are two UUIDs in fact
- on disk (applies only to LUKS)
- for activated device (aka DM-UUID)
DM-UUID is constructed from format type, on-disk UUID (if present) and
activated device name (so you are able to activate e.g. snapshot of LUKS
even with the same on-disk UUID).
crypt_get_uuid() was formerly designed to return DM-UUID but apparently I
mixed up something here (PLAIN prefix should not be visible).
Well, I'll check what I can do here now and not break existing logic.
More information about the dm-crypt