[Ci-users] Disk space on ci nodes

Karanbir Singh mail-lists at karan.org
Sat Jan 30 12:00:33 UTC 2016


On 22/01/16 04:18, Dusty Mabe wrote:

> Can we have some free space left in the VG? Is there some other way to
> get this to happen?

Space was harder, and needs more planning - Patrick and I just hacked up
a small example script that allows you to build, on demand a file backed
loop device that can be (ab)used to get you the same result.

grab
https://github.com/kbsingh/centos-ci-scripts/blob/master/create_looped_disk.shcreate_looped_disk.sh,
and call it like:

dsk=$(bash create_looped_disk.sh 10)

will give you a 10gb disk, with $dsk pointing to /dev/<something> that
is the device name you can now consume.

since the machines are throw away, we didnt bother with reclaiming space
etc - and we left it to the user to not ask for size > available space.

the backing loop files are created in /var/tmp/

performance seems reasonable.

does this help you get over the immediate problem ?

-- 
Karanbir Singh
+44-207-0999389 | http://www.karan.org/ | twitter.com/kbsingh
GnuPG Key : http://www.karan.org/publickey.asc



More information about the Ci-users mailing list