Bug 138097 - Remove PV from VG, VG has LV extents on it: attempts pvmove and fails
Summary: Remove PV from VG, VG has LV extents on it: attempts pvmove and fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: system-config-lvm
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jim Parsons
QA Contact: Jim Parsons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-04 16:39 UTC by Derek Anderson
Modified: 2009-04-16 23:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-12 17:01:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Derek Anderson 2004-11-04 16:39:47 UTC
Description of problem:
Create a VG and create an LV on top of it.  Navigate to the PV under
the LV Physical View and click "Remove Volume from Volume Group". 
After confirming that you really want to do this you get the error:

pvmove command failed. Command attempted: "/usr/sbin/pvmove /dev/sde1"

And this on the command line:

"mirror: Required device-mapper target(s) not detected in your kernel"

The pvmove command doesn't work directly from the command line either,
so this may not be a problem with the GUI.  I'm probably have
something configured correctly, so this will probably end up notabug,
but I don't want to lose track of it.

Version-Release number of selected component (if applicable):
system-config-lvm-0.9.6-1.0
kernel 2.6.9-1.641_EL

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jim Parsons 2004-11-09 03:27:03 UTC
This error occurs when the devicemapper mirror target mod is not
present in the kernel. If running a 2.6.9 or greater kernel, 'modprobe
dm-mirror' should be run. To ensure the mod is loaded, run 'dmsetup
targets'.

Comment 2 Jim Parsons 2004-11-10 02:22:29 UTC
A method has been added to the command handler that calls 'dmsetup
targets' and returns TRUE or FALSE if the target is loaded in the
kernel. This method is called before 'pvmove' is called. If the target
is not present, the following error message is displayed:

"The dm-mirror module is either not loaded in your kernel, or your
kernel does not support the dm-mirror target. If it is supported, try
running
\'modprobe dm-mirror\'. Otherwise, operations that require moving data
on Physical Extents are unavailable."

I am marking this QA ready -- hoping this solution is satisfactory.
Available in 0.9.7-1.0

Comment 3 Derek Anderson 2004-11-11 21:17:22 UTC
Without the dm-mirror target available I am now getting this traceback:

Traceback (most recent call last):
  File "/usr/share/system-config-lvm/InputController.py", line 310, in
on_pv_rm
    self.remove_pv()
  File "/usr/share/system-config-lvm/InputController.py", line 391, in
remove_pv
    if alloc <= actual_free_extents:
NameError: global name 'actual_free_extents' is not defined

Comment 4 Derek Anderson 2004-11-11 21:20:35 UTC
Same traceback whether the dm-mirror target is active or not.

Comment 5 Jim Parsons 2004-11-11 23:35:28 UTC
Fixed in 0.9.9-1.0.

Comment 6 Derek Anderson 2004-11-12 17:01:41 UTC
Verified in system-config-lvm-0.9.9-1.0.  Man, pvmoves can take a
looooooooong time.  May want to consider a "This will take awhile"
dialog.  If so, that will be another item.  Closing this one.


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