Static UBI volumes and ubiupdatevol ?
Ricard Wanderlof
ricard.wanderlof at axis.com
Wed Dec 15 05:43:38 EST 2010
On Wed, 15 Dec 2010, Ricard Wanderlof wrote:
> I've tried using ubimkvol to create a static volume, then using
> ubiupdatevol to write an ubifs image to it. That works, but when I try to
> mount it subsequently I get things like
>
> [ 6656.114000] UBIFS: static UBI volume - read-only mode
> [ 6656.129000] UBIFS error (pid 866): mount_ubifs: can't format empty UBI
> volume: read-only UBI volume
> mount: mounting ubi1_0 on /volume1/ failed: Read-only file system
I don't know if I screwed up big time when I was trying this out before,
it seems to work fine now just as well as with dynamic volumes. I don't
know if I was doing ubiupdatevol to the wrong volume (which would explain
the above error message) or what.
I'd still like to get some input on the other two questions in my previous
email though...
> A related question: With static volumes, I assume you still get the
> benefit of scrubbing, which in turn means that UBI can move the data
> around if it deems necessary?
>
> Which begs a final question: is it possible to verify the integrity of a
> static UBI volume? Even with JFFS2, if mounted readonly the flash in that
> particular partition is never written to, so it is possible to use a
> simple checksum to verify data integrity. With JFFS2 this can be
> important, as missing JFFS2 nodes don't necessarily result in mount time
> or run time failures, it just results in missing files or parts of files.
I'm also wondering if anyone has any thoughts on upgrading a 'live'
system, when the flash is managed by UBI.
With a system based on mtd+jffs2 it is actually possible to reflash the
partition with the [read only] root file system on it without unmounting,
as long as no accesses are made to the physical flash during the rewrite
or afterwards. In other words, immediately after reflashing the system
must be rebooted.
However, with UBI, given that there are background threads which might be
doing garbage collection etc I'm suspecting such a solution might not be
as suitable when the flash is managed by UBI. Or is there a some solution
that someone has tried with any level of success?
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list