[UBUNTU] Avoid creation of mixed-blocksize PV on LVM volume groups

Bug #1842436 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Canonical Foundations Team
lvm2 (Ubuntu)
Fix Released
Undecided
Julian Andres Klode

Bug Description

Default block-size of a file-system seems to be dependent on the volume-size.
Big volume (at least ext4) does have 4k blk-size, even the underlying device with a smaller physical blk-size.

The patch, avoiding define mixed-sized volume groups is now upstream
in the master branch of LVM2
https://sourceware.org/git/?p=lvm2.git;a=commit;h=0404539edb25e4a9d3456bb3e6b402aa2767af6b

Using this patch within the distribution is for sanity reasons.

Related branches

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-181228 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
affects: linux (Ubuntu) → lvm2 (Ubuntu)
Changed in ubuntu-z-systems:
assignee: nobody → Canonical Foundations Team (canonical-foundations)
importance: Undecided → High
Changed in lvm2 (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → Julian Andres Klode (juliank)
tags: added: id-5d6e87bc40caa37d15c1d145
Frank Heimes (fheimes)
description: updated
Changed in ubuntu-z-systems:
status: New → Triaged
description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Setup with mixed PVs (on dasds forced with dasdfmt):

ubuntu@eoan-disktest:~$ sudo pvdisplay
  "/dev/vdc1" is a new physical volume of "<6.88 GiB"
  --- NEW Physical volume ---
  PV Name /dev/vdc1
  VG Name
  PV Size <6.88 GiB
  Allocatable NO
  PE Size 0
  Total PE 0
  Free PE 0
  Allocated PE 0
  PV UUID GqEvSA-Qalj-415c-01i7-0Zxb-gXTW-oUd7BW

  "/dev/vdd1" is a new physical volume of "<6.88 GiB"
  --- NEW Physical volume ---
  PV Name /dev/vdd1
  VG Name
  PV Size <6.88 GiB
  Allocatable NO
  PE Size 0
  Total PE 0
  Free PE 0
  Allocated PE 0
  PV UUID iMkCz2-JfSi-59ZS-RCzr-nAdC-9SUf-U9EeOu

  "/dev/vde1" is a new physical volume of "3.51 GiB"
  --- NEW Physical volume ---
  PV Name /dev/vde1
  VG Name
  PV Size 3.51 GiB
  Allocatable NO
  PE Size 0
  Total PE 0
  Free PE 0
  Allocated PE 0
  PV UUID vuWlZW-lALQ-Om05-a57f-e0Qu-pE4W-6Rmqyn

  "/dev/vdf1" is a new physical volume of "3.51 GiB"
  --- NEW Physical volume ---
  PV Name /dev/vdf1
  VG Name
  PV Size 3.51 GiB
  Allocatable NO
  PE Size 0
  Total PE 0
  Free PE 0
  Allocated PE 0
  PV UUID OkVIqF-yXA3-MHPr-b3ON-A6Ua-d5GZ-QOHUae

ubuntu@eoan-disktest:~$ sudo blockdev --getss /dev/vdc1 /dev/vdd1 /dev/vde1 /dev/vdf1
4096
4096
512
512

out of these creating mixed size VG and LV:
$ sudo vgcreate vol_grp1 /dev/vdc1 /dev/vdd1 /dev/vde1 /dev/vdf1
$ sudo lvcreate -l 18 -n log_vol1 vol_grp1
$ sudo lvdisplay
  --- Logical volume ---
  LV Path /dev/vol_grp1/log_vol1
  LV Name log_vol1
  VG Name vol_grp1
  LV UUID SNbOFb-F233-2RYv-rjy4-iGW6-Fmo0-f0NNU0
  LV Write Access read/write
  LV Creation host, time eoan-disktest, 2019-09-09 14:51:41 +0000
  LV Status available
  # open 0
  LV Size 72.00 MiB
  Current LE 18
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 253:0

Updating to the test build with the requested fix (after lvremove/vgremove).

Now the same create gives me
$ sudo vgcreate vol_grp1 /dev/vdc1 /dev/vdd1 /dev/vde1 /dev/vdf1
  Devices have inconsistent logical block sizes (4096 and 512).
  See lvm.conf allow_mixed_block_sizes.
$ echo $?
5

I can throw this line into lvm.conf devices section:
        allow_mixed_block_sizes = 1
to make it work again.

I personally miss an entry to the man page or the default .conf file.
I might need to take a look if that was added in another commit, but functionally it looks good already. But if anyone wants the PPA would be already testable.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I added the conffile changes to the open MP.
Waiting for a review before the upload ..

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lvm2 - 2.03.02-2ubuntu6

---------------
lvm2 (2.03.02-2ubuntu6) eoan; urgency=medium

  * d/control: stop dropping thin-provisioning-tools to Suggests as it
    is ready to be promoted via MIR LP 1828887. Fixes usability issues
    of thin-provisioning-tools not being installed by default (LP: #1657646).
    - d/control: also add thin-provisioning-tools build-dep as configure
      wants it around for some checks at build time.
  * d/p/lp-1842436-*: Avoid creation of mixed-blocksize PV on LVM
    volume groups as it can cause FS corruption (LP: #1842436)

 -- Christian Ehrhardt <email address hidden> Fri, 06 Sep 2019 08:23:10 +0200

Changed in lvm2 (Ubuntu):
status: New → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2019-09-10 08:02 EDT-------
IBM Bugzilla status -> closed, Fix Released with Eoan

tags: added: targetmilestone-inin1910
removed: targetmilestone-inin---
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.