Results 1 to 6 of 6

Thread: btrfsmaintenance broken

  1. #1
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default btrfsmaintenance broken

    btrfsmaintenance cron jobs are missing (again), this time the jobs cannot be rescued by either the refresh service or forced reinstall. Journal gives some clues:
    Code:
    Jan 18 19:20:38 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calendar specification, ignoring: none
    Jan 18 19:20:38 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calendar specification, ignoring: none
    can anyone else confirm this issue, or give hints into how to fix?

  2. #2

    Default Re: btrfsmaintenance broken

    Quote Originally Posted by ndc33 View Post
    btrfsmaintenance cron jobs are missing (again)
    No, they are not missing.
    They have been converted to systemd timers.

    See e.g. https://build.opensuse.org/package/r...ev=base&rev=13

    Journal gives some clues:
    Code:
    Jan 18 19:20:38 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calendar specification, ignoring: none
    Jan 18 19:20:38 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calendar specification, ignoring: none
    can anyone else confirm this issue, or give hints into how to fix?
    Maybe it would help if you posted the content of those mentioned files?
    Apparently the calendar specifications are wrong, sounds like they are set to "none".

    And AFAICS, the refresh script (that writes those files) takes the values from /etc/sysconfig/btrfsmaintenance and/or /etc/default/btrfsmaintenance, so better post those too.

    Seems like the timers are enabled by mistake even if set to "none" (which causes those error messages in the journal), but that apparently has been fixed in the devel project recently:
    https://build.opensuse.org/request/show/559643

  3. #3
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default Re: btrfsmaintenance broken

    great observation.

    i was hasty in simply running the refresh service and then force installing btrfsmaintainance, this should (under new system) be installed yes?

    /etc/systemd/system/btrfs-trim.timer.d/
    Code:
    [Timer]
    OnCalendar=none
    /etc/systemd/system/btrfs-balance.timer.d/
    Code:
    [Timer]
    OnCalendar=weekly
    not surprisingly /etc/sysconfig/btrfsmaintenance shows
    Code:
    BTRFS_BALANCE_PERIOD="weekly"
    BTRFS_TRIM_PERIOD="none"
    for the error messages after reboot to make sure i had not triggered anything
    Code:
    sudo journalctl -b | grep btrfs
    Jan 18 20:26:57 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calenda
    r specification, ignoring: none
    Jan 18 20:26:57 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calen
    dar specification, ignoring: none
    Jan 18 20:26:59 asus systemd[1]: Started Balance block groups on a btrfs filesystem.
    Jan 18 20:26:59 asus systemd[1]: Starting Update cron periods from /etc/sysconfig/btrfsmaintenance...
    Jan 18 20:26:59 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh script btrfs-scrub.sh for uninstall
    Jan 18 20:26:59 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh script btrfs-defrag.sh for uninstall
    Jan 18 20:26:59 asus systemd[1]: Started Scrub btrfs filesystem, verify block checksums.
    Jan 18 20:26:59 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh script btrfs-balance.sh for uninstall
    Jan 18 20:26:59 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh script btrfs-trim.sh for uninstall
    Jan 18 20:26:59 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh timer btrfs-scrub for monthly
    Jan 18 20:26:59 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calenda
    r specification, ignoring: none
    Jan 18 20:26:59 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calen
    dar specification, ignoring: none
    Jan 18 20:26:59 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh timer btrfs-defrag for none
    Jan 18 20:26:59 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calenda
    r specification, ignoring: none
    Jan 18 20:26:59 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calen
    dar specification, ignoring: none
    Jan 18 20:27:00 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh timer btrfs-balance for weekly
    Jan 18 20:27:00 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calenda
    r specification, ignoring: none
    Jan 18 20:27:00 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calen
    dar specification, ignoring: none
    Jan 18 20:27:00 asus btrfsmaintenance-refresh-cron.sh[1103]: Refresh timer btrfs-trim for none
    Jan 18 20:27:00 asus systemd[1]: /etc/systemd/system/btrfs-trim.timer.d/schedule.conf:2: Failed to parse calenda
    r specification, ignoring: none
    Jan 18 20:27:00 asus systemd[1]: /etc/systemd/system/btrfs-defrag.timer.d/schedule.conf:2: Failed to parse calen
    dar specification, ignoring: none
    Jan 18 20:27:00 asus systemd[1]: Started Update cron periods from /etc/sysconfig/btrfsmaintenance.
    
    
    for more info
    Code:
    nicholas@asus:~> sudo systemctl list-timers                            
    
    NEXT                         LEFT                LAST                         PASSED             UNIT            
    Fri 2018-01-19 00:00:00 CET  3h 7min left        Thu 2018-01-18 07:54:08 CET  12h ago            logrotate.timer
    Fri 2018-01-19 20:41:56 CET  23h left            Thu 2018-01-18 20:41:56 CET  10min ago          systemd-tmpfile
    Mon 2018-01-22 00:00:00 CET  3 days left         Mon 2018-01-15 07:47:10 CET  3 days ago         btrfs-balance.t
    Mon 2018-01-22 00:00:00 CET  3 days left         Mon 2018-01-15 07:47:10 CET  3 days ago         fstrim.timer    
    Thu 2018-02-01 00:00:00 CET  1 weeks 6 days left Mon 2018-01-01 00:00:25 CET  2 weeks 3 days ago btrfs-defrag.ti
    Thu 2018-02-01 00:00:00 CET  1 weeks 6 days left Mon 2018-01-01 00:00:25 CET  2 weeks 3 days ago btrfs-scrub.tim
    Thu 2018-02-01 00:00:00 CET  1 weeks 6 days left Mon 2018-01-01 00:00:25 CET  2 weeks 3 days ago btrfs-trim.time
    

  4. #4

    Default Re: btrfsmaintenance broken

    Quote Originally Posted by ndc33 View Post
    i was hasty in simply running the refresh service and then force installing btrfsmaintainance, this should (under new system) be installed yes?
    btrfsmaintenance?
    Yes, that should be installed, if you use btrfs at least.

    not surprisingly /etc/sysconfig/btrfsmaintenance shows
    Code:
    BTRFS_BALANCE_PERIOD="weekly"
    BTRFS_TRIM_PERIOD="none"
    That's the trim period, that affects btrfs-trim.timer .
    I suppose BTRFS_DEFRAG_PERIOD is set to "none" as well...

    So, if you want those services to be run periodically, you'd need to change the settings in /etc/sysconfig/btrfsmaintenance accordingly.
    (these two are indeed set to "none" by default according to the comments in that file)

    The error messages should be only cosmetical I think, as indicated they are caused by the fact that the timer is enabled even though it's set to "none" (which has been fixed already in the devel project). The corresponding services won't be run because of the errors, but that's the intended effect of "none" anyway...
    You can ignore the errors IMHO, or if you do want to get rid of them, I suppose it should suffice to disable the corresponding timers manually.
    E.g. "systemctl disable btrfs-trim.timer"

    If you enable them by setting some proper period, the "error" messages should disappear too I think.

    for more info
    Code:
    nicholas@asus:~> sudo systemctl list-timers                            
    
    NEXT                         LEFT                LAST                         PASSED             UNIT            
    Fri 2018-01-19 00:00:00 CET  3h 7min left        Thu 2018-01-18 07:54:08 CET  12h ago            logrotate.timer
    Fri 2018-01-19 20:41:56 CET  23h left            Thu 2018-01-18 20:41:56 CET  10min ago          systemd-tmpfile
    Mon 2018-01-22 00:00:00 CET  3 days left         Mon 2018-01-15 07:47:10 CET  3 days ago         btrfs-balance.t
    Mon 2018-01-22 00:00:00 CET  3 days left         Mon 2018-01-15 07:47:10 CET  3 days ago         fstrim.timer    
    Thu 2018-02-01 00:00:00 CET  1 weeks 6 days left Mon 2018-01-01 00:00:25 CET  2 weeks 3 days ago btrfs-defrag.ti
    Thu 2018-02-01 00:00:00 CET  1 weeks 6 days left Mon 2018-01-01 00:00:25 CET  2 weeks 3 days ago btrfs-scrub.tim
    Thu 2018-02-01 00:00:00 CET  1 weeks 6 days left Mon 2018-01-01 00:00:25 CET  2 weeks 3 days ago btrfs-trim.time
    
    Looks good, I'd say...
    Last edited by wolfi323; 18-Jan-2018 at 13:38.

  5. #5
    Join Date
    Sep 2012
    Posts
    7,095

    Default Re: btrfsmaintenance broken

    Quote Originally Posted by wolfi323 View Post
    I suppose it should suffice to disable the corresponding timers manually.
    They are re-enabled by btrfsmaintenanace-refresh.service which runs on every boot (and is enabled by default).

  6. #6

    Default Re: btrfsmaintenance broken

    Quote Originally Posted by arvidjaar View Post
    They are re-enabled by btrfsmaintenanace-refresh.service which runs on every boot (and is enabled by default).
    Ah ok.
    I somehow suspected that might be the case, but haven't checked...

Posting Permissions

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