linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Andres Toomsalu <andres@active.ee>, Zdenek Kabelac <zkabelac@redhat.com>
Subject: Re: [linux-lvm] how to recover after thin pool metadata did fill up?
Date: Thu, 18 Oct 2012 15:01:15 +0100	[thread overview]
Message-ID: <20121018140114.GB24912@ubuntu> (raw)
In-Reply-To: <508003F1.8090308@shiftmail.org>

On Thu, Oct 18, 2012 at 03:28:17PM +0200, Spelic wrote:
> So, supposing one is aware of this problem beforehand, at pool creation
> can this problem be worked around by using --poolmetadatasize  to
> make a metadata volume much larger than the default?
> 
> And if yes, do you have any advice on the metadata size we should use?

There are various factors that effect this.

- block size
- data dev size
- nr snapshots

The rule of thumb I've been giving is:

work out the number of blocks in your data device.  ie. data_dev_size / data_block_size.
Then multiply by 64.  This gives the metadata size in bytes.

The above calculation should be fine for people who're primarily using
thinp for thin provisioning, and not lots of snapshots.  I recommend
these people use a large block size.  eg, 4M.  I don't think this is
what lvm does by default (at one point it was using a block size of
64k).

Snapshots require extra copies of the metadata for devices.  Often the
data is shared, but the btrees for the metadata diverge as cow
exceptions occur.  So if you're using snapshots allocate more space.
This is compounded by the fact that it's often better to use small
block sizes for snapshots.

- Joe

  parent reply	other threads:[~2012-10-18 14:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 20:21 [linux-lvm] how to recover after thin pool metadata did fill up? Andres Toomsalu
2012-10-18 10:30 ` Zdenek Kabelac
2012-10-18 10:42   ` Andres Toomsalu
2012-10-18 10:55     ` Andres Toomsalu
2012-10-18 11:29     ` Zdenek Kabelac
2012-10-18 13:28   ` Spelic
2012-10-18 13:35     ` Andres Toomsalu
2012-10-18 13:43     ` Zdenek Kabelac
2012-10-18 13:47       ` Andres Toomsalu
2012-10-18 14:01     ` Joe Thornber [this message]
2012-10-18 13:35 ` Joe Thornber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121018140114.GB24912@ubuntu \
    --to=thornber@redhat.com \
    --cc=andres@active.ee \
    --cc=linux-lvm@redhat.com \
    --cc=zkabelac@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).