Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 243790 - Cannot delete LVM snapshot
Cannot delete LVM snapshot
Product: Fedora
Classification: Fedora
Component: system-config-lvm (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Marek Grac
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-06-11 17:56 EDT by Luc
Modified: 2009-08-26 22:13 EDT (History)
5 users (show)

See Also:
Fixed In Version: 1.1.9-1.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-26 22:13:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (1.01 KB, patch)
2009-08-20 07:04 EDT, Marek Grac
no flags Details | Diff

  None (edit)
Description Luc 2007-06-11 17:56:37 EDT
Description of problem:
1) When I create a snapshot of my home partition, then, I cannot delete the
snapshot partition. I get the following message:
'lvchange command failed. Command attempted "/usr/sbin/lvchange -an
/dev/VolGroup00/cliche" - System error message: Can't change snapshot logical
volume "cliche" '
But if I use the webmin LVM manager, I can delete the snapshot partition without
any problem.
2) another time, I made a snapshot, but forgot to give it enough space. Then
after some works it came out of memory. Then I  gave it more space, and after
tried to delete the snapshot. As before it was not possible to delete it. Then I
left the snapshot and reboot the PC. After the reboot, it was not possible to
start the machine: I got errors related to the snapshot LVM partition on
power-on and the boot process stopped and proposed me to correct errors with
fsck. after answering yes, the system never stopped to print y.
Fortunately, I am on a dual boot machine and could start ubuntu with which I
could delete the snapshot partition. Then all was OK with Fedora

Version-Release number of selected component (if applicable): 1.1.1-1.0.fc7

How reproducible:

Steps to Reproduce:
1.create a snapshot of the home LVM partition
2.delete the snapshot: 
Actual results:Fails to delete

Expected results:

Additional info:
Comment 1 Bug Zapper 2008-05-14 09:00:41 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Dave Wysochanski 2008-05-22 11:03:06 EDT
Still exists in rawhide.

One possiblity.  Don't try the deactivate step, but use a "force" option on
lvremove.  This option will skip confirmation checks if the LV is active, but
before removal will deactivate the LV.  This should be safe as long as the VG is
not clustered.  In the clustered case, the "force" option would also skip a test
for activation on other cluster nodes, which is perhaps not desired here.
Comment 3 Dave Wysochanski 2008-05-22 11:06:46 EDT
I believe this is the code:

 def remove_lv(self, lvpath):
    self.deactivate_lv(lvpath) <----
      args = list()
      cmdstr = ' '.join(args)
      out,err,res =
Logical Volume"))

Other bzs covering same/similar issue:
Comment 4 Bug Zapper 2008-11-25 20:54:49 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
Comment 5 Frank Lin PIAT 2009-05-21 15:02:30 EDT
The bug applies to fedora 10:

Error message:
  lvchange command failed. Command attempted: "/sbin/lvchange -an
  /dev/vg1/lv1-snapshot" - System Error Message:
  Can't change snapshot logical volume "testA1"

Step to reproduce the error (from system-config-lvm):
 * Create a logical volume (don't even mount it).
 * Create a snapshot of that LV.
 * Select the snapshot
 * Click on "Remove logical volume"

The problem also occurs when I run the command line manually
 /sbin/lvchange -an /dev/vg1/lv1-snapshot

 Use the command "lvremove VolumeGroupName/Snapshotname" from the
Comment 6 Marek Grac 2009-08-20 07:04:40 EDT
Created attachment 358065 [details]
Proposed patch

Snapshot cannot be deactivated before its origin is deactivated. Workaround proposed by Frank is correct solution.
Comment 7 Fedora Update System 2009-08-20 09:03:50 EDT
system-config-lvm-1.1.8-1.fc10 has been submitted as an update for Fedora 10.
Comment 8 Fedora Update System 2009-08-20 19:00:53 EDT
system-config-lvm-1.1.9-1.fc10 has been submitted as an update for Fedora 10.
Comment 9 Fedora Update System 2009-08-21 21:02:09 EDT
system-config-lvm-1.1.9-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-lvm'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8861
Comment 10 Fedora Update System 2009-08-26 22:12:56 EDT
system-config-lvm-1.1.9-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.