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