How do I make rsync ignore unreadable files (damaged sectors)?

Jamie Lokier jamie at shareable.org
Wed Dec 30 20:23:17 MST 2009


Matthias Schniedermeyer wrote:
> On 22.12.2009 19:24, Stefan Nowak wrote:
> >>> On 22.12.2009 16:39, Stefan Nowak wrote:
> >>>
> >>> The only low-budget test ideas I have:
> >>>
> >>> The CD scratching a la Tomas Gustavsson seems the only easily  
> >>> achievable
> >>> solution. But then it is not sure whether the OS does the reading  
> >>> retries
> >>> or whether the optical disk drive itself retries reading.
> >>
> >> On 22.12.2009 at 19:10 Matthias Schniedermeyer wrote:
> >>
> >> Get some Old, cheap and as small as possible USB-Sticks.
> >>
> >> Especially when they are small you should be able to reach the
> >> overwrite-limits relativly fast (Which may still be counted in days)
> >>
> >> Depending in model you should be able to get some interesting errors,
> >> maybe even total breakdowns.
> >> ;-)
> >
> > Your suggestion, to make the destination volume (USB stick) full, will  
> > result in write errors! If you mean "size-limit" by "overwrite-limit"
> > What we wanted was, how to provoke read errors, and Paul Slootman  
> > already offered a solution for that: hdparm --make-bad-sector.
> > Or did you mean to write a small testfile on a flash drive, then  
> 
> > overwrite it multiple times (more often than the specified "overwrite  
> > limit") by an automated loop, as long until you get the first write  
> > error, and hence you can expect a bad sector at this file, and then use 
> > it as a broken test source?
> 
> That's the spirit. Altough flash-media, due to it's inner workings, 
> doesn't guarantee that an error stays confined to the file(s) you are 
> pounding on. An error, while overwriting something, CAN destroy pretty 
> much anything, altough "only" up to the erase-block-size.

Or writing repeatedly to the same sector may have no effect - it may
be remapped every time it is written.  Depends on the flash media.

-- Jamie


More information about the rsync mailing list