Bug 243790 - Cannot delete LVM snapshot
Summary: Cannot delete LVM snapshot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-lvm
Version: 10
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Marek Grac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-11 21:56 UTC by Luc
Modified: 2009-08-27 02:13 UTC (History)
5 users (show)

Fixed In Version: 1.1.9-1.fc10
Clone Of:
Environment:
Last Closed: 2009-08-27 02:13:20 UTC
Type: ---
Embargoed:


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

Description Luc 2007-06-11 21:56:37 UTC
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:
always

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


Expected results:


Additional info:

Comment 1 Bug Zapper 2008-05-14 13:00:41 UTC
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:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Dave Wysochanski 2008-05-22 15:03:06 UTC
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 15:06:46 UTC
I believe this is the code:
<snip>

 def remove_lv(self, lvpath):
    self.deactivate_lv(lvpath) <----
    try:
      args = list()
      args.append(LVREMOVE_BIN_PATH)
      args.append("--force")
      args.append(lvpath.strip())
      cmdstr = ' '.join(args)
      out,err,res =
execWithCaptureErrorStatusProgress(LVREMOVE_BIN_PATH,args,
                                                       _("Removing
Logical Volume"))
</snip>


Other bzs covering same/similar issue:
https://bugzilla.redhat.com/show_bug.cgi?id=248164
https://bugzilla.redhat.com/show_bug.cgi?id=250439

Comment 4 Bug Zapper 2008-11-26 01:54:49 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Frank Lin PIAT 2009-05-21 19:02:30 UTC
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

Workaround:
 Use the command "lvremove VolumeGroupName/Snapshotname" from the
 command-line.

Comment 6 Marek Grac 2009-08-20 11:04:40 UTC
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 13:03:50 UTC
system-config-lvm-1.1.8-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/system-config-lvm-1.1.8-1.fc10

Comment 8 Fedora Update System 2009-08-20 23:00:53 UTC
system-config-lvm-1.1.9-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/system-config-lvm-1.1.9-1.fc10

Comment 9 Fedora Update System 2009-08-22 01:02:09 UTC
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-27 02:12:56 UTC
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.