Dealing with an ATA error

-1

my Xubuntu 16.04. produces a non-stop ATA error message. Here is the output of dmesg

[ 4547.943159] ata7: hard resetting link
[ 4548.657810] ata7: SATA link down (SStatus 0 SControl 300)
[ 4548.657824] ata7: EH complete
[ 4548.757449] ata7: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
[ 4548.757455] ata7: irq_stat 0x00000040, connection status changed
[ 4548.757459] ata7: SError: { DevExch }
[ 4548.757467] ata7: hard resetting link
[ 4549.469969] ata7: SATA link down (SStatus 0 SControl 300)
[ 4549.469983] ata7: EH complete
[ 4550.363622] ata7: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen
[ 4550.363628] ata7: irq_stat 0x00000040, connection status changed
[ 4550.363632] ata7: SError: { DevExch }
[ 4550.363642] ata7: hard resetting link

This error runs continuously.

Information about my system:

I have two hard disks and a DVD

# lsscsi
[0:0:0:0]    disk    ATA      MAXTOR STM325082 E     /dev/sda 
[0:0:1:0]    cd/dvd  TSSTcorp CDDVDW SH-S223B  SB02  /dev/sr0 
[1:0:0:0]    disk    ATA      SAMSUNG HD320KJ  0-10  /dev/sdb 

And the ata ports for the hard disks are following

/sys/bus/pci/devices/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
/sys/bus/pci/devices/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb

A complete list of ata ports is

 # ls -l /sys/class/ata_port
 ata1 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1
 ata2 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2
 ata3 -> ../../devices/pci0000:00/0000:00:1f.5/ata3/ata_port/ata3
 ata4 -> ../../devices/pci0000:00/0000:00:1f.5/ata4/ata_port/ata4
 ata5 -> ../../devices/pci0000:00/0000:00:1c.6/0000:03:00.1/ata5/ata_port/ata5
 ata6 -> ../../devices/pci0000:00/0000:00:1c.6/0000:03:00.1/ata6/ata_port/ata6
 ata7 -> ../../devices/pci0000:00/0000:00:1c.6/0000:03:00.0/ata7/ata_port/ata7

And the devices

# ls -l /sys/dev/block
11:0 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:1/0:0:1:0/block/sr0
7:0 -> ../../devices/virtual/block/loop0
7:1 -> ../../devices/virtual/block/loop1
7:2 -> ../../devices/virtual/block/loop2
7:3 -> ../../devices/virtual/block/loop3
7:4 -> ../../devices/virtual/block/loop4
7:5 -> ../../devices/virtual/block/loop5
7:6 -> ../../devices/virtual/block/loop6
7:7 -> ../../devices/virtual/block/loop7
8:0 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
8:1 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1
8:16 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb
8:17 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1
8:18 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb2
8:19 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb3
8:20 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb4
8:21 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb5
8:22 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb6

Finally the partitions:

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop1    7:1    0    55M  1 loop /snap/core18/1754
sdb      8:16   0 298.1G  0 disk 
├─sdb4   8:20   0     1K  0 part 
├─sdb2   8:18   0  46.6G  0 part /
├─sdb5   8:21   0 124.6G  0 part /home
├─sdb3   8:19   0   7.9G  0 part [SWAP]
├─sdb1   8:17   0 599.9M  0 part /boot
└─sdb6   8:22   0 118.2G  0 part 
loop4    7:4    0   291M  1 loop /snap/vlc/1620
sr0     11:0    1  1024M  0 rom  
loop2    7:2    0    97M  1 loop /snap/core/9289
loop0    7:0    0    55M  1 loop /snap/core18/1705
sda      8:0    0 232.9G  0 disk 
└─sda1   8:1    0   197G  0 part 
loop5    7:5    0  96.5M  1 loop /snap/core/9436
loop3    7:3    0 290.4M  1 loop /snap/vlc/1700

Question:

How can I solve this error?

Any possible help that helps to solve it is also appreciated, for example, what is this ata7 problematic port? From all the data that I have gathered it seems it does not correspond to any physical disk nor any partition.

linux
ubuntu
hard-drive
partition
sata
asked on Server Fault Jun 26, 2020 by loved.by.Jesus

1 Answer

2

How can I solve this error?

Replace the harddrive, because it is obviously doing ATA resets. This is (in almost all cases) a sign of electronics at near death or a nagging loose contact.

Maybe it's the SATA/SAS cable (or connector), so you can check/exchange that first. But in most cases I have seen the recent years it was the drive (electronics) itself.

I could also replace the whole computer

Yes, that would fix it, too. Sounds a bit radical and expensive in time and money to me, but that would most definately fix it.

could you explain why should I replace the hard drive

Because it's defect. Healthy drives don't play the on|off game.

[...] not try to solve the problem in another more gently way?

There are indeed some options avaible. You can always boot (and maybe work) from a USB stick. You can put a new HDD alongside the defect one (and ignore it) or just don't use this computer anymore. But none of those will fix a broken drive.

Hint: It is almost never a real option to fix hardware issues in software or "other gentle ways".

answered on Server Fault Jul 5, 2020 by bjoster

User contributions licensed under CC BY-SA 3.0