...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 #23 Guest 2015-05-27 09:47
I love your blog.. very nice colors & theme. Did you design this
website yourself or did you hire someone to
do it for you? Plz respond as I'm looking to create my own blog and would like to know where u got this from.
thank you

my web-site ... sushi restaurants near me
0 #22 Guest 2015-05-15 12:51
My partner and I absolutely love your blog and
find most of your post's to be just what I'm looking for.
Would you offer guest writers to write content for you personally?
I wouldn't mind publishing a post or elaborating on a few of the subjects you write regarding here.
Again, awesome web site!

Also visit my web-site :: followers.Guru/Buy-Instagram-followers/
0 #21 Guest 2015-04-26 19:53
If you wish for to obtain much from this paragraph
then you have to apply these techniques to your won blog.

My blog post ... affordable web hosting
0 #20 Guest 2015-04-03 08:00
Very nice article. I definitely appreciate this site.

Feel free to surf to my web blog; poker online - bettingoffers.co -
0 #19 Guest 2015-03-31 17:36
Hello my family member! I wish to say that
this post is amazing, nice written and come with almost all important infos.
I'd like to peer extra posts like this .

Also visit my webpage - ShawvehicleSolutions.co.uk
0 #18 Guest 2015-03-09 10:38
Pretty! This has been an incredibly wonderful article. Τhank youu for supplying tҺis info.

My web blog; immobilien-Ьei-koeln.de/
0 #17 Guest 2015-02-26 16:47
I couldn't refrain from commenting. Exceptionally well written!

Take a look at my weblog ... web ads
0 #16 Guest 2015-02-20 11:50
You ought to take part in a contest for one of thhe best sites online.
I am going to recommend this blog!

My website affordable web hosting
0 #15 Guest 2015-02-19 15:14
Wow! This blog looks juat like my old one! It's on a entirely different subject but it has pretty mch the same
page layout and design. Great choice of colors!

My blog post :: Giganet-Web-Hosting
0 #14 Guest 2015-02-19 14:37
of course like your website however you have to check the
spelling on quite a few of your posts. A number
of them are rife with spelling issues and I
find it very bothersome to tell the reality then again I'll surely come back again.

Here is my webpage: cheap hosting
0 #13 Guest 2015-02-12 18:27
According to their website, Evolv - Health, LLC is a direct sales
company developed by a team of scientists in conjunction with seasoned entrepreneurs, marketers and direct sellers.
In terms of making money with Evolv, understand that
the only way you will make money is by meeting your sales quota and recruiting like there is no tomorrow.
One final note on the compensation plan, it is a binary hybrid.

Also visit my web-site; evolv reviews (Kassie)
0 #12 Guest 2014-12-21 14:55
Excellent blog! Do you have any tips for aspiring writers?

I'm hoping to start mƴ օwn blog slon ƅut I'm a little lost on eveгything.
Woulld you recommend starting wіth a free platform llike Wordpress օr ɡo foг a aid option? Theге arе so many
choices ouut tҺere that I'm completely overwhelmed
.. Аny tips? Thanks a lot!

Alsߋ visit mʏ web-site ... haus mieten köln
-1 #11 Guest 2014-12-12 08:17
Ԝhat's up, everything is gߋing sound here and ofcourse eѵery onne іs sharing data, that's reallʏ excellent,
keep up writing.

Feel free tο visit myy web blog - denkmalschutz-immobilien.weebly.com
0 #10 Guest 2014-10-03 14:48
Hi it's me, I am also visiting this web page regularly, this web
site is really pleasant and the viewers are genuinely sharing good thoughts.

Look into my webpage ... website hosting; giganetwebhosting.com,
0 #9 Guest 2014-10-03 10:35
Thanks for finally writing about >Mapping Linux kenel ATA errors to a device
0 #8 Guest 2014-08-21 18:13
Hi to all, іt's reallƴ a fastidious foг me to visit this web site, itt includes
helpful ӏnformation.

Hеre is my webb pɑge ... Www.pinterest.com
0 #7 Guest 2014-06-05 10:59
whoah this weblog is magnificent i really like reading your posts.

Keep up the great work! You understand, lots of persons are hunting
around for this information, you can help them greatly.

My page product descriptions
0 #6 Guest 2014-05-26 08:57
Hi to all, since I am truly eager of reading this website's post to be
updated regularly. It includes good data.

Feel free to visit my site ... asp.net hosting
0 #5 Guest 2014-05-08 08:32
wonderful post, very informative. I ponder why the opposite specialists of this sector do not notice this.
You should continue your writing. I'm confident, you've a huge readers' base already!

Also visit my web site ... Towing and Repossession Software
0 #4 Guest 2014-05-05 12:24
Hello there, just became alert to your blog through Google, and found that it is
really informative. I'm gonna watch out for brussels.
I'll be grateful if you continue this in future. A lot of people will be benefited from
your writing. Cheers!

Here is my web site; Auto Shop Repair Software

Add comment

Security code