Trouble

SATA trouble

32 20455
633kd4d  
I have  a 2.5 inch SATA drive that works fine on other machines, but when I connect it to the Bpi running Lubuntu I get a tremendous number of errors.
[    6.832722] ata1: link is slow to respond, please be patient (ready=0)
[   11.460598] ata1: COMRESET failed (errno=-16)
[   11.831630] ata1: SATA link down (SStatus 0 SControl 300)
[   11.870317] ata1: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
[   11.882721] ata1: irq_stat 0x00000040, connection status changed
[   11.892153] ata1: SError: { CommWake DevExch }
[   11.899259] ata1: hard resetting link
[   14.172886] ata1: COMRESET failed (errno=-32)
[   14.181937] ata1: reset failed (errno=-32), retrying in 8 secs


I figured the drive might require too much power, so I gave it it's own supply. Now when I boot, I just get:
[    1.383981] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 88

[    1.748442] ata1: SATA link down (SStatus 0 SControl 300)


and then nothing afterwards. Telling the kernel to re-scan the bus after booting results in the exact same thing. I'm using the same cable and power supply that I use when connecting it to other machines, so I know those are good.


Has anyone seen anything similar? It looks like it sees the drive, but I've no idea why it doesn't connect.
"I'm using the same cable and power supply that I use when connecting it to other machines"??? What is the other machines?

633kd4d  
Reply 2# tony_zhang


   I've connected it to a generic (old) x86 linux box that I've had around for several years running Debian, as well as an Ubuntu emulator on my Mac using a USB adapter http://www.newertech.com/products/usb3_universaldriveadap.php.
I had no errors, and even ran fsck on it.

633kd4d  
Tested with a different drive, and Raspian as well. Same results.

cyryllo  
Post Last Edited by cyryllo at 2014-8-11 16:19

Post Last Edited by cyryllo at 2014-8-11 13:56

I have a similar problem with SSD drive. Gets the same message
  1. ata1: hard resetting link
  2. [  174.783413] ata1: SATA link down (SStatus 0 SControl 300)
  3. [  174.785368] ata1: EH complete
Copy the Code
I Use Raspbian
On other computers hard drive it works fine.
Edit:

I found the reason. Power connector for a disk there is no tension. I checked with a multimeter and there is no tension.
With an external power supply sees the drive. So I bought a damaged Banana Pi :/

eDIT2:

My mistake.

I have connected the power supply to the USB OTG because there was no power to the drive connectors

nealwon  
maybe your power is 5V 1A  right?
try 5V 2A!

MrK1982  
Post Last Edited by MrK1982 at 2014-8-22 09:10

Hello everybody!
Well, I've brought up my time (last 3 hours) with searching in forums for useable solutions for that kind of Problem. First of all: I haven't found even one...
633kd4d wrote:
I have  a 2.5 inch SATA drive that works fine on other machines [...]


I tried three different hard-drives, all of them working fine in other devices! All of them show the same behaviour!
Everything seems to be fine after pi start-up is done. There is a quiet spinning sound of the disk, which tells me that the drive has powered up.
But at the moment, when I try to mount the drive to a mount point (mount -t ext4 -o rw /dev/sda1 /media/hdd) the hard drives rotation stops without any delay! After a break less than a second, the drive spins up again just to stop again a few seconds later. This sequence repeats more or less up to 20 times. Sometimes the drive becomes accessible after that. On any file operation I try to start, this nasty start/stop sequence begins again and again.

