Comment 6 for bug 1589289

Revision history for this message
Eric Desrochers (slashd) wrote :

I started to read that bug a couple of days ago

Maybe using 'ConditionVirtualization=!container' should be enought to prevent fstrim from running inside container, I'll give it a try later this week. If its work as expected, I'll submit it upstream.

'container' type would cover the following:

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

Reference:
https://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html#