[dm-crypt] How to find out about mapped device name?
w.david.li at gmail.com
Tue Feb 5 00:57:27 CET 2013
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?
On Mon, Feb 4, 2013 at 3:50 PM, .. ink .. <mhogomchungu at gmail.com> wrote:
> On Mon, Feb 4, 2013 at 6:32 PM, David Li <w.david.li at gmail.com> wrote:
>> Hi Experts,
>> I have already called luksFormat on a raw block dev and luksOpen to set
>> up mapped device in /dev/mapper. Is there a command to find out about the
>> mapping between the raw dev and mapped dev?
> "cryptsetup status /dev/mapper/mapped_device" will give you the info at
> the "device" field.
> "readlink /dev/mapper/mapped_device" will give you something like
> "../dm-1"..That address says the dm device is "/dev/dm-1"
> take the "dm-1" component,add around it to gave a path
> "/sys/block/dm-1/slaves/" and then go to the folder and you will see an
> entry that will look like "sdc5".This entry will tell you the "raw device"
> is "/dev/sdc5.
> The first way require root's privileges.
> The second way is hacky but does not
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dm-crypt