[openstack-dev] [fuel][nailgun][volume-manager][fuel-agent] lvm metadata size value. why was it set to 64M?
eli at mirantis.com
Thu Feb 18 10:01:50 UTC 2016
I was trying to trace the change and found 3 year old commit, yes it's hard
to recover the reason .
So what we should ask is what is a right way to calculate lvm metadata size
and change this behaviour.
I would suggest at least explicitly set metadata size on Nailgun side to
the same amount we have in the agent (until better size is found). Plus
explicitly reserve some amount of space based on io-optimal of specific
On Wed, Feb 17, 2016 at 8:51 PM, Alexander Gordeev <agordeev at mirantis.com>
> Apparently, nailgun assumes that lvm metadata size is always set to 64M 
> It seems that it was defined here since the early beginning of nailgun as
> a project, therefore it's impossible to figure out for what purposes that
> was done as early commit messages are not so informative.
> According to the documentation (man lvm.conf):
> pvmetadatasize — Approximate number of sectors to set aside
> for each copy of the metadata. Volume groups with large numbers of
> physical or logical volumes, or volumes groups containing complex
> logical volume structures will need additional space for their metadata.
> The metadata areas are treated as circular buffers, so unused space becomes
> filled with an archive of the most recent previous versions of the metadata.
> The default value is set to 255 sectors. (128KiB)
> Quotation from particular lvm.conf sample:
> # Approximate default size of on-disk metadata areas in sectors.
> # You should increase this if you have large volume groups or
> # you want to retain a large on-disk history of your metadata changes.
> # pvmetadatasize = 255
> nailgun's volume manager calculates sizes of logical volumes within one
> physical volume group and takes into account the size of lvm metadata .
> However, due to logical volumes size gets rounded to the nearest multiple
> of PE size (which is 4M usually), fuel-agent always ends up with the lack
> of free space when creating logical volumes exactly in accordance with
> partitioning scheme is generated by volume manager.
> Thus, tricky logic was added into fuel-agent  to bypass that flaw.
> Since 64M is way too big value when compared with typical one, fuel-agent
> silently reduces the size of lvm metadata by 8M and then partitioning
> always goes smooth.
> Consequently, almost each physical volume group remains only 4M of free
> space. It worked fine on old good HDDs.
> But when the time comes to use any FC/HBA/HW RAID block storage device
> which is occasionally reporting relatively huge values for minimal io size
> and optimal io size exposed in sysfs, then fuel-agent might end up with the
> lack of free space once again due to logical volume alignments within
> physical volume group . Those alignments have been done by LVM
> automatically with respect to those values 
> As I'm going to trade off some portion of reserved amount of disk space
> for storing lvm metadata for the sake of logical volume alignments, here're
> the questions:
> * why was lvm metadata set to 64M?
> * could someone shed more light on any obvious reasons/needs hidden behind
> * what is the minimal size of lvm metadata we'll be happy with?
> * the same question for the optimal size.
>  https://bugs.launchpad.net/fuel/+bug/1546049
>  http://people.redhat.com/msnitzer/docs/io-limits.txt
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev