Bacula-users

Re: [Bacula-users] FW: difficulty reading tapes after upgrade 3.0.2 -> 5.2.12

2013-02-22 11:54:33
Subject: Re: [Bacula-users] FW: difficulty reading tapes after upgrade 3.0.2 -> 5.2.12
From: Martin Simmons <martin AT lispworks DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 22 Feb 2013 16:51:41 GMT
What about mt setblk and defblksize?

If you do get it working again, then it would be interesting to try dd again
to see if the first block really is only 1k.

__Martin


>>>>> On Thu, 21 Feb 2013 13:48:54 +0000, GILES Stephen said:
> 
> After continued testing with other volumes they all read fine. I tried bacula 
> again which was able to mount and read the volumes successfully.
> However, after a reboot, bacula reverted to it's previous state of not being 
> able to read the tapes via either bls, or via the normal bacula-sd 
> interaction.
> 
> This points me towards it being a host OS issue and settings that were lost 
> after a reboot.
> I have no idea what though, I have checked my : mt -f /dev/nst0 stoptions and 
> they are all as expected. 
> 
> Blocksize is set to variable mode and other options as per the 
> troubleshooting guide.
> 
> My question now is, what options can I tweak and how on the tape drive to try 
> and get bls to work as it was before.
> If I get it working again, is there any way to check what those options are 
> in place?
> 
> All very confusing, considering this has worked in place for 3 years prior to 
> upgrade.
> 
> Thanks,
> 
> Stephen.
> 
> 
> -----Original Message-----
> From: GILES Stephen 
> Sent: 21 February 2013 12:22
> To: bacula-users AT lists.sourceforge DOT net
> Subject: Re: [Bacula-users] FW: difficulty reading tapes after upgrade 3.0.2 
> -> 5.2.12
> 
> I have tried the bls with the archive device.
> The file read OK and it displayed the label on the tape. I 
> 
> When I try the same command on the actual tape, the tape does list.
> 
> Output follows :
> 
> ------------------------
> 
> [root@iota tmp]# mt -f /dev/nst0 rewind
> [root@iota tmp]# bls -d 200 -j -v  -V ANR899L3 -c /etc/bacula/bacula-sd.conf 
> /dev/nst0
> bls: stored_conf.c:704-0 Inserting device res: NeoLTO3-0
> bls: match.c:260-0 add_fname_to_include prefix=0 compres=0 alg= 1431655765 
> fname=/
> bls: butil.c:287-0 Using device: "/dev/nst0" for reading.
> bls: dev.c:318-0 init_dev: tape=1 dev_name=/dev/nst0
> bls: acquire.c:708-0 Attach Jid=0 dcr=83abd30 size=0 dev="NeoLTO3-0" 
> (/dev/nst0)
> bls: vol_mgr.c:161-0 add read_vol=ANR899L3 JobId=0
> bls: butil.c:188-0 Acquire device for read
> bls: acquire.c:69-0 dcr=83abd30 dev=83ab458
> bls: acquire.c:70-0 MediaType dcr= dev=LTO3
> bls: acquire.c:98-0 Want Vol=ANR899L3 Slot=0
> bls: acquire.c:112-0 MediaType dcr= dev=LTO3
> bls: acquire.c:180-0 MediaType dcr= dev=LTO3
> bls: acquire.c:197-0 dir_get_volume_info vol=ANR899L3
> bls: bls.c:488-0 Fake dir_get_volume_info
> bls: mount.c:589-0 No swap_dev set
> bls: mount.c:547-0 Must load "NeoLTO3-0" (/dev/nst0)
> bls: autochanger.c:117-0 autoload: slot=0 InChgr=0 Vol=ANR899L3 21-Feb 12:07 
> bls JobId 0: No slot defined in catalog (slot=0) for Volume "ANR899L3" on 
> "NeoLTO3-0" (/dev/nst0).
> 21-Feb 12:07 bls JobId 0: Cartridge change or "update slots" may be required.
> bls: acquire.c:228-0 open vol=ANR899L3
> bls: dev.c:383-0 open dev: type=2 dev_name="NeoLTO3-0" (/dev/nst0) 
> vol=ANR899L3 mode=OPEN_READ_ONLY
> bls: dev.c:1911-0 Enter mount
> bls: dev.c:433-0 Open dev: device is tape
> bls: autochanger.c:313-0 Locking changer NEO2000-1 21-Feb 12:07 bls JobId 0: 
> 3301 Issuing autochanger "loaded? drive 0" command.
> bls: autochanger.c:272-0 Run program=/usr/libexec/bacula/mtx-changer 
> /dev/sg13 loaded 0 /dev/nst0 0
> bls: autochanger.c:274-0 run_prog: /usr/libexec/bacula/mtx-changer /dev/sg13 
> loaded 0 /dev/nst0 0 stat=0 result=2 21-Feb 12:07 bls JobId 0: 3302 
> Autochanger "loaded? drive 0", result is Slot 2.
> bls: autochanger.c:327-0 Unlocking changer NEO2000-1
> bls: dev.c:448-0 Try open "NeoLTO3-0" (/dev/nst0) mode=OPEN_READ_ONLY
> bls: dev.c:470-0 Rewind after open
> bls: dev.c:2411-0 In set_os_device_parameters
> bls: dev.c:2433-0 MTSETDRVBUFFER
> bls: dev.c:522-0 open dev: tape 3 opened
> bls: dev.c:396-0 preserve=0x0 fd=3
> bls: acquire.c:236-0 opened dev "NeoLTO3-0" (/dev/nst0) OK
> bls: acquire.c:239-0 calling read-vol-label
> bls: label.c:79-0 Enter read_volume_label res=0 device="NeoLTO3-0" 
> (/dev/nst0) vol=ANR899L3 dev_Vol=*NULL*
> bls: label.c:128-0 Big if statement in read_volume_label
> bls: label.c:817-0 unser_vol_label
> 
> Volume Label:
> Id                : Bacula 1.0 immortal
> VerNo             : 11
> VolName           : ANR899L3
> PrevVolName       :
> VolFile           : 0
> LabelType         : VOL_LABEL
> LabelSize         : 164
> PoolName          : Scratch
> MediaType         : LTO3
> PoolType          : Backup
> HostName          : iota.pst.ed.ac.uk
> Date label written: 12-Mar-2012 14:08
> bls: label.c:200-0 Compare Vol names: VolName=ANR899L3 hdr=ANR899L3
> 
> Volume Label:
> Id                : Bacula 1.0 immortal
> VerNo             : 11
> VolName           : ANR899L3
> PrevVolName       :
> VolFile           : 0
> LabelType         : VOL_LABEL
> LabelSize         : 164
> PoolName          : Scratch
> MediaType         : LTO3
> PoolType          : Backup
> HostName          : iota.pst.ed.ac.uk
> Date label written: 12-Mar-2012 14:08
> bls: label.c:221-0 Leave read_volume_label() VOL_OK
> bls: label.c:234-0 Call reserve_volume=ANR899L3
> bls: vol_mgr.c:362-0 enter reserve_volume=ANR899L3 drive="NeoLTO3-0" 
> (/dev/nst0)
> bls: vol_mgr.c:272-0 new Vol=ANR899L3 at 83ac6d8 dev="NeoLTO3-0" (/dev/nst0)
> bls: vol_mgr.c:486-0 === set in_use. vol=ANR899L3 dev="NeoLTO3-0" (/dev/nst0)
> bls: vol_mgr.c:520-0 Inc walk_start use_count=2 volname=ANR899L3
> bls: vol_mgr.c:208-0 List end new volume: ANR899L3 in_use=1 swap=0 on device 
> "NeoLTO3-0" (/dev/nst0)
> bls: acquire.c:243-0 Got correct volume.
> 21-Feb 12:07 bls JobId 0: Ready to read from volume "ANR899L3" on device 
> "NeoLTO3-0" (/dev/nst0).
> bls: acquire.c:345-0 dcr=83abd30 dev=83ab458
> bls: acquire.c:346-0 MediaType dcr= dev=LTO3
> bls: label.c:817-0 unser_vol_label
> 
> Volume Label:
> Id                : Bacula 1.0 immortal
> VerNo             : 11
> VolName           : ANR899L3
> PrevVolName       :
> VolFile           : 0
> LabelType         : VOL_LABEL
> LabelSize         : 164
> PoolName          : Scratch
> MediaType         : LTO3
> PoolType          : Backup
> HostName          : iota.domain.local
> Date label written: 12-Mar-2012 14:08
> 
> Volume Label:
> Id                : Bacula 1.0 immortal
> VerNo             : 11
> VolName           : ANR899L3
> PrevVolName       :
> VolFile           : 0
> LabelType         : VOL_LABEL
> LabelSize         : 164
> PoolName          : Scratch
> MediaType         : LTO3
> PoolType          : Backup
> HostName          : iota.domain.local
> Date label written: 12-Mar-2012 14:08
> 
> Begin Job Session Record:
> JobId             : 19999
> VerNum            : 11
> PoolName          : Full-Srv-QArchive-Tape
> PoolType          : Backup
> JobName           : xi-DATA-QArchive-tue1.0
> ClientName        : xi-fd
> Job (unique name) : xi-DATA-QArchive-tue1.0.2013-01-01_21.01.00_13
> FileSet           : linux-DATA-QArchive.tue1.0
> JobType           : B
> JobLevel          : F
> Date written      : 01-Jan-2013 21:03
>    
> 
> ----------------------------
> 
> The tape then scans and tells me blocks and jobs.
> 
> So, they tape is reading with bls as expected.
> 
> Will try the strace next.
> 
> Any thoughts in the output I have posted?
> 
> Stephen.
> 
> 
> --
> The University of Edinburgh is a charitable body, registered in Scotland, 
> with registration number SC005336.
> 
> 
> -----Original Message-----
> From: Martin Simmons [mailto:martin AT lispworks DOT com] 
> Sent: 20 February 2013 20:16
> To: bacula-users AT lists.sourceforge DOT net
> Subject: Re: [Bacula-users] FW: difficulty reading tapes after upgrade 3.0.2 
> -> 5.2.12
> 
>>>>> On Tue, 19 Feb 2013 19:12:35 +0000, GILES Stephen said:
> > 
> > Thanks for the links.
> > I have read a few of those bits, and figured it was backward compatible 
> > also.
> > Just tried your suggestion and I get exactly the same error.
> > 
> > It really has me stumped, and I'm surprised other people have not come 
> > across it. Because I get the same thing for every 3.0.2 tape I have tried.
> > 
> > Any other thoughts?
> 
> You could try to find out exactly what the SD process has read from the tape, 
> e.g. using "strace -f -s 1024 ..." or gdb breakpoints.
> 
> You could add a file storage device with Archive Device = /tmp, dd the first 
> block to a file in /tmp and then run "bls -d 200 /tmp/filename" to see what 
> that says about the label (expect an error about "Wrong Volume mounted on 
> device").
> 
> __Martin
> 
> 
> > 
> > Stephen.
> > ________________________________________
> > From: lst_hoe02 AT kwsoft DOT de [lst_hoe02 AT kwsoft DOT de]
> > Sent: 19 February 2013 14:55
> > To: bacula-users AT lists.sourceforge DOT net
> > Subject: Re: [Bacula-users] FW: difficulty reading tapes after upgrade 
> > 3.0.2 -> 5.2.12
> > 
> > Zitat von GILES Stephen <stephen.giles AT ed.ac DOT uk>:
> > 
> > > Hello,
> > >
> > > Is anyone able to suggest anything, or point me in a direction?
> > > Have I hit an unknown bug as I can't think what else to try.
> > >
> > > My bacula-sd.conf looks like this.
> > >
> > > Please see additional information below.
> > >
> > > ----------
> > > Storage {                             # definition of myself
> > >   Name = iota-sd
> > >   SDPort = 9103                  # Director's port
> > >   WorkingDirectory = "/var/spool/bacula"
> > >   Pid Directory = "/var/run"
> > >   Maximum Concurrent Jobs = 20
> > > }
> > >
> > > Director {
> > >   Name = iota-dir
> > >   Password = "###"
> > > }
> > >
> > >
> > > # NEO2000 tapedrive1
> > > Device {
> > >   Name = NeoLTO3-0
> > >   Drive Index = 0
> > >   Media Type = LTO3
> > >   Archive Device = /dev/nst0
> > >   Device Type = Tape
> > >
> > >   AutoChanger = yes;
> > >   AutomaticMount = yes;
> > >   AutoSelect = yes;
> > >
> > >   AlwaysOpen = no;
> > >   RemovableMedia = yes;
> > >   RandomAccess = no;
> > >   Maximum Network Buffer Size = 262144
> > >   Maximum File Size = 10gb
> > >
> > >   Minimum blocksize = 262144
> > >   Maximum blocksize = 262144
> > >
> > >   Spool Directory = /bacula-spool/1/ }
> > >
> > > # NEO2000 jukebox
> > > Autochanger {
> > >   Name = NEO2000-1
> > >   Device = NeoLTO3-0
> > >   Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
> > >   Changer Device = /dev/sg13
> > > }
> > >
> > > Messages {
> > >   Name = Standard
> > >   director = iota-dir = all
> > > }
> > >
> > >
> > 
> > 
> > Hello
> > 
> > The documentation for the on-tape-format is here:
> > 
> > http://www.bacula.org/2.4.x-manuals/en/developers/Storage_Media_Output
> > _Format.html
> > 
> > and at first glance old tape from version 3.x should be readable and
> > http://www.bacula.org/5.2.x-manuals/en/main/main/Bacula_Security_Issue
> > s.html#SECTION004310000000000000000 also suggest so.
> > 
> > One thing to try is to only set the Maximum blocksize = 262144 and 
> > leave the Minimum blocksize at the default (0) to prevent Bacula from 
> > using *fixed* blocksize.
> > 
> > Regards
> > 
> > Andreas
> > 
> > 
> > 
> > ----------------------------------------------------------------------
> > -------- Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics Download AppDynamics Lite 
> > for free today:
> > http://p.sf.net/sfu/appdyn_d2d_feb
> > _______________________________________________
> > Bacula-users mailing list
> > Bacula-users AT lists.sourceforge DOT net
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> > 
> > --
> > The University of Edinburgh is a charitable body, registered in 
> > Scotland, with registration number SC005336.
> > 
> > 
> > ----------------------------------------------------------------------
> > -------- Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics Download AppDynamics Lite 
> > for free today:
> > http://p.sf.net/sfu/appdyn_d2d_feb
> > _______________________________________________
> > Bacula-users mailing list
> > Bacula-users AT lists.sourceforge DOT net
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> > 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics Download AppDynamics Lite for free 
> today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users