Bug 1337304

Summary: Add verbose option to fstrim systemd service file
Product: [Fedora] Fedora Reporter: Richard Shaw <hobbes1069>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonathan, kzak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-18 10:13:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard Shaw 2016-05-18 18:51:49 UTC
Description of problem:
It's nice to see if fstrim is actually doing anything, plus by default you get no output so all you see in the log is that systemd is "started/starting" the service. 

fstrim.service:

- ExecStart=/usr/sbin/fstrim -a
+ ExecStart=/usr/sbin/fstrim -av

After that you get nice and concise output (hostname removed):

May 18 13:44:30 systemd[1]: Starting Discard unused blocks...
May 18 13:44:30 fstrim[21611]: /var: 0 B (0 bytes) trimmed
May 18 13:44:30 fstrim[21611]: /boot: 0 B (0 bytes) trimmed
May 18 13:44:30 fstrim[21611]: /: 0 B (0 bytes) trimmed
May 18 13:44:30 systemd[1]: Started Discard unused blocks.

Comment 1 Jan Kurik 2016-07-26 04:32:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 2 Richard Shaw 2016-10-17 19:59:40 UTC
Is there any objection to this change request?

Comment 3 Karel Zak 2016-10-18 10:13:45 UTC
Good idea, thanks. Fixed by upstream commit 6a9aaf54915a454c21a16da94b2ed971158b416c. 

The change will be available for Fedora after upgrade to v2.29 (probably f26).