...because open source matters

  • Increase font size
  • Default font size
  • Decrease font size

Mapping Linux kernel ATA errors to a device

E-mail Print

I found it quite difficult to map Linux kernel ATA warnings to a particular device. These article gives some insights.

I have a dying drive in my system and I'm getting Linux kernel warnings like those ones:

[ 3180.294013] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 3180.316290] ata6.00: configured for UDMA/33
[ 3180.316294] ata6: EH complete
[ 3180.547232] ata6: exception Emask 0x50 SAct 0x0 SErr 0x90800 action 0xe frozen
[ 3180.547234] ata6: irq_stat 0x00400000, PHY RDY changed
[ 3180.547238] ata6: SError: { HostInt PHYRdyChg 10B8B }
[ 3180.547244] ata6: hard resetting link
[ 3182.698012] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 3182.736664] ata6.00: configured for UDMA/33
[ 3182.736667] ata6: EH complete
[ 3182.864164] ata6.00: exception Emask 0x50 SAct 0x1 SErr 0x90800 action 0xe frozen
[ 3182.864167] ata6.00: irq_stat 0x00400000, PHY RDY changed
[ 3182.864170] ata6: SError: { HostInt PHYRdyChg 10B8B }
[ 3182.864173] ata6.00: failed command: READ FPDMA QUEUED
[ 3182.864179] ata6.00: cmd 60/cutout/00:00:02:00:00/40 tag 0 ncq 4096 in
[ 3182.864181]          res 40/cutout/00:00:02:00:00/40 Emask 0x50 (ATA bus error)
[ 3182.864183] ata6.00: status: { DRDY }
[ 3182.864189] ata6: hard resetting link
To figure out who is ata6 I had to look at my drives in the /sys file-system:
dirk@topo ~ $ ls -l /sys/block/sd{a,b,c,d}
lrwxrwxrwx 1 root root 0 Apr  9 01:24 /sys/block/sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Apr  9 01:24 /sys/block/sdb -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb
lrwxrwxrwx 1 root root 0 Apr  9 01:24 /sys/block/sdc -> ../devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdc
lrwxrwxrwx 1 root root 0 Apr  9 01:24 /sys/block/sdd -> ../devices/pci0000:00/0000:00:1f.2/host5/target5:0:0/5:0:0:0/block/sdd

On PCI bus 1, PCI device 00:1f.2 is my SATA controller, a Intel Corporation 82801HB (ICH8) 4 port SATA AHCI Controller (rev 02). It provides 4 hosts to each of which I have attached a disk.

To get that ID, Instead of looking into the target structure, we're looking into the scsi_host structure. It has a directory for the host and in it a file unique_id. That's the ID appended to ata.

So for each of the hosts above I can display the ID like this:

dirk@topo ~ $ for host in 0 1 4 5; do echo -n host${host}:; cat /sys/devices/pci0000:00/0000:00:1f.2/host${host}/scsi_host/host${host}/unique_id; done

So going back to where we came, ata6 is host5, which hostsĀ sdd.



0 #99 Guest 2015-08-25 23:52
An lawyer can use the particulars of the law to push the
insurance coverage business into undertaking what is right.

Here is my web page :: motor vehicle lawyers new jersey [www.spdang.com]
0 #98 Guest 2015-08-25 13:25
Greetings PDH :) I agree that calling it a right was by
no means supposed as carte blanche for the worst type of rudeness
and bigotry.

My web-site :: sg commercial property
0 #97 Guest 2015-08-25 10:21
After we first moved in, his daughters lived there.

Here is my webpage - altez condo
0 #96 Guest 2015-08-23 01:17
Ahaa, its good dialogue concerning this paragraph at this place at this blog, I have read all that, so
at this time me also commenting here.

my weblog - consumer data
0 #95 Guest 2015-08-19 23:33
If you're not already a netflix
customer service
subscriber you should follow all
the backlinks to subscribe for the service.
0 #94 Guest 2015-08-19 10:44
The formula for the loan amount is to match the age the mature.
Bottom Line: Historically, our economy has periodic slow periods and then economic booms.

