Fedora Linux Support Community & Resources Center
  #1  
Old 20th May 2008, 12:19 AM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
Hard Drive Diagnostics

Is there a program that will do whatever the manufacturers diagnostics programs do? The idea is instead of downloading maxtors diag and WD diag and IBM diag, can you just run "linux hdd diag" on a drive?

Thanks,

Dave
Reply With Quote
  #2  
Old 20th May 2008, 12:49 AM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
yum install smartmontools hdparm

# smartctl -a /dev/sd[a-z]
Reply With Quote
  #3  
Old 20th May 2008, 01:20 AM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
is the -t long the same as what all the diag programs do?
Reply With Quote
  #4  
Old 20th May 2008, 01:31 AM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
No, they're all a little different in scope. Read 'man smartctl', I can't remember off the top of my head what each test does. There's "short", "long", and "off-line" at least, maybe more. Don't forget to edit /etc/smartd.conf, and turn service smartd on if you want regular monitoring.

My smartd.conf (just the relevant lines):
/dev/sda -a -o on -m root -n standby
/dev/sdb -a -o on -m root -n standby

hdparm has more, that's what you need to get/set HDD parameters (smartmontools is just monitoring).

V
Reply With Quote
  #5  
Old 20th May 2008, 02:31 AM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
when i run
sudo smartctl -i /dev/sdb

I get:
Device: MAXTOR S 5QF23WJ9 Version: E
Device type: disk
Local Time is: Sun May 18 21:29:56 2008 EDT
Device does not support SMART

I thought almost all drives in the recent past used SMART?

I tried
sudo smartctl -s on /dev/sdb

to turn smart "on" but it says:
unable to fetch IEC (SMART) mode page [unsupported field in scsi command]
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

thoughts?
Reply With Quote
  #6  
Old 20th May 2008, 02:35 AM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Yes: try the permissive switch:

smartctl -a -T permissive /dev/sdb

Use repeated permissive switches, one for each gasp:
smartctl -a -T permissive -T permissive /dev/sdb

and so on until it cooperates. Use the permissive switch(es) with whatever other options/switches you want/need.

V
Reply With Quote
  #7  
Old 20th May 2008, 02:49 AM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
Unless I'm doing something wrong, its still not cooperating?

Code:
[dave@davedesktop ~]$ sudo smartctl -a -T permissive -T permissive -T permissive /dev/sdb
smartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: MAXTOR S         5QF23WJ9 Version: E   
Device type: disk
Local Time is: Sun May 18 21:43:41 2008 EDT
Device does not support SMART

Error Counter logging not supported
Device does not support Self Test logging
Code:
[dave@davedesktop ~]$ sudo smartctl -s on -T permissive -T permissive /dev/sdbsmartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

unable to fetch IEC (SMART) mode page [unsupported field in scsi command]
Code:
[dave@davedesktop ~]$ sudo smartctl -t short -T permissive -T permissive /dev/sdb
smartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Short offline self test failed [unsupported scsi opcode]
Reply With Quote
  #8  
Old 20th May 2008, 03:01 AM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
I'm not familiar with that exact make and model, so I don't know why it would choke smartctl. Unless of course it does not in fact support S.M.A.R.T. It looks like you're doing it right, but try also specifying drive type in case that libata stuff is confusing it:
smartctl -s on -d ata /dev/sdb

Add the other switches later. That is, if it is in fact an IDE PATA/SATA drive, not an SCSI or other odd-ball. I don't know why you should need that, though, as you can see, I safely dropped the '-d ata' switch from mine and it caused no problems, but give that a try: tell it explicitly what to look for.

V
Reply With Quote
  #9  
Old 20th May 2008, 03:06 AM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
hmm I tried it on another drive and am receiving the exact same messages - maybe it has to do with that i have it in an external usb enclosure?

I'm gona try it on the parallel port now... i'll report the results
Reply With Quote
  #10  
Old 20th May 2008, 03:15 AM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Quote:
Originally Posted by daviddoria
hmm I tried it on another drive and am receiving the exact same messages - maybe it has to do with that i have it in an external usb enclosure?

I'm gona try it on the parallel port now... i'll report the results
I don't think you can do this with smartmontools....

See their web site, but I'm pretty sure that's the problem. http://smartmontools.sourceforge.net/index.html

V
Reply With Quote
  #11  
Old 20th May 2008, 03:24 AM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
bahhhh ok - I haven't tried it yet but from the website sounds like that is the problem. I should have mentioned that at the beginning!

Well at least I learned something along the way...

Thanks for the help
Reply With Quote
  #12  
Old 20th May 2008, 03:32 AM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
No, I'm afraid USB is not supported: http://smartmontools.sourceforge.net...ml#testinghelp
Quote:
Smartmontools for FireWire, USB, and SATA disks/systems

As for USB and FireWire (IEEE 1394) disks and tape drives, the news is not good. They appear to the operating system as SCSI devices but their implementations do not usually support those SCSI commands needed by smartmontools. A consortium associated with IEEE 1394 certified some external enclosures (containing a ATA disk and a protocol bridge) as being compliant to the relevant standards. Even still, that compliance means that they tend to only support the bare minimum of commands needed for device operation (i.e. SMART support is an unsupported extra). Hopefully external USB and Firewire devices will support SAT in the future, see below. Some USB device based on cypress chips support a proprietary protocol (ATACB) that allow to send raw ATA commands (i.e. SMART support).
If I knew of any other such tools, I'd suggest them, but smartmontools is the standard Linux tool for such jobs, and I know of no others....

V
Reply With Quote
  #13  
Old 20th May 2008, 06:15 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
All the above commands worked fine when I plugged it in to the IDE port. My only remaining concern is that
smartctl -t long /dev/sdb

only took about 10 mins to run where as the maxtor tool takes about an hour.... from the man page "long" seemed like the most thorough test available - if this is the case what accounts for the extreme time difference?
Reply With Quote
  #14  
Old 20th May 2008, 06:56 PM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
I don't know, but the output of smartctl -a tells you exactly how long the tests are supposed to take:
Code:
[root@localhost ~]# smartctl -a /dev/sda
smartctl version 5.38 [i386-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi Deskstar T7K250 series
Device Model:     HDT722516DLA380
Serial Number:    VDK91GTEEYZ3YR
Firmware Version: V43OA99A
User Capacity:    160,041,885,696 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 1
Local Time is:    Tue May 20 13:44:46 2008 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
[...]
Short self-test routine
recommended polling time:        (   1) minutes.
Extended self-test routine
recommended polling time:        (  57) minutes.
[...]
The Maxtor test may also check for vendor-specific items that a generic tool can't, but that's just a guess. It could also easily be that smartctl is better, more efficient?

And IIRC, the off-line test is longer and more thorough, but I'd have to re-check the manual pages to be sure. Off-line is a different animal than short and long on-line tests....

The important results are: overall Health assessment and the individual item results.

V
Reply With Quote
  #15  
Old 25th May 2008, 05:37 PM
virason Offline
Registered User
 
Join Date: Jul 2007
Location: Northwestern Carolina
Posts: 50
Following a failed attempt to install F9 on a previously fully functional sata drive, the drive now seems to be a read-only drive.

Any suggestions on how to rectify this condition would be appreciated.
Reply With Quote
Reply

Tags
diagnostics, drive, hard

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is written to hard drive with thumb drive install or live cd murof Using Fedora 5 12th December 2008 04:27 PM
Booting from USB external drive instead of internal hard drive davrom Hardware & Laptops 2 24th November 2008 11:56 AM
Installing to a USB Flash Drive and using the drive and a normal hard drive beeball Installation and Live Media 3 23rd March 2008 05:45 AM
grub.conf on hard drive, boot usb drive badwolf001 Installation and Live Media 9 17th November 2007 02:58 AM
Automount stopped working with USB pen drive and USB hard drive fedoraphile Using Fedora 20 14th December 2006 05:53 AM


Current GMT-time: 20:57 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat