can't mount ubifs after resizing with ubirsvol

Richard Weinberger richard at nod.at
Thu Nov 19 05:42:55 PST 2015


Hi!

Am 19.11.2015 um 14:34 schrieb Ibrahim Mattus Neto:
> Hi Richard!
> 
> Thanks for the response.
> 
> What I did was:
> 
> 1) I created an .ubi file using the following configuration.
> [rootfs]
> mode=ubi
> vol_id=0
> vol_type=dynamic
> vol_name=rootfs
> vol_alignment=1
> image=rootfs.ubifs
> vol_size=80MiB
> 
> [data]
> mode=ubi
> vol_id=1
> vol_type=dynamic
> vol_name=data
> vol_alignment=1
> vol_flags=autoresize
> vol_size=10MiB
> 
> [recover]
> mode=ubi
> vol_id=2
> vol_type=dynamic
> vol_name=recover
> vol_alignment=1
> vol_size=5MiB
> 
> 2) After booting I tried to shrink "data" and increase the size of recover using ubirsvol:
> 
> ubirsvol /dev/ubi0 -n 1 -s 4MiB    (data)
> 
> ubirsvol /dev/ubi0 -n 2 -s 15MiB (recover)
> 
> 3) After the resizing I tried to mount "data"
> 
> mount /home/data/
> [   88.510000] UBIFS error (ubi0:1 pid 668): validate_sb: bad LEB count: 1159 in superblock, 34 on UBI volume, 20 minimum required
> [   88.520000] UBIFS error (ubi0:1 pid 668): validate_sb: bad superblock, error 1

This cannot work. You resized the UBI *volume*, not the UBIFS filesystem.
And unless I'm very mistaken UBIFS does not support shrinking anyway.

Thanks,
//richard



More information about the linux-mtd mailing list