[dm-crypt] How to find out about mapped device name?

.. ink .. mhogomchungu at gmail.com
Tue Feb 5 01:08:04 CET 2013


On Mon, Feb 4, 2013 at 6:57 PM, David Li <w.david.li at gmail.com> wrote:

>
> Thanks for the info!
>
> What if I was only given the raw dev name, .e.g, /dev/sdd? Is there an
> easy way to find out its mapped encrypted device name in /dev/mapper?
>
>
The easiest way is to use a mapper path that gives a direct relationship to
the underlying device.For example,if you want to open a device at
"/dev/sdc5",use a mapper path of something like "dev_sdc5.This way,if given
a device of "/dev.sda6",you know the mapper path is "/dev/mapper"sda_6".

Most tools that open volumes have some sort of a consistency on what mapper
paths they create and its based on the user ID and device path

If you dont know the relationship btw a device and its mapper,then the only
thing you can do i can think of is to go through all entries in
"/dev/mapper" and look for their underying devices and compare it with the
device you are interested in.

I believe "LVM" volumes also add entries in "/dev/mapper" so the folder may
have other entries apart from cryptsetup ones.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20130204/0c59c73b/attachment.html>


More information about the dm-crypt mailing list