...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 #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.
0 #79 Guest 2015-07-30 09:55
The internet is usually a great way to learn about other people's
experiences with different sites.

www.arsenalschoolmorocco.com www.arsenalschoolmorocco.com list of fast food
near me
0 #78 Guest 2015-07-28 03:01
If you've got difficulty signing in to or contacting Yahoo.

bt yahoo login yahoo.com
0 #77 Guest 2015-07-28 01:45
I like what you guys are usually up too. Such clever work and coverage!
Keep up the very good works guys I've you guys to my own blogroll.

My webpage online empire maker
0 #76 Guest 2015-07-27 09:50
In this type of case, to safeguard its servers from automated queries, att.net yahoo login, ttlink.com, can deny you
access, presenting you with the "Error 999" page instead.
0 #75 Guest 2015-07-27 02:18
In addition, making use of a webhosting server allows you to have the liberty of allowing your material to be seen on the Internet.

Also visit my blog post web
hosting services india
0 #74 Guest 2015-07-27 02:04
It guarantees a 99.9 % uptime, totally free domain, unlimited disk
space and information transfer.

Check out my blog :: web
hosting companies in california
0 #73 Guest 2015-07-27 00:28
Pair is a great host for website jobs that seek to scale in traffic, as their support for
greater efficiency hosting is high quality.

Feel free to surf to my web page; web hosting talk
0 #72 Guest 2015-07-26 20:49
You get unrestricted disk storage, domain hosting, e-mail support, free site scripts,
e-commerce and multimedia functions and more.

Here is my weblog ... web hosting free domain name
0 #71 Guest 2015-07-26 19:30
The majority of webhosting providers state that you are responsible for backing up your very own content.

My blog post - web hosting free trial
0 #70 Guest 2015-07-26 12:04
So no matter how big or little your requirements may be,
we make sure to have a hosting solution for you.

Take a look at my weblog :: web
hosting free google
0 #69 Guest 2015-07-26 11:29
This suggests that you can utilize and enjoy our
hosting services whether you're a home user, a huge enterprise or a little business.

Also visit my page: web hosting services for small
0 #68 Guest 2015-07-26 08:25
After fill out the hosting type they will inquire about your payment treatment under
Enter Your Billing Information" area.

My web blog - web hosting services comparison
0 #67 Guest 2015-07-26 07:13
A few vendors provide an emerging kind of shared hosting, occasionally called grid hosting.

Here is my webpage; web hosting free no ads
0 #66 Guest 2015-07-26 06:19
I am a sole proprieter web designer for micro-sized business,
with experience as a president of a big non-profit.

My web-site :: web hosting services
0 #65 Guest 2015-07-26 06:04
In Pakistan and India, Beginners do unknown that where they can purchase trustworthy and real hosting.

Visit my web site - web hosting companies in orlando
0 #64 Guest 2015-07-26 05:54
Right here using part of hard disk drive disk area and bandwidth which is allotted to you by hosting provider.

My homepage: web hosting services
0 #63 Guest 2015-07-26 05:14
After Chosen your hosting plan, Now it's time to submit hosting account type to make your
transaction possible.

Feel free to visit my web page web
hosting companies list
0 #62 Guest 2015-07-25 17:41
DreamHost DreamHost offers totally free hosting for nonprofits, a really easy-to-use control panel, and uncomplicated setup of
typical software application.

My web site web hosting companies free
0 #61 Guest 2015-07-25 16:48
I love looking through a post that will make men and women think.
Also, thanks for allowing me to comment!

Also visit my website traffic with anthony

Add comment

Security code