Possible bug: (btrfs raid & mdraid) UUID bug on kirkwood

btrfs user for 10+ years.

Device: Zyxel NSA325 - Kirkwood

2x 1TB 2,5” SATA HDD

i added btrfs modules and created a btrfs fs on sda. mounted it and added sdb to the filesystem. nothing fancy s far. no errors. when i now reboot the unit and try to mount the fs again its corrupted: c-tree damage. i tried this several times with using partitions or using the whole block device. always the same result. now i think it might be a bug.

root@Zyxel-NSA325:~# cat /etc/openwrt_release 
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='24.10.4'
DISTRIB_REVISION='r28959-29397011cc'
DISTRIB_TARGET='kirkwood/generic'
DISTRIB_ARCH='arm_xscale'
DISTRIB_DESCRIPTION='OpenWrt 24.10.4 r28959-29397011cc'
DISTRIB_TAINTS=''

bootlog:

dmesg 
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.110 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 13.3.0 r28959-29397011cc) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 Sun Oct 19 16:37:45 2025
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 508092K/524288K available (7224K kernel code, 594K rwdata, 1076K rodata, 1024K init, 235K bss, 16196K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000001] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000028] Switching to timer-based delay loop, resolution 5ns
[    0.000138] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000158] CPU: Testing write buffer coherency: ok
[    0.000242] pid_max: default: 32768 minimum: 301
[    0.007550] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.007574] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.014539] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.014740] Setting up static identity map for 0x100000 - 0x10003c
[    0.014991] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.020420] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.020448] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.022416] pinctrl core: initialized pinctrl subsystem
[    0.024812] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.025159] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026371] thermal_sys: Registered thermal governor 'step_wise'
[    0.026411] cpuidle: using governor ladder
[    0.026701] Feroceon L2: Enabling L2
[    0.026726] Feroceon L2: Cache support initialised.
[    0.031323] No ATAGs?
[    0.036181] SCSI subsystem initialized
[    0.036600] libata version 3.00 loaded.
[    0.036809] usbcore: registered new interface driver usbfs
[    0.036849] usbcore: registered new interface driver hub
[    0.036885] usbcore: registered new device driver usb
[    0.038249] clocksource: Switched to clocksource orion_clocksource
[    0.045807] NET: Registered PF_INET protocol family
[    0.045980] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.047657] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.047682] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.047695] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.047746] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.048313] TCP: Hash tables configured (established 4096 bind 4096)
[    0.048744] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.048908] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.048930] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.049544] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.049580] PCI: CLS 0 bytes, default 32
[    0.052350] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.053503] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.053511] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.058847] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.060628] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.061646] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.062127] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.062475] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    0.062508] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    0.062529] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    0.062543] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    0.062897] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.062909] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.062922] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    0.062930] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.062938] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    0.063006] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    0.064084] PCI: bus0: Fast back to back transfers disabled
[    0.064095] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.064205] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    0.064239] pci 0000:01:00.0: reg 0x10: [mem 0x90000000-0x90001fff 64bit]
[    0.064372] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.064406] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    0.064570] PCI: bus1: Fast back to back transfers disabled
[    0.064578] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.064606] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.064619] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    0.064639] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.064649] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.064697] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.072263] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.074906] printk: console [ttyS0] disabled
[    0.075178] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.075211] printk: console [ttyS0] enabled
[    0.700135] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    0.706526] nand: Eon NAND 128MiB 3,3V 8-bit
[    0.710841] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.718492] Scanning device for bad blocks
[    0.727418] Bad eraseblock 100 at 0x000000c80000
[    0.736816] Bad eraseblock 200 at 0x000001900000
[    0.780664] 3 fixed-partitions partitions found on MTD device orion_nand
[    0.787395] Creating 3 MTD partitions on "orion_nand":
[    0.792568] 0x000000000000-0x0000000c0000 : "uboot"
[    0.814264] 0x0000000c0000-0x000000140000 : "uboot_env"
[    0.820698] 0x000000140000-0x000008000000 : "ubi"
[    0.838164] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.848068] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 0a:cc:d5:84:15:0c
[    0.857061] i2c_dev: i2c /dev entries driver
[    0.862747] orion_wdt: Initial timeout 21 sec
[    0.877144] marvell-cesa f1030000.crypto: CESA device successfully registered
[    0.885723] NET: Registered PF_INET6 protocol family
[    0.892643] Segment Routing with IPv6
[    0.896376] In-situ OAM (IOAM) with IPv6
[    0.900443] NET: Registered PF_PACKET protocol family
[    0.905536] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.918775] 8021q: 802.1Q VLAN Support v1.8
[    0.957049] UBI: auto-attach mtd2
[    0.960429] ubi0: attaching mtd2
[    1.133410] ubi0: scanning is finished
[    1.148871] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[    1.154396] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.161316] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.168049] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.174875] ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
[    1.181004] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.188268] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1750711236
[    1.197443] ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
[    1.207043] ubi0: background thread "ubi_bgt0d" started, PID 369
[    1.213479] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.219008] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.226166] clk: Disabling unused clocks
[    1.236149] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.246258] Freeing unused kernel image (initmem) memory: 1024K
[    1.252227] Run /sbin/init as init process
[    1.256339]   with arguments:
[    1.256343]     /sbin/init
[    1.256347]   with environment:
[    1.256350]     HOME=/
[    1.256354]     TERM=linux
[    1.631564] init: Console is alive
[    1.635157] init: - watchdog -
[    2.027846] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.086584] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    2.112076] orion-ehci f1050000.ehci: EHCI Host Controller
[    2.117617] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    2.125440] orion-ehci f1050000.ehci: irq 35, io mem 0xf1050000
[    2.158264] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    2.165132] hub 1-0:1.0: USB hub found
[    2.169255] hub 1-0:1.0: 1 port detected
[    2.190025] sata_mv f1080000.sata: version 1.28
[    2.190473] sata_mv f1080000.sata: slots 32 ports 2
[    2.199511] scsi host0: sata_mv
[    2.204230] scsi host1: sata_mv
[    2.207794] ata1: SATA max UDMA/133 irq 36
[    2.211940] ata2: SATA max UDMA/133 irq 36
[    2.458258] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.660311] hub 1-1:1.0: USB hub found
[    2.664443] hub 1-1:1.0: 4 ports detected
[    2.708269] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    2.719064] ata1.00: ATA-8: HGST HTS541010A9E680, JA0OA560, max UDMA/133
[    2.725808] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    2.739383] ata1.00: configured for UDMA/133
[    2.744053] scsi 0:0:0:0: Direct-Access     ATA      HGST HTS541010A9 A560 PQ: 0 ANSI: 5
[    2.753284] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    2.761019] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.766308] sd 0:0:0:0: [sda] Write Protect is off
[    2.771133] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.771187] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.780353] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[    3.089313]  sda: sda1
[    3.091985] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.288264] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.318335] ata2.00: LPM support broken, forcing max_power
[    3.323951] ata2.00: ATA-8: ST1000LM024 HN-M101MBB, 2AR10001, max UDMA/133
[    3.330870] ata2.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.368326] ata2.00: LPM support broken, forcing max_power
[    3.373946] ata2.00: configured for UDMA/133
[    3.378568] scsi 1:0:0:0: Direct-Access     ATA      ST1000LM024 HN-M 0001 PQ: 0 ANSI: 5
[    3.387740] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    3.395469] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    3.400765] sd 1:0:0:0: [sdb] Write Protect is off
[    3.405579] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.405629] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.414786] sd 1:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
[    3.852261]  sdb: sdb1
[    3.854925] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.870166] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.875446] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    3.883143] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    3.892508] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.897769] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    3.905228] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    3.916558] hub 2-0:1.0: USB hub found
[    3.920638] hub 2-0:1.0: 2 ports detected
[    3.925499] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.934386] hub 3-0:1.0: USB hub found
[    3.938458] hub 3-0:1.0: 2 ports detected
[    3.950297] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.967958] init: - preinit -
[    6.838272] random: crng init done
[    6.966399] mtdblock: MTD device 'uboot_env' is NAND, please consider using UBI block devices instead.
[    7.516217] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    7.526732] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[    7.532821] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    7.542717] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   11.719382] UBIFS (ubi0:2): Mounting in unauthenticated mode
[   11.750448] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 588
[   11.783393] UBIFS (ubi0:2): recovery needed
[   11.940625] UBIFS (ubi0:2): recovery completed
[   11.945167] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[   11.953047] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.963016] UBIFS (ubi0:2): FS size: 120121344 bytes (114 MiB, 931 LEBs), max 942 LEBs, journal size 6064128 bytes (5 MiB, 47 LEBs)
[   11.974901] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[   11.981556] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID 0D158761-0EB9-4C7F-AE1F-DA5199BEB898, small LPT model
[   11.998472] mount_root: switching to ubifs overlay
[   12.011469] urandom-seed: Seeding with /etc/urandom.seed
[   12.209724] procd: - early -
[   12.212738] procd: - watchdog -
[   12.826662] procd: - watchdog -
[   12.830960] procd: - ubus -
[   12.921673] procd: - init -
[   13.740335] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.802735] zram: Added device: zram0
[   13.860206] raid6: skipped pq benchmark and selected int32x8
[   13.865905] raid6: using intx1 recovery algorithm
[   13.882974] xor: measuring software checksum speed
[   13.890035]    arm4regs        :  1464 MB/sec
[   13.896867]    8regs           :  1335 MB/sec
[   13.903704]    32regs          :  1335 MB/sec
[   13.908074] xor: using function: arm4regs (1464 MB/sec)
[   14.613913] urngd: v1.0.2 started.
[   14.679761] Btrfs loaded, zoned=no, fsverity=no
[   14.779615] rtc-pcf8563 0-0051: registered as rtc0
[   14.808284] rtc-pcf8563 0-0051: setting system clock to 2025-12-04T20:05:35 UTC (1764878735)
[   14.966658] PPP generic driver version 2.4.2
[   14.978993] NET: Registered PF_PPPOX protocol family
[   15.042318] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   15.050226] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   15.119948] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.560228] zram0: detected capacity change from 0 to 262144
[   17.584955] Adding 131068k swap on /dev/zram0.  Priority:100 extents:1 across:131068k SSDsc
[   21.482986] br-lan: port 1(eth0) entered blocking state
[   21.488285] br-lan: port 1(eth0) entered disabled state
[   21.493569] mv643xx_eth_port mv643xx_eth_port.0 eth0: entered allmulticast mode
[   21.501112] mv643xx_eth_port mv643xx_eth_port.0 eth0: entered promiscuous mode
[   24.102576] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   24.135240] br-lan: port 1(eth0) entered blocking state
[   24.140540] br-lan: port 1(eth0) entered forwarding state

