Merge "Put MKFS_OPTS after filesystem type"
This commit is contained in:
commit
5db62528f5
@ -417,7 +417,7 @@ LOOPDEV=$(sudo losetup --show -f $TMP_IMAGE_PATH)
|
||||
export EXTRA_UNMOUNT="detach_loopback $LOOPDEV"
|
||||
export IMAGE_BLOCK_DEVICE=$LOOPDEV
|
||||
eval_run_d block-device "IMAGE_BLOCK_DEVICE="
|
||||
sudo mkfs $MKFS_OPTS -t $FS_TYPE -L ${DIB_ROOT_LABEL} ${IMAGE_BLOCK_DEVICE}
|
||||
sudo mkfs -t $FS_TYPE $MKFS_OPTS -L ${DIB_ROOT_LABEL} ${IMAGE_BLOCK_DEVICE}
|
||||
# Tuning the rootfs uuid works only for ext filesystems.
|
||||
if echo "$FS_TYPE" | grep -q "^ext"; then
|
||||
sudo tune2fs -U ${DIB_IMAGE_ROOT_FS_UUID} ${IMAGE_BLOCK_DEVICE}
|
||||
|
@ -58,18 +58,25 @@ formats are:
|
||||
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::
|
||||
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' <distro> vm
|
||||
|
||||
You can also select a different filesystem by setting the ``FS_TYPE``
|
||||
environment variable.
|
||||
|
||||
Note ``--mkfs-options`` are options passed to the mfks *driver*,
|
||||
rather than ``mkfs`` itself (i.e. after the initial `-t` argument).
|
||||
|
||||
Speedups
|
||||
--------
|
||||
If you have 4GB of available physical RAM (as reported by /proc/meminfo
|
||||
|
Loading…
Reference in New Issue
Block a user