demand mounting a dm-crypt based filesystem on a fixed device

Galen Seitz galens at seitzassoc.com
Sun Apr 13 14:56:55 PDT 2008


I would like to demand mount a dm-crypt based filesystem that is
located on a fixed device.  I don't want the filesystem or dm-crypt
device to always be active, as most of the time it is not needed.  Can
anyone suggest a mechanism to accomplish this?  There are many
instructions on the net for doing this with removable devices, but I
haven't found any that would apply to a fixed device.  With a
removable device you have a hotplug event to initiate the necessary
steps.  With a fixed device it seems that autofs or something similar
would be required.  Is something along the following lines plausible?

   autofs triggers hal
   hal calls gnome volumer manager
   gnome volume manager asks user for passphrase
   gnome volume manager hands passphrase to hal
   hal calls cryptsetup
   autofs mounts dm-crypt device
     filesystem available
   autofs idle timeout expires
   autofs umounts dm-crypt device
   autofs triggers hal
   hal performs cryptsetup close

If there is a better list for this question, please let me know.

thanks,
galen




More information about the hal mailing list