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
900 stars 79 forks source link

btrfs-defrag.sh: use proper unit for defrag command #27

Closed fcrozat closed 6 years ago

kdave commented 7 years ago

There's no difference, m and M work the same and it's documented. Am I missing something?

fcrozat commented 7 years ago

the command doesn't work on Leap 42.2 at all with m

kdave commented 7 years ago

Works for me. I've compiled from 42.2 sources and defragmented a file, using -t 32m. No complaints about syntax and the resulting extent sizes match the target size. Please post more details.

fcrozat commented 7 years ago

ok, found: I had also BTRFS_DEFRAG_MIN_SIZE=+1m in /etc/sysconfig/btrfsmaintenance which was not migrated to +1M when the fix was done on btrfsmaintenance (package was installed before).

Therefore, this fix is not strictly needed (but it looks nicer, to go with the previous fix for find ;)

kdave commented 6 years ago

I'd like to close this issue, the lowercase variant has been fixed in v0.2 and we haven't seen any other reports so I don't think we need a tool to fixup the configuration.