Hello,
normaly the ubifs recovery prozess will be startet automaticly on mount, if nesessary.
mount -o sync -t ubifs ubi0:data /mnt/data
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 2, name "data"
UBIFS: file system size: 33013760 bytes (32240 KiB, 31 MiB, 260 LEBs)
UBIFS: journal size: 1650688 bytes (1612 KiB, 1 MiB, 13 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 1559321 bytes (1522 KiB)
Here everything works fine. But sometimes the recovery prozess failes:
mount -o sync -t ubifs ubi0:firmware /mnt/firmware
UBIFS: recovery needed
UBI error: ubi_io_read: error -74 while reading 34816 bytes from PEB 467:96256,
read 34816 bytes
UBIFS error (pid 772): ubifs_recover_leb: corrupt empty space LEB 253:114688, co
rruption starts at 811
UBIFS error (pid 772): ubifs_scanned_corruption: corruption at LEB 253:811
UBIFS error (pid 772): ubifs_recover_leb: LEB 253 scanning failed
mount: mounting ubi0:firmware on /mnt/firmware failed: Structure needs cleaning
I suppose that is similar to following mailing list entry:
http://lists.infradead.org/pipermail/linux-mtd/2009-March/024953.html
According to the ubifs documentation, chapter "Power-cuts tolerance", the problem were seen on NOR flash with kernel version 2.6.27 and should be solved in later versions.
http://www.linux-mtd.infradead.org/doc/ubifs.html
Any idea, how can we solve this problem?
Kind regards,
Birger
p.s. We got these error also on the rootfs ubifs partition, which will be mounted by the kernel via kernel command line.
CONFIG_PKG_BOOT_STREAM_CMDLINE1="noinitrd console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstype=ubifs rw gpmi"
Which board you are using and which version of Linux you are running there?
I see http://git.infradead.org/users/dedekind/ubifs-v2.6.27.git fixes the issue for 2.6.27 kernel you mentioned:
http://lists.infradead.org/pipermail/linux-mtd/2009-May/025609.html
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------