using fstrim to save some space in cloud images

Dusty Mabe dusty at
Wed Jun 17 22:12:00 UTC 2015

Hey all,

Have we considered running fstrim against our cloud image filesystems
before we package it up? I wrote a small script to do it (inside a
container) at [1]. Looks like we can save ~28M:

[root at f22 xzimg]# ls -lh ./
total 1.3G
-rw-r--r--. 1 root root 3.0G May 22 00:13 orig.raw
-rw-r--r--. 1 root root 147M May 22 00:13 orig.raw.xz
-rw-r--r--. 1 root root 3.0G Jun 17 16:52 trimmed.raw
-rw-r--r--. 1 root root 129M Jun 17 17:21 trimmed.raw.xz
[root at f22 xzimg]# du -sh ./*
517M    ./orig.raw
147M    ./orig.raw.xz
489M    ./trimmed.raw
129M    ./trimmed.raw.xz

[1] -

More information about the cloud mailing list