* Missing 2 blocks on my UBI partition
@ 2020-05-26 15:54 Patrick Doyle
2020-05-26 16:00 ` Steve deRosier
0 siblings, 1 reply; 3+ messages in thread
From: Patrick Doyle @ 2020-05-26 15:54 UTC (permalink / raw)
To: linux-mtd
I'm curious to learn where 2 blocks went missing from my UBI NAND
device... can anybody help me out:
# ubinfo -a
UBI version: 1
Count of UBI devices: 1
UBI control device major/minor: 10:57
Present UBI devices: ubi0
ubi0
Volumes count: 8
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 1024 (130023424 bytes, 124.0 MiB)
Amount of available logical eraseblocks: 99 (12570624 bytes, 11.9 MiB)
Maximum count of volumes 128
Count of bad physical eraseblocks: 0
Count of reserved physical eraseblocks: 20
Current maximum erase counter value: 33
Minimum input/output unit size: 2048 bytes
Character device major/minor: 252:0
Present volumes: 0, 1, 2, 3, 4, 5, 6, 7
Volume ID: 0 (on ubi0)
Type: static
Alignment: 1
Size: 127 LEBs (16125952 bytes, 15.3 MiB)
Data bytes: 16031744 bytes (15.2 MiB)
State: OK
Name: rootfs
Character device major/minor: 252:1
-----------------------------------
Volume ID: 1 (on ubi0)
Type: dynamic
Alignment: 1
Size: 529 LEBs (67170304 bytes, 64.0 MiB)
State: OK
Name: persistent
Character device major/minor: 252:2
-----------------------------------
Volume ID: 2 (on ubi0)
Type: static
Alignment: 1
Size: 30 LEBs (3809280 bytes, 3.6 MiB)
Data bytes: 3746638 bytes (3.5 MiB)
State: OK
Name: kernel
Character device major/minor: 252:3
-----------------------------------
Volume ID: 3 (on ubi0)
Type: static
Alignment: 1
Size: 143 LEBs (18157568 bytes, 17.3 MiB)
Data bytes: 18145280 bytes (17.3 MiB)
State: OK
Name: old_rootfs
Character device major/minor: 252:4
-----------------------------------
Volume ID: 4 (on ubi0)
Type: static
Alignment: 1
Size: 30 LEBs (3809280 bytes, 3.6 MiB)
Data bytes: 3745994 bytes (3.5 MiB)
State: OK
Name: old_kernel
Character device major/minor: 252:5
-----------------------------------
Volume ID: 5 (on ubi0)
Type: static
Alignment: 1
Size: 38 LEBs (4825088 bytes, 4.6 MiB)
Data bytes: 4763648 bytes (4.5 MiB)
State: OK
Name: language
Character device major/minor: 252:6
-----------------------------------
Volume ID: 6 (on ubi0)
Type: static
Alignment: 1
Size: 1 LEBs (126976 bytes, 124.0 KiB)
Data bytes: 65536 bytes (64.0 KiB)
State: OK
Name: crypto
Character device major/minor: 252:7
-----------------------------------
Volume ID: 7 (on ubi0)
Type: static
Alignment: 1
Size: 1 LEBs (126976 bytes, 124.0 KiB)
Data bytes: 65536 bytes (64.0 KiB)
State: OK
Name: prev_crypto
Character device major/minor: 252:8
This shows that I have 8 UBI Volumes with sized as:
Size: 127 LEBs (16125952 bytes, 15.3 MiB)
Size: 529 LEBs (67170304 bytes, 64.0 MiB)
Size: 30 LEBs (3809280 bytes, 3.6 MiB)
Size: 143 LEBs (18157568 bytes, 17.3 MiB)
Size: 30 LEBs (3809280 bytes, 3.6 MiB)
Size: 38 LEBs (4825088 bytes, 4.6 MiB)
Size: 1 LEBs (126976 bytes, 124.0 KiB)
Size: 1 LEBs (126976 bytes, 124.0 KiB)
Total: 899 LEBs
There are 99 blocks free, 20 blocks reserved, and (according to the
documentation, 4 blocks of UBI management overhead
899+99+20+4=1022
But my NAND flash has 1024 blocks. According to ubinfo, none of them
are marked as bad.
Where did the other 2 blocks go?
What am I missing?
--wpd
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Missing 2 blocks on my UBI partition
2020-05-26 15:54 Missing 2 blocks on my UBI partition Patrick Doyle
@ 2020-05-26 16:00 ` Steve deRosier
2020-05-26 17:21 ` Patrick Doyle
0 siblings, 1 reply; 3+ messages in thread
From: Steve deRosier @ 2020-05-26 16:00 UTC (permalink / raw)
To: Patrick Doyle; +Cc: linux-mtd
On Tue, May 26, 2020 at 8:55 AM Patrick Doyle <wpdster@gmail.com> wrote:
>
> I'm curious to learn where 2 blocks went missing from my UBI NAND
> device... can anybody help me out:
>
> # ubinfo -a
> UBI version: 1
> Count of UBI devices: 1
> UBI control device major/minor: 10:57
> Present UBI devices: ubi0
>
> ubi0
> Volumes count: 8
> Logical eraseblock size: 126976 bytes, 124.0 KiB
> Total amount of logical eraseblocks: 1024 (130023424 bytes, 124.0 MiB)
> Amount of available logical eraseblocks: 99 (12570624 bytes, 11.9 MiB)
> Maximum count of volumes 128
> Count of bad physical eraseblocks: 0
> Count of reserved physical eraseblocks: 20
> Current maximum erase counter value: 33
> Minimum input/output unit size: 2048 bytes
> Character device major/minor: 252:0
> Present volumes: 0, 1, 2, 3, 4, 5, 6, 7
>
> Volume ID: 0 (on ubi0)
> Type: static
> Alignment: 1
> Size: 127 LEBs (16125952 bytes, 15.3 MiB)
> Data bytes: 16031744 bytes (15.2 MiB)
> State: OK
> Name: rootfs
> Character device major/minor: 252:1
> -----------------------------------
> Volume ID: 1 (on ubi0)
> Type: dynamic
> Alignment: 1
> Size: 529 LEBs (67170304 bytes, 64.0 MiB)
> State: OK
> Name: persistent
> Character device major/minor: 252:2
> -----------------------------------
> Volume ID: 2 (on ubi0)
> Type: static
> Alignment: 1
> Size: 30 LEBs (3809280 bytes, 3.6 MiB)
> Data bytes: 3746638 bytes (3.5 MiB)
> State: OK
> Name: kernel
> Character device major/minor: 252:3
> -----------------------------------
> Volume ID: 3 (on ubi0)
> Type: static
> Alignment: 1
> Size: 143 LEBs (18157568 bytes, 17.3 MiB)
> Data bytes: 18145280 bytes (17.3 MiB)
> State: OK
> Name: old_rootfs
> Character device major/minor: 252:4
> -----------------------------------
> Volume ID: 4 (on ubi0)
> Type: static
> Alignment: 1
> Size: 30 LEBs (3809280 bytes, 3.6 MiB)
> Data bytes: 3745994 bytes (3.5 MiB)
> State: OK
> Name: old_kernel
> Character device major/minor: 252:5
> -----------------------------------
> Volume ID: 5 (on ubi0)
> Type: static
> Alignment: 1
> Size: 38 LEBs (4825088 bytes, 4.6 MiB)
> Data bytes: 4763648 bytes (4.5 MiB)
> State: OK
> Name: language
> Character device major/minor: 252:6
> -----------------------------------
> Volume ID: 6 (on ubi0)
> Type: static
> Alignment: 1
> Size: 1 LEBs (126976 bytes, 124.0 KiB)
> Data bytes: 65536 bytes (64.0 KiB)
> State: OK
> Name: crypto
> Character device major/minor: 252:7
> -----------------------------------
> Volume ID: 7 (on ubi0)
> Type: static
> Alignment: 1
> Size: 1 LEBs (126976 bytes, 124.0 KiB)
> Data bytes: 65536 bytes (64.0 KiB)
> State: OK
> Name: prev_crypto
> Character device major/minor: 252:8
>
> This shows that I have 8 UBI Volumes with sized as:
> Size: 127 LEBs (16125952 bytes, 15.3 MiB)
> Size: 529 LEBs (67170304 bytes, 64.0 MiB)
> Size: 30 LEBs (3809280 bytes, 3.6 MiB)
> Size: 143 LEBs (18157568 bytes, 17.3 MiB)
> Size: 30 LEBs (3809280 bytes, 3.6 MiB)
> Size: 38 LEBs (4825088 bytes, 4.6 MiB)
> Size: 1 LEBs (126976 bytes, 124.0 KiB)
> Size: 1 LEBs (126976 bytes, 124.0 KiB)
> Total: 899 LEBs
> There are 99 blocks free, 20 blocks reserved, and (according to the
> documentation, 4 blocks of UBI management overhead
>
> 899+99+20+4=1022
>
> But my NAND flash has 1024 blocks. According to ubinfo, none of them
> are marked as bad.
>
> Where did the other 2 blocks go?
>
> What am I missing?
>
The last two blocks on the NAND are typically used as a Bad Block
Table by Linux. I imagine this is likely where the last two blocks
"went". You should see a message about that in your dmesg.
- Steve
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Missing 2 blocks on my UBI partition
2020-05-26 16:00 ` Steve deRosier
@ 2020-05-26 17:21 ` Patrick Doyle
0 siblings, 0 replies; 3+ messages in thread
From: Patrick Doyle @ 2020-05-26 17:21 UTC (permalink / raw)
To: Steve deRosier; +Cc: linux-mtd
On Tue, May 26, 2020 at 12:01 PM Steve deRosier <derosier@gmail.com> wrote:
>
> The last two blocks on the NAND are typically used as a Bad Block
> Table by Linux. I imagine this is likely where the last two blocks
> "went". You should see a message about that in your dmesg.
>
> - Steve
Ahh yes... that sounds right. It's curious that ubinfo still thinks
it has access to 1024 blocks, if the mtd driver (presumably?) is
taking away the last 2 blocks for itself.
It also seems like I should be able to shut that off, since
(presumably?) it adds no value to the bad block management provided by
UBI.
I'll go look into that.
Thank you very much.
--wpd
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-26 17:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 15:54 Missing 2 blocks on my UBI partition Patrick Doyle
2020-05-26 16:00 ` Steve deRosier
2020-05-26 17:21 ` Patrick Doyle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.