I notice that when I unmount my external HDD I sometimes getting messages in my logs which saying:

Buffer I/O error on device sdX, logical block XX

Where the X stands for the device for example: sdc. How I seriously do I have to take these messages since the device only spewing this messages when I unmount it, when I mount and use it I don't get any messages and the device works fine at this point as far I can see.

Those messages can be normal -

http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02270753&cc=us&dlc=en&lc=en

https://serverfault.com/questions/613249/buffer-i-o-error-on-device-sata-drive

to impending drive failure (unlikely).

smartmontools is required to determine the health of the drive and your drives passed.

smartctl -H /dev/sda
smartctl -a /dev/sda
smarrctl -t short /dev/sda

to show the results of tests

smartctl -l selftest /dev/sda

Example:

smartctl -l selftest /dev/sda ... Num Test_Description Status Remaining LifeTime(hours)

LBA_of_first_error

1 Short offline Completed without error 00% 1689 -

You can use fsck to check the file system, but fsck should be run from a live usb.

fsck -a -y /dev/sda1

the -a and -y options attempt repair.

with fsck you specify a partition.

See https://wiki.archlinux.org/index.php/S.M.A.R.T.

http://www.thomas-krenn.com/en/wiki/SMART_tests_with_smartctl

http://www.maketecheasier.com/check-repair-filesystem-fsck-linux/

  • 1
    You can add -c and it will check for bad blocks as well – Geary Shull Nov 18 '14 at 13:40

Typically, this buffer issues can be indicative of a pending HDD failure. However, it is best to test the drive and verify and see where exactly the error lay. Please run e2fsck -fv /dev/sdX. If it runs without error, then there must be something else wrong. If it has any errors or mentions moving sectors, backup immediately and prepare to replace the drive. I recommend replacing it sooner rather than later in that case

  • 1
    Not necessarily ... they can be "just noise", we need more information. – Panther Nov 18 '14 at 2:11
  • Thus the command. Mind you, I have seen drives develop bad sectors and not fail, but these were always laptop drives under heavy use. – Geary Shull Nov 18 '14 at 2:12
  • smartmontools are better, IMO, then fsck to give hard drive health. – Panther Nov 18 '14 at 2:15
  • I do like smartmontools, since it is a little faster, but fsck is more thorough. – Geary Shull Nov 18 '14 at 2:41
  • 1
    fsck checks the file system rather then the hard drive. See lpic2.unix.nl/ch04s02.html or similar. – Panther Nov 18 '14 at 3:24

I formatted al my external hdd's to a EXT4 filesystem and I didn't see the errors again. Looks like it had something to do with the NTFS driver I guess.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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