archive mirror
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <>
Subject: [linux-lvm] "Data alignment must not exceed device size."
Date: Tue, 10 Apr 2018 09:47:30 +0100	[thread overview]
Message-ID: <> (raw)

Recently in Fedora something changed that stops us from creating small
LVs for testing.

An example failure with a 64 MB partitioned disk:

# parted -s -- /dev/sda mklabel msdos mkpart primary 128s -128s
Warning: The resulting partition is not properly aligned for best performance: 128s % 65535s != 0s
# lvm pvcreate --force /dev/sda1
  /dev/sda1: Data alignment must not exceed device size.
  Format-specific initialisation of physical volume /dev/sda1 failed.
  Failed to setup physical volume "/dev/sda1".

Obviously if I were to increase the beginning of the partition to
65536 sectors (32 MB) then there wouldn't be much space left for data.

Another possibly related issue happens if I use a 32 MB disk and leave
out the partition table (again, this used to work in Fedora up to recently):

# lvm pvcreate --force /dev/sda
# lvm vgcreate VG /dev/sda
# lvm lvcreate -l 100%FREE -n LV /dev/VG
  Calculated size of logical volume is 0 extents. Needs to be larger.
guestfsd: error:   Calculated size of logical volume is 0 extents. Needs to be larger.

I checked the lvm2 git repo and didn't see any recent changes which I
thought could affect this.

I'm not sure what component is responsible.  I have two very similarly
configured machines where it works with one but not with the other.
The only difference seems to be the kernel:


Not working:


Richard Jones, Virtualization Group, Red Hat
Read my programming and virtualization blog:
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.

             reply	other threads:[~2018-04-10  8:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10  8:47 Richard W.M. Jones [this message]
2018-04-10 14:00 ` [linux-lvm] "Data alignment must not exceed device size." Richard W.M. Jones
2018-04-10 14:43   ` Zdenek Kabelac
2018-04-10 14:49     ` Richard W.M. Jones
2018-04-10 15:04       ` Zdenek Kabelac
2018-04-10 15:34     ` Mike Snitzer
2018-04-10 15:01   ` Zdenek Kabelac
2018-04-10 15:05     ` Richard W.M. Jones

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:

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

  git send-email \ \ \ \

* 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).