Resizing of an existing UBIFS

Artem Bityutskiy dedekind1 at gmail.com
Tue May 22 04:10:58 EDT 2012


On Tue, 2012-05-22 at 09:21 +0200, Robert Homann wrote:
> OK, thanks. Actually, writing such a tool is not completely out of
> question in my case... How hard do you think it would be to implement it?
> Would such a tool simply change some values in a few structures or would it
> have to do something much more complicated? Or could some existing tool from
> mtd-utils be extended to do the job?

The idea is that we have on-flash area called "lprops area" which stands
for "LEB properties" and this area contains per-LEB information, e.g.,
how much free space this LEB contains. Obviously - the larger is the UBI
volume, the more LEBs it has, the larger is the lprops area. The lprops
area sits at the beginning of the flash.

When you create the file-system you can specify the size of the lprops
area indirectly using the --max-leb-cnt option. To re-size beyond that,
you need to extend the area, which means that you need to relocate the
contents of LEBs which follow this are further to the end of the device.
This this will change the position of UBIFS nodes, and will re-quire to
amend the indexing information. This is not a simple task, but doable.

However, it may be easier to copy the contents of the entire file-system
to a local machine, then re-create a new image with those files, and
re-flash the device with the new image...

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120522/bb4bf13f/attachment.sig>


More information about the linux-mtd mailing list