I just upgraded to 18.04 on my NAS. I have a script that prompts my user for a luks password and then mounts the drive after it's decrypted. This used to work:
cryptsetup luksOpen /dev/md0 md0_crypt udevadm settle --exit-if-exists=/dev/mapper/files--vg-main mount /dev/mapper/files--vg-main /main
However after updating to 18.04 this stopped working and I get:
mount: /main: special device /dev/mapper/files--vg-main does not exist.
I have not found a solution just googling. My LUKS container is my pv. I have it in a Vol group called files-vg. I then have one logical volume with a path /dev/files-vg/main. Hence why I'm looking for /dev/mapper/files--vg-main
Edit: To clarify, the
udevadm settle line does not wait long enough for the LV to become available so the mount fails. I can manually call
mount and it will work afterward.