Flatcar
Flatcar copied to clipboard
fstrim.service as shipped creates dependency on /etc/fstab which doesn't exist
Description
Stock fstrim.service
, calls /sbin/fstrim -Av
, which fails because /etc/fstab
as we all know doesn't exist.
Environment and steps to reproduce
Install flatcar in an environment whose controller and drives support the fstrim command.
-
sudo systemctl start fstrim.service
- weep softly
Additional information
If copy the unit from /usr/lib to /etc and modify it to call /sbin/fstrim -av
not /sbin/fstrim -Av
, it works fine. -A
means trim all supported mounted filesystems from /etc/fstab
, while -a
means trim all supported mounted filesystems
, without looking at /etc/fstab
.
Thanks for reporting this. This appears to come from util-linux, we'll need to fixup the service file.
+1
We created the following drop-in to do just that: https://github.com/utilitywarehouse/tf_kube_ignition/blob/master/resources/fstrim.conf
It appears our todo is to add the proposed fstrim conf to util-linux and install it in pkg_postinst, overwriting the default shipped with upstream.
Looks like a good first issue.
@t-lo It appears that this was fixed in this commit https://github.com/flatcar/scripts/commit/faf115acdec955cc31d528ada266d9053c13bc71 and in flatcar release stable-3510.2.2.
Yes, thanks for noticing!