I'm encountering persistent UBIFS mount failures on my i.MX6 system with Micron NAND. My kernel version is Linux buildroot 4.14.135 #2 SMP Mon May 13 16:08:45 UTC 2024 armv7l GNU/Linux. Specifically, I'm getting 'Invalid argument' and 'Structure needs cleaning' errors when mounting /dev/ubi0_0 to /opt.
From the kernel logs, I see these errors:
- UBIFS error (ubi0:0 pid 166): ubifs_recover_leb: LEB 1067 scanning failed
- UBIFS error (ubi0:0 pid 157): ubifs_replay_journal: no UBIFS nodes found at the log head LEB 6:0, possibly corrupted
- UBIFS error (ubi0:0 pid 168): ubifs_recover_leb: LEB 5 scanning failed
And also these GPMI-NAND errors:
- gpmi-nand 1806000.gpmi-nand: STATUS_UNCORRECTABLE: Page:67528,subpage:0,Bitflips:-74,corrected:8
These errors suggest potential LEB corruption within UBIFS and uncorrectable bit flips from the GPMI-NAND controller.
Currently, when I face issues, I reformat the NAND and mount again, which works. However, I want to investigate why it's failing in the first instance and if there are any patches to fix the problem, or if I am encountering a kernel bug.
I'm seeking advice on:
- Potential causes for the LEB corruption and GPMI-NAND uncorrectable errors.
- Recommended troubleshooting steps to diagnose and resolve these issues.
- Any tools that can be used to repair the ubifs partition. for kernel version 4.14.135.
- If there are any patches to fix the problem, or if I am encountering a kernel bug.
- Any insights or suggestions would be greatly appreciated."