Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am facing issue with my HDD and I need to know what is the command or application to check the Health of the HDD in LINUX REDHAT

share|improve this question
    
You tagged this with hardware-raid. What type of server is this (makes/model), and does it have a RAID controller? –  ewwhite Nov 5 '12 at 13:53

4 Answers 4

Check out the smartctl command. It will display the current SMART counters of the drive as well as enabling you to run some simple self tests.

share|improve this answer

If by "health" you mean the status of Self-Monitoring, Analysis and Reporting Technology, you should check out the smartctl tool from the smartmontools package.

share|improve this answer

You will find any errors relating to io by typing dmesg in to your terminal. If your HDD's support S.M.A.R.T. you can grab a copy of smartmontools from your package manager for a more detailed look.

share|improve this answer

When smartd is configured, make sure to enable the monitoring daemon if it is not already started. On a Red Hat Enterprise Linux system, use:

# chkconfig smartd on    
# service smartd start

The smartctl program also allows for you to view and test SMART attributes of a drive. You can quickly check the overall health of a drive by using:

# smartctl -H /dev/sda    
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/    
=== START OF READ SMART DATA SECTION ===    
SMART overall-health self-assessment test result: PASSED

Obtaining information on the drive is useful as well. With the -i option, you can view the type of drive, its serial number, and so forth. In a system with a lot of drives, having this information recorded can assist in knowing which drive device (i.e., /dev/sda) corresponds with which physical drive. For instance:

# smartctl -i /dev/sda    
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen    
Home page is http://smartmontools.sourceforge.net/    
=== START OF INFORMATION SECTION ===    
Model Family:     Seagate Barracuda 7200.10 family    
Device Model:     ST3320620AS    
Serial Number:    9QF26NGD    
Firmware Version: 3.AAJ    
User Capacity:    320,072,933,376 bytes
Device is:        In smartctl database [for details use: -P show]   
ATA Version is:   7    
ATA Standard is:  Exact ATA specification draft version not indicated    
Local Time is:    Sun Mar  7 14:20:18 2010 MST    
SMART support is: Available - device has SMART capability.    
SMART support is: Enabled

The -a option shows the specifics of the SMART attributes and test history. This shows various SMART status information, such as the drive temperature, how many hours it has been powered on, and so forth. It also indicates when tests have been performed and what the results of those tests were.

for more options about smartctl, please check here or here. Hope this helps...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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