Re: Query on PE size

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

 



Dne 5.6.2013 04:07, Kumar amit mehta napsal(a):
Hi,

I see that a VG will set the default PE size to 4MiB, i.e.
4 * 1024 * 1024 = 4194304
(Please correct me if I'm wrong)

<snip>
# pvcreate /dev/vdc1
# vgcreate testvg /dev/vdc1
# vgdisplay
# vgdisplay testvg|grep "PE Size"
    PE Size               4.00 MiB <----
<snip>

I see that :
vgcreate()
  -->vgcreate_params_set_defaults()
    -->vp_def->extent_size = DEFAULT_EXTENT_SIZE * 2;

Where DEFAULT_EXTENT_SIZE is #defined to 4096
<snip from lib/config/defaults.h>
#define DEFAULT_EXTENT_SIZE 4096        /* In KB */
<snip from lib/config/defaults.h>

This means that the default extent size being set is 8192, but as mentioned
earlier,the default extent size as reported by 'vgdisplay' is 4 MiB. So Can
someone please point me to the place where this conversion of 8192 into 4MiB
is taking place in the code ?

Variables in the lvm source code which have suffix _size should keep the size in 512b block units -> 8192 * 512b block => 4MiB

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux