can't mount ubifs on volume smaller than 265 LEBs/32MiB

Artem Bityutskiy dedekind at infradead.org
Fri Apr 4 01:25:50 EDT 2008


On Fri, 2008-04-04 at 15:12 +1100, Hamish Moffatt wrote:
> I need a ubifs on a small volume (around 16MiB or less) but I've found
> that I can't get the volume to mount if it's that small.
> 
> With a LEB size of 126kb, any file system < 265 LEBs won't mount,
> failing in validate_sb.
> 
> # ubimkvol /dev/ubi0 -N config -S 264
> Volume ID 2, size 264 LEBs (34062336 bytes, 32.5 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
> # mount /rw
> mount: mounting ubi0:config on /rw failed: Invalid argument
> 
> # dmesg
> [...]
> [ 1191.360000] UBIFS error (pid 2804): validate_sb: bad superblock
> 
> # ubirmvol /dev/ubi0 -n 2
> # ubimkvol /dev/ubi0 -N config -S 265
> Volume ID 2, size 265 LEBs (34191360 bytes, 32.6 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
> # mount /rw

Cannot reproduce this with nandsim.

$ sudo modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa
third_id_byte=0x00 fourth_id_byte=0x15

$ sudo modprobe ubi mtd=0

$ sudo ubimkvol /dev/ubi0 -N config -S 264
Volume ID 0, size 264 LEBs (34062336 bytes, 32.5 MiB), LEB size 129024
bytes (126.0 KiB), dynamic, name "config", alignment 1

$ sudo mount -t ubifs ubi0:config /mnt/ubifs/

Could you please enable debugging, retry and send me dmesg output? Or
any suggestion what I could do to reproduce the problem?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list