Hello community,

here is the log from the commit of package btrfsmaintenance for 
openSUSE:Factory checked in at 2015-10-17 16:39:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/btrfsmaintenance (Old)
 and      /work/SRC/openSUSE:Factory/.btrfsmaintenance.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "btrfsmaintenance"

Changes:
--------
--- /work/SRC/openSUSE:Factory/btrfsmaintenance/btrfsmaintenance.changes        
2015-07-14 17:46:20.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.btrfsmaintenance.new/btrfsmaintenance.changes   
2015-10-17 16:39:07.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Oct  8 00:00:00 CEST 2015 - dste...@suse.cz
+
+- version 0.1.2
+  - change default config for trim: off
+  - journal loggin should work (fixed a typo)
+
+-------------------------------------------------------------------

Old:
----
  btrfsmaintenance-0.1.1.tar.bz2

New:
----
  btrfsmaintenance-0.1.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ btrfsmaintenance.spec ++++++
--- /var/tmp/diff_new_pack.j5JSJY/_old  2015-10-17 16:39:07.000000000 +0200
+++ /var/tmp/diff_new_pack.j5JSJY/_new  2015-10-17 16:39:07.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           btrfsmaintenance
-Version:        0.1.1
+Version:        0.1.2
 Release:        0
 Summary:        Scripts for btrfs periodic maintenance tasks
 License:        GPL-2.0

++++++ btrfsmaintenance-0.1.1.tar.bz2 -> btrfsmaintenance-0.1.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfsmaintenance-0.1.1/README.md 
new/btrfsmaintenance-0.1.2/README.md
--- old/btrfsmaintenance-0.1.1/README.md        2015-07-13 15:15:06.000000000 
+0200
+++ new/btrfsmaintenance-0.1.2/README.md        2015-10-14 17:39:46.000000000 
+0200
@@ -1,40 +1,139 @@
 Btrfs maintenance toolbox
 =========================
 
-This is a set of scripts supplements the btrfs filesystem and aims to automate
-a few maintenance tasks. This means the scrub, balance, trim or
-defragmentation.
+This is a set of scripts supplementing the btrfs filesystem and aims to 
automate
+a few maintenance tasks. This means the *scrub*, *balance*, *trim* or
+*defragmentation*.
 
 Each of the tasks can be turned on/off and configured independently. The
 default config values were selected to fit the default installation profile of
-openSUSE 13.2.
+openSUSE 13.2 where the root filesystem is formatted to *btrfs*.
 
-* scrub - go through all medatada/data and verify the checksums
+Overall tuning of the default values should give a good balance between effects
+of the tasks and low impact of other work on the system. If this does not fit
+your needs, please adjust the settings.
 
-* balance - the balance command can do a lot of things, in general moves data 
around in big chunks, here we use it to reclaim back the space of the underused 
chunks so it can be allocated again according to current needs
+### scrub ###
+
+__Description:__ Scrub operation reads all data and metadata from the devices
+and verifies the checksums. It's not mandatory, but may point out problems with
+faulty hardware early as it touches data that might not be in use and bitrot.
+
+If thre's a redundancy of data/metadata, ie. the *DUP* or *RAID1/5/6* 
profiles, scrub
+is able to repair the data autmatically if there's a good copy available.
+
+__Impact when active:__ Intense read operations take place and may slow down or
+block other filesystem activies, possibly only for short periods.
+
+__Tuning:__
+
+* the recommended period is once in a month but a weekly period is also 
acceptable
+* you can turn off the automatic repair (`BTRFS_SCRUB_READ_ONLY`)
+* the default IO priority is set to *idle* but scrub may take long to finish,
+  you can change priority to *normal* (`BTRFS_SCRUB_PRIORITY`)
+
+__Related commands:__
+
+* you can check status of last scrub run (either manual or through the cron
+  job) by `btrfs scrub status /path`
+* you can cancel a running scrub anytime if you find it inconvenient (`btrfs
+  scrub cancel /path`), the progress state is saved each 5 seconds and next
+  time scrub will start from that point
+
+### balance ###
+
+__Description:__ The balance command can do a lot of things, in general moves
+data around in big chunks. Here we use it to reclaim back the space of the
+underused chunks so it can be allocated again according to current needs.
 
 The point is to prevent some corner cases where it's not possible to eg.
 allocate new metadata chunks because the whole device space is reserved for all
 the chunks, although the total space occupied is smaller and the allocation
 should succeed.
 
