kdave / btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.
GNU General Public License v2.0
897 stars 79 forks source link

Application unconfigurable due to file "/etc/sysconfig/btrfsmaintenance" does not exist after installing on ubuntu 20.04 #106

Closed tribbloid closed 2 years ago

tribbloid commented 2 years ago

The following message is self-explanatory:

xxx@pop-os:~$ apt show btrfsmaintenance 
Package: btrfsmaintenance
Version: 0.4.2-1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Nicholas D Steeves <nsteeves@gmail.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 76.8 kB
Depends: btrfs-progs, systemd | cron
Enhances: btrfs-progs
Homepage: https://github.com/kdave/btrfsmaintenance
Download-Size: 17.1 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Description: automate btrfs maintenance tasks on mountpoints or directories
 This is a set of scripts for the btrfs filesystem that automates the
 following maintenance tasks: scrub, balance, trim, and defragment.
 .
 Tasks are enabled, disabled, scheduled, and customised from a single
 text file.  The default configuration assumes an installation profile
 where / is a btrfs filesystem.
 .
 The default values have been chosen as an even compromise between
 time to complete maintenance, improvement in filesystem performance,
 and minimum impact on other processes.  Please note that I/O priority
 scheduling requires the use of CFQ, and not noop, deadline,
 anticipatory, or blk-mq.  CFQ is Debian's default block scheduler.

xxx@pop-os:~$ cat /etc/sysconfig/btrfsmaintenance
cat: /etc/sysconfig/btrfsmaintenance: No such file or directory

How could this happen? If this important file is missing in the repo it will be useless

jerri commented 2 years ago

According to documentation in /usr/share/docs/btrfsmaintenance/README.Debian, the configuration is expected in /etc/default/btrfsmaintenance which is available, as far as I can see. At least with 0.5-1, which is being used in Ubuntu and in Debian unstable. Sorry, don't have a stable version of Debian at hand. But in the worst case this probably is just an error in the old version of the package?!

tribbloid commented 2 years ago

Thanks Lot. Will check immediately

Get Outlook for iOShttps://aka.ms/o0ukef


From: Gerhard Hellmann @.> Sent: Friday, March 4, 2022 10:45:30 AM To: kdave/btrfsmaintenance @.> Cc: Peng Cheng @.>; Author @.> Subject: Re: [kdave/btrfsmaintenance] Application unconfigurable due to file "/etc/sysconfig/btrfsmaintenance" does not exist after installing on ubuntu 20.04 (Issue #106)

According to documentation in /usr/share/docs/btrfsmaintenance/README.Debian, the configuration is expected in /etc/default/btrfsmaintenance which is available, as far as I can see. At least with 0.5-1, which is being used in Ubuntu and in Debian unstable. Sorry, don't have a stable version of Debian at hand. But in the worst case this probably is just an error in the old version of the package?!

— Reply to this email directly, view it on GitHubhttps://protect-au.mimecast.com/s/Cl0DCK1DrrTB8L99iMbiLW?domain=github.com, or unsubscribehttps://protect-au.mimecast.com/s/ESJECL7E99TmNLXXiqvZv6?domain=github.com. You are receiving this because you authored the thread.Message ID: @.***>

sten0 commented 2 years ago

Hi,

Yes, this was my fault (I missed this docstring, and no one noticed until June 2021). The fix is in git still hasn't been uploaded, but is essentially just:

--- a/btrfsmaintenance-refresh.service +++ b/btrfsmaintenance-refresh.service @@ -1,5 +1,6 @@ [Unit]

I'm still investigating a better way to set add/enhance the Documentation key, because systemd doesn't support either markdown files or compressed markdown files. I contacted systemd upstream, and they want man pages to be used for this value, and I chose to delay uploading 0.5-2.

tribbloid commented 2 years ago

thanks a lot, it is indeed there!

Does this only affect document or other files?

sten0 commented 2 years ago

thanks a lot, it is indeed there!

🙂

Does this only affect document or other files?

What are you referring to when you write "this"? /etc/default/btrfsmaintenance?

tribbloid commented 2 years ago

@sten0 Sorry I just saw /etc/default/btrfsmaintenance in the readme file. So it should be a false alarm.

The btrfsmaintenance-refresh.service fix is nice to have, but eventually the readme file should give enough information