From fb246a02eb2ed330d3cc37f5795b3ed026aabe07 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Sat, 11 May 2013 16:36:32 +1200 Subject: [PATCH] Ensure that the ext4 fs can be rebuilt up to 1PB in size. Change-Id: I16c5fe4eb0a9951d44745d6a46450f70d33b3481 --- README.md | 4 +++- bin/disk-image-create | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b1aba443..0ec773d4 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,9 @@ cloud: e.g. a nova-compute node. Images produce either a filesystem image with a label of cloudimg-rootfs, or can be customised to produce whole disk images (but will still contain a filesystem labelled cloudimg-rootfs). Once the file system tree is assembled a loopback device with filesystem (or partition table -and file system) is created and the tree copied into it. +and file system) is created and the tree copied into it. The file system +created is an ext4 filesystem just large enough to hold the file system tree +and can be resized up to 1PB in size. An element is a particular set of code that alters how the image is built, or runs within the chroot to prepare the image. E.g. the local-config element diff --git a/bin/disk-image-create b/bin/disk-image-create index da16b665..1dae5c23 100755 --- a/bin/disk-image-create +++ b/bin/disk-image-create @@ -122,7 +122,8 @@ else MKFS_OPTS="-i 4096" fi fi - +# allow up to 1PB of 4KB blocks. +OPTS="$MKFS_OPTS -E resize=274877906944" LOOPDEV=$(sudo losetup --show -f $TMP_IMAGE_PATH) export EXTRA_UNMOUNT="detach_loopback $LOOPDEV"