From 41f4841399285169f79b2656805c874ffaed18f3 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