I also get this tremendous number of errors, so I just post a cut out of them:

  1. [  655.469287] ata1.00: exception Emask 0x10 SAct 0x10000 SErr 0x10300 action 0xe frozen
  2. [  655.488218] ata1.00: irq_stat 0x08400000, interface fatal error, PHY RDY changed
  3. [  655.504611] ata1: SError: { UnrecovData Persist PHYRdyChg }
  4. [  655.519608] ata1.00: failed command: READ FPDMA QUEUED
  5. [  655.542530] ata1.00: cmd 60/08:80:18:08:00/00:00:00:00:00/40 tag 16 ncq 4096 in
  6. [  655.542544]          res 40/00:80:18:08:00/00:00:00:00:00/40 Emask 0x10 (ATA bus error)
  7. [  655.574733] ata1.00: status: { DRDY }
  8. [  655.585467] ata1: hard resetting link
  9. [  658.207723] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  10. [  658.249534] ata1.00: configured for UDMA/33
  11. [  658.260512] ata1: EH complete
  12. [  658.307984] ata1.00: exception Emask 0x10 SAct 0x4 SErr 0x10200 action 0xe frozen
  13. [  658.324750] ata1.00: irq_stat 0x00400000, PHY RDY changed
  14. [  658.338210] ata1: SError: { Persist PHYRdyChg }
  15. [  658.358914] ata1.00: failed command: READ FPDMA QUEUED
  16. [  658.381407] ata1.00: cmd 60/08:10:98:08:00/00:00:00:00:00/40 tag 2 ncq 4096 in
  17. [  658.381424]          res 40/00:08:90:08:00/00:00:00:00:00/40 Emask 0x10 (ATA bus error)
  18. [  658.408949] ata1.00: status: { DRDY }
  19. [  658.420650] ata1: hard resetting link
  20. [  660.983035] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  21. [  661.067832] ata1.00: configured for UDMA/33
  22. [  661.083352] ata1: EH complete
  23. [  661.126776] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe frozen
  24. [  661.147120] ata1: irq_stat 0x00400000, PHY RDY changed
  25. [  661.160204] ata1: SError: { Persist PHYRdyChg }
  26. [  661.172735] ata1: hard resetting link
  27. [  663.728134] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  28. [  663.790890] ata1.00: configured for UDMA/33
  29. [  663.803141] ata1: EH complete
  30. [  663.837153] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe frozen
  31. [  663.853486] ata1: irq_stat 0x00400000, PHY RDY changed
  32. [  663.866826] ata1: SError: { Persist PHYRdyChg }
  33. [  663.879315] ata1: hard resetting link
  34. [  666.558288] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  35. [  666.611165] ata1.00: configured for UDMA/33
  36. [  666.622682] ata1: EH complete
  37. [  666.872910] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
  38. [  682.597016] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe frozen
  39. [  682.613191] ata1: irq_stat 0x00400000, PHY RDY changed
  40. [  682.626311] ata1: SError: { Persist PHYRdyChg }
  41. [  682.638766] ata1: hard resetting link
  42. [  685.259560] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  43. [  685.289168] ata1.00: configured for UDMA/33
  44. [  685.300006] ata1: EH complete
  45. [  862.707780] ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe frozen
  46. [  862.729250] ata1.00: irq_stat 0x00400000, PHY RDY changed
  47. [  862.742573] ata1: SError: { Persist PHYRdyChg }
  48. [  862.756339] ata1.00: failed command: FLUSH CACHE EXT
  49. [  862.777760] ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 7
  50. [  862.777771]          res 40/00:30:b0:0a:04/00:00:1c:00:00/40 Emask 0x10 (ATA bus error)
  51. [  862.807060] ata1.00: status: { DRDY }
  52. [  862.817743] ata1: hard resetting link
  53. [  865.441938] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
  54. [  865.468289] ata1.00: configured for UDMA/33
  55. [  865.481650] ata1.00: retrying FLUSH 0xea Emask 0x10
  56. [  865.497817] ata1: EH complete
Copy the Code
My bpi is running on the latest bananian release:

  1. mrk@thor:~# cat /proc/version
Copy the Code
Tells me:

  1. Linux version 3.4.90 (bananapi@lemaker) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #1 SMP PREEMPT Wed Jul 2 15:10:20 CST 2014
Copy the Code
By the way a power supply with only 5W is not enough to spin up a hard drive plus the banana-pi! I haven't even try to do so. The power supply which I am using is able to deliver upto 12W. This means a peak current of 2.4 Ampere. That should be really enough!

(ATA bus error)
ata1.00: configured for UDMA/33


Seems to be a data transmission issue.The data cable is not reliably transferring data from the hdd to the controller.So the controller tries to reduce the transmission speed to udma33 for more reliability.

See if a different sata cable helps(the one with a clip would be better).

Apart from that you could try a different os,a different filesystem like ext3 or even a different power supply(or power the drive externally).

Guesswork really,but you must try as many options as you can before giving up.

MrK1982  
Actually I'm not at home to test it ... I'm going to change the cable for testing purposes on monday but I'm not sure it is a cable related issue. Today the drive has build up a connection with UDMA/133 but the spin up/down procedure seems to be persistent. I can check this remotely by:

  1. smartctl -A /dev/sda | grep -E "(Load_Cycle_Count|ID)"
Copy the Code
This command shows up the hdd's load cycle count which gives me a marker how often the disk went to its sleep state.

  1. #               ID   Attribute_Name   FLAG   Value   Worst   Thresh   Type   Updated When failed   RAW-Value
  2. #First run:
  3.                  193   Load_Cycle_Count   0x0032   098   000   Old_age   Always   -   4235
  4. #Second run (a few turns later)
  5.                  ... .... .... ... ... ... ... - 4244
  6. #Third one
  7.                  ... ... ... ... ... ... ... - 4257
Copy the Code
and so on ...
I have stopped swapping to this drive now and unmounted it so the drive must not stand this over weekend ...

By the way there is a know problem in debian 7 based systems related to this but until now it seems to be known with western digital hdds only. Mine is a seagate drive and connected to a x86 System running debian this problem doesn't occure.

pieter  
Dear Colleagues,

I noticed the same output with dmesg as MrK1982 - bananian on a banana pi with a blue western digital 1 TB disk on the sata port.  Sometimes it works fine, but when it starts to issue errors, both the log and the scsi subsystem take all CPU power - and the disk becomes non accessible.

Any advice is very welcome.

Kind regards,
Pieter

You have to log in before you can reply Login | Sign Up

Points Rules