lvm - freeze any lvm command after lvremove

Bug #1118434 reported by Ilya Ryabinin on 2013-02-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lvm2
New
Undecided
Unassigned
lvm2 (Debian)
Fix Released
Unknown
lvm2 (Ubuntu)
Undecided
Unassigned
udev (Ubuntu)
Undecided
Unassigned

Bug Description

1. Ubuntu - 12.10 quantal
2. lvm2 - 2.02.95-4ubuntu1
While deleting multiple snupshots, LVM get error. Any lvm command after the results freez.

Reproduse:
cat /dev/zero | dd of=./my_test_pv.bin bs=1M count=1024
losetup /dev/loop0 ./my_test_pv.bin
pvcreate /dev/loop0
vgcreate my_test_vg /dev/loop0

lvcreate my_test_vg --name test_lv_01 --size 100M
lvcreate my_test_vg --name test_lv_02 --size 100M
lvcreate my_test_vg --name test_lv_03 --size 100M
lvcreate my_test_vg --name test_lv_04 --size 100M

for i in 01 02 03 04; do lvcreate -s /dev/my_test_vg/test_lv_$i --name SS-$i --size 64M; done
  Logical volume "SS-01" created
  Logical volume "SS-02" created
  Logical volume "SS-03" created
  Logical volume "SS-04" created

lvs
  LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
  SS-01 my_test_vg swi-a-s- 64,00m test_lv_01 0,00
  SS-02 my_test_vg swi-a-s- 64,00m test_lv_02 0,00
  SS-03 my_test_vg swi-a-s- 64,00m test_lv_03 0,00
  SS-04 my_test_vg swi-a-s- 64,00m test_lv_04 0,00
  test_lv_01 my_test_vg owi-a-s- 100,00m
  test_lv_02 my_test_vg owi-a-s- 100,00m
  test_lv_03 my_test_vg owi-a-s- 100,00m
  test_lv_04 my_test_vg owi-a-s- 100,00m

lvremove /dev/my_test_vg/SS-0* --force
  Unable to deactivate open my_test_vg-SS--01-cow (252:6)
  Failed to resume SS-01.
  Internal error: Writing metadata in critical section.
  Internal error: Performing unsafe table load while 1 device(s) are known to be suspended: (252:1)
  Internal error: Performing unsafe table load while 1 device(s) are known to be suspended: (252:7)
  Internal error: Writing metadata in critical section.
  Logical volume "SS-02" successfully removed
  Internal error: Writing metadata in critical section.
  Internal error: Performing unsafe table load while 1 device(s) are known to be suspended: (252:2)
  Internal error: Performing unsafe table load while 1 device(s) are known to be suspended: (252:10)
  Internal error: Writing metadata in critical section.
  Logical volume "SS-03" successfully removed
  Internal error: Writing metadata in critical section.
  Internal error: Performing unsafe table load while 1 device(s) are known to be suspended: (252:3)
  Internal error: Performing unsafe table load while 1 device(s) are known to be suspended: (252:13)
  Internal error: Writing metadata in critical section.
  Logical volume "SS-04" successfully removed
  libdevmapper exiting with 1 device(s) still suspended.

lvs <- at this moment console freez... ctrl+c does not help
--------------------
in second console:

dmsetup info /dev/mapper/my_test_vg-test_lv_0?
Name: my_test_vg-test_lv_01
State: SUSPENDED
Read Ahead: 256
Tables present: LIVE & INACTIVE
Open count: 2
Event number: 0
Major, minor: 252, 0
Number of targets: 1
UUID: LVM-e84Pj8WjgMKXulfJ1FDlXYxrNnnzRZWjUDyoMDJEXfF1cfV8vwmPPWl6uuzFcBRI

Name: my_test_vg-test_lv_02
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 252, 1
Number of targets: 1
UUID: LVM-e84Pj8WjgMKXulfJ1FDlXYxrNnnzRZWjazRu4GvINTLKl6Dz2dmmIqOZPCa7SL7W

Name: my_test_vg-test_lv_03
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 252, 2
Number of targets: 1
UUID: LVM-e84Pj8WjgMKXulfJ1FDlXYxrNnnzRZWj9HKgQcqI9w74Ks9zxkbdjiKEqxjN3UnB

Name: my_test_vg-test_lv_04
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 252, 3
Number of targets: 1
UUID: LVM-e84Pj8WjgMKXulfJ1FDlXYxrNnnzRZWjbAH0DdMfVoCrqRaggSjw0FXxrcGHswm6

my_test_vg-test_lv_01 - are suspended

dmsetup resume /dev/mapper/my_test_vg-test_lv_01

at this momen lvs comman in first console unfreez
-----------------------------------------
console 1
  LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
  SS-01 my_test_vg -wi-a--- 64,00m
  test_lv_01 my_test_vg -wi-a--- 100,00m
  test_lv_02 my_test_vg -wi-a--- 100,00m
  test_lv_03 my_test_vg -wi-a--- 100,00m
  test_lv_04 my_test_vg -wi-a--- 100,00m

repeat lvremove
lvremove /dev/my_test_vg/SS-01
  Logical volume "SS-01" successfully removed

I repeated the process with lvremove -vvvvv
output attached

Ilya Ryabinin (riv1329) wrote :
Ilya Ryabinin (riv1329) on 2013-03-03
tags: added: 12.04 12.10.13.04
Ilya Ryabinin (riv1329) wrote :

Affected distro:
- Ubuntu 12.04 LTS (Precise Pangolin)
- Ubuntu 12.10 (Quantal Quetzal)
- Ubuntu 13.04 (Raring Ringtail)

Oliver Brakmann (obrakmann) wrote :

This problem was also present in Debian. I linked the corresponding bug report.

It's also now fixed in Debian stable. Unstable had the fix since summer, from which it got into Saucy, so 13.10 should not be affected (haven't yet verified that, but the fix is in lvm2 2.02.98-05 and 13.10 has 2.02.98-06, so it's a good bet).

The Debian bug report also has a few workarounds for those still stuck on earlier releases.

And I guess the fix should probably be backported to 12.04 LTS.

Changed in lvm2 (Debian):
status: Unknown → Fix Released
summary: - lvm - freez any lvm command after lvremove
+ lvm - freeze any lvm command after lvremove
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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