image/centos: generate an image resizable to common HD sizes

At the moment the (CentOS) root filesystem image shipped with the ISO
can be resized at most to 1324 GB which might be too small given
the sizes of the modern hard drives. Make sure the image can be resized
to 8TB.

The gory details: ext4 reserves some blocks for filesystem metadata
(block group descriptors) which are used for growing the filesystem.
The number of reserved blocks determines how large the filesystem can
possilby grow. For smaller filesystems too few blocks gets reserved.
As a work around use a slightly bigger initial filesystem so it can
be expanded up to 8 TB.

It should be noted that expanding a few GB sized filesystem to several
TBs produces very suboptimal metadata layout and incurs substantial
performance degradation (15 -- 25%). Also resizing takes much longer
than unpacking a tarball (with the same content). So a proper fix is
rewriting IBP code to use a better backup/restore mechanism (which
is essentially what IBP does).

Related-Bug: #1459665
Change-Id: I07f2233d0db68be1c72307f85a99eddaf54c9346
(cherry picked from commit 5b898d26d2)
This commit is contained in:
Alexei Sheplyakov 2015-06-03 15:41:58 +03:00 committed by Igor Kalnitsky
parent bcc909ffc5
commit 418b2a5c24
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part / --fstype="ext4" --size=1324
part / --fstype="ext4" --size=8192
%post
rm /etc/yum.repos.d/*