"lvconvert --repair" destroys thin pool LV

Bug #1625201 reported by marek on 2016-09-19
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Undecided
Unassigned

Bug Description

Hi
  If pool meta is 16GB , lvconvert --repair will destroy logical volumes.
After rapair logical volumes inside the pool can not be activated again. Steps to reproduce:

truncate --size 100GiB /tmp/test
losetup /dev/loop1 /tmp/test
pvcreate /dev/loop1
vgcreate vg02 /dev/loop1
lvcreate -n pool0meta -L 16G vg02
lvcreate -n pool0 -L 16GiB vg02
lvcreate -n data -V 1GiB --thinpool vg02/pool0
vgchange -a n vg02
lvconvert --repair vg02/pool0

# vgchange -a y vg02
  device-mapper: resume ioctl on (252:3) failed: Invalid argument
  Unable to resume vg02-pool0-tpool (252:3)
  device-mapper: resume ioctl on (252:3) failed: Invalid argument
  Unable to resume vg02-pool0-tpool (252:3)
  1 logical volume(s) in volume group "vg02" now active

Syslog :

[6039585.407800] device-mapper: thin: 252:2: metadata device (4145152 blocks) too small: expected 4161600
[6039585.407859] device-mapper: table: 252:2: thin-pool: preresume failed, error = -22
[6039586.535215] device-mapper: thin: 252:2: metadata device (4145152 blocks) too small: expected 4161600
[6039586.535258] device-mapper: table: 252:2: thin-pool: preresume failed, error = -22
[6039613.657170] device-mapper: thin: 252:3: metadata device (4145152 blocks) too small: expected 4161600
[6039613.657212] device-mapper: table: 252:3: thin-pool: preresume failed, error = -22
[6039614.716005] device-mapper: thin: 252:3: metadata device (4145152 blocks) too small: expected 4161600
[6039614.716047] device-mapper: table: 252:3: thin-pool: preresume failed, error = -22

Workaround for this is to shirk pool meta ( only when it is possible: You have free space in VG, and when meta will fit ) :

thin_dump /dev/mapper/vg02-pool0_tmeta > lvm_meta_dum
lvcreate -n pool0meta2 -L 12G vg02
thin_restore -i lvm_meta_dump -o /dev/mapper/vg02-pool0meta2
lvconvert --thinpool vg02/pool0 --poolmetadata vg02/pool0meta2

--
   Kind Regards
     Marek Grzybowski

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lvm2 2.02.133-1ubuntu10
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Mon Sep 19 13:29:54 2016
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=C.UTF-8
 LC_MESSAGES=POSIX
 SHELL=/bin/bash
SourcePackage: lvm2
UpgradeStatus: No upgrade log present (probably fresh install)

marek (grzybowski) wrote :
Stefan Mühlbacher (xp8it) wrote :

Same problem here.

root@xp8main1-2017:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

root@xp8main1-2017:~# apt show lvm2
Package: lvm2
Version: 2.02.133-1ubuntu10

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers