On Mon, 26 Jun 2006 at 16.13.55 -0500, rwh wrote:
> I have a set of external USB disks that contain encrypted partitions and
> I'm trying to set up a service script to mount those disks with the
> appropriate passwords in a way that will be reasonably robust across
> reboots, etc.
> 
> I've gotten to the point where I could parse the information in
> /proc/scsi/scsi to map the scsi device to the device assignment, grep
> through the system log to find the device that was assigned, and use
> that to grab the appropriate password and mount point for the volume.
> 
> I'm wondering if I'm missing something and where there is a table
> somewhere in /proc, or an existing utility that can dump this information?

Maybe this is naive, but why not mount by volume label or UUID or use
LVM and make a volume group on the USB device and mount the LV contained
therein?

I guess if you have to put the device name in magic incantations before
you mount it to set up your crypto gears, LABEL= or UUID= won't work,
but LVM should still work in that case, although you might need to do
another pvscan or vgscan if the device isn't connected at boot.

-- 
Sidney CAMMERESI
http://www.cheesecake.org/sac/