LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-13-2010, 08:14 AM   #1
Ralfredo
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Rep: Reputation: 0
How can I find out which sector that is bad


Hi,

Tonight my machine started writing the following in the messages file:

Jul 13 14:41:19 big smartd[9989]: Device: /dev/sda, 1 Currently unreadable (pending) sectors

The problem started after:
Code:
[1769461.577365] ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0
[1769461.577369] ata1.00: irq_stat 0x40000008
[1769461.577375] ata1.00: cmd 60/08:00:d3:d4:5c/00:00:04:00:00/40 tag 0 ncq 4096 in
[1769461.577376]          res 41/40:00:da:d4:5c/8d:00:04:00:00/40 Emask 0x409 (media error) <F>
[1769461.577379] ata1.00: status: { DRDY ERR }
[1769461.577381] ata1.00: error: { UNC }
[1769461.610262] ata1.00: configured for UDMA/133
[1769461.610262] ata1: EH complete
[1769461.610262] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors (1000205 MB)
[1769461.610262] sd 0:0:0:0: [sda] Write Protect is off
[1769461.610262] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[1769461.610262] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
I guess the hex values in the "cmd-row" can be used to get the faulty block. I would like to write to that block to force a relocation to a spare block. Can anyone help me translate the hex values into something usable?

I have tried to read the whole disk /dev/sda with dd without problem.

TIA /Ralfredo
 
Old 07-13-2010, 08:25 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Try "badblocks" ?
 
Old 07-13-2010, 08:48 AM   #3
Ralfredo
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
Try "badblocks" ?
No, not yet. dd took around six hours so i really would like to know at least on which partion to start.

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

I have run a short self test without any errors, and are running the long self test right now.
Code:
# 1  Extended offline    Self-test routine in progress 60%     13180         -
# 2  Short offline       Completed without error       00%     13180         -
# 3  Short offline       Completed without error       00%     13168         -
# 4  Short offline       Completed without error       00%     13144         -
# 5  Short offline       Completed without error       00%     13120         -
# 6  Extended offline    Completed without error       00%     13102         -
# 7  Short offline       Completed without error       00%     13096         -
# 8  Short offline       Completed without error       00%     13072         -
# 9  Short offline       Completed without error       00%     13048         -
#10  Short offline       Completed without error       00%     13024         -
#11  Short offline       Completed without error       00%     13000         -
#12  Short offline       Completed without error       00%     12976         -
#13  Short offline       Completed without error       00%     12952         -
#14  Extended offline    Completed without error       00%     12934         -
#15  Short offline       Completed without error       00%     12928         -
#16  Short offline       Completed without error       00%     12904         -
#17  Short offline       Completed without error       00%     12880         -
#18  Short offline       Completed without error       00%     12856         -
#19  Short offline       Completed without error       00%     12832         -
#20  Short offline       Completed without error       00%     12810         -
#21  Short offline       Completed without error       00%     12786         -
I'm not sure how worried I should be. A single bad sector might not be so bad.

If i can read the whole drive with dd, will badblocks find anything more in non destructive mode? I guess I have to write to the block to trigger the error or...
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
bad sector problem ahmed gamal Slackware 2 08-18-2008 06:38 PM
how can i partition around a bad sector ? nephish Linux - Hardware 13 12-02-2005 08:45 AM
Bad sector woes :S kevingpo Fedora 4 07-07-2005 02:57 AM
bad sector in HDD ??? hitesh_linux Linux - General 2 06-20-2003 03:54 PM
how to check for bad sector nakkaya Linux - General 1 01-16-2003 07:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration