-1

I have an external USB hard drive (WD Elements, 1TB), which is already partially filled (~370GB available):

$ mount | grep store17
/dev/sde1 on /store17 type ext4 (rw,nosuid,nodev,noexec,relatime,data=ordered,user,x-systemd.device-timeout=10)

I need to copy new files into the drive, but for a 18MB file (the file size seems to matter), here is what happens:

$ cd /store17
$ cp ~/my_18MB_file .
$ ls
[...]
my_18MB_file
[...]
$ # WAITING A FEW SECONDS...
$ ls
ls: reading directory '.': Input/output error

Then all I can do is to umount/remount the device, but of course, after remounting the device, the new file has not been copied.

To be noticed:

  • The writing process is working well with small data, like touch /store17/myemptyfile, or copying a 2kB file.

  • If the file to copy is 800MB big, the I/O error happens while copying:

    cp: error writing './gum_src.tar.gz': Input/output error
    
  • I made a short health test with smartmontools, which passed.

Question: What can I run on the command line to better understand what happens? May I consider this hard drive as dead, despite the reading process seems perfectly fine?

0

You can use dd to read the whole partition (or the whole disk with the second command)

dd if=/dev/sde1 of=/dev/null bs=1M
dd if=/dev/sde of=/dev/null bs=1M

It is likely that it will stop somewhere with I/O error.

You should back up all files on that disk.

After that, rewriting the whole disk may cause the defect sectors to be reallocated, but would you trust that disk for important data?

  • Indeed dd stopped after copying 4.9GB. It's quite important data, so I will back it up as soon as possible, thanks – yolenoyer Aug 19 '18 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.