Cannot assemble raid mdadm

Hi all! I’m a new buyer of this amazing board. In these days i’m trying to build the nas but i’m in trouble with the configuration of mdadm.

Looking the wiki, i’ve fixed the Jmicron issue and i’ve installed OMV5. For now i’m using 3 disks (500gb hdd, 240 ssd, 120 ssd) until the other 1Tb disk arrive.

I’ve formatted all my disks with fdisk and i’ve changed the partition type in Linux Raid. For creating mdadm raid0 array i wrote:

$:> echo 1 > /sys/module/raid0/parameters/default_layout
$:> mdadm --create /dev/md0 --level=stripe --raid-devices=3 /dev/sd[a-c]1
$:> mkfs.ext4 /dev/md0
$:> sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
$:> echo '/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab
$:> mount -a

it seems work because with lsblk i see that the mount point is correct in /mnt/md0 but when i try to write something in this folder (after permission change) i receive a input/output error and the in lsblk all disks disappear. If i reboot the raid assembling fail. Someone can help me?
Thank you :slight_smile:

1 Like

Digging on google i think that the problem maybe could be this (dmesg output):

[   14.263204] md/raid0:md0: cannot assemble multi-zone RAID0 with default_layout setting
[   14.263210] md/raid0: please set raid0.default_layout to 1 or 2
[   14.263215] md: pers->run() failed ...

i try to set 1 the raid0.default_layout but it changes at reboot. Maybe i try with a ExecPostScript in systemd rockpi-sata service.

EDIT: still not working, i receive after mount in /mnt/md0 an I/O error and the disks disapperar from lsblk

