Skip to contentSkip to conversation

pvmove and badsectors

linux-lvm Dieter Stueken 1 participant 1 message Aug 1, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Heinz J . Mauelshagen

pvmove moves data chunk by chunk (64kB).

If such chunk read fails, it retries rereading the failed chunk sector by sector in order to retrieve as much data as possible.

I'm about to try it. But afterwards I like to analyze which files are affected using "debugfs". As far as I understand the code, any unreadable sector is zeroed. The printf reports about the unreadable sector, but only prints the # of the sector from the input device. Instead I'm interested on where the zeroed sector ends up on the destionation device, to locate it later on. Questions:

the printed sector number counts 512 byte sectors? If I run pvmove -v, it reports the PE# and LE# of the PE currently copying. I hope I can calculate this way:

Get sector# modulo PE size to get the relative position of the broken sector within the PE, and using the destionation LE# + the offset to get the sector # on the LV after the move. Right?

Suggestion:
write such informations to syslog to be sure this is saved somewhere. If this is printed on screen olny, I may loose this information easily and won't have any change to locate the broken sector later on.

Dieter.

Signature · 4 lines
Dieter St�ken, con terra GmbH, M�nster
    [email protected]
    http://www.conterra.de/
    (0)251-7474-501