summaryrefslogtreecommitdiff
path: root/fsck/bcachefsck_all.timer
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-12-04 18:43:31 -0800
committerKent Overstreet <kent.overstreet@linux.dev>2023-12-07 11:57:36 -0500
commit74753de9894df00b8759f5cd6909335e268b0035 (patch)
tree6905f48e27190a81c7c5993bbb0871fd4f7f8729 /fsck/bcachefsck_all.timer
parentfbfdd05ac5b5b748cf9c7c0ea72be5268917c5d6 (diff)
fsck: add a service to schedule and run bcachefsck@ services
Create a script that looks for mounted bcachefs filesystems and tries to run as many of them in parallel as possible without two different scrubbers hitting the same low level block device. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fsck/bcachefsck_all.timer')
-rw-r--r--fsck/bcachefsck_all.timer16
1 files changed, 16 insertions, 0 deletions
diff --git a/fsck/bcachefsck_all.timer b/fsck/bcachefsck_all.timer
new file mode 100644
index 00000000..65470d40
--- /dev/null
+++ b/fsck/bcachefsck_all.timer
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (C) 2023-2024 Oracle. All Rights Reserved.
+# Author: Darrick J. Wong <djwong@kernel.org>
+
+[Unit]
+Description=Periodic bcachefsck for All Filesystems
+
+[Timer]
+# Run on Sunday at 3:10am, to avoid running afoul of DST changes
+OnCalendar=Sun *-*-* 03:10:00
+RandomizedDelaySec=60
+Persistent=true
+
+[Install]
+WantedBy=timers.target