You are not logged in.
Pages: 1
I have a Crucial M4 SSD which supports TRIM. To make use of it I enabled the fstrim timer as written in the Arch Linux wiki.
However "journalctl -u fstrim" shows no log entries although I enabled the timer several weeks/months ago. This is confusing me, is this a usual behavior? Is TRIM working as intended anyway?
The important command output:
# hdparm -I /dev/sda | grep TRIM
* Data Set Management TRIM supported (limit 8 blocks)
* Deterministic read data after TRIM# journalctl -u fstrim
-- No entries --# systemctl status fstrim.timer
● fstrim.timer - Discard unused blocks once a week
Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: disabled)
Active: active (waiting) since So 2016-01-17 18:18:01 CET; 3h 56min ago
Docs: man:fstrimOffline
I wonder if you need to at least start fstrim.service ONCE for the timer to work.
Btw this is a more accurate way to tell whether fstrim can TRIM your drive:
[tom@localhost ~]$ grep . /sys/block/sd*/queue/discard_*
/sys/block/sda/queue/discard_granularity:0
/sys/block/sda/queue/discard_max_bytes:0
/sys/block/sda/queue/discard_max_hw_bytes:0
/sys/block/sda/queue/discard_zeroes_data:0
/sys/block/sdb/queue/discard_granularity:512
/sys/block/sdb/queue/discard_max_bytes:2147450880
/sys/block/sdb/queue/discard_max_hw_bytes:2147450880
/sys/block/sdb/queue/discard_zeroes_data:0
[tom@localhost ~]$ (Obviously,) sda is a no and sdb is a yes.
Last edited by tom.ty89 (2016-01-17 22:30:48)
Offline
I think you have to set your journal storage to "persistent" or create /var/log/journal to keep log entries for your timer.
See journald.conf(5)
Jin, Jîyan, Azadî
Offline
..."auto" is similar to "persistent" but the directory /var/log/journal is not created if needed,...
[tom@localhost ~]$ pacman -Qo /var/log/journal/
/var/log/journal/ is owned by systemd 228-3Offline
"/var/log/journal/" already exists and is owned by systemd, as tom.ty89 wrote. And the SSD supports TRIM definitely.
$ grep . /sys/block/sda/queue/discard_*
/sys/block/sda/queue/discard_granularity:512
/sys/block/sda/queue/discard_max_bytes:2147450880
/sys/block/sda/queue/discard_max_hw_bytes:2147450880
/sys/block/sda/queue/discard_zeroes_data:0What is the output of "journalctl -u fstrim" for other SSD users?
Offline
$ journalctl -u fstrim
-- Logs begin at Wed 2016-01-13 09:05:50 EST, end at Mon 2016-01-18 12:53:13 EST. --
Jan 18 00:00:35 gazp6 systemd[1]: Starting Discard unused blocks...
Jan 18 00:00:37 gazp6 systemd[1]: Started Discard unused blocks.Offline
$ journalctl -u fstrim
-- Logs begin at vr 2015-11-20 20:55:09 CET, end at ma 2016-01-18 19:49:36 CET. --
nov 30 10:30:12 desktop1 systemd[1]: Starting Discard unused blocks...
nov 30 10:30:23 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
dec 07 09:28:39 desktop1 systemd[1]: Starting Discard unused blocks...
dec 07 09:28:50 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
dec 14 11:54:16 desktop1 systemd[1]: Starting Discard unused blocks...
dec 14 11:54:25 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
dec 21 10:44:14 desktop1 systemd[1]: Starting Discard unused blocks...
dec 21 10:44:23 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
dec 28 11:56:06 desktop1 systemd[1]: Starting Discard unused blocks...
dec 28 11:56:15 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
jan 04 13:50:10 desktop1 systemd[1]: Starting Discard unused blocks...
jan 04 13:50:18 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
jan 11 13:45:10 desktop1 systemd[1]: Starting Discard unused blocks...
jan 11 13:45:18 desktop1 systemd[1]: Started Discard unused blocks.
-- Reboot --
jan 18 10:14:28 desktop1 systemd[1]: Starting Discard unused blocks...
jan 18 10:14:39 desktop1 systemd[1]: Started Discard unused blocks.As you can see, it runs every week so far.
Offline
Pages: 1