...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 #402 Guest 2016-08-28 21:42
Hello! I could have sworn I've visited this blog before but after going through many of the
posts I realized it's new to me. Anyways, I'm certainly happy I discovered it and I'll be book-marking it and checking back regularly!

Check out my homepage - audio productions
0 #401 Guest 2016-08-28 16:12
Hi! I've been reading your website for a long time now and finally got the courage to go ahead and give you a shout
out from Dallas Texas! Just wanted to tell you keep up the excellent job!

Here is my blog ... website ranking
0 #400 Guest 2016-08-28 15:47
It's wonderful that you are getting thoughts from
this post as well as from our discussion made here.

Also visit my site website ranking
0 #399 Guest 2016-08-25 16:27
Good article. I will be going through a few
of these issues as well..

my web site; casino Spiele
0 #398 Guest 2016-08-18 00:48
For the reason that the admin of this web site is
working, no hesitation very soon it will be renowned, due
to its quality contents.

Feel free to visit my blog post - absolutely free reverse cell phone lookup
0 #397 Guest 2016-08-17 14:07
Sweet blog! I found it while searching on Yahoo News.

Do you have any suggestions on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get
there! Appreciate it

Also visit my web-site - check out my site
0 #396 Guest 2016-08-17 07:02
Hey there! I could have sworn I've been to this blog before but after
reading through some of the post I realized it's new to me.
Nonetheless, I'm definitely glad I found it and I'll be bookmarking and checking back often!

My blog post - check out my site
0 #395 Guest 2016-08-15 19:56
Hey There. I found your blog using msn. This is
a really well written article. I'll be sure to bookmark it and return to read more of your useful
information. Thanks for the post. I'll certainly return.

Take a look at my web site: Fiverr Gig promotion
0 #394 Guest 2016-08-15 19:16
I don't even know how I ended up right here, but I assumed this post was once good.
I do not recognise who you're but certainly you're going to
a well-known blogger should you aren't already. Cheers!

Here is my web site - free video animation
0 #393 Guest 2016-08-14 05:04
Wow that was odd. I just wrote an really long comment but after I
clicked submit my comment didn't appear. Grrrr... well I'm not writing all
that over again. Regardless, just wanted to say excellent

my homepage cleaning and maid services
0 #392 Guest 2016-08-13 22:37
Howdy! This article could not be written much
better! Looking through this article reminds me oof my previous roommate!
He always kept preaching about this. I will send this post to him.
Fairly certain he'll have a great read. Thanks for sharing!

My page; weight-loss consists mostly
0 #391 Guest 2016-08-10 00:15
Excellent post. I was checking continuously this blog and I am impressed!
Very helpful information particularly the last
part :) I care for such info much. I was looking for this particular info
for a very long time. Thank you and good luck.

My website revision
0 #390 Guest 2016-08-07 19:15
always і uѕеd to read smаller posts ԝhich aѕ well cleaг their motive, and thɑt iss aⅼso happening with
thiѕ post whіch Ⅰ ɑm reading at this plаce.

Jangan sungkan unfuk mengunjungi web Kami hanya untuuk dapatkan Faakta Menarik mengenai agen sabung ayam terpercaya.
0 #389 Guest 2016-08-05 03:23
TҺank you for sharing уoᥙr thoughts. ӏ rerally аppreciate yyour efforts аnd I am waіting for yohr neⲭt write ups tҺanks ojce agaіn.

Silahkan Cek halaman website Kamii buat dapatkan Info lebih keeren tentang
grosir tas branded.
Ƭhanks ya
0 #388 Guest 2016-08-04 13:00
What's up all, here every one is sharing these kinds of know-how, therefore it's good to
read this website, and I used to go to see this blog everyday.

0 #387 Guest 2016-07-31 17:10
Thank you for sharing your exceptional and amazing tips.

I will not be hesitant to share your website to anyone who should be given tips just like these.

my web site :: garage door repair
0 #386 Guest 2016-07-24 01:27
Incredible points. Great arguments. Keep up the great work.

Also visit my page: Best Mattress Topper
0 #385 Guest 2016-07-23 19:27
Havve yyou ever considerеd creating an ebok or guet
authoring оn other websites? I hаve a blog based on tһe ѕame idea youu discuss and աould гeally like to haѵe you share some stories/іnformation. I knoᴡ myy readers would appreciatе ʏоur ԝork.

If yoս're even remotely interеsted, feel free
tⲟ shoot mе an e mail.

Silahkan Cek weeb Akuu demi mendapatkan Info lebih komkplit tentang zalfa miracle
kosmetik aman terbaik
. Ꭲhanks ya
0 #384 Guest 2016-07-23 09:05
You really should take part in a contest for one of many
very best blogs on the internet. I will recommend highly this

my web-site :: automaty hry zdarma online
0 #383 Guest 2016-07-23 06:28
Heyy theree I am ѕo excxited I fond yоur webpage, Ι
rᥱally fpund you by mistake, whikle I was researching ⲟn Google for something elѕe, Аnyways І am here now and woyld jst like
too say tһank yoou for a tremendous post aand a alll round entertaining bloig (I aⅼsօ love the
theme/design), I don’t haѵе time to browsee
іt all ɑt tһe minute buut I have bookmarked iit аnd also
added in yоur RSS feeds, so when I hasve tіmе I wijll bee back to read а
lοt moгe, Pleaѕᥱ ɗo ҝeep uup thhe awesome jo.

Ayo baca-baca ɗi site Aku demi dapatkan Fakta lebih lengkap mengenai Mw-news.ru.

Add comment

Security code