Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171205 - app-backup/flexbackup specifies wrong command line option for mbuffer / other small enhancements
Summary: app-backup/flexbackup specifies wrong command line option for mbuffer / other...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-17 00:02 UTC by John R. Graham
Modified: 2007-04-15 20:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to apply the described fixes. (flexbackup.patch,5.33 KB, patch)
2007-03-17 00:05 UTC, John R. Graham
Details | Diff
Update the documentation to describe the new features. (genkernel-3.4.6-docs.patch,1.97 KB, patch)
2007-03-31 16:37 UTC, John R. Graham
Details | Diff
New patch applies against flexbackup-1.2.1-r3 without annoying offset messages. (flexbackup-1.2.1-mbuffer-switch.patch,5.42 KB, patch)
2007-04-14 21:46 UTC, John R. Graham
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John R. Graham gentoo-dev 2007-03-17 00:02:49 UTC
Flexbackup uses either the buffer or mbuffer program to help streaming tape drives from thrashing.  The buffer program uses the -p command line option to specify the percentage the buffer to fill before writing data.  Alas, mbuffer's command line is insidiously incompatible with buffer in this: it uses -P (capital P) instead of -p (lowercase p) to mean the same thing.  In mbuffer -p (lowercase p) is for read buffer starvation control as opposed to write buffer fill control.  Since flexbackup uses -p for both buffer and mbuffer, flexbackup causes a lot of tape drive thrashing when mbuffer is used, since the write buffer fill control is not specified.  I've included a patch that corrects this issue.

In addition, the "find" command line that is constructed to identify files to backup is awfully complex.  In figuring out how to properly specify directories to prune, I made a small change to the program itself to log the pruning regex and added some informative comments to the "flexbackup.conf" file.  The patch also applies both of these small changes.

Finally, the patch corrects example global exclusions in the "flexbackup.conf" which actually break a backup under Gentoo because they exclude the backup of critical Portage components ("/usr/lib/portage/pym/cache", in fact).  Probably not the best example for a Portage ebuild to install.

The patches are against "flexbackup-1.2.1-r2".  Note that there's a little bit of correction work on inconsistent indenting in there, too.  I'm going to submit these patches upstream as well, but, upstream hasn't made any updates since 2003, so I really think the best way to get 'em into the tree is through a Gentoo bug.

Reproducible: Always

Steps to Reproduce:
1. Include "$buffer = 'mbuffer';" in "flexbackup.conf".
2. Backup to tape.
Actual Results:  
Tape drive will thrash incessantly during backup:  write a little bit, stop, backup, repeat.

Expected Results:  
Reasonable buffering should keep tape drive moving in one direction most of the time.
Comment 1 John R. Graham gentoo-dev 2007-03-17 00:05:51 UTC
Created attachment 113532 [details, diff]
Patch to apply the described fixes.
Comment 2 John R. Graham gentoo-dev 2007-03-31 16:37:37 UTC
Created attachment 115060 [details, diff]
Update the documentation to describe the new features.

Update the documentation (both man page and internal --help documentation) to describe the new features.

Alas, I also made a small additional code change:  I added a --no-symlink option as a complimentary option to the new --symlink one.  This allows the option to be defaulted to on in genkernel.conf and then turned off from the command line.
Comment 3 John R. Graham gentoo-dev 2007-04-01 14:40:49 UTC
Comment on attachment 115060 [details, diff]
Update the documentation to describe the new features.

Posted a patch for my genkernel enhancement to the wrong bug.  Sorry for the trouble.  Please ignore this patch.
Comment 4 John R. Graham gentoo-dev 2007-04-14 21:46:06 UTC
Created attachment 116268 [details, diff]
New patch applies against flexbackup-1.2.1-r3 without annoying offset messages.
Comment 5 John R. Graham gentoo-dev 2007-04-15 20:51:38 UTC
This fix is in Portage now as flexbackup-1.2.1-r4 thanks to the help of the Gentoo Sunrise team.