From 5e9c451d5f2e33b4d2e662781eaa6f8ce8dacd0f Mon Sep 17 00:00:00 2001 From: Abel Lopez Date: Tue, 15 Dec 2015 15:45:36 -0800 Subject: [PATCH] Document byte-to-inode ratio End user docs would benefit from a section about the byte-to-inode ratio, and why it's set the way it is. This update explains why and how to manipulate the ratio depending on the intended use. Change-Id: Iffb5ef6f4c7c74f4aa6e25912d4991d7a611c8fe Closes-bug: 1512841 --- doc/source/user_guide/building_an_image.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/source/user_guide/building_an_image.rst b/doc/source/user_guide/building_an_image.rst index d5ae8bde2..05810cd73 100644 --- a/doc/source/user_guide/building_an_image.rst +++ b/doc/source/user_guide/building_an_image.rst @@ -54,3 +54,20 @@ formats are: * vhd * docker * raw + +Filesystem Caveat +----------------- + +By default, disk-image-create uses a 4k byte-to-inode ratio when creating the +filesystem in the image. This allows large 'whole-system' images to utilize +several TB disks without exhausting inodes. In contrast, when creating images +intended for tenant instances, this ratio consumes more disk space than an +end-user would expect (e.g. a 50GB root disk has 47GB avail.). If the image is +intended to run within a tens to hundrededs of gigabyte disk, setting the +byte-to-inode ratio to the ext4 default of 16k will allow for more usable space +on the instance. The default can be overridden by passing --mkfs-options like +this:: + + disk-image-create --mkfs-options '-i 16384' vm + +