]> sourceware.org Git - lvm2.git/commit
Change default alignment of pe_start to 1MB.
authorMike Snitzer <snitzer@redhat.com>
Thu, 12 Aug 2010 04:11:48 +0000 (04:11 +0000)
committerMike Snitzer <snitzer@redhat.com>
Thu, 12 Aug 2010 04:11:48 +0000 (04:11 +0000)
commitb123a82d736ed7916111beb7fdab1ab0eea4f050
tree859831597d5b8f76dbcca36099b7d052e2175e9b
parentdff224669d075625d4d5210c9808b6c22a4830ba
Change default alignment of pe_start to 1MB.

The new standard in the storage industry is to default alignment of data
areas to 1MB.  fdisk, parted, and mdadm have all been updated to this
default.

Update LVM to align the PV's data area start (pe_start) to 1MB.  This
provides a more useful default than the previous default of 64K (which
generally ended up being a 192K pe_start once the first metadata area
was created).

Before this patch:
# pvs -o name,vg_mda_size,pe_start
  PV         VMdaSize  1st PE
  /dev/sdd     188.00k 192.00k

After this patch:
# pvs -o name,vg_mda_size,pe_start
  PV         VMdaSize  1st PE
  /dev/sdd    1020.00k   1.00m

The heuristic for setting the default alignment for LVM data areas is:
- If the default value (1MB) is a multiple of the detected alignment
  then just use the default.
- Otherwise, use the detected value.

In practice this means we'll almost always use 1MB -- that is unless:
- the alignment was explicitly specified with --dataalignment
- or MD's full stripe width, or the {minimum,optimal}_io_size exceeds
  1MB
- or the specified/detected value is not a power-of-2
12 files changed:
WHATS_NEW
doc/example.conf.in
lib/config/defaults.h
lib/metadata/metadata.c
test/lvm-utils.sh
test/t-pvcreate-operation-md.sh
test/t-pvcreate-usage.sh
test/t-topology-support.sh
test/t-vgcreate-usage.sh
test/t-vgextend-usage.sh
test/t-vgsplit-operation.sh
test/test-utils.sh
This page took 0.03439 seconds and 5 git commands to generate.