linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: Jim Haddad <jimhaddad46@gmail.com>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] "write failed.. No space left", "Failed to write VG", and "Failed to write a MDA"
Date: Mon, 4 Jun 2018 11:35:17 -0500	[thread overview]
Message-ID: <20180604163517.GC19875@redhat.com> (raw)
In-Reply-To: <20180604153434.GB19875@redhat.com>

On Mon, Jun 04, 2018 at 10:34:34AM -0500, David Teigland wrote:
> format-text.c:331 Reading mda header sector from /dev/sdb at 4096
> format-text.c:678 Writing metadata for VG foo to /dev/sdb at 7168 len 1525 (wrap 0)
> format-text.c:331 Reading mda header sector from /dev/sdb at 999665172480
> format-text.c:678 Writing metadata for VG foo to /dev/sdb at 999665175552 len 1525 (wrap 0)
> format-text.c:331 Reading mda header sector from /dev/sdg at 4096
> format-text.c:678 Writing metadata for VG foo to /dev/sdg at 7168 len 1525 (wrap 0)
> format-text.c:331 Reading mda header sector from /dev/sdg at 999665172480
> format-text.c:678 Writing metadata for VG foo to /dev/sdg at 999665175552 len 1525 (wrap 0)

To illustrate what you should see when the metadata wraps, using the default
metadata area size:

The initial metadata written by vgcreate:

Reading mda header sector from /dev/sdb at 4096
Writing metadata for VG foo to /dev/sdb at 4608 len 931 (wrap 0)
Reading mda header sector from /dev/sdb at 999665172480
Writing metadata for VG foo to /dev/sdb at 999665172992 len 931 (wrap 0)
Reading mda header sector from /dev/sdg at 4096
Writing metadata for VG foo to /dev/sdg at 4608 len 931 (wrap 0)
Reading mda header sector from /dev/sdg at 999665172480
Writing metadata for VG foo to /dev/sdg at 999665172992 len 931 (wrap 0)

When writing the metadata wraps, it does not go beyond the end of the device
and it returns to the original offset used above:

Reading mda header sector from /dev/sdb at 4096
Writing metadata for VG foo to /dev/sdb at 1043968 len 4608 (wrap 19895)
Writing metadata for VG foo to /dev/sdb at 4608 len 19895 (wrapped)
Reading mda header sector from /dev/sdb at 999665172480
Writing metadata for VG foo to /dev/sdb at 999666212352 len 8704 (wrap 15799)
Writing metadata for VG foo to /dev/sdb at 999665172992 len 15799 (wrapped)
Reading mda header sector from /dev/sdg at 4096
Writing metadata for VG foo to /dev/sdg at 1043968 len 4608 (wrap 19895)
Writing metadata for VG foo to /dev/sdg at 4608 len 19895 (wrapped)
Reading mda header sector from /dev/sdg at 999665172480
Writing metadata for VG foo to /dev/sdg at 999666212352 len 8704 (wrap 15799)
Writing metadata for VG foo to /dev/sdg at 999665172992 len 15799 (wrapped)

The write that goes to the end of the metadata area starts at 999666212352 and
has length 8704.  start+length is 999666221056 which matches the device size:

# pvs -o name,dev_size --units b /dev/sdb /dev/sdg
  PV         DevSize      
  /dev/sdb   999666221056B
  /dev/sdg   999666221056B

  reply	other threads:[~2018-06-04 16:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03 20:13 [linux-lvm] "write failed.. No space left", "Failed to write VG", and "Failed to write a MDA" Inbox
2018-06-03 20:18 ` Inbox
2018-06-03 22:21 ` Inbox
2018-06-03 23:57   ` Inbox
2018-06-04  0:19     ` Inbox
2018-06-04  0:46       ` Jim Haddad
2018-06-04  2:47         ` Jim Haddad
2018-06-04 15:34           ` David Teigland
2018-06-04 16:35             ` David Teigland [this message]
2018-06-04 18:26             ` Jim Haddad
2018-06-04 18:52               ` David Teigland
2018-06-04  6:54     ` Patrick Mitchell

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=20180604163517.GC19875@redhat.com \
    --to=teigland@redhat.com \
    --cc=jimhaddad46@gmail.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).