Need a way to recognize partionion table inside of LUKS container declaratively and automatically

Bug #1672106 reported by Nazar Mokrynskyi
6
This bug affects 1 person
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/xyz-part1` and `/dev/mapper/xyz-part2`.

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,kpartx-delimiter=-part

Which will result in:
* /dev/mapper/xyz
* /dev/mapper/xyz-part1
* /dev/mapper/xyz-part2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.