Power supply underpowered for Rockpro64, deficient PCIe SATA card, or something else?
#1
Quote:Hi! I have a Rockpro64 NAS-- I bought just about everything listed on the wiki for the setup (https://wiki.pine64.org/wiki/NASCase).

I use two 3.5" Hitachi HDDs connected via the PCIe SATA adapter (bought from Pine store) for my data drive (I use only 1 drive actively-- the other is for backup-- not RAID). The OS (Armbian 21.05.1 Buster with Linux 4.4.213-rockchip64 with OMV) runs on eMMC. The unit, including the 2 internal HDDs, runs on the 12V 5A power supply I bought from Pine store. The HDDs are powered with the "custom power cable" that came with the Pine NAS box.

Every time I try to copy large files (a few hundred MB and larger) to the data HDD in my NAS server, the transfer fails and the filesystem drops to read-only.

Thinking that it could be drive failure, I have cloned (with clonezilla) the data drive two times to try other (new) HDDs but the problem persists. So, this isn't a drive failure issue.

On top of this, when I copy large files to an external HDD with its own power supply that is attached to the NAS via USB (of course, this isn't using the SATA card either since it's using USB), the transfer works perfectly and does not fail.

So, one possibility is that I am not getting enough power to the internal HDDs, which causes the copy to fail and the filesystem to drop to read-only. I have tried different circuits in my house (U.S. so 120V) thinking that maybe one circuit is overtaxed, but I still have the same problem.

I have seen in some other threads (e.g. https://forum.pine64.org/showthread.php?tid=9079) that some folks have not been happy with the PCIe SATA adapter that is offered in the Pine store. Anybody have thoughts on this?

Or does anyone have any other suggestions on what my problem could be?

Can you please advise on what I can do to fix this problem? Do I need to buy a beefier power supply or a different PCIe SATA card?

Thanks in advance.
  Reply
#2
Hi,
  You may try :
- check where the failures come from (with logs and messages of dmesg)
- use  armbian with the 5.10 linux kernel
- test with an ATX PSU (if you have a desktop pc) as an external SATA power
- check temperature of the CPU with "sudo armbianmonitor -M" / install a heat sink on the SATA card if it does not have one
- eventually enable the gen2 overlay
      - "sudo armbian-config"
      - toggle Hardware > pcie-gen2
                   Hardware > spi-spidev

From my part I do not have the pine64 SATA card. Some complained about this cards, but I suppose that some have managed to make it work properly !

good luck.
  Reply
#3
Thank you LMM for the great reply.

Good thought to try it out with a desktop PSU (I should have thought of that!). I tried that first to isolate whether Pine 12V5A PSU might be the issue. Powered by the desktop PSU, I still get that same failures! So I am guessing this is not a power issue after all.

CPU is at ~38°C according to armbianmonitor. I do not currently have a heat sink installed on the SATA card.

I'm not quite ready to reinstall OS with newer kernel (unless there's a way to do without doing a fresh install? I'd have to research).

I will try the gen2 overlay you suggest.

In the meantime, can anyone see from this dmesg output (from right after the failure) if there are any hints as to what is wrong?

Code:
[16242.704653] ata1.00: exception Emask 0x10 SAct 0x7fffff7f SErr 0x400000 action 0x6 frozen
[16242.704661] ata1.00: irq_stat 0x08000000, interface fatal error
[16242.704666] ata1: SError: { Handshk }
[16242.704673] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704682] ata1.00: cmd 61/00:00:00:48:e9/08:00:5b:00:00/40 tag 0 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704687] ata1.00: status: { DRDY }
[16242.704691] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704698] ata1.00: cmd 61/00:08:00:50:e9/08:00:5b:00:00/40 tag 1 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704703] ata1.00: status: { DRDY }
[16242.704707] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704714] ata1.00: cmd 61/00:10:00:58:e9/08:00:5b:00:00/40 tag 2 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704718] ata1.00: status: { DRDY }
[16242.704722] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704729] ata1.00: cmd 61/00:18:00:60:e9/08:00:5b:00:00/40 tag 3 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704733] ata1.00: status: { DRDY }
[16242.704737] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704744] ata1.00: cmd 61/00:20:00:68:e9/08:00:5b:00:00/40 tag 4 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704748] ata1.00: status: { DRDY }
[16242.704752] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704759] ata1.00: cmd 61/00:28:00:70:e9/08:00:5b:00:00/40 tag 5 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704764] ata1.00: status: { DRDY }
[16242.704767] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704774] ata1.00: cmd 61/00:30:00:78:e9/08:00:5b:00:00/40 tag 6 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704778] ata1.00: status: { DRDY }
[16242.704782] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704789] ata1.00: cmd 61/00:40:00:80:e9/08:00:5b:00:00/40 tag 8 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704793] ata1.00: status: { DRDY }
[16242.704797] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704803] ata1.00: cmd 61/00:48:00:88:e9/08:00:5b:00:00/40 tag 9 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704808] ata1.00: status: { DRDY }
[16242.704811] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704818] ata1.00: cmd 61/00:50:00:90:e9/08:00:5b:00:00/40 tag 10 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704822] ata1.00: status: { DRDY }
[16242.704826] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704833] ata1.00: cmd 61/00:58:00:98:e9/08:00:5b:00:00/40 tag 11 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704837] ata1.00: status: { DRDY }
[16242.704841] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704848] ata1.00: cmd 61/00:60:00:b0:e8/08:00:5b:00:00/40 tag 12 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704852] ata1.00: status: { DRDY }
[16242.704855] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704862] ata1.00: cmd 61/00:68:00:b8:e8/08:00:5b:00:00/40 tag 13 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704866] ata1.00: status: { DRDY }
[16242.704870] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704877] ata1.00: cmd 61/00:70:00:c0:e8/08:00:5b:00:00/40 tag 14 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704881] ata1.00: status: { DRDY }
[16242.704884] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704891] ata1.00: cmd 61/00:78:00:c8:e8/08:00:5b:00:00/40 tag 15 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704895] ata1.00: status: { DRDY }
[16242.704899] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704906] ata1.00: cmd 61/00:80:00:d0:e8/08:00:5b:00:00/40 tag 16 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704910] ata1.00: status: { DRDY }
[16242.704913] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704920] ata1.00: cmd 61/00:88:00:d8:e8/08:00:5b:00:00/40 tag 17 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704925] ata1.00: status: { DRDY }
[16242.704928] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704935] ata1.00: cmd 61/00:90:00:e0:e8/08:00:5b:00:00/40 tag 18 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704939] ata1.00: status: { DRDY }
[16242.704942] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704949] ata1.00: cmd 61/00:98:00:e8:e8/08:00:5b:00:00/40 tag 19 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704953] ata1.00: status: { DRDY }
[16242.704957] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704964] ata1.00: cmd 61/00:a0:00:f0:e8/08:00:5b:00:00/40 tag 20 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704968] ata1.00: status: { DRDY }
[16242.704971] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704978] ata1.00: cmd 61/00:a8:00:f8:e8/08:00:5b:00:00/40 tag 21 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704982] ata1.00: status: { DRDY }
[16242.704986] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.704993] ata1.00: cmd 61/00:b0:00:00:e9/08:00:5b:00:00/40 tag 22 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.704997] ata1.00: status: { DRDY }
[16242.705000] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705007] ata1.00: cmd 61/00:b8:00:08:e9/08:00:5b:00:00/40 tag 23 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705011] ata1.00: status: { DRDY }
[16242.705015] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705022] ata1.00: cmd 61/00:c0:00:10:e9/08:00:5b:00:00/40 tag 24 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705026] ata1.00: status: { DRDY }
[16242.705029] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705036] ata1.00: cmd 61/00:c8:00:18:e9/08:00:5b:00:00/40 tag 25 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705040] ata1.00: status: { DRDY }
[16242.705044] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705051] ata1.00: cmd 61/00:d0:00:20:e9/08:00:5b:00:00/40 tag 26 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705055] ata1.00: status: { DRDY }
[16242.705058] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705065] ata1.00: cmd 61/00:d8:00:28:e9/08:00:5b:00:00/40 tag 27 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705069] ata1.00: status: { DRDY }
[16242.705073] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705080] ata1.00: cmd 61/00:e0:00:30:e9/08:00:5b:00:00/40 tag 28 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705084] ata1.00: status: { DRDY }
[16242.705087] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705094] ata1.00: cmd 61/00:e8:00:38:e9/08:00:5b:00:00/40 tag 29 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705098] ata1.00: status: { DRDY }
[16242.705102] ata1.00: failed command: WRITE FPDMA QUEUED
[16242.705109] ata1.00: cmd 61/00:f0:00:40:e9/08:00:5b:00:00/40 tag 30 ncq 1048576 out
                        res 50/00:00:00:98:e9/00:08:5b:00:00/40 Emask 0x10 (ATA bus error)
[16242.705113] ata1.00: status: { DRDY }
[16242.705119] ata1: hard resetting link
[16252.708615] ata1: softreset failed (1st FIS failed)
[16252.708632] ata1: hard resetting link
[16262.708897] ata1: softreset failed (1st FIS failed)
[16262.708916] ata1: hard resetting link
[16297.708770] ata1: softreset failed (1st FIS failed)
[16297.708789] ata1: limiting SATA link speed to 3.0 Gbps
[16297.708795] ata1: hard resetting link
[16302.708802] ata1: softreset failed (1st FIS failed)
[16302.708821] ata1: reset failed, giving up
[16302.708829] ata1.00: disabled
[16302.709006] ata1: EH complete
[16302.709144] sd 0:0:0:0: [sda] tag#12 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.709156] sd 0:0:0:0: [sda] tag#12 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 40 00 00 00 08 00 00 00
[16302.709163] blk_update_request: I/O error, dev sda, sector 1542012928
[16302.709178] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 931135488 size 8388608 starting block 192751872)
[16302.709187] Buffer I/O error on device sda1, logical block 192751360
[16302.709205] Buffer I/O error on device sda1, logical block 192751361
[16302.709211] Buffer I/O error on device sda1, logical block 192751362
[16302.709217] Buffer I/O error on device sda1, logical block 192751363
[16302.709224] Buffer I/O error on device sda1, logical block 192751364
[16302.709230] Buffer I/O error on device sda1, logical block 192751365
[16302.709236] Buffer I/O error on device sda1, logical block 192751366
[16302.709242] Buffer I/O error on device sda1, logical block 192751367
[16302.709248] Buffer I/O error on device sda1, logical block 192751368
[16302.709254] Buffer I/O error on device sda1, logical block 192751369
[16302.709263] sd 0:0:0:0: [sda] tag#24 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.709283] sd 0:0:0:0: [sda] tag#24 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e8 e0 00 00 00 08 00 00 00
[16302.709365] blk_update_request: I/O error, dev sda, sector 1541988352
[16302.709410] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 922746880 size 4194304 starting block 192748800)
[16302.710175] sd 0:0:0:0: [sda] tag#13 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.710187] sd 0:0:0:0: [sda] tag#13 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 38 00 00 00 08 00 00 00
[16302.710193] blk_update_request: I/O error, dev sda, sector 1542010880
[16302.710206] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 931135488 size 8388608 starting block 192751616)
[16302.710624] sd 0:0:0:0: [sda] tag#25 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.710628] sd 0:0:0:0: [sda] tag#12 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.710638] sd 0:0:0:0: [sda] tag#12 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 a8 00 00 00 08 00 00 00
[16302.710647] blk_update_request: I/O error, dev sda, sector 1542039552
[16302.710657] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 947912704 size 8388608 starting block 192755200)
[16302.710690] sd 0:0:0:0: [sda] tag#25 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e8 d8 00 00 00 08 00 00 00
[16302.710709] blk_update_request: I/O error, dev sda, sector 1541986304
[16302.710748] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 922746880 size 4194304 starting block 192748544)
[16302.710878] sd 0:0:0:0: [sda] tag#14 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.710888] sd 0:0:0:0: [sda] tag#14 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 30 00 00 00 08 00 00 00
[16302.710894] blk_update_request: I/O error, dev sda, sector 1542008832
[16302.710906] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 931135488 size 8388608 starting block 192751360)
[16302.711665] sd 0:0:0:0: [sda] tag#24 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.711683] sd 0:0:0:0: [sda] tag#24 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 b8 00 00 00 08 00 00 00
[16302.711690] blk_update_request: I/O error, dev sda, sector 1542043648
[16302.711702] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 947912704 size 8388608 starting block 192755712)
[16302.711952] sd 0:0:0:0: [sda] tag#26 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.711977] sd 0:0:0:0: [sda] tag#15 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.711982] sd 0:0:0:0: [sda] tag#26 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e8 d0 00 00 00 08 00 00 00
[16302.711997] blk_update_request: I/O error, dev sda, sector 1541984256
[16302.712008] sd 0:0:0:0: [sda] tag#15 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 28 00 00 00 08 00 00 00
[16302.712018] blk_update_request: I/O error, dev sda, sector 1542006784
[16302.712029] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 931135488 size 8388608 starting block 192751104)
[16302.712043] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 922746880 size 4194304 starting block 192748288)
[16302.712372] sd 0:0:0:0: [sda] tag#25 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[16302.712385] sd 0:0:0:0: [sda] tag#25 CDB: opcode=0x8a 8a 00 00 00 00 00 5b e9 c0 00 00 00 08 00 00 00
[16302.712392] blk_update_request: I/O error, dev sda, sector 1542045696
[16302.712406] EXT4-fs warning (device sda1): ext4_end_bio:330: I/O error -5 writing to inode 171186174 (offset 947912704 size 8388608 starting block 192755968)
[16302.741874] EXT4-fs error (device sda1): ext4_wait_block_bitmap:523: comm kworker/u12:1: Cannot read block bitmap - block_group = 5883, block_bitmap = 192413707
[16302.741904] JBD2: Detected IO errors while flushing file data on sda1-8
[16302.742065] Buffer I/O error on dev sda1, logical block 0, lost sync page write
[16302.742137] EXT4-fs (sda1): Delayed block allocation failed for inode 171186174 at logical offset 251904 with max blocks 1024 with error 5
[16302.742142] EXT4-fs (sda1): This should not happen!! Data will be lost

[16302.743857] Aborting journal on device sda1-8.
[16302.743890] EXT4-fs (sda1): previous I/O error to superblock detected
[16302.743923] Buffer I/O error on dev sda1, logical block 365985792, lost sync page write
[16302.743955] JBD2: Error -5 detected when updating journal superblock for sda1-8.
[16302.743984] Buffer I/O error on dev sda1, logical block 0, lost sync page write
[16302.744069] EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal
[16302.744079] EXT4-fs (sda1): Remounting filesystem read-only
[16302.744084] EXT4-fs (sda1): previous I/O error to superblock detected
[16302.744118] Buffer I/O error on dev sda1, logical block 0, lost sync page write
[16302.744158] EXT4-fs (sda1): ext4_writepages: jbd2_start: 1024 pages, ino 171186174; err -30
[16302.744175] EXT4-fs (sda1): I/O error while writing superblock
[16302.744193] EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal
[16302.758539] JBD2: Detected IO errors while flushing file data on sda1-8
  Reply
#4
Enabling gen2 overlay and spi-spidev doesn't seem to have done any good in this case-- I am still having the issue  Undecided
  Reply
#5
As you can see from the numerous reports, PINE's SATA-Card is not of good quality.
(I do not say that all products are of low quality, but it seems that there are many problematic products with "SATA-Card: ASM1061")

