0 pts.
 Linux – Check disk status
Hi, I need to know how to check for disk errors on Linux, similar to the Solaris iostat -E command. Thanks, JCD.

Software/Hardware used:
ASKED: April 6, 2006  4:16 PM
UPDATED: April 19, 2013  3:14 PM

Answer Wiki:
fsck -A will check all filesystems in the /etc/fstab file. Check the manpage for your Linux brand. Don
Last Wiki Answer Submitted:  April 19, 2013  3:14 pm  by  Michael Tidmarsh   11,410 pts.
All Answer Wiki Contributors:  Michael Tidmarsh   11,410 pts. , Swiftd   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

First mount your hd to read-only.
secondly, if you are use ext3/ext2, e2fsck /dev/hda, if you are using reiser, then use the reiserfsck command

 0 pts.

 

I don’t think this is what the poster is asking for. Solaris iostat gives output similar to:
solaris9-test% iostat -E
sd0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: IBM Product: DDYS-T36950M Revision: S80D Serial No:
Size: 36.70GB
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
sd1 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: IBM Product: DDYS-T36950M Revision: S80D Serial No:
Size: 36.70GB
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
which reports disk-level errors. fsck runs a filesystem level check, and does not report disk errors.

 0 pts.

 

There’s a sysstat package that can be downloaded that contains iostat for Linux: http://perso.wanadoo.fr/sebastien.godard/

Outside of gathering this info from /proc/partitions and /proc/stat, it’s probably your best option.

 0 pts.

 

Thanks, Swiftd. It looks like that package still lacks the crucial ‘-e’ flag to report disk errors. I posted this questing back in April and received similar results – I just don’t think Linux has a way to report disk errors. It seems filesystem errors are as far as we can go.

 0 pts.

 

For S.M.A.R.T. Hard drives, there’s Smart support.

http://www.linuxjournal.com/article/6983

It’s probably not what you are looking for, but it does provide a lot of information.

 0 pts.