[linux-lvm] LE to PE mapping

Peter Rajnoha prajnoha at redhat.com
Mon Sep 15 06:40:50 UTC 2014


On 09/13/2014 12:02 AM, Allen, Jack wrote:
> Hello:
>         I need to find a command on RHEL 5.8 that will show each LE to
> PE mapping for a LV. All the command I have looked at so far (lvs, pvs,
> lvdisplay and pvdisplay) using various option only show the start PE and
> how many.

Try lvdisplay --maps (or pvdisplay --maps for the other way round).

>         Something else I need some clarification on is the PE size of
> 4MB and the strip size of 16K. Are the PEs not allocated as shown above
> in either example?
>  
>         Are the PE allocated in 4MB chunks?
>  

Yes, it's 4MB extent size by default if not speficied otherwise
using vgcreate/vgchange -s.

>         Then what does the 16K do?
>  

That is stripe size - the data  will be placed/rotated over disks
by this amount for each disk while the extent size is the basic unit
for mapping LV segments to the underlying disks. Of course, if you have,
for example, 2 stripes, you need an LV which is mapped to at least 2
different disks which also means at least 2 PEs to fulfill this condition
(otherwise, we couldn't map stripes onto different disks which would defeat
the essence of striping) - LVM does this rounding for you and
modifies the LV size automatically to make the stripe count and
LV mapping combination possible.

> -------------------------
> Jackson C. Allen
> McKesson Provider Technologies
> 5995 Windward Parkway
> Alpharetta, GA 30005
> (404) 338-2023
> _Jack.Allen at McKesson.com_ <mailto:Jack.Allen at McKesson.com>
> Confidentiality Notice: This e-mail message, including any attachments,
> is for the sole use of the intended recipient(s) and may contain
> confidential and privileged information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply e-mail and destroy all
> copies of the original message.
>  
>  
>  
>  
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 


-- 
Peter




More information about the linux-lvm mailing list