[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock"



It looks like the fix for this problem is not yet in CVS.  I'm pretty sure
Heinz has taken a look at the patch already as well (at least he commented
on this thread).  This fixes a BUG where it is not possible to do pvmove
on an MD device.

> > In any case, try the below patch, and it should fix this problem.
> 
> # pvmove /dev/md7
> pvmove -- moving physical extents in active volume group "vg01"
> pvmove -- WARNING: moving of active logical volumes may cause data loss!
> pvmove -- do you want to continue? [y/n] y
> pvmove -- doing automatic backup of volume group "vg01"
> pvmove -- 76 extents of physical volume "/dev/md7" successfully moved
>
> Many thanks -- seems to work a treat !

Here is the patch again.

Cheers, Andreas
============================================================================
diff -u -u -r1.3.2.5 pvmove.c
--- tools/pvmove.c	2001/02/14 14:48:01	1.3.2.5
+++ tools/pvmove.c	2001/02/20 18:16:22
@@ -234,7 +234,8 @@
 
    if ( opt_v > 0) printf ( "%s -- reading data of source physical volume "
                             "from \"%s\"\n", cmd, src_pv_name);
-   if ( ( ret = pv_read ( src_pv_name, &pv, NULL)) < 0) {
+   if ( ( ret = pv_read ( src_pv_name, &pv, NULL)) < 0 &&
+	ret != -LVM_EPV_READ_MD_DEVICE) {
       if ( ret == -LVM_EPV_READ_OPEN) {
          fprintf ( stderr, "%s -- source physical volume \"%s\" "
                            "doesn't exist\n\n",

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]