Debian Bug report logs - #798431
lvm2: OriginLV lost if CacheLV failed

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <[email protected]>; Source for lvm2 is src:lvm2 (PTS, buildd, popcon).

Reported by: Benoit Friry <[email protected]>

Date: Wed, 9 Sep 2015 10:03:01 UTC

Severity: normal

Found in version lvm2/2.02.127-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#798431; Package lvm2. (Wed, 09 Sep 2015 10:03:05 GMT) (full text, mbox, link).


Acknowledgement sent to Benoit Friry <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <[email protected]>. (Wed, 09 Sep 2015 10:03:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Benoit Friry <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lvm2: OriginLV lost if CacheLV failed
Date: Wed, 09 Sep 2015 11:49:01 +0200
Package: lvm2
Version: 2.02.127-1
Severity: normal

Dear Maintainer,

Context and issue
-----------------
I want to use lvmcache to speedup access to data on RAID1.

Configuration is essentially:
 - 2 HDD in software raid1 with md -> one pv -> one VG
 - 1 SSD (/dev/sda1) is put in same VG
 - 1 of the LV is for /
 - I created a lvm cache for /

It happenned /dev/sda1 failed.  Boot failed.  I booted from Debian Live
CD, but I did not manage to repair.  lvtools and cache_check refused to
repair cmeta LV, and I did not find how to access it to try any manual
repairing.

I had to reinstall/restore. 

Reproduction
------------
sda1 is the only partition on SSD
sde1 is the only partition on a USB key

*** LV creation
# vgcreate vgtest /dev/sda1 /dev/sde1
# lvcreate -n test -L 10G vgtest /dev/sda1
# lvcreate -n testcache -L 1G vgtest /dev/sde1
# lvcreate -n testcachemeta -L 8M vgtest /dev/sde1
# lvconvert --type cache-pool --poolmetadata vgtest/testcachemeta\
	--cachemode writethrough vgtest/testcache
# lvconvert --type cache --cachepool vgtest/testcache vgtest/test

*** LV failure
# lvs -a
# lvchange -an vgtest/test
# pvremove /dev/sde1 --force --force

*** LV recovery tentatives
# lvchange -ay vgtest/test
  WARNING: Device for PV NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I not found or rejected by a filter.
  Refusing activation of partial LV vgtest/test.  Use '--activationmode partial' to override.
# lvchange -ay vgtest/test --activationmode partial
  PARTIAL MODE. Incomplete logical volumes will be processed.
  WARNING: Device for PV NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I not found or rejected by a filter.
  Check of pool vgtest/testcache failed (status:1). Manual repair required!
# lvchange -ay vgtest/test_corig --force --activationmode partial
  PARTIAL MODE. Incomplete logical volumes will be processed.
  WARNING: Device for PV NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I not found or rejected by a filter.
  Unable to change internal LV test_corig directly
# lvconvert -v --force --uncache vgtest/test
  WARNING: Device for PV NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I not found or rejected by a filter.
    There are 1 physical volumes missing.
  Cannot change VG vgtest while PVs are missing.
  Consider vgreduce --removemissing.
    There are 1 physical volumes missing.
# vgreduce -v --force --removemissing vgtest
   Finding volume group "vgtest"
  WARNING: Device for PV NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I not found or rejected by a filter.
    There are 1 physical volumes missing.
    There are 1 physical volumes missing.
    Trying to open VG vgtest for recovery...
    Found same device /dev/sda1 with same pvid SFN1I61m6AOWxnMG5YjWvjVpPuQpNLAc
  WARNING: Device for PV NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I not found or rejected by a filter.
    There are 1 physical volumes missing.
    There are 1 physical volumes missing.
    Archiving volume group "vgtest" metadata (seqno 7).
  Removing partial LV test.
    Releasing logical volume "testcache"
    There are 1 physical volumes missing.
    Creating volume group backup "/etc/lvm/backup/vgtest" (seqno 8).
  Logical volume "testcache" successfully removed
    Releasing logical volume "test"
    There are 1 physical volumes missing.
    Creating volume group backup "/etc/lvm/backup/vgtest" (seqno 9).
  Logical volume "test" successfully removed
    Removing PV with UUID NubIyb-joYP-9Jei-Fhy3-xUuz-5SVf-3NSI0I from VG vgtest
    Creating volume group backup "/etc/lvm/backup/vgtest" (seqno 10).
  Wrote out consistent volume group vgtest

All LV is gone!

Using a cachethrough mode, OriginLV (/dev/sda1) was intact.
There must be some way to access it!


I did not find much clues on Internet. 
Best hit: https://www.redhat.com/archives/linux-lvm/2015-August/msg00008.html


Best regards,
Benoit

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lvm2 depends on:
ii  dmeventd                  2:1.02.104-1
ii  dmsetup                   2:1.02.104-1
ii  init-system-helpers       1.23
ii  initscripts               2.88dsf-59.2
ii  libc6                     2.19-19
ii  libdevmapper-event1.02.1  2:1.02.104-1
ii  libdevmapper1.02.1        2:1.02.104-1
ii  liblvm2app2.2             2.02.127-1
ii  libreadline5              5.2+dfsg-3
ii  libudev1                  225-1
ii  lsb-base                  4.1+Debian14

lvm2 recommends no packages.

Versions of packages lvm2 suggests:
ii  thin-provisioning-tools  0.3.2-1

-- no debconf information



Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#798431; Package lvm2. (Sun, 20 Dec 2015 20:33:12 GMT) (full text, mbox, link).


Acknowledgement sent to Matt Taggart <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Sun, 20 Dec 2015 20:33:12 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Matt Taggart <[email protected]>
To: [email protected]
Subject: RE: lvm2: OriginLV lost if CacheLV failed
Date: Sun, 20 Dec 2015 12:28:08 -0800
Hi,

#798431 was filed against version 2.02.127-1, but looking at the upstream 
changelog at

https://git.fedorahosted.org/cgit/lvm2.git/tree/WHATS_NEW

I see lots of cache related changes in newer releases. Maybe someone can 
try to repeat this bug with the 2.02.133-2 package in stretch/sid or if the 
package could be updated to the latest 2.02.138 upstream release (just 
released on Dec 14) then you could test with that.

-- 
Matt Taggart
[email protected]





Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:44:00 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.