To test this feature the environment variable has to be exported:
export EXTEND_DISK_SIZE=8G
Any disk size can be set according to the qemu-img documentation. Additional space will be mounted to the /var/lib/docker
qemu-img
/var/lib/docker
Question: Does '/var/lib/docker' holds files with owner different from root, some special rights?
Point is: "cp -r" is not safe. It doesn't preservers original owner/rights.
Add this to /etc/fstab. Mounting from here will confuse a user. User running VM without knowledge of cloud-init will be very confused.
Still more then 80 characters. Point is: if you split a string do it in a right way with purpose in mind.
Maybe add a docstring with description of "disk_size". Is it bytes? kilo/mega/etc ?....
I would like to follow http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html
docstring standard.
no-no-no
No reason for this line. os.environ.get returns None for unknown env variable
Please constrict try/except block to code that throws exceptions.
Touching/moving /var/lib/docker is bad idea. It is mach better to extend docker storage in a standard way:
http://www.projectatomic.io/docs/docker-storage-recommendation/
Possible solution:
2 new commits added
Pull-Request has been closed by sturivny
To test this feature the environment variable has to be exported:
export EXTEND_DISK_SIZE=8G
Any disk size can be set according to the
qemu-imgdocumentation.Additional space will be mounted to the /var/lib/docker