We could also implement a check mechanism inside "/etc/cron.weekly/fstrim" using'systemd-detect-virt', if it's a container don't run it, otherwise let's do it.
[/etc/cron.weekly/fstrim] # script as-is
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
We could also implement a check mechanism inside "/etc/cron. weekly/ fstrim" using'systemd- detect- virt', if it's a container don't run it, otherwise let's do it.
[/etc/cron. weekly/ fstrim] # script as-is
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true