devices look ok

smartctl:
disk 1 ~900h uptime

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%       899         -


disk2 ~100h uptime

SMART Extended Self-test Log Version: 1 (2 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%        93         -
# 2  Short offline       Completed without error       00%        90         -
# 3  Extended offline    Completed without error       00%        70         -


mount errors:

1st try fstab

/dev/sda1 /mnt btrfs defaults,noatime,space_cache=v2,compress=lzo 0 0

2nd plain: mount /dev/sdb1 /mnt

3rd plain: mount /dev/sda1 /mnt

[  141.016102] BTRFS: device fsid 4bc4d94a-6175-4fe6-a3be-53276538e02d devid 1 transid 18 /dev/sda1 scanned by mount (2820)
[  141.028613] BTRFS info (device sda1): first mount of filesystem 4bc4d94a-6175-4fe6-a3be-53276538e02d
[  141.037850] BTRFS info (device sda1): using crc32c (crc32c-generic) checksum algorithm
[  141.045871] BTRFS info (device sda1): use lzo compression, level 0
[  141.052097] BTRFS info (device sda1): using free space tree
[  141.070025] BTRFS error (device sda1): devid 2 uuid 02fb055d-4d4d-4210-bc66-5b4f1ad0d4ee is missing
[  141.079151] BTRFS error (device sda1): failed to read chunk tree: -2
[  141.086224] BTRFS error (device sda1): open_ctree failed: -2
[  179.495910] BTRFS: device fsid 4bc4d94a-6175-4fe6-a3be-53276538e02d devid 2 transid 18 /dev/sdb1 scanned by mount (2838)
[  179.508295] BTRFS info (device sdb1): first mount of filesystem 4bc4d94a-6175-4fe6-a3be-53276538e02d
[  179.517527] BTRFS info (device sdb1): using crc32c (crc32c-generic) checksum algorithm
[  179.525542] BTRFS info (device sdb1): using free space tree
[  179.532486] BTRFS error (device sdb1): devid 1 uuid b73bbbd4-90a9-4401-822d-33fe37017d18 is missing
[  179.541636] BTRFS error (device sdb1): failed to read the system array: -2
[  179.549406] BTRFS error (device sdb1): open_ctree failed: -2
[  184.674358] BTRFS: device fsid 4bc4d94a-6175-4fe6-a3be-53276538e02d devid 1 transid 18 /dev/sda1 scanned by mount (2859)
[  184.686932] BTRFS info (device sda1): first mount of filesystem 4bc4d94a-6175-4fe6-a3be-53276538e02d
[  184.696130] BTRFS info (device sda1): using crc32c (crc32c-generic) checksum algorithm
[  184.704169] BTRFS info (device sda1): using free space tree
[  184.714514] BTRFS error (device sda1): devid 2 uuid 02fb055d-4d4d-4210-bc66-5b4f1ad0d4ee is missing
[  184.723673] BTRFS error (device sda1): failed to read chunk tree: -2
[  184.730962] BTRFS error (device sda1): open_ctree failed: -2

but i can mount both units in degraded mode without problems

degraded mount sda1:

mount -o degraded /dev/sda1 /mnt/

dmesg:

[  451.072156] BTRFS: device fsid 4bc4d94a-6175-4fe6-a3be-53276538e02d devid 1 transid 18 /dev/sda1 scanned by mount (2883)
[  451.084705] BTRFS info (device sda1): first mount of filesystem 4bc4d94a-6175-4fe6-a3be-53276538e02d
[  451.093934] BTRFS info (device sda1): using crc32c (crc32c-generic) checksum algorithm
[  451.101951] BTRFS info (device sda1): allowing degraded mounts
[  451.107834] BTRFS info (device sda1): using free space tree
[  451.126053] BTRFS warning (device sda1): devid 2 uuid 02fb055d-4d4d-4210-bc66-5b4f1ad0d4ee is missing

degraded mount sdb1:

mount -o degraded /dev/sdb1 /mnt/

dmesg:

[  559.618161] BTRFS info (device sda1): first mount of filesystem 4bc4d94a-6175-4fe6-a3be-53276538e02d
[  559.627388] BTRFS info (device sda1): using crc32c (crc32c-generic) checksum algorithm
[  559.635435] BTRFS info (device sda1): allowing degraded mounts
[  559.641301] BTRFS info (device sda1): using free space tree

i can mount degraded, remove the 2nd disk and add it again. then it mounts ok. but after reboot its broken again.

any suggestions?

ask please on btrts mailing list ..

I remember some hickups with this.

And some other hickups with the maintainer, for this read lkml

I happened to have te exact same device. Is it v2 or v1 you're using?

I’m not sure that btrfs is the best option for a 32 bit device. btrfs just isn’t designed to be used on 32 bit routers with low amounts of memory in my experience

It’s hard to find a googleable answer but from what i’ve seen generally the file size limits you get when using it on a 32 bit system make it unusable. You should be able to see for yourself, make the volume on a 64 bit system then copy various large files onto it, try a 3gb, then a 2gb, etc and when you mount on the 32 bit device you’ll see you probably can’t access the file. Maybe that was just my experience though /shrug, perhaps the issue was something else like thumb mode.

Maybe f2fs is something to try instead if you were looking for compression, not sure about checksumming.

next funny thing.

ok, we say btrfs is problematic on 32 bit arm.

next i try to create a mdraid on the 2 existing partitions with:

root@Zyxel-NSA325:~# mdadm --zero-superblock /dev/sda1 /dev/sdb1
root@Zyxel-NSA325:~# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
root@Zyxel-NSA325:~# mkfs.ext4 /dev/md0
root@Zyxel-NSA325:~#

and add to fstab:

/dev/md0 /mnt ext4 noatime,rw 0 0

which afterwards mounts fine with mount -a ! this is expected since its nothing fancy.

but after reboot (did one including waiting for raid building to end successfully and one with rebooting while still building raid. it doesnt matter.)

NAS comes up. no raid mounted via fstab!

mount -a claims:

root@Zyxel-NSA325:~# mount -a
mount: mounting /dev/md0 on /mnt failed: No such file or directory

and yes there are no md devices at all

root@Zyxel-NSA325:~# ls /dev/m* -l
crw-------    1 root     root       90,   0 Jan  1  1970 /dev/mtd0
crw-------    1 root     root       90,   1 Jan  1  1970 /dev/mtd0ro
crw-------    1 root     root       90,   2 Jan  1  1970 /dev/mtd1
crw-------    1 root     root       90,   3 Jan  1  1970 /dev/mtd1ro
crw-------    1 root     root       90,   4 Jan  1  1970 /dev/mtd2
crw-------    1 root     root       90,   5 Jan  1  1970 /dev/mtd2ro
brw-------    1 root     root       31,   0 Jan  1  1970 /dev/mtdblock0
brw-------    1 root     root       31,   1 Jan  1  1970 /dev/mtdblock1
brw-------    1 root     root       31,   2 Jan  1  1970 /dev/mtdblock2

dmesg:

root@Zyxel-NSA325:~# dmesg 
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.110 (builder@buildhost) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 13.3.0 r28959-29397011cc) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 Sun Oct 19 16:37:45 2025
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 508092K/524288K available (7224K kernel code, 594K rwdata, 1076K rodata, 1024K init, 235K bss, 16196K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000001] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000028] Switching to timer-based delay loop, resolution 5ns
[    0.000138] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000158] CPU: Testing write buffer coherency: ok
[    0.000242] pid_max: default: 32768 minimum: 301
[    0.007550] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.007574] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.014539] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.014740] Setting up static identity map for 0x100000 - 0x10003c
[    0.014991] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.020420] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.020448] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.022416] pinctrl core: initialized pinctrl subsystem
[    0.024812] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.025159] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026371] thermal_sys: Registered thermal governor 'step_wise'
[    0.026411] cpuidle: using governor ladder
[    0.026701] Feroceon L2: Enabling L2
[    0.026726] Feroceon L2: Cache support initialised.
[    0.031323] No ATAGs?
[    0.036181] SCSI subsystem initialized
[    0.036600] libata version 3.00 loaded.
[    0.036809] usbcore: registered new interface driver usbfs
[    0.036849] usbcore: registered new interface driver hub
[    0.036885] usbcore: registered new device driver usb
[    0.038249] clocksource: Switched to clocksource orion_clocksource
[    0.045807] NET: Registered PF_INET protocol family
[    0.045980] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.047657] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.047682] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.047695] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.047746] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.048313] TCP: Hash tables configured (established 4096 bind 4096)
[    0.048744] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.048908] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.048930] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.049544] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.049580] PCI: CLS 0 bytes, default 32
[    0.052350] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.053503] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.053511] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.058847] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.060628] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.061646] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.062127] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.062475] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges:
[    0.062508] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[    0.062529] mvebu-pcie mbus@f1000000:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    0.062543] mvebu-pcie mbus@f1000000:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    0.062897] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.062909] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.062922] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[    0.062930] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.062938] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    0.063006] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    0.064084] PCI: bus0: Fast back to back transfers disabled
[    0.064095] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.064205] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    0.064239] pci 0000:01:00.0: reg 0x10: [mem 0x90000000-0x90001fff 64bit]
[    0.064373] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.064406] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    0.064569] PCI: bus1: Fast back to back transfers disabled
[    0.064578] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.064606] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.064619] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    0.064638] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.064648] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.064694] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.072264] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.074907] printk: console [ttyS0] disabled
[    0.075178] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.075210] printk: console [ttyS0] enabled
[    0.700093] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    0.706478] nand: Eon NAND 128MiB 3,3V 8-bit
[    0.710794] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.718443] Scanning device for bad blocks
[    0.727371] Bad eraseblock 100 at 0x000000c80000
[    0.736778] Bad eraseblock 200 at 0x000001900000
[    0.780622] 3 fixed-partitions partitions found on MTD device orion_nand
[    0.787356] Creating 3 MTD partitions on "orion_nand":
[    0.792529] 0x000000000000-0x0000000c0000 : "uboot"
[    0.814232] 0x0000000c0000-0x000000140000 : "uboot_env"
[    0.820669] 0x000000140000-0x000008000000 : "ubi"
[    0.838310] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.848231] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 0a:cc:d5:84:15:0c
[    0.857220] i2c_dev: i2c /dev entries driver
[    0.862894] orion_wdt: Initial timeout 21 sec
[    0.877220] marvell-cesa f1030000.crypto: CESA device successfully registered
[    0.885797] NET: Registered PF_INET6 protocol family
[    0.892719] Segment Routing with IPv6
[    0.896459] In-situ OAM (IOAM) with IPv6
[    0.900528] NET: Registered PF_PACKET protocol family
[    0.905620] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.918857] 8021q: 802.1Q VLAN Support v1.8
[    0.957150] UBI: auto-attach mtd2
[    0.960528] ubi0: attaching mtd2
[    1.133551] ubi0: scanning is finished
[    1.149021] ubi0: attached mtd2 (name "ubi", size 126 MiB)
[    1.154548] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.161470] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.168201] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.175027] ubi0: good PEBs: 1012, bad PEBs: 2, corrupted PEBs: 0
[    1.181156] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.188412] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1750711236
[    1.197587] ubi0: available PEBs: 0, total reserved PEBs: 1012, PEBs reserved for bad PEB handling: 18
[    1.207185] ubi0: background thread "ubi_bgt0d" started, PID 368
[    1.213626] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.219162] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.226321] clk: Disabling unused clocks
[    1.236299] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.246411] Freeing unused kernel image (initmem) memory: 1024K
[    1.252380] Run /sbin/init as init process
[    1.256492]   with arguments:
[    1.256496]     /sbin/init
[    1.256500]   with environment:
[    1.256503]     HOME=/
[    1.256507]     TERM=linux
[    1.631759] init: Console is alive
[    1.635343] init: - watchdog -
[    2.027966] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.086747] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    2.112298] orion-ehci f1050000.ehci: EHCI Host Controller
[    2.117859] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    2.125676] orion-ehci f1050000.ehci: irq 35, io mem 0xf1050000
[    2.158265] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    2.165129] hub 1-0:1.0: USB hub found
[    2.169255] hub 1-0:1.0: 1 port detected
[    2.190011] sata_mv f1080000.sata: version 1.28
[    2.190462] sata_mv f1080000.sata: slots 32 ports 2
[    2.199502] scsi host0: sata_mv
[    2.204224] scsi host1: sata_mv
[    2.207794] ata1: SATA max UDMA/133 irq 36
[    2.211938] ata2: SATA max UDMA/133 irq 36
[    2.458258] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.660300] hub 1-1:1.0: USB hub found
[    2.664429] hub 1-1:1.0: 4 ports detected
[    2.708270] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    2.719058] ata1.00: ATA-8: HGST HTS541010A9E680, JA0OA560, max UDMA/133
[    2.725805] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    2.739382] ata1.00: configured for UDMA/133
[    2.744043] scsi 0:0:0:0: Direct-Access     ATA      HGST HTS541010A9 A560 PQ: 0 ANSI: 5
[    2.753267] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    2.761004] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.766286] sd 0:0:0:0: [sda] Write Protect is off
[    2.771112] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.771165] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.780330] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[    2.824949]  sda: sda1
[    2.827569] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.288263] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.318335] ata2.00: LPM support broken, forcing max_power
[    3.323955] ata2.00: ATA-8: ST1000LM024 HN-M101MBB, 2AR10001, max UDMA/133
[    3.330873] ata2.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.368325] ata2.00: LPM support broken, forcing max_power
[    3.373951] ata2.00: configured for UDMA/133
[    3.378585] scsi 1:0:0:0: Direct-Access     ATA      ST1000LM024 HN-M 0001 PQ: 0 ANSI: 5
[    3.387756] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    3.395485] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    3.400777] sd 1:0:0:0: [sdb] Write Protect is off
[    3.405592] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.405643] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.414798] sd 1:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
[    3.827154]  sdb: sdb1
[    3.829834] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.845453] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.850777] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    3.858451] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    3.867796] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.873070] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    3.880515] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    3.891585] hub 2-0:1.0: USB hub found
[    3.895638] hub 2-0:1.0: 2 ports detected
[    3.900608] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.909444] hub 3-0:1.0: USB hub found
[    3.913541] hub 3-0:1.0: 2 ports detected
[    3.925299] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.935094] init: - preinit -
[    6.828274] random: crng init done
[    6.956252] mtdblock: MTD device 'uboot_env' is NAND, please consider using UBI block devices instead.
[    7.505630] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    7.516320] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[    7.522303] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   11.697956] UBIFS (ubi0:2): Mounting in unauthenticated mode
[   11.729067] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 587
[   11.761948] UBIFS (ubi0:2): recovery needed
[   11.854256] UBIFS (ubi0:2): recovery completed
[   11.858868] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[   11.866736] UBIFS (ubi0:2): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.876712] UBIFS (ubi0:2): FS size: 120121344 bytes (114 MiB, 931 LEBs), max 942 LEBs, journal size 6064128 bytes (5 MiB, 47 LEBs)
[   11.888604] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[   11.895250] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID 0D158761-0EB9-4C7F-AE1F-DA5199BEB898, small LPT model
[   11.912212] mount_root: switching to ubifs overlay
[   11.926303] urandom-seed: Seeding with /etc/urandom.seed
[   12.125409] procd: - early -
[   12.128527] procd: - watchdog -
[   12.742570] procd: - watchdog -
[   12.746851] procd: - ubus -
[   12.837810] procd: - init -
[   13.670696] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.733400] zram: Added device: zram0
[   13.915701] raid6: skipped pq benchmark and selected int32x8
[   13.921433] raid6: using intx1 recovery algorithm
[   13.942783] xor: measuring software checksum speed
[   13.949851]    arm4regs        :  1463 MB/sec
[   13.956682]    8regs           :  1335 MB/sec
[   13.963530]    32regs          :  1335 MB/sec
[   13.967907] xor: using function: arm4regs (1463 MB/sec)
[   14.579554] urngd: v1.0.2 started.
[   14.789721] Btrfs loaded, zoned=no, fsverity=no
[   14.909940] rtc-pcf8563 0-0051: registered as rtc0
[   14.928280] rtc-pcf8563 0-0051: setting system clock to 2025-12-11T07:45:09 UTC (1765439109)
[   15.065367] PPP generic driver version 2.4.2
[   15.114423] NET: Registered PF_PPPOX protocol family
[   15.164139] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   15.172049] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   15.248471] kmodloader: done loading kernel modules from /etc/modules.d/*
[   18.228338] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[   18.242493] mtdblock: MTD device 'uboot_env' is NAND, please consider using UBI block devices instead.
[   18.256919] mtdblock: MTD device 'uboot' is NAND, please consider using UBI block devices instead.
[   18.462359] zram0: detected capacity change from 0 to 262144
[   18.477185] Adding 131068k swap on /dev/zram0.  Priority:100 extents:1 across:131068k SSDsc
[   22.291292] br-lan: port 1(eth0) entered blocking state
[   22.296567] br-lan: port 1(eth0) entered disabled state
[   22.301874] mv643xx_eth_port mv643xx_eth_port.0 eth0: entered allmulticast mode
[   22.309414] mv643xx_eth_port mv643xx_eth_port.0 eth0: entered promiscuous mode
[   24.651785] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   24.661758] br-lan: port 1(eth0) entered blocking state
[   24.667010] br-lan: port 1(eth0) entered forwarding state
[  130.091217] /dev/md0: Can't lookup blockdev
[  721.320389] /dev/md0: Can't lookup blockdev

but the modules are all loaded.

lsmod:

root@Zyxel-NSA325:~# lsmod
blake2b_generic        28672  0 
btrfs                1122304  0 
chacha_neon            24576  1 libchacha20poly1305
crc_ccitt              12288  1 ppp_async
ehci_fsl               12288  0 
ehci_hcd               40960  3 ehci_platform,ehci_orion,ehci_fsl
ehci_orion             12288  0 
ehci_platform          12288  0 
ext4                  434176  0 
fsl_mph_dr_of          12288  0 
gpio_button_hotplug    12288  0 
ip6_udp_tunnel         12288  1 wireguard
jbd2                   61440  1 ext4
kpp                    12288  0 
libchacha20poly1305    12288  1 wireguard
libcrc32c              12288  2 nf_tables,btrfs
libcurve25519_generic   16384  1 wireguard
mbcache                12288  1 ext4
md_mod                118784  3 raid10,raid1,raid0
nf_conntrack           77824  7 nft_redir,nft_nat,nft_masq,nft_flow_offload,nft_ct,nf_nat,nf_flow_table
nf_defrag_ipv4         12288  1 nf_conntrack
nf_defrag_ipv6         16384  1 nf_conntrack
nf_flow_table          28672  2 nf_flow_table_inet,nft_flow_offload
nf_flow_table_inet     12288  0 
nf_log_syslog          16384  0 
nf_nat                 28672  4 nft_redir,nft_nat,nft_masq,nft_chain_nat
nf_reject_ipv4         12288  2 nft_reject_ipv4,nft_reject_inet
nf_reject_ipv6         12288  2 nft_reject_ipv6,nft_reject_inet
nf_tables             192512156 nft_fib_inet,nf_flow_table_inet,nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet,nft_reject,nft_redir,nft_quota,nft_numgen,nft_nat,nft_masq,nft_log,nft_limit,nft_hash,nft_flow_offload,nft_fib_ipv6,nft_fib_ipv4,nft_fib,nft_ct,nft_chain_nat
nfnetlink              12288  1 nf_tables
nft_chain_nat          12288  2 
nft_ct                 16384  3 
nft_fib                12288  3 nft_fib_inet,nft_fib_ipv6,nft_fib_ipv4
nft_fib_inet           12288  0 
nft_fib_ipv4           12288  1 nft_fib_inet
nft_fib_ipv6           12288  1 nft_fib_inet
nft_flow_offload       12288  0 
nft_hash               12288  0 
nft_limit              12288  5 
nft_log                12288  0 
nft_masq               12288  1 
nft_nat                12288  0 
nft_numgen             12288  0 
nft_quota              12288  0 
nft_redir              12288  0 
nft_reject             12288  3 nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet
nft_reject_inet        12288  2 
nft_reject_ipv4        12288  0 
nft_reject_ipv6        12288  0 
poly1305_arm           16384  1 libchacha20poly1305
ppp_async              16384  0 
ppp_generic            32768  3 pppoe,ppp_async,pppox
pppoe                  20480  0 
pppox                  12288  1 pppoe
raid0                  16384  0 
raid1                  40960  0 
raid10                 53248  0 
raid6_pq               94208  1 btrfs
rtc_pcf8563            12288  0 
sata_mv                32768  0 
slhc                   16384  1 ppp_generic
udp_tunnel             16384  1 wireguard
wireguard              57344  0 
xhci_hcd              110592  2 xhci_plat_hcd,xhci_pci
xhci_pci               16384  0 
xhci_plat_hcd          12288  0 
xor                    12288  1 btrfs
xxhash_generic         12288  0 
zram                   20480  2 
zsmalloc               20480  1 zram

if im seraching for any mdraid:

root@Zyxel-NSA325:/# mdadm --assemble --scan -v
mdadm: looking for devices for /dev/md0
mdadm: no recogniseable superblock on /dev/zram0
mdadm: /dev/sdb1 has wrong uuid.
mdadm: Cannot assemble mbr metadata on /dev/sdb
mdadm: /dev/sda1 has wrong uuid.
mdadm: Cannot assemble mbr metadata on /dev/sda
mdadm: no recogniseable superblock on /dev/ubiblock0_1
mdadm: no recogniseable superblock on /dev/mtdblock2
mdadm: no recogniseable superblock on /dev/mtdblock1
mdadm: no recogniseable superblock on /dev/mtdblock0

i also can successfuly rebuild the raid again with the setting from above. and after reboot its gone again.

imho, there a huge paralles between the 2 problems! they seem quiet similar, or not?

any thoughs?

btrfs claims:


[  141.070025] BTRFS error (device sda1): devid 2 uuid 02fb055d-4d4d-4210-bc66-5b4f1ad0d4ee is missing

mdadm claims:

mdadm: /dev/sda1 has wrong uuid.
mdadm: Cannot assemble mbr metadata on /dev/sda

sounds very similar to me!

If this a true md device with RAID

Remeber some issues with some other platform on some other (now dead) forum.

You have problems with your hardware, maybe the powerdown sequence is not optimal

hmm…can u plz elaborate?

i dont get why powerdown is related to wrong uuids on boot.

from the bootlog the sata ports get inizialied and the disks are detected right. so i dosent seem to be hw related.

i created a single ext4 on one partition and put it into fstab. it wont be automounted on boot but if i mount -a manually it works.

   24.800908] br-lan: port 1(eth0) entered forwarding state
[   62.166849] EXT4-fs (sda1): mounted filesystem 9c4f0685-4874-49c1-a178-8fcf009d7df2 r/w with ordered data mode. Quota mode: disabled.
root@Zyxel-NSA325:~# 

If you have a broken RAM yes.

The whole superblock is rewitten to update the last accesstime.

I remember on my own hardware such type of error on “rotating disk”.

smartctl info was OK, but git says all data is currupted

This is getting worse with SSD, with TLC and QLC nand chips

tripple or quard layer cells, with 3 or 4 bit in each cell

hmm…ok.

then i would delete zram first and try again. this might be a suspicous candidate for such errors…

Btrfs is really intended for data centre server grade equipment and your NSA325 is very far removed from this. Just because btrfs is available on OpenWrt, it does not mean it is suitable for every architecture. Without the proper hardware resources it will very much be an "at your own risk" situation. Clearly in this case it does not work. I very much doubt if this is a bug because I have in the past had it working on OpenWrt on high end server hardware - intelligent raid 5 controller, redundant power supplies, ups etc. etc.

You might try manually umounting, then waiting for some time (possibly tens of minutes for large disks on this hardware), and ultimately, guessing/hoping that all disk activity has stopped, before rebooting. See if that makes a difference.

i expect this wasx86/64 hw. properly and well tested.

on the other hand, as the subject says, in the meantime i doubt its a btrfs problem cause mdraid serves an similar error.

i´ ll try to sort out an mem corruption for now.

also if mdraid/btrfs is not working in general in this specific architecture then why providing it? so where here to sort it out an when there is architecture problem fix it (upstream) or remove the packages from the architecture. imho every package provided though officiall repos has the right to work correctly :wink:

Yes, in my case it was - not only x86-64 but also it was a spare 42U rack server with many TB of raid 5 storage.

Did you try the umount and wait test?

It does work, but your particular device does not have the resources do work reliably.

It is compiled and packaged for all supported architectures, but that does not mean it will work on resource restricted hardware.

no change.

i created a btrfs volume on sdb1 which works also after reboots.

when i add a 2nd device to it it breaks after manually unmounting, waiting for ~ 10min and reboot.

a basic

root@Zyxel-NSA325:~# mount /dev/sdb1 /mnt/
mount: mounting /dev/sdb1 on /mnt/ failed: No such file or directory

shows it broken.

[ 1721.704245] mtdblock: MTD device 'uboot_env' is NAND, please consider using UBI block devices instead.
[ 2177.794246] BTRFS: device fsid 5a25d9c7-1f3d-469c-ab1b-6da58ff44299 devid 1 transid 15 /dev/sdb1 scanned by mount (2991)
[ 2177.806833] BTRFS info (device sdb1): first mount of filesystem 5a25d9c7-1f3d-469c-ab1b-6da58ff44299
[ 2177.816046] BTRFS info (device sdb1): using crc32c (crc32c-generic) checksum algorithm
[ 2177.824076] BTRFS info (device sdb1): using free space tree
[ 2178.217464] BTRFS error (device sdb1): devid 2 uuid 68b29073-64a2-4cba-936c-dbc5271b7ec0 is missing
[ 2178.226593] BTRFS error (device sdb1): failed to read chunk tree: -2
[ 2178.233637] BTRFS error (device sdb1): open_ctree failed: -2
root@Zyxel-NSA325:~#