From b67d037a5e37026bf17095233ee5db926a9ec8a0 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 3 Aug 2023 13:45:11 -0400 Subject: [PATCH] add xfs_fsr service run before fstrim service --- systemd/system/fstrim.service.d/local.conf | 4 ++++ systemd/system/xfs_fsr.service | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 systemd/system/xfs_fsr.service diff --git a/systemd/system/fstrim.service.d/local.conf b/systemd/system/fstrim.service.d/local.conf index 4e4403c..8ad529d 100644 --- a/systemd/system/fstrim.service.d/local.conf +++ b/systemd/system/fstrim.service.d/local.conf @@ -1,3 +1,7 @@ +[Unit] +Wants=xfs_fsr.service +After=xfs_fsr.service + [Service] CPUSchedulingPolicy=idle IOSchedulingClass=idle diff --git a/systemd/system/xfs_fsr.service b/systemd/system/xfs_fsr.service new file mode 100644 index 0000000..be66885 --- /dev/null +++ b/systemd/system/xfs_fsr.service @@ -0,0 +1,12 @@ +[Unit] +Description=XFS filesystem reorganization + +[Service] +CPUSchedulingPolicy=idle +ExecStart=/usr/bin/xfs_fsr -f /var/lib/.fsrlast +IOSchedulingClass=idle +IPAddressDeny=any +MemoryDenyWriteExecute=true +PrivateIPC=true +PrivateNetwork=true +Type=oneshot