Results 1 to 5 of 5

Thread: btrfs-trim and fstrim.timer

  1. #1
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default btrfs-trim and fstrim.timer

    `systemctl list-timers`
    shows I have the active fstrim.timer.

    /usr/lib/systemd/system/fstrim.timer
    /usr/lib/systemd/system/fstrim.service


    I also found
    /etc/cron.weekly/btrfs-trim
    and disabled it in
    /etc/sysconfig/btrfsmaintenance
    by
    BTRFS_TRIM_PERIOD="none"

    I just ran
    `systemctl restart btrfsmaintenance-refresh`
    which seemingly deleted
    /etc/cron.weekly/btrfs-trim

    `systemctl status fstrim.timer`
    shows it's still active.

    So what I'm wondering is:

    - Are there two different things trying to trim once a week?
    - Do I simply `systemctl disable fstrim.timer` to get rid of it?

    My goal is to manually run these maintenance operations.

  2. #2
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default Re: btrfs-trim and fstrim.timer

    I see
    /usr/lib/systemd/system/fstrim.timer
    and
    https://github.com/kdave/btrfsmainte...rfs-trim.timer
    are the same.

  3. #3
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default Re: btrfs-trim and fstrim.timer

    However,
    /usr/lib/systemd/system/fstrim.service
    and
    https://github.com/kdave/btrfsmainte...s-trim.service
    are not the same.

    Code:
    [Unit]
    Description=Discard unused blocks
    
    [Service]
    Type=oneshot
    ExecStart=/usr/sbin/fstrim -av
    Where the version on github has
    "Conflicts=fstrim.service"
    and the openSUSE fstrim.service isn't calling btrfs-trim.

  4. #4
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default Re: btrfs-trim and fstrim.timer

    So if
    /usr/lib/cron/run-crons
    calls
    /etc/cron.weekly/btrfs-trim
    and
    /usr/lib/systemd/system/fstrim.service
    calls

    /usr/sbin/fstrim
    then it seems like two things are trying to trim once a week.

  5. #5
    Join Date
    Apr 2016
    Location
    North America
    Posts
    537

    Default Re: btrfs-trim and fstrim.timer

    This is apparently fixed in Leap 15 (my default is BTRFS_TRIM_PERIOD="none").
    https://bugzilla.opensuse.org/show_bug.cgi?id=1017268


    And for the other:
    `systemctl disable fstrim.timer` does permanently disable it;
    although, `systemctl stop fstrim.timer` is also needed for the current session.

Posting Permissions

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