 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

20th May 2008, 12:19 AM
|
|
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
|

20th May 2008, 12:49 AM
|
 |
Administrator
|
|
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289

|
|
|
yum install smartmontools hdparm
# smartctl -a /dev/sd[a-z]
|

20th May 2008, 01:20 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 884

|
|
|
is the -t long the same as what all the diag programs do?
|

20th May 2008, 01:31 AM
|
 |
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
|

20th May 2008, 02:31 AM
|
|
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?
|

20th May 2008, 02:35 AM
|
 |
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
|

20th May 2008, 02:49 AM
|
|
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]
|

20th May 2008, 03:01 AM
|
 |
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
|

20th May 2008, 03:06 AM
|
|
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
|

20th May 2008, 03:15 AM
|
 |
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
|

20th May 2008, 03:24 AM
|
|
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
|

20th May 2008, 03:32 AM
|
 |
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
|

20th May 2008, 06:15 PM
|
|
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?
|

20th May 2008, 06:56 PM
|
 |
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
|

25th May 2008, 05:37 PM
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 20:57 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|