miriup.de

...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
host0:1
host1:2
host4:5
host5:6

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

 

Comments   

 
0 #386 Guest 2016-07-24 01:27
Incredible points. Great arguments. Keep up the great work.


Also visit my page: Best Mattress Topper
Quote
 
 
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
Quote
 
 
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
site!

my web-site :: automaty hry zdarma online
Quote
 
 
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.
Suwun
Quote
 
 
0 #382 Guest 2016-07-22 17:07
It's difficult to find well-informed people for this subject, but you sound
like you know what you're talking about! Thanks

Also visit my web blog; movie tube
Quote
 
 
0 #381 Guest 2016-07-19 03:35
Semifinal losers play off to get a bronze medal game while you'll find classification games
- on the list of quarterfinal losers - that help determine fifth to eighth places.

Eight spots were determined by the host nation along
with the top seven finishers at the previous Euro - Basket.
They declared that's to help us drive away the tire of travel.


Also visit my webpage visit aland island finland
Quote
 
 
0 #380 Guest 2016-07-18 01:31
Magnificent beat ! I would like to apprentice even as you amend your site, how could i subscribe for a weblog web site?
The account aided me a acceptable deal. I have been tiny bit familiar of this your broadcast provided shiny transparent
concept

Here is my blog; movie
tube
Quote
 
 
0 #379 Guest 2016-07-09 18:45
Hello,I enjoy reading all of your article post. Iwanted to write a little comment to support you.


Check out my blog: real nurse sex
Quote
 
 
0 #378 Guest 2016-07-08 23:04
Hello just wanted to give you a brief heads up and let
you know a few of the pictures aren't loading correctly.
I'm not sure why but I think its a linking issue.
I've tried it in two different browsers and both show the same outcome.


Also visit my web page: לקרוא את
המידע המלא כאן
Quote
 
 
0 #377 Guest 2016-07-07 19:18
Simply desire to say your article is as surprising. The clarity on your post is simply nice and that
i can assume you're an expert on this subject. Well along with your permission let me to clutch your RSS feed
to keep up to date with impending post. Thanks a
million and please continue the rewarding work.


Also visit my web-site Best Mattress
Topper
Quote
 
 
0 #376 Guest 2016-07-06 01:05
A few of the elements common to numerous trailers are here.

Trailers are usually comprised of scenes from the movie they are advertising, yet occasionally include
erased scenes from the film.

Here is my web site - 2016 movie
trailers
Quote
 
 
0 #375 Guest 2016-07-05 23:53
Ӏ'm not suге where you are gettіng your informɑtion, bսt
great topic. І needѕ to spend some tine learning more ߋr undderstanding mߋre.
Thanks for exxellent іnformation I was looқing fօr this information for my
mission.

Kunjungi halaman website Saya buat mendapatkan Informasi lebih komplit mengenai exkiez.cicc.us/index.php?action=profile;u=210. Ƭhanks ya
Quote
 
 
0 #374 Guest 2016-07-02 14:54
Wonderful goods from you, man. I have understand your stuff previous to and you are just
too great. I actually like what you have acquired here, certainly like what you're stating and the way
in which you say it. You make it enjoyable and you still
take care of to keep it wise. I can't wait to read much more
from you. This is really a great web site.

Take a look at my blog post - מנעולן פורץ באזור
קריות
Quote
 
 
0 #373 Guest 2016-07-01 13:25
If you wissh for to grow your experience only keep visiting this
web sote and be updated with the latest news posted here.


my web bllg :: nhhealthykids.com
Quote
 
 
0 #372 Guest 2016-06-30 07:32
Nice post. I was checking constantly this blog and I'm impressed!
Very useful info specifically the last part :
) I care for such info much. I was seeking this certain info for a long time.
Thank you and gokd luck.

my blog post ... Canadian pharmacies shipping to usa
Quote
 
 
0 #371 Guest 2016-06-27 23:46
Excellent post! We will be linking to this particularly great
content on our website. Keep up the great writing.

My weblog :: מערכת מיגון ואבטחה
Quote
 
 
0 #370 Guest 2016-06-27 05:08
You have observed very interesting details! ps decent internet site.


Also visit my blog: services website designing
Quote
 
 
0 #369 Guest 2016-06-26 16:07
Really high quality blog posts on this site, saved to fav.



Also visit my webpage ... garage Door lower Panel
Quote
 
 
0 #368 Guest 2016-06-22 22:52
However the fact nonetheless remains that these drugs aren't premature ejaculation medications.
The drug has adverse drug reactions like dizziness and
sneezing among others. According to the National
Institutes of Health (NIH), an increasing number of men are reporting problems with erectile dysfunction (ED), or
the recurrent inability to get or maintain an erection.

Here is my homepage: www.levitradosageus24.com/levitra-40-mg/
Quote
 
 
0 #367 Guest 2016-06-21 20:51
Excellent way of explaining, and fastidious article to take facts concerning my presentation subject, which i
am going to deliver in institution of higher education.

My website: Clickbank Marketplace Reputation
Quote
 

Add comment


Security code
Refresh