Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

  1. #11
    Join Date
    Sep 2012
    Posts
    5,226

    Default Re: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

    Quote Originally Posted by tannington View Post
    removing (or commenting out) "ProtectHome=yes" in "/usr/lib/systemd/system/fstrim.service" resolves the problem.
    This is fixed upstream in https://git.kernel.org/pub/scm/utils...2247b05cc143ea

    Submit openSUSE bug report.

  2. #12
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,113

    Default Re: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

    Quote Originally Posted by tannington View Post
    Found this:

    https://bbs.archlinux.org/viewtopic.php?id=247751

    where it was suggested that removing (or commenting out) "ProtectHome=yes" in "/usr/lib/systemd/system/fstrim.service" resolves the problem.

    At the moment I'm unsure exactly what the purpose of "ProtectHome=yes" is...

    Edit: OK... found some information here: https://www.freedesktop.org/software...temd.exec.html

    Still thinking about it...
    Seems to be a feature, not a bug, but: https://github.com/karelzak/util-lin...2247b05cc143ea
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  3. #13
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,314

    Default Re: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

    Quote Originally Posted by arvidjaar View Post
    Submit openSUSE bug report.
    https://bugzilla.opensuse.org/show_bug.cgi?id=1154023
    Regards, Paul

    2x Tumbleweed (Snapshot: 20191203) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  4. #14
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,113

    Default Re: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

    Quote Originally Posted by tannington View Post
    It's possible the mail problem is unrelated, just coincidental ?
    Patched fstrim.service:

    Code:
    erlangen:~ # systemctl cat fstrim.service 
    # /usr/lib/systemd/system/fstrim.service
    [Unit]
    Description=Discard unused blocks on filesystems from /etc/fstab
    Documentation=man:fstrim(8)
    
    [Service]
    Type=oneshot
    ExecStart=/usr/sbin/fstrim --fstab --verbose --quiet
    ProtectSystem=strict
    ProtectHome=yes
    PrivateDevices=no
    PrivateNetwork=yes
    PrivateUsers=no
    ProtectKernelTunables=yes
    ProtectKernelModules=yes
    ProtectControlGroups=yes
    MemoryDenyWriteExecute=yes
    SystemCallFilter=@default @file-system @basic-io @system-service
    
    # /etc/systemd/system/fstrim.service.d/override.conf
    [Service]
    ProtectHome=read-only
    erlangen:~ #
    After rebooting fstrim.service now trims /home and mail problems are gone for now.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  5. #15
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,314

    Default Re: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

    Quote Originally Posted by karlmistelberger View Post
    After rebooting fstrim.service now trims /home and mail problems are gone for now.
    Yes, changing ProtectHome to "read-only" has restored fstrimming of /home on both of the TW installs I have here.

    I owe you a thanks, as I wasn't, until your initial post, aware /home wasn't being trimmed.

    I'm not quite sure how that would affect postfix (which I don't use) though... Still all is working, so a good result.
    Regards, Paul

    2x Tumbleweed (Snapshot: 20191203) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  6. #16
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,113

    Default Re: NVMe Trouble - fstrim.service Skipping /home, Delayed Appearence of Files After Write

    Quote Originally Posted by tannington View Post
    Yes, changing ProtectHome to "read-only" has restored fstrimming of /home on both of the TW installs I have here.

    I owe you a thanks, as I wasn't, until your initial post, aware /home wasn't being trimmed.

    I'm not quite sure how that would affect postfix (which I don't use) though... Still all is working, so a good result.
    Switched to a new system partition using btrfs and kept home partition. Same symptoms as before: fstrim skipped /home and after several days email would not show up anymore at ~/.local/share/local-mail/. Fixed fstrim.service and everything is back to normal now.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •