mdadm RAID6 causing SATA errors

Type: Self-Compiled Firmware
SDK Package Name: rk3588_linux_bsp_release_20221012_v1.0.2a.xml
Modification Content: Added
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_DM_RAID=y
config
Log: dmesg.zip

I have 4 HDDs connected via the included SATA cables:

# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    0  10.9T  0 disk
sdb            8:16   0  10.9T  0 disk
sdc            8:32   0  10.9T  0 disk
sdd            8:48   0  10.9T  0 disk

I ran the long SMART test on all drives and no errors were detected.
After creating a RAID array using

mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd

The initial resync begins, but gets stuck after a few seconds.
dmesg logs are available here: https://paste.debian.net/hidden/b161164f/

Is this a problem with your SATA cables or the on-board SATA controller? Or maybe a software issue?
I will attempt switching out the cables later today to see if anything changes

Both the board and the drives are powered using an external ATX PSU, so I doubt its a power issue.

Note: last commit in the kernel directory is a95cf55eb5292c66c62fef90bd8d4abb5d776d17
Latest bundle I applied is v1.0.4a

tchip_askquestions
dmesg.zip (2.14 KB)

Adding a PCIe SATA controller and connecting the drives to it worked, seems like the one on-board is not suited for RAID.

Hey there,

i did the same with BTRFS-Raid and got similar errors like netthier. Would be nice if someone dig into the kernel source to fix this.

Greeting,
NoDiskNoFun

I can recreate this issue by writing to multiple sata drives at the same time, which means this isn’t raid or btrfs-raid related and is instead is likely an issue with the sata port multiplier.
Example using dcfldd https://linux.die.net/man/1/dcfldd

sudo dcfldd if=/dev/urandom of=/dev/sda1 of=/dev/sdb1 count=100000

Which freezes after transferring ~1.5GB of data.
The kernel shows the following errors

[  230.178075] ata1.00: failed to read SCR 1 (Emask=0x40)
[  230.178204] ata1.01: failed to read SCR 1 (Emask=0x40)
[  230.178251] ata1.02: failed to read SCR 1 (Emask=0x40)
[  230.178289] ata1.03: failed to read SCR 1 (Emask=0x40)
[  230.178335] ata1.04: failed to read SCR 1 (Emask=0x40)
[  230.178370] ata1.05: failed to read SCR 1 (Emask=0x40)
[  230.178406] ata1.06: failed to read SCR 1 (Emask=0x40)
[  230.178441] ata1.07: failed to read SCR 1 (Emask=0x40)
[  230.178476] ata1.08: failed to read SCR 1 (Emask=0x40)
[  230.178510] ata1.09: failed to read SCR 1 (Emask=0x40)
[  230.178544] ata1.10: failed to read SCR 1 (Emask=0x40)
[  230.178576] ata1.11: failed to read SCR 1 (Emask=0x40)
[  230.178609] ata1.12: failed to read SCR 1 (Emask=0x40)
[  230.178642] ata1.13: failed to read SCR 1 (Emask=0x40)
[  230.178675] ata1.14: failed to read SCR 1 (Emask=0x40)
[  230.178731] ata1.01: exception Emask 0x100 SAct 0x1100000 SErr 0x0 action 0x6 frozen
[  230.178774] ata1.01: failed command: WRITE FPDMA QUEUED
[  230.178838] ata1.01: cmd 61/40:a0:00:08:00/05:00:00:00:00/40 tag 20 ncq dma 688128 out
[  230.178838]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  230.178878] ata1.01: status: { DRDY }
[  230.178910] ata1.01: failed command: WRITE FPDMA QUEUED
[  230.178969] ata1.01: cmd 61/40:c0:40:0d:00/05:00:00:00:00/40 tag 24 ncq dma 688128 out
[  230.178969]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  230.179002] ata1.01: status: { DRDY }
[  230.179039] ata1.03: exception Emask 0x100 SAct 0xfeefffff SErr 0x0 action 0x6 frozen

Disabling FBS/FIS fixes this issue by instead defaulting to CBS
But this is not a great workaround since CBS is super slow. CBS means the host can only do a transaction to one device at a time, whereas FBS lets the host interleave transactions between each device on the port multiplier.

To disable FBS, and get functional sata ports, comment out the following in drivers/ata/ahci_platform.c

	if (of_device_is_compatible(dev->of_node, "rockchip,rk-ahci"))
		hpriv->flags |= AHCI_HFLAG_YES_FBS;

Hi everyone. I had the same problem on four 3588ITX boards. They worked very unstable with SATA drivers. The problem was with firmware of JMB575. After flashing EEPROM next to JMB575 with working firmware everything is ok now.

How did you check and upgrade the firmware?

There is wrong fw of the SATA eeprom. You can unsolder EEPROM, flash it with this fw and solder back
sata_adapter_EN25F40.zip (8.62 KB)

These can indicate drive failures, cable issues, Skribbl IO or SATA controller problems.

Sprunki is more than just a game—it’s a creative outlet that blends music, art, and community.

Eaglecraft is a sandbox game based on the Minecraft concept, allowing players to explore, build, and survive in a blocky 3D world. The game is primarily played in a browser, making it convenient for users whttps://eaglercraftminecraft.github.io/ho do not want to download software.

Eaglecraft is a sandbox game based on the Minecraft concept, allowing players to explore, build, and survive in a blocky 3D world. The game is primarily played in a browser, making it convenient for users who do not want to download software. eaglercraft

Eaglecraft là một trò chơi sandbox dựa trên khái niệm Minecraft, cho phép người chơi khám phá, xây dựng và sinh tồn trong thế giới 3D dạng khối. Trò chơi chủ yếu được chơi trên trình duyệt, tạo sự thuận tiện cho những người dùng không muốn tải xuống phần mềm.

Clicking like instantly—this is fantastic. Good luck on your exam! Here are the free Valid test cram COF-C02 sheet file resources.

I’m amazed by the depth of your article, thank you for sharing! Using the DEP-2025 reliable braindumps questions, I achieved a promotion and salary boost. It’s free for everyone now. Wishing you all success in your career paths!