* Re: [linux-lvm] LVM with devfs questions and patches
@ 2001-02-14 18:18 Benoit Gaussen
2001-02-14 19:19 ` Andreas Dilger
2001-02-17 9:26 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe Piete Brooks
0 siblings, 2 replies; 11+ messages in thread
From: Benoit Gaussen @ 2001-02-14 18:18 UTC (permalink / raw)
To: linux-lvm
>Thanks for those, I've reworked them a little but the effect should be the same.
>
Hi,
I saw the changes in the CVS tree except for one thing that I forgot to tell
about in my previous mail.
There is a mistake in the devfs registration of /dev/lvm, the major and
minor numbers are swapped :
Just an extract of the patch :
lvm_devfs_handle = devfs_register(
- 0 , "lvm", 0, 0, LVM_CHAR_MAJOR,
+ 0 , "lvm", 0, LVM_CHAR_MAJOR, 0,
S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
&lvm_chr_fops, NULL);
Ben.
--
Unix IS user friendly, it is just selective about who his friends are.
Anonymous
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] LVM with devfs questions and patches
2001-02-14 18:18 [linux-lvm] LVM with devfs questions and patches Benoit Gaussen
@ 2001-02-14 19:19 ` Andreas Dilger
2001-02-17 9:26 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe Piete Brooks
1 sibling, 0 replies; 11+ messages in thread
From: Andreas Dilger @ 2001-02-14 19:19 UTC (permalink / raw)
To: linux-lvm
Benoit Gaussen writes:
> I saw the changes in the CVS tree except for one thing that I forgot to tell
> about in my previous mail.
>
> There is a mistake in the devfs registration of /dev/lvm, the major and
> minor numbers are swapped :
>
> Just an extract of the patch :
>
> lvm_devfs_handle = devfs_register(
> - 0 , "lvm", 0, 0, LVM_CHAR_MAJOR,
> + 0 , "lvm", 0, LVM_CHAR_MAJOR, 0,
> S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
> &lvm_chr_fops, NULL);
I noticed your change, and it is also in the devfs patch that I submitted.
Cheers, Andreas
--
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe
2001-02-14 18:18 [linux-lvm] LVM with devfs questions and patches Benoit Gaussen
2001-02-14 19:19 ` Andreas Dilger
@ 2001-02-17 9:26 ` Piete Brooks
2001-02-17 10:16 ` Luca Berra
1 sibling, 1 reply; 11+ messages in thread
From: Piete Brooks @ 2001-02-17 9:26 UTC (permalink / raw)
To: linux-lvm
I was unable to create RAID1 PVs under 0.9.1_beta2 (RH 7.0.90 - Fisher), so I
used some raw partitions. I upgraded to 0.9.1_beta4 (which fixed the OOPS or
boot - great!) and have managed to create and add the RAID PV.
I'd like to remove the old PVs, and the empty one was `vgreduce's OK, but I
can't pvmove the data from the old one.
# pvmove /dev/hda9
pvmove -- moving physical extents in inactive volume group "vg01"
pvmove -- WARNING: moving of active logical volumes may cause data loss!
pvmove -- do you want to continue? [y/n] y
pvmove -- ERROR "pv_move_pe(): PE lock" pv_move_pe
pvmove -- ERROR "pv_move_pe(): PE lock" moving physical extents
#
Any ideas ?
I was hoping to HACK it pro tem, and create new LVs by specifying the PVs to
use, but this too failed:
# lvcreate -L 50M -n repl vg01 /dev/md8
lvcreate -- rounding up size to physical extent boundary "52 MB"
lvcreate -- couldn't read physical volume "/dev/md8"
#
Should this work ? (the man page doesn't describe `[PhysicalVolumePath...]'
Not directly LVM, but if I run out of inodes, is there some way to extend an
ext2 FS so that the ratio of inodes/block is higher than the original FS ?
% cat /proc/lvm/global
LVM driver version 0.9.1_beta4 (09/02/2001)
Total: 1 VG 2 PVs 2 LVs (0 LVs open)
Global: 12656 bytes malloced IOP version: 10 11:29:30 active
VG: vg01 [2 PV, 2 LV/0 open] PE Size: 4096 KB
Usage [KB/PE]: 2097152 /512 total 122880 /30 used 1974272 /482 free
PVs: [AA] hda9 1048576 /256 106496 /26 942080/230
[AA] md8 1048576 /256 0 /0 1048576/256
LVs: [AWDL ] lv01 106496 /26 close
[ARDL ] snap-lv01 106496 /26 close
%
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe
2001-02-17 9:26 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe Piete Brooks
@ 2001-02-17 10:16 ` Luca Berra
2001-02-17 10:49 ` Piete Brooks
0 siblings, 1 reply; 11+ messages in thread
From: Luca Berra @ 2001-02-17 10:16 UTC (permalink / raw)
To: linux-lvm
On Sat, Feb 17, 2001 at 09:26:43AM +0000, Piete Brooks wrote:
> I was unable to create RAID1 PVs under 0.9.1_beta2 (RH 7.0.90 - Fisher), so I
> used some raw partitions. I upgraded to 0.9.1_beta4 (which fixed the OOPS or
> boot - great!) and have managed to create and add the RAID PV.
>
> I'd like to remove the old PVs, and the empty one was `vgreduce's OK, but I
> can't pvmove the data from the old one.
>
> # pvmove /dev/hda9
> pvmove -- moving physical extents in inactive volume group "vg01"
> pvmove -- WARNING: moving of active logical volumes may cause data loss!
> pvmove -- do you want to continue? [y/n] y
> pvmove -- ERROR "pv_move_pe(): PE lock" pv_move_pe
>
> pvmove -- ERROR "pv_move_pe(): PE lock" moving physical extents
i believe the vg should be active....
> I was hoping to HACK it pro tem, and create new LVs by specifying the PVs to
> use, but this too failed:
>
> # lvcreate -L 50M -n repl vg01 /dev/md8
> lvcreate -- rounding up size to physical extent boundary "52 MB"
> lvcreate -- couldn't read physical volume "/dev/md8"
it should can you send a debug output...
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe
2001-02-17 10:16 ` Luca Berra
@ 2001-02-17 10:49 ` Piete Brooks
2001-02-17 15:48 ` Joe Thornber
2001-02-17 16:18 ` Andreas Dilger
0 siblings, 2 replies; 11+ messages in thread
From: Piete Brooks @ 2001-02-17 10:49 UTC (permalink / raw)
To: linux-lvm; +Cc: Piete.Brooks
>> # pvmove /dev/hda9
>> pvmove -- moving physical extents in inactive volume group "vg01"
>> pvmove -- WARNING: moving of active logical volumes may cause data loss!
>> pvmove -- do you want to continue? [y/n] y
>> pvmove -- ERROR "pv_move_pe(): PE lock" pv_move_pe
>>
>> pvmove -- ERROR "pv_move_pe(): PE lock" moving physical extents
> i believe the vg should be active....
Sigh -- it warns that data loss can occur if they are active, so I assumed
that they should be inactive. If it has to be active, why does it quietly say
`extents in inactive volume' and not warn that they should be active ?
I got the data onto the RAID device, and when that's active, I get a different
message:
# pvmove /dev/md7
pvmove -- ERROR "pv_read(): multiple device" reading source physical volume
"/dev/md7"
# cat /proc/lvm/global
LVM driver version 0.9.1_beta4 (09/02/2001)
Total: 1 VG 3 PVs 2 LVs (2 LVs open 2 times)
Global: 10276 bytes malloced IOP version: 10 0:19:55 active
VG: vg01 [3 PV, 2 LV/2 open] PE Size: 4096 KB
Usage [KB/PE]: 3145728 /768 total 1257472 /307 used 1888256 /461 free
PVs: [AA] md8 1048576 /256 1048576 /256 0/0
[AA] md7 1048576 /256 208896 /51 839680/205
[AA] md6 1048576 /256 0 /0 1048576/256
LVs: [AWDL ] repl 348160 /85 1x open
[AWDL ] scratch 909312 /222 1x open
#
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe
2001-02-17 10:49 ` Piete Brooks
@ 2001-02-17 15:48 ` Joe Thornber
2001-02-17 19:04 ` Heinz J. Mauelshagen
2001-02-17 16:18 ` Andreas Dilger
1 sibling, 1 reply; 11+ messages in thread
From: Joe Thornber @ 2001-02-17 15:48 UTC (permalink / raw)
To: linux-lvm
On Sat, Feb 17, 2001 at 10:49:19AM +0000, Piete Brooks wrote:
> >> # pvmove /dev/hda9
> >> pvmove -- moving physical extents in inactive volume group "vg01"
> >> pvmove -- WARNING: moving of active logical volumes may cause data loss!
> >> pvmove -- do you want to continue? [y/n] y
> >> pvmove -- ERROR "pv_move_pe(): PE lock" pv_move_pe
> >>
> >> pvmove -- ERROR "pv_move_pe(): PE lock" moving physical extents
> > i believe the vg should be active....
>
> Sigh -- it warns that data loss can occur if they are active, so I assumed
> that they should be inactive. If it has to be active, why does it quietly say
> `extents in inactive volume' and not warn that they should be active ?
I think the warning is just telling you that if you loose power whilst
the move is in progress bad things could happen. Heinz can you
clarify please.
- Joe
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe
2001-02-17 10:49 ` Piete Brooks
2001-02-17 15:48 ` Joe Thornber
@ 2001-02-17 16:18 ` Andreas Dilger
2001-02-17 16:42 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" Piete Brooks
1 sibling, 1 reply; 11+ messages in thread
From: Andreas Dilger @ 2001-02-17 16:18 UTC (permalink / raw)
To: linux-lvm; +Cc: Piete.Brooks
Piete Brooks writes:
> I got the data onto the RAID device, and when that's active, I get a
> different message:
>
> # pvmove /dev/md7
> pvmove -- ERROR "pv_read(): multiple device" reading source physical volume
> "/dev/md7"
This is because (I don't know why) LVM user tools return an "error code"
when accessing an MD device. It is up to the caller to single out the
MD error code, and pretend like it is OK. Probably pvmove (or pv_read)
doesn't do this correctly. IMO we should treat MD devices just like
regular devices, since pv_read_all_pv_of_vg() already cleans this up for us.
Maybe the MD cleanup should be moved down to pv_read_all_pv() and be
done with it? This may cause some problems if people are doing changes
to LVM when the MD devices are not active, but this problem is there no
matter where we do filtering of MD devices.
In any case, try the below patch, and it should fix this problem.
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/17 16:12:49
@@ -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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock"
2001-02-17 16:18 ` Andreas Dilger
@ 2001-02-17 16:42 ` Piete Brooks
2001-02-20 18:24 ` Andreas Dilger
0 siblings, 1 reply; 11+ messages in thread
From: Piete Brooks @ 2001-02-17 16:42 UTC (permalink / raw)
To: linux-lvm; +Cc: Piete.Brooks
> 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 !
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe
2001-02-17 15:48 ` Joe Thornber
@ 2001-02-17 19:04 ` Heinz J. Mauelshagen
0 siblings, 0 replies; 11+ messages in thread
From: Heinz J. Mauelshagen @ 2001-02-17 19:04 UTC (permalink / raw)
To: linux-lvm
On Sat, Feb 17, 2001 at 03:48:56PM +0000, Joe Thornber wrote:
> On Sat, Feb 17, 2001 at 10:49:19AM +0000, Piete Brooks wrote:
> > >> # pvmove /dev/hda9
> > >> pvmove -- moving physical extents in inactive volume group "vg01"
> > >> pvmove -- WARNING: moving of active logical volumes may cause data loss!
> > >> pvmove -- do you want to continue? [y/n] y
> > >> pvmove -- ERROR "pv_move_pe(): PE lock" pv_move_pe
> > >>
> > >> pvmove -- ERROR "pv_move_pe(): PE lock" moving physical extents
> > > i believe the vg should be active....
> >
> > Sigh -- it warns that data loss can occur if they are active, so I assumed
> > that they should be inactive. If it has to be active, why does it quietly say
> > `extents in inactive volume' and not warn that they should be active ?
>
> I think the warning is just telling you that if you loose power whilst
> the move is in progress bad things could happen. Heinz can you
> clarify please.
Yes, that warning exactly means that.
There's an aproach to work around that already but it's not yet implemented :-(
OTOH the ERROR displayed shouldn't happen.
Is probably related to the MD assumption further down in this thread.
As Andreas Dilger pointed out: we need to fix pv_read() and friends in order
to stop dealing with MDs through error codes.
>
> - Joe
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock"
2001-02-17 16:42 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" Piete Brooks
@ 2001-02-20 18:24 ` Andreas Dilger
2001-02-20 23:21 ` Heinz J. Mauelshagen
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Dilger @ 2001-02-20 18:24 UTC (permalink / raw)
To: linux-lvm; +Cc: Piete.Brooks
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock"
2001-02-20 18:24 ` Andreas Dilger
@ 2001-02-20 23:21 ` Heinz J. Mauelshagen
0 siblings, 0 replies; 11+ messages in thread
From: Heinz J. Mauelshagen @ 2001-02-20 23:21 UTC (permalink / raw)
To: linux-lvm
It will show up in the next release.
Added the check Andreas recommended for destination PVs as well.
On Tue, Feb 20, 2001 at 11:24:10AM -0700, Andreas Dilger wrote:
> 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
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2001-02-20 23:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-14 18:18 [linux-lvm] LVM with devfs questions and patches Benoit Gaussen
2001-02-14 19:19 ` Andreas Dilger
2001-02-17 9:26 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" pv_move_pe Piete Brooks
2001-02-17 10:16 ` Luca Berra
2001-02-17 10:49 ` Piete Brooks
2001-02-17 15:48 ` Joe Thornber
2001-02-17 19:04 ` Heinz J. Mauelshagen
2001-02-17 16:18 ` Andreas Dilger
2001-02-17 16:42 ` [linux-lvm] Newbie question: ERROR "pv_move_pe(): PE lock" Piete Brooks
2001-02-20 18:24 ` Andreas Dilger
2001-02-20 23:21 ` Heinz J. Mauelshagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).