]> sourceware.org Git - lvm2.git/commit
Place the first PE at 1 MiB for all defaults
authorDavid Teigland <teigland@redhat.com>
Tue, 13 Nov 2018 21:00:11 +0000 (15:00 -0600)
committerDavid Teigland <teigland@redhat.com>
Mon, 26 Nov 2018 22:36:50 +0000 (16:36 -0600)
commit904e1e3d26ccb43c19266e96e67f8c10f93eaaa4
treede606cee83816b18c04e33018c5f412e8c7add67
parent2d1152103f8fce4892380f75f59dd5013bcd84d3
Place the first PE at 1 MiB for all defaults

. When using default settings, this commit should change
  nothing.  The first PE continues to be placed at 1 MiB
  resulting in a metadata area size of 1020 KiB (for
  4K page sizes; slightly smaller for larger page sizes.)

. When default_data_alignment is disabled in lvm.conf,
  align pe_start at 1 MiB, based on a default metadata area
  size that adapts to the page size.  Previously, disabling
  this option would result in mda_size that was too small
  for common use, and produced a 64 KiB aligned pe_start.

. Customized pe_start and mda_size values continue to be
  set as before in lvm.conf and command line.

. Remove the configure option for setting default_data_alignment
  at build time.

. Improve alignment related option descriptions.

. Add section about alignment to pvcreate man page.

Previously, DEFAULT_PVMETADATASIZE was 255 sectors.
However, the fact that the config setting named
"default_data_alignment" has a default value of 1 (MiB)
meant that DEFAULT_PVMETADATASIZE was having no effect.

The metadata area size is the space between the start of
the metadata area (page size offset from the start of the
device) and the first PE (1 MiB by default due to
default_data_alignment 1.)  The result is a 1020 KiB metadata
area on machines with 4KiB page size (1024 KiB - 4 KiB),
and smaller on machines with larger page size.

If default_data_alignment was set to 0 (disabled), then
DEFAULT_PVMETADATASIZE 255 would take effect, and produce a
metadata area that was 188 KiB and pe_start of 192 KiB.
This was too small for common use.

This is fixed by making the default metadata area size a
computed value that matches the value produced by
default_data_alignment.
19 files changed:
configure.ac
include/configure.h.in
lib/config/config.c
lib/config/config.h
lib/config/config_settings.h
lib/config/defaults.h
lib/format_text/format-text.c
lib/metadata/metadata-exported.h
lib/metadata/metadata.c
lib/metadata/metadata.h
lib/metadata/pv.h
man/pvcreate.8_des
man/vgcreate.8_des
test/shell/pe-align.sh [new file with mode: 0644]
test/shell/pvcreate-bootloaderarea.sh
test/shell/pvcreate-usage.sh
test/shell/topology-support.sh
tools/args.h
tools/toollib.c
This page took 0.045186 seconds and 5 git commands to generate.