I've got a backup server setup that I use for rsync and ftp backups. One of the folders has files in it that were copied to the server using ftp and when ever those files are accessed in almost any way it triggers an input/output error and the filesystem goes read-only. I've since started using rsync to backup the same client computer to another folder and that backup set works fine. But I can't delete the original set because even rm triggers the i/o error causing the fs to go read-only. The problem is it's about 11gb of files (most are not problematic) and I'd like to get that space back.
At one point I did a du in the folder containing the bad files and it reported over 3TB of space used. There's only about 300GB available so that's obviously wrong.
I've fsck'd and it didn't find any problems, nor did it solve the problem. Any other suggestions?
Any thoughts on what would cause these files to get all screwy? It's a data partition so I could reupload everything, although it it's about 200gigs so I'd be sitting watching my cable modem hum for a couple of weeks I figure. But I'd like to make sure it's not going to happen again.
My guess would be a bad drive, or bad cabling. If the machine has ever lost power or crashed, or if there's a bug in the kernel, it's possible that the hardware is fine but the filesystem is corrupted.
I've seen many bad drives where everything is fine as long as you don't touch a particular set of data, because that data happens to occupying the bad spots on the drive. But even then, there could be more bad spots that haven't been found yet.
In general, it's not worth the risk of keeping a drive that's known to be bad, but if it's just an isolated media defect, and not a mechanical problem, then reformatting with an error check should do it.