UBI: Single versus Multiple Images

Doug Kehn
2012-06-05T13:21:43Z

Hi Everyone,

I have the following NAND flash MTD layout (presently JFFS2):

* Boot-loader
* Kernel
* Root file-system (rootfs)

* Data

I'm going to switch from JFFS2 to UBI/UBIFS.  I'm wondering if it is better to create a single UBI image containing both rootfs and data volumes or to create separate UBI images (each with a single volume) or is the answer it depends?

The data volume will be used for logging data.  The volume won't completely fill as old data will be purged to make room for new data.  For the single image multiple volume case, if I understand the
documentation correctly, UBI will use all PEB from both volumes for mapping per-volume LEB,
correct?  If my understanding is correct, then it's possible, after enough time, maximum PEB erase count will be reached and both rootfs and data volumes will be read-only?  If the goal is to keep the rootfs volume writable, even if the data volume become read-only, then would it be better to create multiple UBI images?  Or is my understanding all wrong?

Thanks,
...doug