1 From bacula-users-admin@lists.sourceforge.net Mon Oct 20 23:44:13 2003
2 Return-Path: <bacula-users-admin@lists.sourceforge.net>
3 Received: from sc8-sf-list2.sourceforge.net (lists.sourceforge.net
4 [66.35.250.206]) by matou.sibbald.com (8.11.6/8.11.6) with ESMTP id
5 h9KLiDY13657 for <kern@sibbald.com>; Mon, 20 Oct 2003 23:44:13 +0200
6 Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13]
7 helo=sc8-sf-list1.sourceforge.net) by sc8-sf-list2.sourceforge.net with
8 esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 1ABhpS-00013k-00; Mon, 20 Oct 2003
10 Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11]
11 helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp
12 (Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian)) id
13 1ABhnp-0007qu-00 for <bacula-users@lists.sourceforge.net>; Mon, 20 Oct 2003
15 Received: from bast.unixathome.org ([66.11.174.150] ident=postfix) by
16 sc8-sf-mx1.sourceforge.net with esmtp (Exim 4.22) id 1ABfiR-0002Iv-Q8 for
17 bacula-users@lists.sourceforge.net; Mon, 20 Oct 2003 12:29:19 -0700
18 Received: from wocker (wocker.unixathome.org [192.168.0.99]) by
19 bast.unixathome.org (Postfix) with ESMTP id 258913F53 for
20 <bacula-users@lists.sourceforge.net>; Mon, 20 Oct 2003 15:25:33 -0400 (EDT)
21 From: "Dan Langille" <dan@langille.org>
22 To: bacula-users@lists.sourceforge.net
24 Message-ID: <3F93FF4E.14552.13ACB682@localhost>
26 X-mailer: Pegasus Mail for Windows (v4.02a)
27 Content-type: text/plain; charset=US-ASCII
28 Content-description: Mail message body
30 X-Spam-Report: 0.0/5.0 Spam Filtering performed by sourceforge.net. See
31 http://spamassassin.org/tag/ for more details. Report problems to
32 https://sf.net/tracker/?func=add&group_id=1&atid=200001
33 Subject: [Bacula-users] FreeBSD - large backups to tape
34 Sender: bacula-users-admin@lists.sourceforge.net
35 Errors-To: bacula-users-admin@lists.sourceforge.net
36 X-BeenThere: bacula-users@lists.sourceforge.net
37 X-Mailman-Version: 2.0.9-sf.net
39 List-Help: <mailto:bacula-users-request@lists.sourceforge.net?subject=help>
40 List-Post: <mailto:bacula-users@lists.sourceforge.net>
42 <https://lists.sourceforge.net/lists/listinfo/bacula-users>,
43 <mailto:bacula-users-request@lists.sourceforge.net?subject=subscribe>
44 List-Id: Bacula user's email list for support and discussions
45 <bacula-users.lists.sourceforge.net>
47 <https://lists.sourceforge.net/lists/listinfo/bacula-users>,
48 <mailto:bacula-users-request@lists.sourceforge.net?subject=unsubscribe>
50 <http://sourceforge.net/mailarchive/forum.php?forum=bacula-users>
51 Date: Mon, 20 Oct 2003 15:29:18 -0400
52 Content-Transfer-Encoding: 8bit
54 Kern and I have been working on a FreeBSD/Bacula problem.
55 He's asked me to post this to the list. The problem was within the
56 FreeBSD pthreads library. A solution has been found.
60 The FreeBSD pthreads library does not properly handle End Of Tape.
61 This problem will be fixed in FreeBSD 4.9. The bug results in more
62 data being written to the tape than could be read. Any backup which
63 involved more than one tape would be incomplete.
67 To demonstrate the problem, tapetest.c can be obtained from
68 http://www.freebsd.org/cgi/query-pr.cgi?pr=56274
70 This tests without pthreads:
72 * If you build this program with:
74 * c++ -g -O2 -Wall -c tapetest.c
75 * c++ -g -O2 -Wall tapetest.o -o tapetest
77 * Procedure for testing tape
78 * ./tapetest /dev/your-tape-device
84 * The output will be something like:
88 * *Begin writing blocks of 64512 bytes.
89 * ++++++++++++++++++++ ...
90 * Write failed. Last block written=17294. stat=0 ERR=Unknown
93 * Wrote EOF to /dev/nsa0
95 * *Starting scan at file 0
96 * 17294 blocks of 64512 bytes in file 0
100 * Total files=1, blocks=17294, bytes = 1115670528
103 * which is correct. Notice that the return status is
104 * 0, while in the example below, which fails, the return
107 This tests with pthreads:
109 * If you build this program with:
111 * c++ -g -O2 -Wall -pthread -c tapetest.c
112 * c++ -g -O2 -Wall -pthread tapetest.o -o tapetest
113 * Note, we simply added -pthread compared to the
116 * Procedure for testing tape
117 * ./tapetest /dev/your-tape-device
123 * The output will be something like:
127 * *Begin writing blocks of 64512 bytes.
128 * +++++++++++++++++++++++++++++ ...
129 * Write failed. Last block written=17926. stat=-1 ERR=No space left on device
131 * Wrote EOF to /dev/nsa0
133 * *Starting scan at file 0
134 * 17913 blocks of 64512 bytes in file 0
138 * Total files=1, blocks=17913, bytes = 1155603456
141 * which is incroorect because it wrote 17,926 blocks but read
142 * back only 17,913 blocks
144 If you get the same number of blocks written and read WHEN using
145 pthreads, then you've been correctly patched.
149 For FreeBSD prior to 4.9, you have two choices to ensure proper
150 backups. These instructions assume you are familiar with patching
151 FreeBSD and already have the FreeBSD source code installed on your
154 1 - cvsup and build your system to FreeBSD 4.8-STABLE
156 2 - Apply this patch.
158 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6&r2=1.16.2.7
160 To apply the patch, follow these instructions as root.
162 fetch -o pthread.diff http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6\&r2=1.16.2.8
164 cd /usr/src/lib/libc_r/uthread/
165 patch < /path/to/pthread.diff
169 I recommend restarting Bacula.
174 I suggest running tapetest on your patched system and then
175 conducting a backup which spans two tapes. Restore the data
176 and compare to the original. If not identical, please let us know.
181 Dan Langille : http://www.langille.org/
185 -------------------------------------------------------
186 This SF.net email is sponsored by OSDN developer relations
187 Here's your chance to show off your extensive product knowledge
188 We want to know what you know. Tell us and you have a chance to win $100
189 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
190 _______________________________________________
191 Bacula-users mailing list
192 Bacula-users@lists.sourceforge.net
193 https://lists.sourceforge.net/lists/listinfo/bacula-users