Skip to contentSkip to conversation

Procedure to pvmove PE's on bad media?

linux-lvm Octavio Di Sciullo 2 participants 2 messages Dec 26, 2001

lore
Share & tools
lore
#0 lore raw

Hi all,

i know this issue has been adressed on previous threads,
but i havent been able to resolve my problem with the work arounds or patches issued, so i will submit my problem here.

	First off, here's some info in my configuration :

	debian linux 2.4.2
	lvm 0.9 (as issued from packages lvm_0.9-2_i386.deb and
liblvm_0.9-2_i386.deb)
	e2fsprogs 1.19-3
	resize2fs 1.03-1

	i have 1 lvm LV (concat) set up on 3 drives (1xWD 25GB,

2xIBM 40GB). A while ago, the WD drive crashed and i had to reinstall a system ( / was on it) and restore the lvm configuration, which went about just fine. I managed to get my VG & LV back, no trouble there. Now, the trouble is i want to remove the WD drive from the lvm conf and not surprisingly, i end up with 5 PE on the partition used by lvm on this drive (hda3) completely unreadable, which pvmove wont reallocate. Its definitely a read error, no problem there, i get the whole package : funny noises from the drive, i/o read errors from syslogd, and here's what pvmove has to say about it when i try to move one of these PE:

willy:/var/tmp# pvmove -n lvol1:6023 /dev/hda3 /dev/hdc1
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 -- ERROR reading input physical volume "/dev/hda3"

pvmove -- ERROR "pv_move_pe(): read input PV" pv_move_pe

pvmove -- ERROR "pv_move_pe(): read input PV" moving physical extents

I've tried to apply to pvmove (from lvm 0.9.1b7) the patch
issued on this thread :
http://lists.sistina.com/pipermail/linux-lvm/2001-September/008767.html
, but unfortunately, it doesnt work :/. With this "forced" pvmove, i get an endless read loop :

"read:-1 to_read:512
read:-1 to_read:512
read:-1 to_read:512
read:-1 to_read:512"
..... (i let it run for about 4h and the output never changed, nor as the drive never ceased to produce scary noises)

Now i dont really know if this the proper behavior of the
patched pvmove in case it REALLY doesnt manage to read the data (i thought this was what the patch was for), or if i have a compatibility problem with my 0.9 lvm installed and the 0.9.1b7 patched pvmove.... I tried (a bit) to upgrade to 0.9.1b7 but i get dependency conflicts.

Does anyone have any ideas on how to solve this, except for
dumping all data on a new LV built on new drives?

Octavio

PS: i am, of course, available for any further info on my configuration if it is required.
______________________________________________________
Boîte aux lettres - Caramail - http://www.caramail.com

#1 lore raw
Quoted 14 lines · Octavio Di Sciullo

I've tried to apply to pvmove (from lvm 0.9.1b7) the patch
issued on this thread :
http://lists.sistina.com/pipermail/linux-lvm/2001-September/008767.html
, but unfortunately, it doesnt work :/. With this "forced" pvmove, i get an endless read loop :

"read:-1 to_read:512
read:-1 to_read:512
read:-1 to_read:512
read:-1 to_read:512"
..... (i let it run for about 4h and the output never changed, nor as the drive never ceased to produce scary noises)

Quoted 6 lines

Now i dont really know if this the proper behavior of the
patched pvmove in case it REALLY doesnt manage to read the data (i thought this was what the patch was for), or if i have a compatibility problem with my 0.9 lvm installed and the 0.9.1b7 patched pvmove.... I tried (a bit) to upgrade to 0.9.1b7 but i get dependency conflicts.

Did you run it as root?
(isn't -1==EPERM, meaning you have no permission?)

The proper output (I think) should be:
read:-5 to_read:512
and with 4MB extent-size you should have 8192 such messages pr bad extent (max).

Signature · 2 lines
Ragnar Kjørstad
Big Storage