Skip to content

Commit f0a6faa

Browse files
committed
Trim filesystems after TemplateVM update
After most update processes are finished, templates can benefit from performing an fstrim operation due to the large amounts of writes performed during the update process. Signed-off-by: Atrate <Atrate@protonmail.com>
1 parent 06dc32e commit f0a6faa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/sh
2+
3+
# perform fstrim on all partitions after finishing update-related I/O
4+
5+
# abort if not in a template
6+
if [ "$(qubesdb-read /type)" = "TemplateVM" ]
7+
then
8+
fstrim -av
9+
fi

0 commit comments

Comments
 (0)