...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 #288 Guest 2016-02-10 02:21
The imbalance of this estrogen overload is contributing to a greater decline of progesterone and testosterone in both women and
men. Let your imagination take you to where you want to go.
The ink on these pads in non-toxic, acid-free and it can't be smeared or smudged
up. Use short up-and-down vertical strokes moving toward the top
of your ear.

Also visit my web-site - ขายครีมทาปาก นมชมพู
0 #287 Guest 2016-02-10 02:05
Hi there everyone, it's my first pay a visit at this
website, and article is actually fruitful in favor of me, keep up posting
these types of articles.

Here is my web blog ... Article Collector
0 #286 Guest 2016-02-09 23:30
It's perfect time to make some plans for the future and it is time to be happy.

I have read this post and if I could I wish to suggest you few interesting things or suggestions.
Maybe you could write next articles referring to this article.
I wish to read more things about it!

My homepage; GOPRO HERO4 Silver
0 #285 Guest 2016-02-06 05:23
Greetings! Very useful advice in this particular article!
It's the little changes that will make the greatest
changes. Many thanks for sharing!

Also visit my web site: Geniux Side Effects
0 #284 Guest 2016-02-05 21:47
Types of hard drive technology are utilized

My site ... Mezcal Dev Austin
0 #283 Guest 2016-02-05 07:30
Good day! I could have sworn I've been to this site before but after reading through some of the post I realized it's new to
me. Anyways, I'm definitely happy I found it
and I'll be bookmarking and checking back often!

Here is my website :: 4u-promotion.com
0 #282 Guest 2016-02-02 10:54
This much is needful, if you really want to see
some results. To lighten dark lips naturally, you should always keep them
moisturized. To steer clear of the lipstick stains on teeth,
fix your finger in your mouth and suck it in as you
drag it out. Try to avoid lip balms and also try to stop yourself
when you get the urge to lick your lips.

Stop by my website ... ครีมทาปากชมพู
0 #281 Guest 2016-02-02 01:15
Whether it is facial creams, body washes, scrubs, shampoos,
lip balms, or even mascara going green is truly the best alternative for our health and
the environment. Blacken out some of your teeth for a really ugly effect.

Soft Matte Lip Cream is surprisingly durable and, unlike some matte lipstick formulas,
also moisturizing'. After making this list and writing my reviews,
it would appear that for the extent of my lip balm collection, I am still on the hunt for the "perfect" one.

Also visit my homepage - ครีมทาปากชมพูคุณภาพดี
0 #280 Guest 2016-02-01 05:22
Paint your face white and create a clown look that you like.
Every night before going to bed, you should place this mixture on your dark lips to lighten them naturally.
Customers who use it to reduce stretch marks claim
it is non-greasy and pleasant. Eyeshadow pigments are also fine powder
based and, in most cases, pure and unadulterated with any
kind of filler.

my blog post ... ครีมทาปากชมพู
0 #279 Guest 2016-01-27 09:03
What is thus particular in regards to the experience?

Also visit my homepage :: xamarin developmet
0 #278 Guest 2016-01-27 08:53
The way in which will probably an unexpected emergency will be dealt with your
home is thus far away by means of people in case

Check out my web page :: Cintia Alemán
0 #277 Guest 2016-01-27 08:09
Precisely how careers which are many a person get at the same time

Here is my web-site; Austin Mezcal Development
0 #276 Guest 2016-01-25 09:26
That's why you need to be sure to purchase a considerable checklist at the outset
— it eliminates the necessity to buy one other checklist
for fairly some time.

Visit my site ... big data low cost
0 #275 Guest 2016-01-23 02:20
fantastic put up, very informative. I ponder why the other
specialists of this sector don't understand this. You should continue your writing.
I'm confident, you've a great readers' base already!

Here is my blog :: Nanaimo Chiropractic
0 #274 Guest 2016-01-22 03:33
It's very trouble-free to find out any matter on web as compared to books, as I found this article at this web site.

Here is my blog Vivid Skin Cream Anti Aging
0 #273 Guest 2016-01-19 04:04
Hurrah, that's what I was looking for, what a data!
existing here at this web site, thanks admin of this website.

Also visit my web blog ... eye serum reviews
0 #272 Guest 2016-01-15 06:59
Thank you a bunch for sharing this with all people you actually recognise what
you're talking approximately! Bookmarked. Please also discuss with my site =).
We can have a hyperlink exchange arrangement among us

my web site: Christina
0 #271 Guest 2016-01-14 21:11
I was able to find good info from your articles.

Feel free to surf to my website: Ultimate4Trading System
0 #270 Guest 2016-01-14 07:38
Heya just wanted to give you a brief heads up and let
you know a few of the pictures aren't loading properly.
I'm not sure why but I think its a linking issue.
I've tried it in two different web browsers and both show the same outcome.

Also visit my page - romance (lorenzovzsb.wordpress.com)
0 #269 Guest 2016-01-13 06:17
Hi there! Do you use Twitter? I'd like to follow you
if that would be okay. I'm definitely enjoying your
blog and look forward to new updates.

Feel free to visit my webpage: cash from home

Add comment

Security code