> > In this case I can't copy the file, as it contains a disk I/O error 2GB into
> > a 4GB file.
> The dd utility has a 'noerrors' option for precisely this situation.
> You will be given the corrupt block as it is received, warts and all.
You misunderstood. I want to leave the faulty part in the file, but
remove the space around so I can use that elsewhere. Obviously copying
is not an option. Data recovery is a non-issue (the whole file was an
on-disk copy of a DVD). Yes there is badblock handling.
Incidentally, I don't think that much of the badblocks program. They all
can't really work properly. I ran it with -w and it didn't find
anything. Yet, if I deliberately read certain blocks, the kernel keeps
on reporting
dma_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
dma_intr: error=0x01 { AddrMarkNotFound }, LBAsect=
as long as I make sure there's no kernel cache copy to read. At a
guess, the DMA fails because the drive is unable to deliver that block
in time. However, sufficiently many attempts by the drive do read the
block ok eventually, which is why there's never an I/O error. The same
block has been found faulty previously at times by the drive itself.
The badblocks program fails to be of use here as the disk manages to
retain data in that block for a few minutes, but not for days. A
sufficiently exhaustive test would have to run for weeks - not
practical. If badblocks reports failures you know you have a problem -
if it reports nothing, it doesn't mean a hell of a lot.
> Woah there... 2GB into a 4GB file? Which filesystem are you using...
> some can only support 2GB max files.
All Linux journalling filesystems support >2GB and have for almost 2
years now (at least on SuSE, or am I mixing this up with xattr?). isofs
doesn't suefully support >2GB if you're concerned with portability.
Whether the smbfs 2GB limit is because of the Linux implementation or
MS's design I don't know. udf started with >2GB by design. NFS I'm not
sure, some do >2GB but I keep hearing reliability complaints about NFS
in general.
Volker
--
Volker Kuhlmann is possibly list0570 with the domain in header
http://volker.dnsalias.net/ Please do not CC list postings to me.