My blog Florida Reverse mortgages
0 #93 Guest 2015-08-19 08:01
Great post. I was checking continuously this blog and I am
impressed! Very useful information specially the last part
:) I care for such information a lot. I was looking for
this particular information for a long time. Thank you and good luck.

Here is my webpage: Garcinia
GCB Diet
0 #92 Guest 2015-08-19 07:19
In many cases these methods even have a tendency work
every friend. Similarly pretty NHS doctors offer a mere HIV small sample.

Here is my web-site; Std Testing Near Me (Destinykidssalon.Com/)
0 #91 Guest 2015-08-18 10:41
Net als een nieuwe Forex handelaar , het is heel gebruikelijk dat je
kan niet volledig begrijpen van de markt of uw specifieke
rol als een handelaar .

Feel free to visit my page; onze website
0 #90 Guest 2015-08-18 09:43
Magnificent beat ! I would like to apprentice
while you amend your web site, how could i subscribe for a blog website?
The account helped me a acceptable deal. I had been tiny bit
acquainted of this your broadcast provided bright
clear concept

Also visit my blog - Found Youth Reviews
0 #89 Guest 2015-08-17 02:00
With havin so much written content do you ever run into any issues of plagorism or copyright violation? My blog
has a lot of unique content I've either written myself or outsourced but
it looks like a lot of it is popping it up all
over the web without my permission. Do you know any methods to help protect against content from being stolen? I'd definitely appreciate it.

Look at my homepage: Followers Guru (followers.guru)
0 #88 Guest 2015-08-16 15:48
Hi there, i read your blog from time to time and i
own a similar one and i was just curious if you get
a lot of spam responses? If so how do you protect
against it, any plugin or anything you can suggest?
I get so much lately it's driving me crazy so any support
is very much appreciated.

my web page: alpha zxt brain health
0 #87 Guest 2015-08-16 10:33
GSM phones use SIM cards that are compatible with all the prepaid
t mobile login-mobile SIM card.
0 #86 Guest 2015-08-10 11:42
You should learn the the inner workings of profitable online gambling Legal,
and avoiding the terrible bests of connected with online poker being rigged.

A huge credit would go to the internet gambling websites who have launched this game and caused it to be easy to get at to the majority of of the
0 #85 Guest 2015-08-09 07:05
This is really interesting, You are a very skilled blogger.

I've joined your feed and look forward to seeking more of your magnificent post.
Also, I have shared your website in my social networks!

Review my web blog: prima skincare
0 #84 Guest 2015-08-08 12:23
What Gmail did with hotmail email sign in, Google Docs
did with anything else: the apps ran inside your browser, were sufficient for many people, and didn't cost a penny at
any given time when Office suites still cost hundreds of pounds.
I believe privacy is really a fundamental right, so what better way
to celebrate Data Privacy Day than to exhibit you how to encrypt email.
0 #83 Guest 2015-08-05 22:51
The listing of commercial failures of Google is almost inexplicable,
because Picasa is not a bad service, although quite limited
compared to others; Google Sites is made for what works
and little more. Facebook jumped about the most straightforward and intuitive word for liking something
there is. Placing your efforts and attention there may only
disperse the productive, new patient getting strategies which have
been working for years now.

Also visit my blog; google
plus android phone
0 #82 Guest 2015-08-03 06:36
Fabulous, what a webpage it is! This blog presents useful information to us, keep it up.

Review my web page If you don't want to wait
or it doesn't open please click here...
0 #81 Guest 2015-08-02 20:18
I'm extremely impressed with your writing abilities and also with the layout to your blog.
Is this a paid topic or did you customize it yourself?
Either way stay up the nice high quality writing, it's rare to
see a great weblog like this one nowadays..

Check out my website ... Gail
0 #80 Guest 2015-07-31 02:48
Another way to look green isn't just about the restaurants near me in philadelphia though, it's also about the shoppers.

Add comment

Security code