ubifs wear leveling across entire device

Artem Bityutskiy dedekind1 at gmail.com
Tue Dec 8 01:36:47 EST 2009


On Mon, 2009-12-07 at 17:44 -0500, twebb wrote:
> >
> > Wear-levelling occurs within a single UBI device which is generally
> > a single MTD partition.
> >
> > You need 1 MTD partition and 1 UBI device with 3 volumes.  Make the
> > 3 volumes total less than the whole UBI device and you can add a 4th
> > volume later.
> >
> 
> If I make 1 MTD partition and 1 corresponding UBI device, should (can)
> it include areas that will never be accessed via UBI-aware tools?  For
> example, is it safe to have on a 4GB physical device a single 4GB MTD
> partition with a single corresponding UBI device, but only 3GB of the
> 4GB device contain N UBI volumes only accessed via appropriate UBI
> user-space (or u-boot) tools while the remaining 1GB of the 4GB is
> accessed with mtd-utils?

This contradicts to what you originally asked for. "Give me
wear-levelling across whole device, but do not touch this 1GiB".

> There are two reasons for this approach:
> 1 - to (hopefully) get the benefits of wear leveling across the entire
> physical device (though I think this may not work in the scenario I've
> described)

If you want untouched 1 GiB, make 3GiB + 1GiB partitions, give 3GiB to
UBI.

> 2 - to allow access to a portion of the flash by non-UBI aware code
> 
> I assume the alternative (w/o the benefit of wear leveling across the
> entire device) is to define 2 MTD partitions: 1 for "non-UBI" access
> and 1 for a single UBI device with multiple UBI volumes?

Yes.

Also, you can emulate MTD devices on top of UBI volumes, so you can use
many of the MTD tools in linux.

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




More information about the linux-mtd mailing list