OpenWrt Forum Archive

Topic: error: ext4_allocate_best_fit_partial

The content of this topic has been archived on 15 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,
I'm trying to build an x86 image. But there comes an error "error: ext4_allocate_best_fit_partial: failed to allocate 13 blocks, out of space?" I tried to increase the number of inodes, but it doesn't work. How can I fix this? thank you.

[==========================================================================================================================================================-] 3670/3670 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
    compressed data, compressed metadata, compressed fragments, no xattrs
    duplicates are removed
Filesystem size 14137.02 Kbytes (13.81 Mbytes)
    29.79% of uncompressed filesystem size (47447.94 Kbytes)
Inode table size 34246 bytes (33.44 Kbytes)
    24.74% of uncompressed inode table size (138399 bytes)
Directory table size 42988 bytes (41.98 Kbytes)
    46.70% of uncompressed directory table size (92059 bytes)
Number of duplicate files found 29
Number of inodes 4237
Number of files 3626
Number of fragments 130
Number of symbolic links  322
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 288
Number of ids (unique uids + gids) 1
Number of uids 1
    root (0)
Number of gids 1
    root (0)
/home/openwrt/trunk/staging_dir/host/bin/make_ext4fs -l 50331648 -b 4096 -i 6000 -m 0 -J /home/openwrt/trunk/build_dir/target-i386_i486_uClibc-0.9.33.2/linux-x86_generic/root.ext4 /home/openwrt/trunk/build_dir/target-i386_i486_uClibc-0.9.33.2/root-x86/
Creating filesystem with parameters:
    Size: 50331648
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6000
    Inode size: 256
    Journal blocks: 0
    Label:
    Blocks: 12288
    Block groups: 1
    Reserved blocks: 0
    Reserved block group size: 7
error: ext4_allocate_best_fit_partial: failed to allocate 13 blocks, out of space?
make[5]: *** [mkfs-ext4] Error 1


PS:I'm doing this in VMware (Ubuntu14.04).

(Last edited by 1034951393 on 30 Apr 2015, 07:01)

I hope this reply doesn't come too late for you, but I ran into the same problem, in my case:

error: ext4_allocate_best_fit_partial: failed to allocate 1579 blocks, out of space?

I solved the problem by increasing the root filesystem partition size from 48 (MB) to 96.  You should be OK by only increasing to 64 or fewer MB, since you're only shy by 13 blocks.

Make the change by running "make menuconfig", go to "Target Images", "Root filesystem partition size (in MB)"

I'm building a pretty large/complete install for my ODROID-U2 with 2 GB RAM and 64 GB eMMC flash, a "big" system for OpenWRT, so probably similar to your x86 system in that regard.

Thank you it works, but in my case (added NO_STRIP clause) I had to add much more space! smile

(Last edited by antonio.petricca on 3 May 2016, 12:33)

The discussion might have continued from here.