Need a way to recognize partionion table inside of LUKS container declaratively and automatically
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Lets assume I have LUKS container on the raw `/dev/sdx`. It occupies the whole disk, so I've opened it, created partition table on corresponding `/dev/mapper/xyz` and created 2 partitions inside.
Here is the trick: before mounting those partitions I need to run `kpartx -u -p -part /dev/mapper/xyz` so that I can access those partitions as `/dev/mapper/
I'd like to make mounting automatic on boot with `/etc/crypttab` and `/etc/fstab` only, but I need to run `kpartx` after opening LUKS container and before mounting target partitions inside of it. This is possible with custom scripts, but requires quite invasive configuration which I'd like to avoid.
Currently I'm unable to find any way to declaratively specify that this container have partition table in it.
What I imaging as a perfect solution is new options supported in `/etc/crypttab` like following:
xyz UUID=... none luks,kpartx,
Which will result in:
* /dev/mapper/xyz
* /dev/mapper/
* /dev/mapper/