Try limiting it to SATA-3(6.0GBPS) -> SATA-2(3.0GBPS).
  # > kernel boot-param: libata.force=3.0Gbps
I have multiple "SATA-Card: ASM1061", but they have many errors similar to the one you pointed out, and I couldn't get normal operation without the above settings.
(* There is no error in the read operation, and at first glance it seems that it is working correctly, but when I perform a large number of write operations, an error occurs)

---
* PCIE-GEN2(5.0G)/GEN1(2.5G) and SATA-3(6.0G)/SATA-2(3.0G)

If the target is an HDD, any of the above settings will have little effect on performance.
In the case of PINE's "SATA-Card", it is effective to set a slower speed setting to get a lot of margin.

(The same board as PINE's SATA-Card is also sold on Amazon.
Therefore, I think that this Card is not designed by PINE itself, but sells some OEM products.)
  Reply
#6
Thank you for chiming in t4_4t.

Incidentally, I just recently found in another thread (https://forum.pine64.org/showthread.php?...9#pid80999) where someone had success by changing that libata.force parameter to 1.5G, so I tried that (I hope I did it right-- I went into armbian-config and edited the boot envs there). Still no dice-- it keeps failing! Out of curiosity I also dialed it down to 0.5G, and it still failed on me.

Sounds like the dmesg output above indicates to you that the SATA card is unreliable?

Same as you describe with my setup-- reads are no problem at all, but lots of writes and things go haywire. Though I have the ASM1062 version of the card.
  Reply
#7
You can use "dmesg" to determine if "kernel param" is working properly.
The kernel I'm using is different from "Armbian", but see below for a comparison.

# kernel param: libata.force=6.0Gbps # or "kernel param": none
Code:
[    2.853814] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.880750] ata1.00: ATA-8: TOSHIBA MQ01ABD100, AX1P2A, max UDMA/100
[    2.880754] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    2.882527] ata1.00: configured for UDMA/100
[    2.883274] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MQ01ABD1 2A   PQ: 0 ANSI: 5
[    2.894956] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    2.894960] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.895075] sd 0:0:0:0: [sda] Write Protect is off
[    2.895081] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.895130] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.109635]  sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15 sda16 >
[    3.136205] sd 0:0:0:0: [sda] Attached SCSI disk


