Skip to content

Commit 24fc791

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 24fc791

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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+
# only run if storage is persistent
6+
if [ -f /run/qubes/persistent-full ]
7+
then
8+
fstrim -av
9+
fi

0 commit comments

Comments
 (0)