btrfs-defrag.sh complained about a missing function is_btrfs
Closed this issue · 6 comments
Looks like you have omitted the line to source your common functions.
Can be fixed by editing /usr/share/btrfsmaintenance/btrfs-defrag.sh (or whatever it's path is on your system):
And adding this line:
.
after line 17 ie current version ie line saying with LOGIDENTIFIER='btrfs-defrag'
Rgds,
Andy
I can confirm this affects 0.4.1
. P.S. oh my, I can't believe I missed this too!
The debian package, 0.4.1-2, enabled in systemd, does this of course.
$ systemctl status btrfs-defrag.service
● btrfs-defrag.service - Defragment file data on a mounted filesystem
Loaded: loaded (/lib/systemd/system/btrfs-defrag.service; static; vendor preset: enabled)
Active: inactive (dead) since Sat 2018-09-01 00:00:14 IST; 13h ago
Docs: man:btrfs-filesystem
Main PID: 25749 (code=exited, status=0/SUCCESS)
Sep 01 00:00:14 tarsk systemd[1]: Started Defragment file data on a mounted filesystem.
Sep 01 00:00:14 tarsk btrfs-defrag.sh[25749]: /usr/share/btrfsmaintenance/btrfs-defrag.sh: 25: /usr/share/btrfsmaintenance/btrfs-defrag.sh: is_btrfs: not found
Sep 01 00:00:14 tarsk btrfs-defrag.sh[25749]: Path / is not btrfs, skipping
Sep 01 00:00:14 tarsk btrfs-defrag.sh[25749]: /usr/share/btrfsmaintenance/btrfs-defrag.sh: 25: /usr/share/btrfsmaintenance/btrfs-defrag.sh: is_btrfs: not found
Sep 01 00:00:14 tarsk btrfs-defrag.sh[25749]: Path /media/barak/BARAK-ARRAY-1 is not btrfs, skipping
Thanks!
Current openSuse Leap 15.0 is affected too. Did that manually on local machine for testing and it works. I would really love to see this merged to get it updated in repo. Ty, Daniel
I've pushed the first fix from GRMrGecko, though there were several others referenced in the changelog. Sorry fo the delay, 0.4.2 release will come soon.