Skip to contentSkip to conversation

How to organize UBI volumes and power crash

DISCUSSION Мясоедов А.Ю. 3 participants 6 messages Oct 2, 2018 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I use UBIFS at my device. I'd like 2 UBIFS volumes, first volume for work purposes, and second volume for logs omly. RootFS is in RAM.

Both volumes are R/W, but the first volume is not intended for permanent writing. The second volume is intended for permanent writing (logs and some data tables).

The second volume may be failured in casual power crash. But the first volume would work.

Will it be safe to have only 1 mfd device, and 2 UBI volume on the mtd device? Or I must to have 2 separate mtd devices with one UBI volume on each? The second approach is not suitable because of device tree modifications when I want to change volume sizes/

Signature · 1 line
Andrey
#1 lore raw
Quoted 2 lines · Мясоедов А.Ю.

I use UBIFS at my device. I'd like 2 UBIFS volumes, first volume for

There is no such thing. You guess mean UBI volumes. A UBIFS filesystem always sits ontop of a UBI volume.

Quoted 8 lines

work purposes, and second volume for logs omly. RootFS is in RAM.

Both volumes are R/W, but the first volume is not intended for permanent writing. The second volume is intended for permanent writing (logs and some data tables).

The second volume may be failured in casual power crash. But the first volume would work.

Both UBI and UBIFS must not corrupt upon a powercut, if you face such an issue, please report. This could be a bug or a hardware problem.

Quoted 4 lines

Will it be safe to have only 1 mfd device, and 2 UBI volume on the mtd device? Or I must to have 2 separate mtd devices with one UBI volume on each? The second approach is not suitable because of device tree modifications when I want to change volume sizes/

The general recommendation is having the MTD partition and therefore the UBI device as large as possible such that the wear leveling large.

Signature · 2 lines
Thanks,
//richard
#2 lore raw

Thank ypu, Richard.

Quoted 1 line

Both UBI and UBIFS must not corrupt upon a powercut, if you face such an

issue, please report. This could be a bug or a hardware problem.

But http://www.linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits says about such possible problems (unstable bits).

Quoted 1 line

The general recommendation is having the MTD partition and therefore the UBI device as large as possible such that the wear leveling large.

02.10.2018 11:41, Richard Weinberger написал:

Do you mean one MTD partition for first UBI volume, and second MTD partition for another one?

Andrey

#3 lore raw

Am Dienstag, 2. Oktober 2018, 10:53:00 CEST schrieb Мясоедов А.Ю.:

Quoted 7 lines

Thank ypu, Richard.

Quoted 1 line

Both UBI and UBIFS must not corrupt upon a powercut, if you face such an

issue, please report. This could be a bug or a hardware problem.

But http://www.linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits
says about such possible problems (unstable bits).

This problem is highly theoretical and so far I have never seen it. So far anyone that claimed to suffer from that was wrong and it turned out that it was some other issue.

It is time to remove that paragraph from the website since it confuses user over and over.
David, can you please file and merge a patch?

Quoted 6 lines
Quoted 1 line

The general recommendation is having the MTD partition and therefore

the UBI device as large as possible such that the wear leveling large. 02.10.2018 11:41, Richard Weinberger написал:

Do you mean one MTD partition for first UBI volume, and second MTD partition for another one?

No, just one UBI device on one MTD partition with multiple UBI volumes.

Thanks,
//richard

#4 lore raw

If so, the UBI/UBIFS is very good and reliable system.
It would be beautiful if linux-mtd.infradead.org will correct they documentation. So I can tell my chief about FLASH partitions organisation in my device.

Thank you, Richard

Andrey

Quoted 29 lines

Am Dienstag, 2. Oktober 2018, 10:53:00 CEST schrieb Мясоедов А.Ю.:

Quoted 7 lines

Thank ypu, Richard.

Quoted 1 line

Both UBI and UBIFS must not corrupt upon a powercut, if you face such an

issue, please report. This could be a bug or a hardware problem.

But http://www.linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits
says about such possible problems (unstable bits).

This problem is highly theoretical and so far I have never seen it. So far anyone that claimed to suffer from that was wrong and it turned out that it was some other issue.

It is time to remove that paragraph from the website since it confuses user over and over.
David, can you please file and merge a patch?

Quoted 6 lines
Quoted 1 line

The general recommendation is having the MTD partition and therefore

the UBI device as large as possible such that the wear leveling large. 02.10.2018 11:41, Richard Weinberger написал:

Do you mean one MTD partition for first UBI volume, and second MTD partition for another one?

No, just one UBI device on one MTD partition with multiple UBI volumes.

Thanks,
//richard

#5 lore raw

Am Dienstag, 2. Oktober 2018, 11:13:35 CEST schrieb Мясоедов А.Ю.:

Quoted 4 lines

If so, the UBI/UBIFS is very good and reliable system. It would be beautiful if linux-mtd.infradead.org will correct they documentation. So I can tell my chief about FLASH partitions organisation in my device.

Since we are hackers and not marketing experts our website sucks a little. ;-)

Thanks,
//richard