[   64.428806] md0: Warning: Device sda1 is misaligned
[   64.428876] md0: detected capacity change from 0 to 739827515392
[   64.680819] EXT4-fs (md0): recovery complete
[   64.680829] EXT4-fs (md0): mounting with "discard" option, but the device does not support discard
[   64.680835] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: discard
[   67.690706] xhci_hcd 0000:01:00.0: WARN Successful completion on short TX
[   67.692357] xhci_hcd 0000:01:00.0: ERROR Transfer event for unknown stream ring slot 2 ep 7
[   67.692375] xhci_hcd 0000:01:00.0: @000000011ed0b010 00000000 00000000 05000000 02088001
[   97.808978] sd 0:0:0:1: [sdb] tag#11 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT
[   97.808994] sd 0:0:0:1: [sdb] tag#11 CDB: opcode=0x2a 2a 00 00 05 1f ff 00 04 00 00
[   97.809363] sd 0:0:0:1: [sdb] tag#0 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD OUT
[   97.809374] sd 0:0:0:1: [sdb] tag#0 CDB: opcode=0x2a 2a 00 00 05 23 ff 00 04 00 00
[   97.809622] sd 0:0:0:0: [sda] tag#12 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT
[   97.809633] sd 0:0:0:0: [sda] tag#12 CDB: opcode=0x2a 2a 00 00 05 27 bf 00 04 00 00
[   97.809845] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[   97.809857] sd 0:0:0:0: [sda] tag#10 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD
[   97.809868] sd 0:0:0:0: [sda] tag#10 CDB: opcode=0x2a 2a 00 00 05 23 bf 00 04 00 00
[  103.549046] sd 0:0:0:0: [sda] tag#13 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD OUT
[  103.549065] sd 0:0:0:0: [sda] tag#13 CDB: opcode=0x2a 2a 00 15 87 07 ff 00 00 08 00
[  103.549239] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  103.589051] scsi host0: uas_eh_device_reset_handler start
[  103.739916] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[  103.775134] scsi host0: uas_eh_device_reset_handler success
[  103.775386] scsi host0: uas_eh_device_reset_handler start
[  103.919894] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[  103.955109] scsi host0: uas_eh_device_reset_handler success
[  134.269813] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[  134.269832] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 05 9b bf 00 00 08 00
[  134.309820] scsi host0: uas_eh_device_reset_handler start
[  134.310893] xhci_hcd 0000:01:00.0: WARNING: Host System Error
[  139.369833] xhci_hcd 0000:01:00.0: xHCI host not responding to stop endpoint command.
[  139.369880] xhci_hcd 0000:01:00.0: xHCI host controller not responding, assume dead
[  139.370372] xhci_hcd 0000:01:00.0: HC died; cleaning up
[  139.370463] sd 0:0:0:0: [sda] tag#1 uas_zap_pending 0 uas-tag 2 inflight: CMD
[  139.370481] sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x2a 2a 00 15 87 07 ff 00 00 08 00
[  139.370498] sd 0:0:0:0: [sda] tag#2 uas_zap_pending 0 uas-tag 3 inflight: CMD
[  139.370511] sd 0:0:0:0: [sda] tag#2 CDB: opcode=0x2a 2a 00 00 05 23 bf 00 04 00 00
[  139.370526] sd 0:0:0:0: [sda] tag#3 uas_zap_pending 0 uas-tag 4 inflight: CMD
[  139.370539] sd 0:0:0:0: [sda] tag#3 CDB: opcode=0x2a 2a 00 00 05 27 bf 00 04 00 00
[  139.370554] sd 0:0:0:1: [sdb] tag#4 uas_zap_pending 0 uas-tag 5 inflight: CMD
[  139.370569] sd 0:0:0:1: [sdb] tag#4 CDB: opcode=0x2a 2a 00 00 05 23 ff 00 04 00 00
[  139.370585] sd 0:0:0:1: [sdb] tag#5 uas_zap_pending 0 uas-tag 6 inflight: CMD
[  139.370598] sd 0:0:0:1: [sdb] tag#5 CDB: opcode=0x2a 2a 00 00 05 1f ff 00 04 00 00
[  139.370626] scsi host0: uas_eh_device_reset_handler FAILED err -22
[  139.370644] scsi host0: uas_eh_device_reset_handler FAILED to get lock err -19
[  139.370661] sd 0:0:0:0: Device offlined - not ready after error recovery
[  139.370675] sd 0:0:0:1: Device offlined - not ready after error recovery
[  139.370687] sd 0:0:0:1: Device offlined - not ready after error recovery
[  139.370699] sd 0:0:0:0: Device offlined - not ready after error recovery
[  139.370711] sd 0:0:0:0: Device offlined - not ready after error recovery
[  139.370723] sd 0:0:0:0: Device offlined - not ready after error recovery
[  139.370758] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x06
[  139.370774] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 05 9b bf 00 00 08 00
[  139.370789] print_req_error: I/O error, dev sda, sector 367551
[  139.370927] EXT4-fs warning (device md0): htree_dirblock_to_tree:995: inode #2: lblock 0: comm ls: error -5 reading directory block
[  139.370990] usb 1-1: USB disconnect, device number 2
[  139.372475] usb 2-1: USB disconnect, device number 2
[  139.387621] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  139.399921] print_req_error: I/O error, dev sda, sector 361170943
[  139.399941] Buffer I/O error on dev md0, logical block 90210304, lost sync page write
[  139.399985] JBD2: Error -5 detected when updating journal superblock for md0-8.
[  139.399996] print_req_error: I/O error, dev sda, sector 336831
[  139.400008] Aborting journal on device md0-8.
[  139.400032] print_req_error: I/O error, dev sda, sector 337855
[  139.400070] Buffer I/O error on dev md0, logical block 90210304, lost sync page write
[  139.400084] JBD2: Error -5 detected when updating journal superblock for md0-8.
[  139.410226] sd 0:0:0:1: rejecting I/O to offline device
[  139.410246] print_req_error: I/O error, dev sdb, sector 336895
[  139.410287] sd 0:0:0:1: rejecting I/O to offline device
[  139.410300] print_req_error: I/O error, dev sdb, sector 335871
[  139.410361] EXT4-fs error (device md0) in ext4_init_inode_table:1447: IO failure
[  139.410446] Buffer I/O error on dev md0, logical block 0, lost sync page write
[  139.410461] EXT4-fs (md0): I/O error while writing superblock
[  139.999907] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
[  140.122337] sd 0:0:0:1: [sdb] Synchronizing SCSI cache
[  140.719911] sd 0:0:0:1: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
[  140.810832] xhci_hcd 0000:01:00.0: WARN Can't disable streams for endpoint 0x82, streams are being disabled already
[  140.812601] usb 2-2: USB disconnect, device number 3
[  140.814856] sd 1:0:0:0: [sdc] Synchronizing SCSI cache
[  141.409918] sd 1:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
[  141.570370] xhci_hcd 0000:01:00.0: WARN Can't disable streams for endpoint 0x82, streams are being disabled already
[  144.146693] Buffer I/O error on dev md0, logical block 0, lost sync page write
[  144.146706] EXT4-fs (md0): I/O error while writing superblock
[  144.270694] Buffer I/O error on dev md0, logical block 180621936, async page read
[  144.308547] Buffer I/O error on dev md0, logical block 180621936, async page read
[  144.449027] md0: detected capacity change from 739827515392 to 0
[  144.449083] md: md0 stopped.

Hello, Stefano_Zaniboni

What’s your version of Quad SATA HAT?

Hi, setq

my version is QUAD SATA HAT KIT for your Raspberry Pi 4

Version number, v1.2 or V1.1

I’ve ordered the board in Mid-April 2020 so i suppose v1.2, tomorrow i check to confirm

Hi setq, i confirm that i’m using a v1.2 version

If bad contact and bad hard disk are excluded, please contact Allnet to replace a new hat.

I have send an email to allnet this morning. I confirm that the disks individually are working well.

Stefano