fstrim: do not use Protect setting in systemd service
The ProtectHome= and ProtectSystem= settings mounts all stuff for the service in read-only mode. The fstrim ioctl operates on read-only mountpoint file descriptor, but on some read-only filesystem the operation can fail, so since2d22ac64e4
we check for read-only volumes and skip it. References: Upstream:2d22ac64e4
Addresses: https://github.com/karelzak/util-linux/issues/948 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
da0debad53
commit
ae63d7e832
|
@ -6,8 +6,6 @@ ConditionVirtualization=!container
|
|||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=@sbindir@/fstrim --fstab --verbose --quiet
|
||||
ProtectSystem=strict
|
||||
ProtectHome=read-only
|
||||
PrivateDevices=no
|
||||
PrivateNetwork=yes
|
||||
PrivateUsers=no
|
||||
|
|
Loading…
Reference in New Issue