0

I've had an external HDD formatted in ext4 for a while. For some reason, it's started to take forever to list directories. Sometimes just running ls /mount/point/of/drive takes minutes, sometimes that directory will ls fine, but not directories in it, etc. Could this be a sign that the drive it getting old, or even about to fail? Copying files is as fast as ever over USB 2.

tkbx
  • 10,847

1 Answers1

1

Filesystem diagnostics

I would run an e2fsck on the disk to start. You'll need to run this readonly against it. Also check out the disk using either hdparm or sdparm.

$  hdparm -tT /dev/sda1

/dev/sda1:
 Timing cached reads:   3884 MB in  2.00 seconds = 1941.51 MB/sec
 Timing buffered disk reads:   46 MB in  0.62 seconds =  74.40 MB/sec

From my experience slowness as you're describing would mean that the drive is most likely starting to have physical failures.

What else?

Given the type of issues you're seeing I would also try running something such as HDAT or Spinrite (Commercial) against the disk to see if it reports any physical failures as well.

You might also want to try booting from some other bootable media and running smartctl to see if there are any SMART errors.

For example:

$ smartctl --all /dev/sda

References

slm
  • 369,824
  • If the physical failure is worn out ("bad") blocks, e2fsck -c should take care of it, but you may loose data. – goldilocks Aug 16 '13 at 07:11