Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

UBIFS size issue

Altera_Forum
Honored Contributor II
1,258 Views

Hello, 

 

I am working with UBIFS,  

 

When I am giving 55MiB of vol size, by following command 

ubimkvol /dev/ubi0 -N vol -s 55MiB 

 

I could able to see only, 49 MiB of space when Kernel boot-up. 

Can any one please, give me some inputs regarding same. 

Thanks, 

Ashwin Rase
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
487 Views

Hi, 

 

 

--- Quote Start ---  

 

When I am giving 55MiB of vol size, by following command 

ubimkvol /dev/ubi0 -N vol -s 55MiB 

I could able to see only, 49 MiB of space when Kernel boot-up. 

 

--- Quote End ---  

 

 

Can't you get the answer from here ? 

 

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

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
487 Views

Hello, 

 

Thanks for reply, 

 

I went through the links, it has mentioned about the free space i.e. "Use%" from below logs . 

 

It also informs that how it varies. Following logs of mine is showing the same. 

 

But I actually want to know that , 

 

when I create a volume by 55 MiB size and I get it as 49 MiB size after df -h, then 

 

for what purpose 6 MiB (55MiB - 49MiB) is used ? 

 

Why I could not able to see 55 MiB size, as allocated total space. ? 

 

-- Following is the log ----- 

 

root@dhcppc7:~# df -h 

 

Filesystem Size Used Available Use% Mounted on 

 

ubi0:vol_1 49.2M 44.0M 5.2M 90% / 

 

root@dhcppc7:~# sync 

 

root@dhcppc7:~# df -h 

 

Filesystem Size Used Available Use% Mounted on 

 

ubi0:vol_1 49.2M 43.0M 6.2M 87% / 

 

------------------------------------------------------ 

 

Thank you, 

 

Ashwin Rase.
0 Kudos
Altera_Forum
Honored Contributor II
487 Views

Hi, 

 

 

--- Quote Start ---  

 

But I actually want to know that , 

 

when I create a volume by 55 MiB size and I get it as 49 MiB size after df -h, then 

 

for what purpose 6 MiB (55MiB - 49MiB) is used ? 

 

Why I could not able to see 55 MiB size, as allocated total space. ? 

 

--- Quote End ---  

 

 

UBIFS always reports conservative amount of free space, 

I think that the reason is written here.  

 

http://www.linux-mtd.infradead.org/doc/ubifs.html#l_spaceacc 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
487 Views

Thanks Kazuyasu for your help

0 Kudos
Reply