(SuSE folks please read on, it's about the AMANDA
/usr/src/packages/SOURCES/amanda-2.4.1p1.dif file in SuSE 6.2)

"John R. Jackson" wrote:

> 
> >The main point is that AMANDA interprets the number of blocks from the
> >SAMBA du command as the wanted estimate ...
> 
> The patterns in client-src/sendsize.c appear to have been redone between
> 2.4.1 and 2.4.2 to address this problem.  I don't think I could generate
> a sensible patch, so have two possible workarounds:
> 
>   * Update the client to 2.4.2.
> 
>   * Get a copy of 2.4.2 and copy the re_size array from 2.4.2 back to
>     your 2.4.1 sources.  I think that will work OK, i.e. there should
>     not be any internal changes that would cause the table to misbehave.
> 


Thank you very much, that was it! I decided to do it manually, as I had
already applied the patch samba2-20000418.diff to my amanda-2.4.1p1-7
(SuSE 6.2 version of amanda-2.4.1.p1) which should actually have
corrected this (it did not report any rej files when I applied it). The
problem was that a line had remained, that would be matched *before* the
SAMBA line could be matched. I commented it and from then on it worked
fine:

---

    {"backup: [0-9][0-9]* 1k blocks on [0-9][0-9]* volume(s)",1024},  /*
AIX */
    {"[0-9][0-9]* blocks, [0-9][0-9]*.[0-9][0-9]* volumes", 1024},
                                                          /* DU 3.2g
dump -E */
    {"dump: Estimate: [0-9][0-9]* blocks being output to pipe",1024},

    /*
     * Changed by root.
     * Commented. Otherwise, the SAMBA du command output
     * gets interpreted using this regexp, resulting in
     * a wrong estimate.
     * {"[0-9][0-9]* blocks",1024},                             * DU 4.0
dump *
     */

    {"dump: Dumping [0-9][0-9]* bytes, ", 1},                /* DU 4.0
vdump */
    {"DUMP: estimated [0-9][0-9]* KB output", 1024},                 /*
HPUX */
    {"xfsdump: estimated dump size: [0-9][0-9]* bytes", 1},  /* Irix 6.2
xfs */

---

As you see, the offending line was 

{"[0-9][0-9]* blocks",1024}

which is there for DU 4.0 dump. Since this comes before the SAMBA
specific lines, it matched the string first and I got the wrong
estimate.

Actually, this is not in the official code for 2.4.1.p1, but has been
put there from SuSE: in the diff file that comes with the source rpm of
SuSE 6.2 for AMANDA (which I have and which gets installed under
/usr/src/packages/SOURCES/amanda-2.4.1p1.dif), I read at line 74:

-------------------

--- client-src/sendsize.c
+++ client-src/sendsize.c       1999/01/16 08:52:09
@@ -562,7 +562,7 @@
     {"[0-9][0-9]* blocks, [0-9][0-9]*.[0-9][0-9]* volumes", 1024},
                                                           /* DU 3.2g
dump -E */
     {"dump: Estimate: [0-9][0-9]* blocks being output to pipe",1024},
-                                                              /* DU 4.0
dump */
+    {"[0-9][0-9]* blocks",1024},                             /* DU 4.0
dump */
     {"dump: Dumping [0-9][0-9]* bytes, ", 1},                /* DU 4.0
vdump */
     {"DUMP: estimated [0-9][0-9]* KB output", 1024},                 /*
HPUX */
     {"xfsdump: estimated dump size: [0-9][0-9]* bytes", 1},  /* Irix
6.2 xfs */

-------------------

You clearly see that this line was added there from the SuSE folks.
Thanks for all the help.

(For SuSE: If you want to see the history on this, just search the
amanda-users mailing list for " Wrong estimates for SAMBA 2.0.6 shares",
I am not going to repeate it here).

-- 
Regards

Chris Karakas
Don�t waste your cpu time - crack rc5: http://www.distributed.net

Reply via email to