0

I have a problem in my external hard drive 5tb samsung. When I try to delete some files (just some files), I receive an error:

/bin/rm: cannot remove 'file': input/output error

Everything began when I used FreeFileSync to sync a folder from my computer to the ext hd. The files with problem are all of the files in .Trash-1000 and sync.ffs_lock.

Some files appear in the ls output with an * in the end, why that?

An example of ls output (I cannot delete none of these files/folders):

d?????????    ? ?       ?               ?            ?  Colony/
-rwxrwxrwx    1 camargo camargo    282224 ago  4  2017  Cover.jpg*

Whe I do file in files/folders with ?, I got an error:

file Colony
Colony: cannot open `Colony' (Input/output error)

But when I do file in the file with an * it seems ok, and when I try to remove with rm, it returns $?=0, but the file are not removed.

file Cover.jpg 
Cover.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=12, height=1651, bps=0, PhotometricIntepretation=RGB, orientation=upper-left, width=1213], baseline, precision 8, 441x600, frames 3

What I tried

1) ntfsfix /dev/sdc1

Says that it is ok with the drive.

2) rm -rf file or sudo rm -rf file or chown $USER:$USER file && rm -f file

Same error message

3) Oppened in gnome-disks and scan filesystem (there are no errors) and correct filesystem

Same behavior after.

11
  • 1
    See this answer of mine. I'm not voting to close as duplicate because your issue is somewhat different and I'm not sure chkdsk /f in Windows is the right first step. Nevertheless ntfsfix is limited and these question marks and input/output error probably indicate filesystem corruption and maybe a hardware problem. Have you ruled out the latter? What does SMART say about the drive? Anything interesting in dmesg when the error occurs? Commented Jun 29, 2019 at 19:52
  • Please edit the question and place the relevant information there. Commented Jun 29, 2019 at 21:49
  • Thanks for your answer! I guess I can't run SMART in an external hard drive over USB (can I?), in gnome-disks the SMART option for this drive is unavailable. dmesg shows almost nothing when I tried to remove that files, but when I disconnect the drive the only error I got are this one: ``` [147487.632078] sd 6:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK ``` Should I try chkdsk? It is a very weird problem, difficult to guess if is a hardware or filesystem problem. Commented Jun 29, 2019 at 21:55
  • Another similar problem, another answer from me. You can try to use smartctl with a hard drive connected via USB. Most enclosures support this, some old ones don't. Commented Jun 29, 2019 at 22:01
  • Tried: sudo smartctl -a -d scsi /dev/sdc and got SMART Health Status: OK, smart support is available but disabled. When I tried to run the short or long test I got [unsupported field in scsi command]. The drive is ok then? Commented Jun 29, 2019 at 22:13

0

You must log in to answer this question.

Browse other questions tagged .