As someone said: "fsck definitely causes more harm than good if the underlying hardware is somehow damaged; bad CPU, bad RAM, a dying hard drive, disk controller gone bad... in those cases more corruption is inevitable."
Not every "someone's" opinion online is worth the pixels it is printed with. While fsck
obviously can't repair damaged hardware, the idea that it will do "more harm than good" is paranoid to the point of delusion. Is it conceivable? Yes, but in that case anything you do with the card/storage including powering it on could create additional corruption, because e.g., bad RAM creates the potential for anything to happen. By far the most likely thing, however, is simply that executables will fail randomly. If this is fsck in the middle of a repair, that will mean the repair is not completed, not that more damage is done.
Fsck is a tool for repairing corrupted filesystems. If you think it is unsafe to use for this purpose, then you should turn off your computer now and leave it off, because as long as it is okay everything is fine, but if something goes wrong you may not be able to use it.
I've had more spinning disks (i.e., traditional harddrives) eventually fail on me than SD cards, but I have had both. This is to be expected, although in theory arguably less so with SD cards (a quality card could, in theory, last through decades of normal use1).
In any case, when secondary storage has failed due to hardware issues, fsck
will probably fail. It probably will not come back and tell you it fixed errors it cannot fix. This is what I've observed with hard drives. With the one SD card I've had go bad, what happened is it did appear to make some corrections -- but I like to run it twice when that happens, just to be sure. In this case, it simply keeps saying the filesystem needs repair, and if you allow it to make repairs it may seem to do so, but if you check again immediately it will do something similar again. If this happens, consider your card defunct.
Another clue on linux with regard to such failure is, if serious enough (with hard disks the problem usually grows over a period of days or weeks; I think SD cards at the end of their natural lifespan will do the same), is that processes will start falling prey to uninterruptible sleep. This is a situation caused by a chicken and egg problem with secondary storage I/O. If these are critical things, the system can freeze up periodically.
Fortunately, this is easy to spot using process diagnostic tools such as top
or ps
; such processes will be in a D
state. Furthermore, there will be copious messages in the system log. Again, at this point consider the card defunct. Hard drives can be revived a bit by tagging "bad blocks" (if they are generally wearing out though, more blocks will soon follow), but the OS cannot do this effectively for SD cards.
1. That's based purely on the lifetime of the flash memory; I think I have read somewhere that if frequently inserted and removed the contacts can wear out before anything else.