udisks
udisks copied to clipboard
Use LUKS label as device mapper name
Hi,
I'm using LUKS devices to store data and I'm happy that I can use them using udisks. Now cryptsetup allows one to use labels for the LUKS devices using, e.g.
cryptsetup luksFormat --label myluksdevice /path/to/device
which is a nice feature, especially if you're using multiple LUKS devices (like I do), to know which is which in case you need to track something down.
Now udisks creates the dev mapper link in the format luks-UUID
, which is a logical decision, since the UUID is always present and should be unique, e.g.
luks-9c172390-4ba2-4af3-8466-b0d57513a16b -> ../dm-1
However, it would be a nice feature if the label of the LUKS device could be used instead? Or additionally (although I'm not sure if this is acceptable from the device mapper perspective)? e.g. (if the label is 'backup1')
luks-9c172390-4ba2-4af3-8466-b0d57513a16b -> ../dm-1
backup1 -> ../dm-1
Yes, we can do that. We are already using filesystem labels for mountpoints, so using label when unlocking LUKS makes sense too.
You can also put the device in crypttab and we will then use the name from there.