Skip to contentSkip to conversation

UBIFS space consumption

DISCUSSION Vikram Narayanan 2 participants 5 messages Jan 18, 2013 – Feb 13, 2013 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I am using UBIFS with the below partitioning layout.

<6m(bootloader)
512k(environment)
512k(redundant-environment)
5m(kernel),
170m(filesystem),
40m(user_data1),
-(user_data2)>

For the UBI volume 0 which has 170 MiB,
ubinfo reports 164.7 MiB, which is explained by:

(PEB size - LEB size) * (no of PEB's - reserved PEBs) (256 - 248) * (680 - 6) = 5.392 MiB
Total size = 170 MiB - 5.39 = 164.6 MiB

root@BOX:/# ubinfo /dev/ubi0
ubi0
Volumes count:                           1
Logical eraseblock size:                 253952 bytes, 248.0 KiB
Total amount of logical eraseblocks:     680 (172687360 bytes, 164.7 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  6
Current maximum erase counter value:     5
Minimum input/output unit size:          4096 bytes
Character device major/minor:            253:0
Present volumes:                         0

But according to "df", UBI volume 0 is sized 148.9 MiB. That's, 15.8 MiB more in terms of consumption.

root@BOX:/# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs             148.9M    132.8M     16.1M  89% /
root@BOX:/#

Can someone explain where this 15 MiB is getting lost?

Regards,
Vikram

#1 lore raw
Quoted 35 lines · Vikram Narayanan

I am using UBIFS with the below partitioning layout.

<6m(bootloader)
512k(environment)
512k(redundant-environment)
5m(kernel),
170m(filesystem),
40m(user_data1),
-(user_data2)>

For the UBI volume 0 which has 170 MiB,
ubinfo reports 164.7 MiB, which is explained by:

(PEB size - LEB size) * (no of PEB's - reserved PEBs) (256 - 248) * (680 - 6) = 5.392 MiB
Total size = 170 MiB - 5.39 = 164.6 MiB

root@BOX:/# ubinfo /dev/ubi0
ubi0
Volumes count:                           1
Logical eraseblock size:                 253952 bytes, 248.0 KiB
Total amount of logical eraseblocks:     680 (172687360 bytes, 164.7 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  6
Current maximum erase counter value:     5
Minimum input/output unit size:          4096 bytes
Character device major/minor:            253:0
Present volumes:                         0

But according to "df", UBI volume 0 is sized 148.9 MiB. That's, 15.8 MiB more in terms of consumption.

Quoted 6 lines
root@BOX:/# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs             148.9M    132.8M     16.1M  89% /
root@BOX:/#

Can someone explain where this 15 MiB is getting lost?

Artem, Any ideas on this?

Thanks,
Vikram

#3 lore raw
Quoted 9 lines · Artem Bityutskiy
Quoted 2 lines · Vikram Narayanan

But according to "df", UBI volume 0 is sized 148.9 MiB. That's, 15.8 MiB more in terms of consumption.

Df is not accurate with UBIFS by design, this is covered by this FAQ entry:

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_df_report

Sorry, I think you've mistaken my question. I've referred the above FAQ before framing this mail.

The above FAQ explains why the _free_ space shown by 'df' isn't accurate. I'm concerned here about the _total_ size shown to me by df, which is less than what is reported by ubinfo.

Thanks,
Vikram

#4 lore raw
Quoted 11 lines · Vikram Narayanan
Quoted 9 lines · Artem Bityutskiy
Quoted 2 lines · Vikram Narayanan

But according to "df", UBI volume 0 is sized 148.9 MiB. That's, 15.8 MiB more in terms of consumption.

Df is not accurate with UBIFS by design, this is covered by this FAQ entry:

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_df_report

Quoted 6 lines

Sorry, I think you've mistaken my question. I've referred the above FAQ before framing this mail.

The above FAQ explains why the _free_ space shown by 'df' isn't accurate. I'm concerned here about the _total_ size shown to me by df, which is less than what is reported by ubinfo.

I guess dmesg output may give some clue - probably that space is spent for the journal, orphans area, and indexing area.

Signature · 2 lines
Best Regards,
Artem Bityutskiy