Skip to content
Snippets Groups Projects
  • Gabor Juhos's avatar
    d90e805f
    build: Add TARGET_ROOTFS_RESERVED_PCT option to reduce wasted space · d90e805f
    Gabor Juhos authored
    
    The genext2fs tool will 'reserve' 5% of the image size by default,
    apparently by creating a huge lost+found directory. In fact it seemed to
    be much more than 5% in practice — I saw an image with 8MiB used, and
    recovered about 2MiB of it by deleting the 'empty' lost+found directory:
    
    /dev/loop0         48377  8482     37438  19% /mnt/spare
     # rmdir lost+found/
    /dev/loop0         48377  6014     39906  14% /mnt/spare
    
    This makes it configurable, but leaves it at the genext2fs default
    of 5% for now. It should probably be changed to default to zero, but
    that can be a separate patch.
    
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
    
    SVN-Revision: 34408
    d90e805f
    History
    build: Add TARGET_ROOTFS_RESERVED_PCT option to reduce wasted space
    Gabor Juhos authored
    
    The genext2fs tool will 'reserve' 5% of the image size by default,
    apparently by creating a huge lost+found directory. In fact it seemed to
    be much more than 5% in practice — I saw an image with 8MiB used, and
    recovered about 2MiB of it by deleting the 'empty' lost+found directory:
    
    /dev/loop0         48377  8482     37438  19% /mnt/spare
     # rmdir lost+found/
    /dev/loop0         48377  6014     39906  14% /mnt/spare
    
    This makes it configurable, but leaves it at the genext2fs default
    of 5% for now. It should probably be changed to default to zero, but
    that can be a separate patch.
    
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
    
    SVN-Revision: 34408