-* trim - run TRIM on the filesystem using the 'fstrim' utility, makes sense 
for SSD devices
+The balance operation needs enough workspace so it can shuffle data around. By
+workspace we mean device space that has no filesystem chunks on it, not to be
+confused by free space as reported eg. by `df`.
+
+__Impact when active:__ Possibly big. There's a mix of read and write 
operations, is
+seek-heavy on a rotational devices. This can interfere with other work in case
+the same set of blocks is affected.
+
+The balance command uses filters to do the work in smaller batches.
+
+__Expected result:__ If possible all the underused chunks are removed, the
+value of `total` in output of `btrfs fi df /path` should be lower than before.
+Check the logs.
+
+The balance command may fail with *no space* reason but this is considered a
+minor fault as the internal filesystem layout may prevent fhe command to find
+enough workspace. This might be a time for manual inspection of space.
+
+__Tuning:__
 
-* defrag - run defrag on configured directories. This is for convenience and 
not necessary
+* you can make the space reclaim more aggressive by adding higher percentage to
+  `BTRFS_BALANCE_DUSAGE` or `BTRFS_BALANCE_MUSAGE`. Higher value means bigger
+  impact on your system and becomes very noticeable.
+* the metadata chunks usage pattern is different from data and it's not
+  necessary to reclaim metadata block groups that are more than 50 full. The
+  default maximum is 30 which should not degrade performance too much but may
+  be suboptimal if the metadata usage varies wildly over time. The assumption
+  is that underused metadata chunks will get used at some point so it's not
+  absolutelly required to do the reclaim.
+* the useful period highly depends on the overall data change pattern on the
+  filesystem
+
+### trim ###
+
+__Description:__ The TRIM operation (aka. *discard*) can instruct the 
underlying device to
+optimize blocks that are not used by the filesystem. This task is performed
+on-demand by the *fstrim* utility.
+
+This makes sense for SSD devices or other type of storage that can translate
+the TRIM action to someting useful (eg. thin-provisioned storage).
+
+__Impact when active:__ Should be low, but depends on the amount of blocks
+being trimmed.
+
+__Tuning:__
+
+* the recommended period is weekly, but monthly is also fine
+* the trim commands might not have an effect and are up to the device, eg. a
+  block range too small or other constraints that may differ by device
+  type/vendor/firmware
+* the default configuration is *off* because of the the system fstrim.timer
+
+### defrag ###
+
+__Description:__ Run defragmentation on configured directories. This is for
+convenience and not necessary as defragmentation needs are usually different
+for various types of data.
+
+__Special case:__
 
 There's a separate defragmentation task that happens automatically and
-defragments only the RPM database files in /var/lib/rpm. This is done via a
-zypper plugin and the defrag pass triggers at the end of the installation.
+defragments only the RPM database files in */var/lib/rpm*. This is done via a
+*zypper* plugin and the defrag pass triggers at the end of the installation.
 
 This improves reading the RPM databases later, but the installation process
 fragments the files very quickly so it's not likely to bring a significant
 speedup here.
 
+
+## Other ##
+
 Cron takes care of periodic execution of the scripts, but they can be run any
-time directly from /usr/share/btrfs/maintenance/, respecting the confured
-values in /etc/sysconfig/btrfsmaintenance.
+time directly from `/usr/share/btrfs/maintenance/`, respecting the configured
+values in `/etc/sysconfig/btrfsmaintenance`.
 
 If the period is changed manually, the cron symlinks have to be refreshed, use
-"systemctl restart btrfsmaintenance-refresh" (or the
-"rcbtrfsmaintenance-refresh" shortcut). Changing the period via yast2 sysconfig
+`systemctl restart btrfsmaintenance-refresh` (or the
+`rcbtrfsmaintenance-refresh` shortcut). Changing the period via *yast2* 
sysconfig
 editor triggers the refresh automatically.
