* ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
@ 2012-01-10 12:46 Alexandre Gambier
2012-01-10 21:23 ` Artem Bityutskiy
0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Gambier @ 2012-01-10 12:46 UTC (permalink / raw)
To: linux-mtd
hi everyone,
I use UBI volume and UBIFS on top of a NAND device with an embedded
video meter.
Everything works fine except that when a UBI volume is mounted the
following warning is outputted :
"UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
handling, reserved 0, need 20"
I create the UBI volume using the autosize options.
Does anyone have an idea about what is it and what can I do to fix this
and make sure my UBI volumes work fine.
Best regards,
Alex
Here is the whole log:
UBI: attaching mtd7 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
handling, reserved 0, need 20
UBI: attached mtd7 to ubi0
UBI: MTD device name: "UserData"
UBI: MTD device size: 256 MiB
UBI: number of good PEBs: 2036
UBI: number of bad PEBs: 12
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 2036
UBI: number of PEBs reserved for bad PEB handling: 0
UBI: max/mean erase counter: 2/1
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 1207
UBI volume: ubi0
Volume name: userdata
UBIFS: mounted UBI device 0, volume 1, name "userdata"
UBIFS: file system size: 260757504 bytes (254646 KiB, 248 MiB, 2021 LEBs)
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root: 0 bytes (0 KiB)
--
Best regards.
Alexandre Gambier
Fte Maximal France SAS
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-10 12:46 ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling Alexandre Gambier
@ 2012-01-10 21:23 ` Artem Bityutskiy
2012-01-11 8:10 ` Alexandre Gambier
0 siblings, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2012-01-10 21:23 UTC (permalink / raw)
To: Alexandre Gambier; +Cc: linux-mtd
On Tue, 2012-01-10 at 13:46 +0100, Alexandre Gambier wrote:
> hi everyone,
>
> I use UBI volume and UBIFS on top of a NAND device with an embedded
> video meter.
> Everything works fine except that when a UBI volume is mounted the
> following warning is outputted :
> "UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
> handling, reserved 0, need 20"
Looks like the pool of reserved PEBs is fully used. Fo how long have you
been using this flash?
> UBI: attaching mtd7 to ubi0
When I see things like mtd7 - I get worried. Do you have 7 partitions on
one chip? Even on old good and reliable chips this was not very good
idea, let alone modern NANDs with all these unstable bits, "radiation"
effects, low eraseblock max. erase count, etc...
BTW, be aware of this problem:
http://linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits
which has not been solved - we need a brave knight who'd spend time
working on this issue.
Artem.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-10 21:23 ` Artem Bityutskiy
@ 2012-01-11 8:10 ` Alexandre Gambier
2012-01-14 15:14 ` Artem Bityutskiy
0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Gambier @ 2012-01-11 8:10 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd
>> hi everyone,
>>
>> I use UBI volume and UBIFS on top of a NAND device with an embedded
>> video meter.
>> Everything works fine except that when a UBI volume is mounted the
>> following warning is outputted :
>> "UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
>> handling, reserved 0, need 20"
> Looks like the pool of reserved PEBs is fully used. Fo how long have you
> been using this flash?
This is a brand new flash...I've been using it for 2 months.
>
>> UBI: attaching mtd7 to ubi0
> When I see things like mtd7 - I get worried. Do you have 7 partitions on
> one chip? Even on old good and reliable chips this was not very good
> idea, let alone modern NANDs with all these unstable bits, "radiation"
> effects, low eraseblock max. erase count, etc...
Here is my partition table
mtd0 -> UBoot -> 1 MiB
mtd1 -> UBootSettings -> 128 KiB
mtd2 -> SafeKernel -> 4 MiB => The linux kernel loaded in safe mode
to restore the main rootfs and perform maintenance.
mtd3 -> AppKernel -> 4 MiB => The linux kernel loaded in normal mode
when running the application.
mtd4 -> SafeFS => 64 MiB => The safe mode file-system.
mtd5 -> AppFS => 128 MiB => The main application file-system.
mtd6 -> Reserved => 54.875 MiB => Reserved during the development
stage, will be used in stable version.
mtd7 -> UserData => 256 MiB => User's data partition to store records
and log files (that will never be erased or formatted).
> BTW, be aware of this problem:
>
> http://linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits
thanks..The user's data partition will be the only one mounted in r/w
mode...files in it are not crucial.
> which has not been solved - we need a brave knight who'd spend time
> working on this issue.
A little bit to complicated for me otherwise I would love to help the
MTD project.
Alex
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-11 8:10 ` Alexandre Gambier
@ 2012-01-14 15:14 ` Artem Bityutskiy
2012-01-16 8:47 ` Alexandre Gambier
0 siblings, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2012-01-14 15:14 UTC (permalink / raw)
To: Alexandre Gambier; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
On Wed, 2012-01-11 at 09:10 +0100, Alexandre Gambier wrote:
> >> hi everyone,
> >>
> >> I use UBI volume and UBIFS on top of a NAND device with an embedded
> >> video meter.
> >> Everything works fine except that when a UBI volume is mounted the
> >> following warning is outputted :
> >> "UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
> >> handling, reserved 0, need 20"
> > Looks like the pool of reserved PEBs is fully used. Fo how long have you
> > been using this flash?
> This is a brand new flash...I've been using it for 2 months.
OK, in this case this is most probably because you specified too large
sizes in your ubinize.cfg. So that your volumes take all eraseblocks.
Try to make some volumes smaller.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-14 15:14 ` Artem Bityutskiy
@ 2012-01-16 8:47 ` Alexandre Gambier
2012-01-16 12:24 ` Artem Bityutskiy
0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Gambier @ 2012-01-16 8:47 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd
On 01/14/2012 04:14 PM, Artem Bityutskiy wrote:
> On Wed, 2012-01-11 at 09:10 +0100, Alexandre Gambier wrote:
>>>> hi everyone,
>>>>
>>>> I use UBI volume and UBIFS on top of a NAND device with an embedded
>>>> video meter.
>>>> Everything works fine except that when a UBI volume is mounted the
>>>> following warning is outputted :
>>>> "UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
>>>> handling, reserved 0, need 20"
>>> Looks like the pool of reserved PEBs is fully used. Fo how long have you
>>> been using this flash?
>> This is a brand new flash...I've been using it for 2 months.
> OK, in this case this is most probably because you specified too large
> sizes in your ubinize.cfg. So that your volumes take all eraseblocks.
> Try to make some volumes smaller.
For example, for my 128MiB partition I specified 120MiB which is 7%
smaller than the total size.
What size would you specify for a 128MiB partition ?
thanks for your help.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-16 8:47 ` Alexandre Gambier
@ 2012-01-16 12:24 ` Artem Bityutskiy
2012-01-16 12:28 ` Alexandre Gambier
0 siblings, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2012-01-16 12:24 UTC (permalink / raw)
To: Alexandre Gambier; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]
On Mon, 2012-01-16 at 09:47 +0100, Alexandre Gambier wrote:
> On 01/14/2012 04:14 PM, Artem Bityutskiy wrote:
> > On Wed, 2012-01-11 at 09:10 +0100, Alexandre Gambier wrote:
> >>>> hi everyone,
> >>>>
> >>>> I use UBI volume and UBIFS on top of a NAND device with an embedded
> >>>> video meter.
> >>>> Everything works fine except that when a UBI volume is mounted the
> >>>> following warning is outputted :
> >>>> "UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB
> >>>> handling, reserved 0, need 20"
> >>> Looks like the pool of reserved PEBs is fully used. Fo how long have you
> >>> been using this flash?
> >> This is a brand new flash...I've been using it for 2 months.
> > OK, in this case this is most probably because you specified too large
> > sizes in your ubinize.cfg. So that your volumes take all eraseblocks.
> > Try to make some volumes smaller.
>
> For example, for my 128MiB partition I specified 120MiB which is 7%
> smaller than the total size.
You should be able to find the UBI overhead formulas on the MTD web
site. Try to specify less than that and see. You should leave enough
PEBs reserved for bad eraseblocks handling - it is 1% by default.
> What size would you specify for a 128MiB partition ?
> thanks for your help.
I do not have time to calculate and I do not remember. But the easiest
is to use something small enough and put the auto-resize flag - it will
then make it to be the maximum size. E.g., use 100MiB, boot and see to
how much it resized.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-16 12:24 ` Artem Bityutskiy
@ 2012-01-16 12:28 ` Alexandre Gambier
2012-01-16 12:31 ` Artem Bityutskiy
0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Gambier @ 2012-01-16 12:28 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd
On 01/16/2012 01:24 PM, Artem Bityutskiy wrote:
> On Mon, 2012-01-16 at 09:47 +0100, Alexandre Gambier wrote:
>> For example, for my 128MiB partition I specified 120MiB which is 7%
>> smaller than the total size.
> You should be able to find the UBI overhead formulas on the MTD web
> site. Try to specify less than that and see. You should leave enough
> PEBs reserved for bad eraseblocks handling - it is 1% by default.
>
>> What size would you specify for a 128MiB partition ?
>> thanks for your help.
> I do not have time to calculate and I do not remember. But the easiest
> is to use something small enough and put the auto-resize flag - it will
> then make it to be the maximum size. E.g., use 100MiB, boot and see to
> how much it resized.
I already use the auto-resize flag...I will try to specify a smaller
size and see if it fixes this warning.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-16 12:28 ` Alexandre Gambier
@ 2012-01-16 12:31 ` Artem Bityutskiy
2012-01-16 16:11 ` Alexandre Gambier
0 siblings, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2012-01-16 12:31 UTC (permalink / raw)
To: Alexandre Gambier; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
On Mon, 2012-01-16 at 13:28 +0100, Alexandre Gambier wrote:
> On 01/16/2012 01:24 PM, Artem Bityutskiy wrote:
> > On Mon, 2012-01-16 at 09:47 +0100, Alexandre Gambier wrote:
> >> For example, for my 128MiB partition I specified 120MiB which is 7%
> >> smaller than the total size.
> > You should be able to find the UBI overhead formulas on the MTD web
> > site. Try to specify less than that and see. You should leave enough
> > PEBs reserved for bad eraseblocks handling - it is 1% by default.
> >
> >> What size would you specify for a 128MiB partition ?
> >> thanks for your help.
> > I do not have time to calculate and I do not remember. But the easiest
> > is to use something small enough and put the auto-resize flag - it will
> > then make it to be the maximum size. E.g., use 100MiB, boot and see to
> > how much it resized.
>
> I already use the auto-resize flag...I will try to specify a smaller
> size and see if it fixes this warning.
You use it but it has no effect because the volumes are already very
large and there is no room to enlarge them further. When you make your
initial sizes small, then UBI will reserve 1% for bad blocks and the use
the rest for the auto-resize volume. And it will print a message which
you will see in your dmesg: something like "resizing from a to b".
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling
2012-01-16 12:31 ` Artem Bityutskiy
@ 2012-01-16 16:11 ` Alexandre Gambier
0 siblings, 0 replies; 9+ messages in thread
From: Alexandre Gambier @ 2012-01-16 16:11 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd
On 01/16/2012 01:31 PM, Artem Bityutskiy wrote:
>>> You should be able to find the UBI overhead formulas on the MTD web
>>> site. Try to specify less than that and see. You should leave enough
>>> PEBs reserved for bad eraseblocks handling - it is 1% by default.
I found the formulas and my specified size was 2 MiB too big.
Now it's fixed.
thanks for your help.
Best regards
alex
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-01-16 16:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 12:46 ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling Alexandre Gambier
2012-01-10 21:23 ` Artem Bityutskiy
2012-01-11 8:10 ` Alexandre Gambier
2012-01-14 15:14 ` Artem Bityutskiy
2012-01-16 8:47 ` Alexandre Gambier
2012-01-16 12:24 ` Artem Bityutskiy
2012-01-16 12:28 ` Alexandre Gambier
2012-01-16 12:31 ` Artem Bityutskiy
2012-01-16 16:11 ` Alexandre Gambier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).