How to tell where a LUKS device is mapped to

Michael Torrie torriem at gmail.com
Mon Aug 9 18:43:58 MDT 2010


On 08/09/2010 05:42 PM, Dave Smith wrote:
>  > ls -l /dev/mapper
> total 0
> crw-rw---- 1 root root  10, 59 2010-08-07 11:39 control
> brw-rw---- 1 root disk 252,  0 2010-08-09 17:11 
> udisks-luks-uuid-6497d53d-5413-4368-80eb-bef311497fb6-uid2343
> brw-rw---- 1 root disk 252,  0 2010-08-09 17:15 
> udisks-luks-uuid-54779533-1245-1234-5efb-1dcb3ac3def-uid1371
> 
> How can I tell which of the two /dev/mapper devices corresponds to 
> /dev/sda3?

It looks like the mapper device filename is based on the filesystem's
uuid.  You can take a look in /dev/disk/by-uuid and see what the
respective uuid strings symlink to.

> 
> Puzzle 2: The Reverse
> 
> I have a mountpoint, /mnt/foo, that I think might be mounted to a LUKS 
> device. I use 'df' to find where it's mounted, as follows:
> 
>  > df -h /mnt/foo
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/mapper/udisks-luks-uuid-6497d53d-5413-4368-80eb-bef311497fb6-uid2343
>                        236M  2.1M  222M   1% /mnt/foo
> 
> That looks like a candidate to me. How do I find out which physical 
> device that comes from?

Probably the same way.


More information about the PLUG mailing list