Re: force remapping a pending sector in sw raid5 array

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

 



On Wed, Feb 07, 2018 at 08:51:15AM +1100, Adam Goryachev wrote:
> I think instead of reading the sector from the drive and relying on the 
> drive to determine the correct data (it's already telling you it can't). 

Just on that point, it's not that simple. A drive will only try to read the
data a few times before giving up and marking the sector as pending a
re-write with new data (so that it can be re-mapped).
You can however re-read it in different ways and sometimes get the data
back, which _should_ then cause an immediate re-writing of the data on a new
block and turn the pending into a reallocated block
However, this does not seem to have happened on my drive, either because the
bad data didn't really get read by hdparm --read-sector, or because the
firmware isn't doing its remapping job, or something else I don't understand

> What you need to do is find out where on md7 drive x sector y maps to 
> and read that sector from md7, which will get md to (possibly) notice 
> the read error, and then read the data from the other drives, and then 
> re-write the faulty sector with correct calculated data (or do the 
> resync on that area of md7 only).

Yeah, I got that part.

> So try setting something like 1287000000 * 4 as the start of the resync 
> up to 1288000000 * 4 and see if that finds and fixes it for you.
> 
> If nothing else, it should finish fairly quickly. You might need to 
> start earlier, but you could just keep reducing the "window" until you 
> find the right spot. Or, someone who knows a lot more about this mapping 
> might jump in and answer the question, though they might need to see the 
> raid details to see the actual physical layout/order of drives/etc.

I did however (indeed) miss that I can narrow the check range, so I'll try
playing with that until I can narrow it down to the right bit.

I'm still curious as to why the hdparm bit didn't work, but oh well at this
point.

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux