Re: How to find out about mapped device name?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxx> wrote:

On Mon, Feb 4, 2013 at 6:32 PM, David Li <w.david.li@xxxxxxxxx> 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



_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux