Labels, encryption and udev rules

After a bit of head banging I’ve managed to create a set of udev rules that automatically mount a set of external USB HDDs with partitions labelled as BACKUP01, BACKUP02 etc. at /media/BACKUP - guess what for :wink:

The partitions should really be encrypted since they’re holding backups of /home.

The questions I have before I screw up a working backup system are…

If I encrypt the partitions can they still be picked up by the label in the udev rules?

Since they’re now going to need a password entered to mount where is this prompt going to come up?
Given that the server they get mounted on is normally running headless I won’t have a tty open on there at the time so it’s not much use the prompt coming up on (say) tty1.


Sounds like a good concept. I’m on a laptop and could test what it does with one of my usb drives if you post the udev rule. At least I could tell you what it displays in a terminal.

This isn’t really an answer to your problem but you might be able to write a short script to supply the password. You could try the the udev rule on a system with monitor to see what the response would be, then put the proper reply in the script.

Maybe post the udev you wrote and somebody will be able to help modify it to call a script.