# kernel param: libata.force=3.0Gbps
Code:
[    2.365367] ata1: FORCE: PHY spd limit set to 3.0Gbps
[    2.365838] ata1: SATA max UDMA/133 abar m512@0xfa010000 port 0xfa010100 irq 243
[    2.366498] ata2: FORCE: PHY spd limit set to 3.0Gbps
[    2.366953] ata2: SATA max UDMA/133 abar m512@0xfa010000 port 0xfa010180 irq 243
...
[    2.830294] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[    2.862941] ata1.00: ATA-8: TOSHIBA MQ01ABD100, AX1P2A, max UDMA/100
[    2.862945] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    2.864633] ata1.00: configured for UDMA/100
[    2.865399] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MQ01ABD1 2A   PQ: 0 ANSI: 5
[    2.876828] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    2.876832] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.876960] sd 0:0:0:0: [sda] Write Protect is off
[    2.876966] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.877022] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.091710]  sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13 sda14 sda15 sda16 >
[    3.101514] sd 0:0:0:0: [sda] Attached SCSI disk


If your settings are working as expected and you still can't see any improvements ...
  There is also "force to PCIE-GEN1", but I don't think it's likely to improve.
If all you can think of doesn't work, unfortunately you have to give up.

In my opinion, "PINE's SATA-Card" is a card of that degree after all.

A similar problem occurred when I installed this "SATA-Card" on a standard "x86-Base PC".
Therefore, it is not a problem limited to Arm-based SBC.
I think the quality of this card itself is poor.

--- Addition ---
ASM1061 vs ASM1062

# lspci
Code:
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 0024
01:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

It's just a matter of recognition.
The above "SATA-Card" was purchased from "PINE-Store" and the Chip stamp is "ASM1061".
But, "lspci" reports "ASM1062" as mentioned above.
  Reply
#8
This is great t4_4t-- thanks for that tip about checking dmesg to see if the kernel params "took". Turns out I had been using the wrong syntax.

In arbian-config, after going to System --> Boot envs, I added the line

Code:
extraargs=libata.force=1.5G

(no quotes or anything-- just exactly like that), which apparently edits the /boot/armbianEnv.txt file (found these details at https://forum.armbian.com/topic/13457-ke...arameters/). After saving and restarting, dmesg shows

Code:
daffy@rockpro64:~$ dmesg | grep limit
[    3.163820] ata1: FORCE: PHY spd limit set to 1.5Gbps
[    3.163836] ata2: FORCE: PHY spd limit set to 1.5Gbps

"$ cat /proc/cmdline" now also shows that the libata.force param was applied at boot.

This is amazing! I am writing big files to my data drive and it is not failing for the first time in months! Thanks again so much.
  Reply
#9
Congratulations on the improvement.

As you can see from your case and the case of me and others, this card has almost no margin.

If you are planning long-term operation, it is better to take measures such as "put a heat sink on the chip" and "use a high quality SATA cable" as others have pointed out.

(Even if it looks okay now, we don't know what will happen to it's in the casing & summer when the temperature is expected to rise)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  irradium (based on crux linux) RockPro64 riscv64, aarch64 mara 7 1,883 11-20-2024, 03:53 PM
Last Post: mara
  New OS for RockPro64 is here, TwisterOS Armbian jtremblant 92 106,110 08-17-2024, 02:32 PM
Last Post: taltamir
  OpenEuler OS on RockPro64 Yuriy Gavrilov 0 289 06-15-2024, 09:38 AM
Last Post: Yuriy Gavrilov
  RK3399 PCIe enumeration jhadd 0 523 01-31-2024, 08:56 AM
Last Post: jhadd
  yocto for RockPro64 Fide 1 1,114 01-16-2024, 10:01 AM
Last Post: Fide
  Installing Ubuntu Server on RockPro64 deutschlmao 2 3,482 10-29-2023, 04:43 PM
Last Post: brotherj4mes
  Vanilla mainline Debian 11 (Bullseye) on the RockPro64 Pete Tandy 22 21,331 08-16-2023, 01:34 AM
Last Post: varac
  slarm64 (unofficial slackware) ROCKPro64 RK3399 (aarch64) mara 54 93,021 08-11-2023, 11:13 AM
Last Post: mara
  How to enable CoreSight ETM trace on RockPro64 shpark 0 865 05-21-2023, 11:34 PM
Last Post: shpark
  Rockpro64 Dead on arrival? quixoticgeek 1 1,371 03-12-2023, 06:55 PM
Last Post: quixoticgeek

Forum Jump:


Users browsing this thread: 1 Guest(s)