+
+
+## Quick start ##
+
+The tasks' periods and other parameters should fit most usecases and do not
+need to be touched. Review the mountpoints (variables ending with
+`_MOUNTPOINTS`) whether you want to run the tasks there or not.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfsmaintenance-0.1.1/btrfs-balance.sh 
new/btrfsmaintenance-0.1.2/btrfs-balance.sh
--- old/btrfsmaintenance-0.1.1/btrfs-balance.sh 2015-07-13 15:15:06.000000000 
+0200
+++ new/btrfsmaintenance-0.1.2/btrfs-balance.sh 2015-10-14 17:39:46.000000000 
+0200
@@ -47,7 +47,7 @@
 } | \
 case "$BTRFS_LOG_OUTPUT" in
        stdout) cat;;
-       journal) sytemd-cat -t "$LOGIDENTIFIER";;
+       journal) systemd-cat -t "$LOGIDENTIFIER";;
        *) cat;;
 esac
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfsmaintenance-0.1.1/btrfs-scrub.sh 
new/btrfsmaintenance-0.1.2/btrfs-scrub.sh
--- old/btrfsmaintenance-0.1.1/btrfs-scrub.sh   2015-07-13 15:15:06.000000000 
+0200
+++ new/btrfsmaintenance-0.1.2/btrfs-scrub.sh   2015-10-14 17:39:46.000000000 
+0200
@@ -48,7 +48,7 @@
 } | \
 case "$BTRFS_LOG_OUTPUT" in
        stdout) cat;;
-       journal) sytemd-cat -t "$LOGIDENTIFIER";;
+       journal) systemd-cat -t "$LOGIDENTIFIER";;
        *) cat;;
 esac
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btrfsmaintenance-0.1.1/sysconfig.btrfsmaintenance 
new/btrfsmaintenance-0.1.2/sysconfig.btrfsmaintenance
--- old/btrfsmaintenance-0.1.1/sysconfig.btrfsmaintenance       2015-07-13 
15:15:06.000000000 +0200
+++ new/btrfsmaintenance-0.1.2/sysconfig.btrfsmaintenance       2015-10-14 
17:39:46.000000000 +0200
@@ -51,7 +51,10 @@
 ## Default:     "1 5 10 20 30 40 50"
 #
 # The usage percent for balancing data block groups.
-# Caveat: the higher the longer it will need
+#
+# Note: default values should not disturb normal work but may not reclaim
+# enough block groups. If you observe that, add higher values but beware that
+# this will increase IO load on the system.
 BTRFS_BALANCE_DUSAGE="1 5 10 20 30 40 50"
 
 ## Path:        System/File systems/btrfs
@@ -59,7 +62,10 @@
 ## Default:     "1 5 10 20 30"
 #
 # The usage percent for balancing metadata block groups.
-# Caveat: the higher the longer it will need
+#
+# Note: default values should not disturb normal work but may not reclaim
+# enough block groups. If you observe that, add higher values but beware that
+# this will increase IO load on the system.
 BTRFS_BALANCE_MUSAGE="1 5 10 20 30"
 
 ## Path:        System/File systems/btrfs
@@ -75,15 +81,15 @@
 ## Default:     "monthly"
 ## ServiceRestart: btrfsmaintenance-refresh
 #
-# Frequency of scrub.
+# Frequency of periodic scrub.
 BTRFS_SCRUB_PERIOD="monthly"
 
 ## Path:        System/File systems/btrfs
 ## Type:        string(idle,normal)
 ## Default:     "idle"
 #
-# Priority of IO at which the scrub process will run. Idle sholud not degrade
-# performance but may take long to finish.
+# Priority of IO at which the scrub process will run. Idle should not degrade
+# performance but may take longer to finish.
 BTRFS_SCRUB_PRIORITY="idle"
 
 ## Path:        System/File systems/btrfs
@@ -96,11 +102,13 @@
 ## Path:           System/File systems/btrfs
 ## Description:    Configuration for periodic fstrim
 ## Type:           string(none,daily,weekly,monthly)
-## Default:        "weekly"
+## Default:        "none"
 ## ServiceRestart: btrfsmaintenance-refresh
 #
-# Frequency of periodic 
-BTRFS_TRIM_PERIOD="weekly"
+# Frequency of periodic trim. Off by default so it does not collide with
+# fstrim.timer . If you do not use the timer, turn it on here. The recommended
+# period is 'weekly'.
+BTRFS_TRIM_PERIOD="none"
 
 ## Path:        System/File systems/btrfs
 ## Description: Configuration for periodic fstrim - mountpoints


Reply via email to