summaryrefslogtreecommitdiffstats
path: root/sys-utils/fstrim.timer
diff options
context:
space:
mode:
authorThomas Bächler2014-04-03 23:41:51 +0200
committerKarel Zak2014-04-07 12:38:18 +0200
commit877cd8944beda33102dd1a288f51c07b4bbf9278 (patch)
treeb3a8f0ee9340958c4e8c9e791f96b80ded0695ad /sys-utils/fstrim.timer
parentlogin: fix minor typos in the man page (diff)
downloadkernel-qcow2-util-linux-877cd8944beda33102dd1a288f51c07b4bbf9278.tar.gz
kernel-qcow2-util-linux-877cd8944beda33102dd1a288f51c07b4bbf9278.tar.xz
kernel-qcow2-util-linux-877cd8944beda33102dd1a288f51c07b4bbf9278.zip
fstrim: add systemd units
This adds a timer and a service for systemd that runs fstrim -a once a day. The Persistent=true option used will only work on systemd 212 or newer.
Diffstat (limited to 'sys-utils/fstrim.timer')
-rw-r--r--sys-utils/fstrim.timer10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys-utils/fstrim.timer b/sys-utils/fstrim.timer
new file mode 100644
index 000000000..24eeee552
--- /dev/null
+++ b/sys-utils/fstrim.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Discard unused blocks once a day
+
+[Timer]
+OnCalendar=daily
+AccuracySec=1h
+Persistent=true
+
+[Install]
+WantedBy=multi-user.target