linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Tomas Dalebjörk" <tomas.dalebjork@gmail.com>
To: Heinz Mauelshagen <heinzm@redhat.com>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] size of lvm metadata
Date: Sun, 19 Dec 2021 21:13:45 +0100	[thread overview]
Message-ID: <1CFB8D67-A13E-46F3-8693-545ED89CB981@gmail.com> (raw)
In-Reply-To: <f4b822a0-33d2-bd9b-6696-09d09aa19052@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2254 bytes --]

Hi

if I have a disk that are merged into a server coming from another server containing a lvm snapshot
How can I convert this foreign disk to an existing  lv volume?

The documentation says I can use
lvconvert-Zn -s targetvg/targetlv sourcevg/sourcelv

But I guess I have to perform some lvm metadata recreation first?

please let me know what steps are neede

Regards Tomas

Sent from my iPhone

> On 17 Sep 2020, at 17:22, Heinz Mauelshagen <heinzm@redhat.com> wrote:
> 
>  Tomas,
> 
> the first PE starts at offset 2048 sectors of size 512 bytes by default, i.e. the LVM MDA (metadata area)
> is ~1MiB big (because the MDA starts at offset 1 page into the device).  If you plan for large numbers of LVs or expect very scattered allocations which both grow the metadata, you may want to create a
> bigger MDA using vgcreate's option --metadatasize (also see /etc/lvm/lvm.conf description on
> metadata/pvmetadatasize).
> 
> On 9/16/20 5:50 PM, Tomas Dalebjörk wrote:
> > hi
> > 
> > I am trying to understand how big the lvm metadata is
> > 
> > in the vgcfgbackup file, I can see extent_size = 8192 dev_size =
> > 204800 pe_start = 2048 pe_count 24
> > 
> > pe_count(24) * extent_size(8192) = 196608 bytes usable space of the
> > total dev_size(204800) metadata size? = dev_size(204800) - 196608 =
> > 8192
> > 
> > but... pe_start is 2048? so what is pe_start here? cant be
> > sectors(512)? bytes? well than ther be not aligned
> > 
> > so where starts the actual data? and where ends the lvm metadata?
> At offset 2048 sectors (1MiB into the device) / MDA ends at sector 2047.
> 
> Mind that lvm2 metadata is text formatted (see /etc/lvm/backup/$VGName for one)
> and thus varies in size (the MDA is used as a ring buffer for 2 copies of the MDA to
> support atomic updates).  As pointed out above when refering to 'vgcreate --metadatasize',
> in more elaborate setups you may run out of MDA space.
> 
> Heinz
> 
> > 
> > regards Tomas Sent from my iPhone
> > 
> > 
> > _______________________________________________ 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/
> 

[-- Attachment #1.2: Type: text/html, Size: 3358 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

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

      parent reply	other threads:[~2021-12-20  6:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 15:50 [linux-lvm] size of lvm metadata Tomas Dalebjörk
2020-09-17 15:21 ` Heinz Mauelshagen
2020-09-17 17:13   ` Tomas Dalebjörk
2021-12-19 20:13   ` Tomas Dalebjörk [this message]

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=1CFB8D67-A13E-46F3-8693-545ED89CB981@gmail.com \
    --to=tomas.dalebjork@gmail.com \
    --cc=heinzm@redhat.com \
    --cc=linux-lvm@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).