Bacula-users

Re: [Bacula-users] DVD Backup Version 2.0.2 OK?

2008-11-30 06:17:04
Subject: Re: [Bacula-users] DVD Backup Version 2.0.2 OK?
From: Richard Mortimer <richm AT oldelvet.org DOT uk>
To: Nils Blanck-Wehde <nils.blanck-wehde AT backofficeservice DOT biz>
Date: Sun, 30 Nov 2008 11:01:47 +0000
Hi,

I'll add some comments here I cannot guarantee that they all apply to
2.4.x because I'm still using 2.2.x and haven't been tracking
development that closely for well over a year. That said I did have DVD
writing working and many of the errors that you report do look familiar.

On Sat, 2008-11-29 at 20:26 +0100, Nils Blanck-Wehde wrote:
> Hi John, hi everyone!
> 
> I think I am getting closer to get DVD-burning to work. I would really
> love to use this feature and I would be glad to help fix it.
> 
> I just checked, I had dvd+rw-tools-7.0-0.el5.3.rpm installed. As this
> is is <7.04 I uninstalled the rpm and compiled / installed from this
> sources:
>         http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd
> +rw-tools-7.1.tar.gz
> Now, growisofs is version 7.1:
>         * growisofs by <appro AT fy.chalmers DOT se>, version 7.1
> Does this version still require patching before building?
> 
I used the Debian version that already had the patches applied.

> Here is what happens now: DVD burning works AS LONG as bacula doesn't
> write more than one part. After the first part a mount error occurs. I
> think that bacula for some reason tries to mount the dvd after each
> part, maybe to check what it just wrote or to calculate the remaining
> space.
It does try to check how much space is left.

The mount failure isn't necessarily a problem doing the operating system
mount of the DVD but rather that Bacula didn't find when it expected or
maybe that it tried to open a file on the DVD in read/write mode.

>  As far as I understand, it is NOT safe to burn parts > 800MB to a dvd
> so I left the default value of 800M in bacula-sd.conf.
> I ran the SD as root (/usr/sbin/bacula-sd -d 99) so I don't think that
> there really is a mount error. Maybe the debug-output is misleading?
Yes I agree. See what I wrote above.

> 
> You will find the (somewhat lengthy) debug output of DIR and SD
> attached.
> 
> If ANY other information (versions, configurations, hardware etc.)
> might help solve the issue, please ask. I will provide you with
> anything needed asap.

I don't have time to look too closely at the moment but the following
may help.

First off I always found that I needed to comment out the following line
in the /etc/bacula/scripts/dvd-handler script.

   growcmd += " -use-the-force-luke=notray"

Add a # at the start of the line to make it

#   growcmd += " -use-the-force-luke=notray"

This is because linux does (did?) not re-read the disk geometry
automatically. The above line forces the DVD to be ejected after writing
and the mount reloads it causing the OS to re-read the geometry and find
the new data written to the DVD.

I actually think that this is the problem that you are seeing because
without it the OS will report unreadable blocks when doing the low level
mount command.

You may also find it useful to go through the steps in

http://bridge.oldelvet.org.uk/bacula/BaculaDVDSetup.html

If those steps are not all successful then Bacula has very little chance
or correctly writing to the DVD.

Regards

Richard


