On 10/31/18 2:05 PM, Stephen Morris wrote: > On 30/10/18 8:45 am, Ed Greshko wrote: >> On 10/30/18 4:46 AM, Stephen Morris wrote: >>> On 29/10/18 9:15 am, Ed Greshko wrote: >>>> On 10/29/18 5:23 AM, Stephen Morris wrote: >>>>> Hi, >>>>> >>>>> I've just noticed that at boot time that the FSTRIM service >>>>> is registering a >>>>> failure. The failure seems to be because it is trying to trim two >>>>> windows mount points >>>>> which are on the SSD, that are mounted as RO because I can't mount >>>>> them as RW due to >>>>> Microsoft functionality. >>>>> >>>>> Is there any way to configure the FSTRIM service to not >>>>> attempt to trim specific >>>>> partitions? >>>> Yes. But it may be more trouble than it is worth. I assume the >>>> only thing you're seeing >>>> is a message in the logs. >>> I noticed the message at boot time when I was monitoring the progress >>> of the boot. The >>> message that scrolled by said that the fstrim service had failed. It >>> was 'systemctl >>> status fstrim.service' that provided the details. I don't have the >>> exact message as I >>> didn't write it down but the same issue didn't occur this morning >>> presumably because the >>> trim service figured the was nothing to do. This morning when I >>> issued the systemctl >>> command it just said the service was 'inactive (dead)'. >> It will show "inactive" since it is a "one shot" process. Also, it >> will only run once/week. >> >>> I have 4 partitions on the ssd, the windows system partition, the >>> windows drive c >>> partition, the Ubuntu boot partition and the Fedora boot partition. >>> The systemctl >>> command I issued yesterday to get the failure details indicated that >>> the Fstrim Service >>> was trying to do its work on those 4 partitions via the mount points >>> specified in fstab, >>> and, that the process on the two linux partitions was successful, but >>> the process on the >>> two windows partitions both failed. >>> >>> In fstab the two windows partitions are specified as 'Read Only' >>> because of Microsoft >>> functionality, so in my view, it is a defect in the Fstrim.service >>> processing to even >>> attempt any write processes on a mount point that is 'Read Only'. I >>> can understand the >>> functionality of "--all", but in my view a bit of common sense logic >>> needs to be >>> included with that to bypass any partitions that are 'Read Only' via >>> the methodology >>> that is being indicated it is using. >> Well, the process probably doesn't check the fstab. According to the >> man page ... >> >> Errors from filesystems that do not support the discard operation are >> silently ignored. >> >> Is all that is checked/ignored. >> >> If the messages bother you, you can bugzilla it. But it seems quite >> minor. > > You are correct, it is minor, but I just don't see why, when the fstrim > process tries to trim the 4 mount points specified in fstab for the 4 > partitions on the SSD, and 2 are successful and two fail, potentially > because those mount points are RO and Microsoft antics won't allow them > to be RW, that should mean that the fstrim service has failed. I can > understand the service being flagged a failing for all processes failed, > but if some work then I would have expected a warning that a subset of > what it was doing didn't work. That's the way I write my programs when I > consider them to be written properly. Generally speaking, programs exit with a "return code" or "exit status". By convention, if the return code is zero, then the program has run properly. A non-zero return code indicates a failure of some kind. Now, there is no rule as to what _kind_ of failure a non-zero return code means. The man page for fstrim(8) specifically says: 0 success 1 failure 32 all failed 64 some filesystem discards have succeeded, some failed So in your case, it's probably returning 64. AFAIK, systemd considers ANY non-zero return code as a failure. If it truly bothers you, ask the systemd folk to provide a means to exclude certain return codes from "fail" status. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - Never eat anything larger than your head - ---------------------------------------------------------------------- _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx