[CentOS-devel] Disk size on Vagrant image

Jeff Sheltren jeff at tag1consulting.com
Fri Aug 25 15:28:46 UTC 2017


On Sat, Aug 19, 2017 at 12:03 AM, Laurentiu Pancescu <
lpancescu at centosproject.org> wrote:
>
>
>> Laurențiu, what do you think?
>>
>
> It would be technically possible and, as you pointed out, the disk
> footprint of the current images wouldn't change much.
>
> Our centos/7 image is around two times larger than Fedora Cloud (409MB vs
> 208MB for the VirtualBox variant).  I would like to reduce our image size
> as soon as 7.4.1708 is released - it would make downloading the image and
> instantiating a new box significantly faster, as well as reducing our
> bandwidth usage (we have 4.5 million downloads so far).  We have to
> uninstall some packages that Anaconda insists on always installing, but we
> don't regain the space used by those packages unless we fill the freed
> sectors with zeros.  On XFS, we can only fill the entire disk with zeros
> using dd in %post (zerofree only works with Ext4 filesystems, which is what
> Fedora uses) - writing 40GB of zeros on our CBS builder would already be
> pretty bad, I wouldn't want to switch to 100-200GB disk images (the disk
> I/O is actually double that size, since the sparsify process would need to
> read the image file resulting from the installation).
>
> Adding another disk to a Vagrant box is a somewhat fragile process, but
> resizing the existing disk image works pretty well and could be automated,
> I think. [1]  You could also use Packer to generate customized versions of
> our official images for you own use - please see the vbox-packer branch in
> [2].  The latter is fully automated and takes less than 30 minutes on my
> Mac Mini "late 2009" with only 4GB RAM and a slow mechanical hard drive.
>
>
>
Thanks for the reply and sorry I'm only just now getting back to this. I'd
love to figure out the 'dd' issue so we can increase the base box disk size
easily.

A few questions as I look at
https://github.com/lpancescu/sig-cloud-instance-build

1) I don't see where the 'dd' is happening, could you point to that?
2) Is there a strong reason to use xfs instead of ext4 on the Vagrant VMs?
3) It seems you could shrink down the install size by adjusting the
kickstart. Doing i.e. '%packages --nobase', and also removing '@core' and
instead adding just the individual desired packages to the list should help
reduce the size (and the need to remove stuff after install).

Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20170825/9121dd35/attachment.html>


More information about the CentOS-devel mailing list