I had a power outage that left my RPi behaving strangely - hanging after specific set of command and similar. I have removed the SD card, plugged it via SD card reader to my computer, mounted and tried copying the files from it. Most of the files get copied without problem, but some of them only get copied up to a point (always the same), after which I get I/O errors. This renders SD card unusable - any subsequent reading of the SD card results in I/O errors, even for other files. Remounting SD cards makes it readable again, but any attempt to read the broken files makes it unusable again. Reading other files seems to work reliably.
Copying the whole partition with dd
has similar effects - I get I/O error after which system no longer finds /dev/sdd
.
e2fsck
finds nothing:
# e2fsck -f /dev/sdd2
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
rootfs: 50998/916864 files (0.6% non-contiguous), 2383924/3769856 blocks
My questions are:
- how can I save the broken files?
- how can I "mark" the broken sectors so that system avoids them?
- should I throw away the SD card, or is this just data error that can be fixed?
Thank you in advance.
P.S.: the data is not crucial (I do have backups, just not completely recent), but still... :)