mount ubi volume fails: No such device
Quoted 8 lines · Lars Michael
Quoted 1 line
UBI: scrubbed PEB 863, data moved to PEB 1097 UBI warning:
ubi_eba_copy_leb: read data back from PEB 1092 and it is different UBI
error:wear_leveling_worker: error -22 while moving PEB 868 to PEB 1092 UBI warning:ubi_ro_mode: switch to read-only mode UBI error:do_work:
work failed with error code -22 UBI error:ubi_thread:ubi_bgt0d: work failed with error code -22
Quoted 6 lines
It says you that it wrote some date, then read it back, compared, and the data did not match. You need to start with validating your falash drivers - use mtd tests:
http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests
I formatted and wrote the image again. ubiattach _sometimes_ completes without the error code -22. In this case the mount went ok. But mount sometimes fails completely (structure needs cleaning), other times errors are reported but successfully recovered. So it seems to work, but no in a reliable way. Any suggestions on how to improve it? My kernel is 2.6.29 so perhaps some patches are needed?
For example:
[root@M54418TWR /]# mount -t ubifs ubi0:rootfs /mnt/ubi_rootfs
UBIFS error (pid 661): ubifs_scan: garbage
UBIFS error (pid 661): ubifs_scanned_corruption: corrupted data at LEB 2:8192 UBIFS error (pid 661): ubifs_scanned_corruption: first 4096 bytes from LEB 2:8192 UBIFS error (pid 661): ubifs_scan: LEB 2 scanning failed
UBIFS error (pid 661): ubifs_scan: corrupt empty space at LEB 5:69632 UBIFS error (pid 661): ubifs_scanned_corruption: corrupted data at LEB 5:69632 UBIFS error (pid 661): ubifs_scanned_corruption: first 4096 bytes from LEB 5:69632 UBIFS error (pid 661): ubifs_scan: LEB 5 scanning failed
mount: mounting ubi0:rootfs on /mnt/ubi_rootfs failed: Structure needs cleaning
or:
mount -t ubifs ubi0:datafs /mnt/udatafs
UBIFS error (pid 670): ubifs_scan: garbage
UBIFS error (pid 670): ubifs_scanned_corruption: corrupted data at LEB 2:4096 UBIFS error (pid 670): ubifs_scanned_corruption: first 4096 bytes from LEB 2:4096 UBIFS error (pid 670): ubifs_scan: LEB 2 scanning failed
UBIFS: recovery needed
UBIFS error (pid 670): ubifs_scan: garbage
UBIFS error (pid 670): ubifs_scanned_corruption: corrupted data at LEB 4:0 UBIFS error (pid 670): ubifs_scanned_corruption: first 4096 bytes from LEB 4:0 UBIFS error (pid 670): ubifs_scan: LEB 4 scanning failed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 2, name "datafs"
UBIFS: file system size: 4952064 bytes (4836 KiB, 4 MiB, 39 LEBs)
UBIFS: journal size: 1142785 bytes (1116 KiB, 1 MiB, 9 LEBs)
UBIFS: media format: 4 (latest is 4)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
Regards,
- Lars
Quoted 7 lines · Lars Michael
I formatted and wrote the image again. ubiattach _sometimes_ completes without the error code -22. In this case the mount went ok. But mount sometimes fails completely (structure needs cleaning), other times errors are reported but successfully recovered. So it seems to work, but no in
a reliable way. Any suggestions on how to improve it? My kernel is 2.6.29 so perhaps some patches are needed?
You really need to make the subpage test work. You can ask UBI to not use sub-pages using the 'vid_hdr_offs' parameter of the 'ubi.ko' module. I cannot tell you the exact value because you did not provide enough information about your flash. Ideally, reporters should read these instructions:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
http://www.linux-mtd.infradead.org/doc/ubi.html#L_how_send_bugreport
Signature · 2 lines
Best Regards, Artem Bityutskiy (Артём Битюцкий)