We use --verbose together with --quite in service files. It seems
confusing, let's make the option more descriptive.
Addresses: https://github.com/karelzak/util-linux/issues/1001
Signed-off-by: Karel Zak <kzak@redhat.com>
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 since
2d22ac64e4 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>
Container type implies the following products:
openvz OpenVZ/Virtuozzo
lxc Linux container implementation by LXC
lxc-libvirt Linux container implementation by libvirt
systemd-nspawn systemd's minimal container implementation, see systemd-nspawn(1)
docker Docker container manager
podman Podman container manager
rkt rkt app container runtime
wsl Windows Subsystem for Linux
References:
https://www.freedesktop.org/software/systemd/man/systemd.unit.htmlhttps://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html#Fix: #840
Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com>
ProtectHome=yes makes /home inaccessible, but we need to open the
directories (mountpoints) read-only.
Addresses: https://github.com/karelzak/util-linux/issues/824
Signed-off-by: Karel Zak <kzak@redhat.com>
When fstrim interacts with NTFS it result can be error reporting bad file
descriptor. That seems to be a bug in NTFS. While waiting driver to get on
top of the issue and be commonly available lets add to fstrim option to make
it be more silent about errno 9 aka EBADF, Bad file descriptor.
Reported-by: https://github.com/moviuro
Proposed-by: Dave Reisner <dreisner@archlinux.org>
Reference: https://bugs.archlinux.org/task/62288
Addresses: https://github.com/karelzak/util-linux/issues/789
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This limits what the fstrim process has access to when it runs.
PrivateUsers can't be enabled because of:
"If this mode is enabled, all unit processes are run without privileges
in the host user namespace[...]"
Further improving this with additional option or making
things even tighter is most likely possible.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Karel Zak <kzak@redhat.com>
Replace -a with -A to discard mounted filesystems from /etc/fstab. The
original -a forces fstrim to try to discard all filesystems, including
for example manually mounted removable media.
It seems better for widely used .service unit to follow /etc/fstab.
Addresses: https://github.com/karelzak/util-linux/issues/673
Signed-off-by: Karel Zak <kzak@redhat.com>
It seems to be good idea to have more verbose output in the log files
for weekly fstrim execution. The verbose adds details (one line) for
each filesystem.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1337304
Signed-off-by: Karel Zak <kzak@redhat.com>