From 3dc74199541a5c3983a08c989b842c4a0119fe91 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Wed, 23 Nov 2016 11:30:35 +0000 Subject: [PATCH] Run TRIM on Windows every 15m As the Windows virtual device supports TRIM we can run this to free up disk space frequently. Not recommended to run on physical devices this often. See https://github.com/docker/pinata/issues/5298 Signed-off-by: Justin Cormack --- alpine/etc/periodic/15m/trim | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 alpine/etc/periodic/15m/trim diff --git a/alpine/etc/periodic/15m/trim b/alpine/etc/periodic/15m/trim new file mode 100755 index 000000000..415b91d1b --- /dev/null +++ b/alpine/etc/periodic/15m/trim @@ -0,0 +1,4 @@ +#!/bin/sh + +# Windows always has TRIM support, clean out unused frequently +[ "$(mobyplatform)" = "windows" ] && /sbin/fstrim /var