> 
> Many thanks in advance
> 
> Nils
> 
> 
> 
> This is the debug output from the director:
> 29-Nov 20:02 company_bacula-dir JobId 3: Start Backup JobId 3,
> Job=nightly-self-backup.2008-11-29_20.02.19
> 29-Nov 20:02 company_bacula-dir JobId 3: Created new Volume
> "BaculaDVD0003" in catalog.
> 29-Nov 20:02 company_bacula-dir JobId 3: Using Device "DVDWriter"
> 29-Nov 20:02 company_bacula-sd JobId 3: Labeled new Volume
> "BaculaDVD0003" on device "DVDWriter" (/dev/hda).
> 29-Nov 20:02 company_bacula-sd JobId 3: Wrote label to prelabeled
> Volume "BaculaDVD0003" on device "DVDWriter" (/dev/hda)
> 29-Nov 20:02 company_bacula-dir JobId 3: Max Volume jobs exceeded.
> Marking Volume "BaculaDVD0003" as Used.
> 29-Nov 20:03 company_bacula-sd JobId 3: Part 1 (52384166 bytes)
> written to DVD.
> 29-Nov 20:03 company_bacula-sd JobId 3: Remaining free space
> 4,695,588,864 on "DVDWriter" (/dev/hda)
> 29-Nov 20:03 company_bacula-sd JobId 3: Fatal error: block.c:856
> Unable to open device next part "DVDWriter" (/dev/hda): ERR=Could not
> mount DVD device "DVDWriter" (/dev/hda).
> 
> This is the debug-output of the SD:
> 
> Volume Label:
> Id                : Bacula 1.0 immortal
> VerNo             : 11
> VolName           : BaculaDVD0003
> PrevVolName       :
> VolFile           : 0
> LabelType         : PRE_LABEL
> LabelSize         : 175
> PoolName          : DVDPool
> MediaType         : DVD
> PoolType          : Backup
> HostName          : company-bacula
> Date label written: 29-Nov-2008 20:02
> company_bacula-sd: reserve.c:316-0 jid=3 enter
> reserve_volume=BaculaDVD0003 drive="DVDWriter" (/dev/hda)
> company_bacula-sd: reserve.c:189-0 jid=3 List begin reserve_volume:
> BaculaDVD0003 in_use=1 on device "DVDWriter" (/dev/hda)
> company_bacula-sd: reserve.c:331-0 jid=3 Vol attached=BaculaDVD0003,
> newvol=BaculaDVD0003 volinuse=1 on "DVDWriter" (/dev/hda)
> company_bacula-sd: reserve.c:339-0 jid=3 === set reserved
> vol=BaculaDVD0003 dev="DVDWriter" (/dev/hda)
> company_bacula-sd: reserve.c:418-0 jid=3 === set in_use.
> vol=BaculaDVD0003 dev="DVDWriter" (/dev/hda)
> company_bacula-sd: reserve.c:189-0 jid=3 List end new volume:
> BaculaDVD0003 in_use=1 on device "DVDWriter" (/dev/hda)
> company_bacula-sd: reserve.c:490-0 Dec reserve=0
> dev="DVDWriter" (/dev/hda)
> company_bacula-sd: append.c:96-0 Begin append
> device="DVDWriter" (/dev/hda)
> company_bacula-sd: dvd.c:311-0 Enter: == open_next_part part=1 npart=0
> dev="DVDWriter" (/dev/hda) vol=BaculaDVD0003 mode=2 file_addr=52383955
> company_bacula-sd: dvd.c:227-0 dvd_write_part: device is
> "DVDWriter" (/dev/hda), part is 1, is_mounted=0
> company_bacula-sd: dvd.c:256-0 Write part:
> cmd=/usr/lib/bacula/dvd-handler /dev/hda write
> 1 /tmp/backup/BaculaDVD0003 timeout=16000
> company_bacula-sd: dvd.c:258-0 Write part status=0 result=Running
> growisofs -use-the-force-luke=notray -quiet -use-the-force-luke=4gms
> -A 'Bacula Data' -input-charset=default -iso-level 3 -pad -p
> 'dvd-handler / growisofs' -sysid 'BACULADATA' -R
> -Z /dev/hda /tmp/backup/BaculaDVD0003
> Executing 'mkisofs -quiet -A Bacula Data -input-charset=default
> -iso-level 3 -pad -p dvd-handler / growisofs -sysid BACULADATA
> -R /tmp/backup/BaculaDVD0003 | builtin_dd of=/dev/hda obs=32k seek=0'
> /dev/hda: "Current Write Speed" is 16.4x1352KBps.
> /dev/hda: flushing cache
> /dev/hda: updating RMA
> /dev/hda: closing session
> 
> Part file /tmp/backup/BaculaDVD0003 successfully written to disk.
> 
> company_bacula-sd: dvd.c:287-0 =========
> unlink(/tmp/backup/BaculaDVD0003)
> company_bacula-sd: dvd.c:341-0 Inc part=2 num_dvd_parts=1
> company_bacula-sd: dev.c:570-0 open_dvd_device: part=2
> num_dvd_parts=1, VolCatInfo.VolCatParts=1
> company_bacula-sd: dev.c:619-0 DVD device mount failed.
> company_bacula-sd: append.c:220-0 Got write_block_to_dev error on
> device "DVDWriter" (/dev/hda). Could not mount DVD device
> "DVDWriter" (/dev/hda).
> 
> company_bacula-sd: reserve.c:189-0 jid=3 List
> acquire:release_device(): BaculaDVD0003 in_use=1 on device
> "DVDWriter" (/dev/hda)
> company_bacula-sd: cram-md5.c:73-0 send: auth cram-md5
> <1406031270.1227985425@company_bacula-sd> ssl=0
> company_bacula-sd: cram-md5.c:152-0 sending resp to challenge:
> +6/Uq8xl87FyGC/9ll/CGC
> company_bacula-sd: dircmd.c:210-0 Message channel init completed.
> 
> 
> Jari Fredriksson schrieb: 
> > > On Sat, Nov 29, 2008 at 11:55 AM, John Drescher
> > > <drescherjm AT gmail DOT com> wrote: 
> > >     
> > > > On Sat, Nov 29, 2008 at 10:50 AM, michael riehemann
> > > > <riehemann AT netzfenster DOT de> wrote:
> > > >       
> > > > > Hi all together,
> > > > > 
> > > > > and, sorry for my english :)
> > > > > 
> > > > > I read that version 2.0.2 is running fine for DVD
> > > > > Backups. I tried with 2.4 and 2.2.8 both are buggy.
> > > > > 
> > > > >         
> > > > Did you use a patched dvd+rw-tools?  Or a 7.04 or
> > > > greater? 
> > > > 
> > > > John
> > > >       
> > 
> > I have patched dvd+rw-tools on latest Debian. And I can confirm that both 
> > the 2.2.8 and 2.4 branch do not work.
> > 
> > 
> >   
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ Bacula-users mailing list 
> Bacula-users AT lists.sourceforge DOT net 
> https://lists.sourceforge.net/lists/listinfo/bacula-users
-- 
Richard Mortimer <richm AT oldelvet.org DOT uk>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users