[linux-lvm] LE to PE mapping

Brassow Jonathan jbrassow at redhat.com
Wed Sep 24 04:57:30 UTC 2014


On Sep 16, 2014, at 12:46 PM, Allen, Jack wrote:

> Hello:
>                 I have only received 1 direct reply about this. Nobody else has anything to add?
>  
>                 Another question: Where is the mapping stored if I wanted to write a program to display it the way I want?
>  

I don't think there is a way to do exactly what you want that I am aware of.  You need to know three things: the order of the devices, the stripe size, and the overall size.  You can compute what you want from that, but I don't think LVM will do that for you.

You can get those three fields from 'lvs', but I think you will have to do some scripting to get what you want from there.

As to the question of the mapping table...  The mapping table is not stored anywhere.  It is constructed from the LVs properties that are stored in the LVM metadata.  You can, however, get the table used to construct the device by calling 'dmsetup table <DM device>'.  The DM device is what /dev/<vg>/<lv> links to.

 brassow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20140923/860a9c5d/attachment.htm>


More information about the linux-lvm mailing list