On Mon, Feb 4, 2013 at 6:32 PM, David Li <w.david.li@xxxxxxxxx> wrote:
"cryptsetup status /dev/mapper/mapped_device" will give you the info at the "device" field.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?
"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