I noticed on a PBS Hyper-V VM, ext4 disk, trim wasn't running on the datastore drive.
File /usr/lib/systemd/system/fstrim.service has line:
However the fstrim man page shows "The evaluation of the list stops after first non-empty file" which would be fstab.
Logs (journalctl -u fstrim.service) show it's running on /etc/fstab only:
If one runs
Is there a better option than running fstrim on that disk via cron? Is this a configuration bug?
File /usr/lib/systemd/system/fstrim.service has line:
Code:
ExecStart=/sbin/fstrim --listed-in /etc/fstab:/proc/self/mountinfo --verbose --quiet-unsupported
/etc/fstab does not contain /mnt/datastore/storename but /proc/self/mountinfo does. However the fstrim man page shows "The evaluation of the list stops after first non-empty file" which would be fstab.
Logs (journalctl -u fstrim.service) show it's running on /etc/fstab only:
Code:
Jan 26 00:46:45 pbs systemd[1]: Starting fstrim.service - Discard unused blocks on filesystems from /etc/fstab...
Jan 26 00:46:45 pbs fstrim[12234]: /boot/efi: 1013.2 MiB (1062432768 bytes) trimmed on /dev/sda2
Jan 26 00:46:45 pbs fstrim[12234]: /: 1.7 GiB (1820901376 bytes) trimmed on /dev/pbs/root
Jan 26 00:46:45 pbs systemd[1]: fstrim.service: Deactivated successfully.
Jan 26 00:46:45 pbs systemd[1]: Finished fstrim.service - Discard unused blocks on filesystems from /etc/fstab.
If one runs
fstrim -av manually it runs on the datastore. Is there a better option than running fstrim on that disk via cron? Is this a configuration bug?