Just a potshot guess, I don't have an auto-changer, but, isn't the "bacula" user supposed to have proper permissions to the device for writing? I had to make sure the file store locally had rw access for the bacula user themselves when I set it up, not sure if that's the ticket.
--
Shawn Qureshi
Artemide, Inc.
IT Specialist
On Thu, 2009-08-13 at 13:34 -0400, Dan Langille wrote:
> On Thu, August 13, 2009 1:19 pm, Dan Langille wrote:
> > I am setting up a new autochanger / tape drive. I'm trying to run btape.
> > The basic test works, but I see this message when I start btape:
> >
> > Autochanger "loaded? drive 0", result: nothing loaded.
> >
> > mtx-changer [and mtx] both disagree with this:
> >
> > $ sudo /etc/bacula/mtx-changer /dev/sg4 loaded 0 /dev/nst0 0
> > AAM240L4
>
> Could this be a permission issue? I'm running as root (via sudo). The
> output I'm encountering is:
>
> $ sudo /sbin/btape -c /etc/bacula/bacula-sd.conf /dev/nst0
> Password:
> Sorry, try again.
> Password:
> Tape block granularity is 1024 bytes.
> btape: butil.c:285 Using device: "/dev/nst0" for writing.
> 13-Aug 13:32 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
> command.
> 13-Aug 13:32 btape JobId 0: 3302 Autochanger "loaded? drive 0", result:
> nothing loaded.
> 13-Aug 13:32 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
> command.
> 13-Aug 13:32 btape JobId 0: 3302 Autochanger "loaded? drive 0", result:
> nothing loaded.
> btape: btape.c:383 open device "LTO-4" (/dev/nst0): OK
> *
>
>
> Which isn't quite what I saw in 2006.
>
>
>
> >
> >
> > I'm guessing that I'm overlooking something simple. More eyes please?
> >
> >
> > The SD autochanger and device configuration:
> >
> >
> > Autochanger {
> > Name = "LTO-4-changer"
> > Device = LTO-4
> > Changer Command = "/etc/bacula/mtx-changer %c %o %s %a %d"
> > Changer Device = /dev/sg4
> > }
> >
> > #
> > # A Linux or Solaris LTO-4 tape drive
> > #
> > Device {
> > Name = LTO-4
> > Media Type = LTO-4
> > Archive Device = /dev/nst0
> > AutomaticMount = yes; # when device opened, read it
> > AlwaysOpen = yes;
> > RemovableMedia = yes;
> > RandomAccess = no;
> > AutoChanger = yes
> >
> > # # Enable the Alert command only if you have the mtx package loaded
> > ## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> > ## If you have smartctl, enable this, it has more info than tapeinfo
> > ## Alert Command = "sh -c 'smartctl -H -l error %c'"
> > }
> >
> >
> >
> >
> > Debug output follows:
> >
> > $ sudo /sbin/btape -d100 -c /etc/bacula/bacula-sd.conf /dev/nst0
> > Tape block granularity is 1024 bytes.
> > btape: stored_conf.c:701-0 Inserting director res:
> > backup01.scs.myyearbook.com-mon
> > btape: stored_conf.c:701-0 Inserting device res: LTO-4
> > btape: butil.c:285 Using device: "/dev/nst0" for writing.
> > btape: dev.c:269-0 init_dev: tape=1 dev_name=/dev/nst0
> > btape: dev.c:345-0 open dev: type=2 dev_name="LTO-4" (/dev/nst0) vol=
> > mode=OPEN_READ_ONLY
> > btape: dev.c:394-0 Open dev: device is tape
> > 13-Aug 13:04 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
> > command.
> > btape: autochanger.c:273-0 Run program=/etc/bacula/mtx-changer /dev/sg4
> > loaded 0 /dev/nst0 0
> > btape: autochanger.c:275-0 run_prog: /etc/bacula/mtx-changer /dev/sg4
> > loaded 0 /dev/nst0 0 stat=0 result=AAM240L4
> > 13-Aug 13:04 btape JobId 0: 3302 Autochanger "loaded? drive 0", result:
> > nothing loaded.
> > btape: dev.c:409-0 Try open "LTO-4" (/dev/nst0) mode=OPEN_READ_ONLY
> > btape: dev.c:431-0 Rewind after open
> > btape: dev.c:2483-0 In set_os_device_parameters
> > btape: dev.c:2489-0 Set block size to zero
> > btape: dev.c:2505-0 MTSETDRVBUFFER
> > btape: dev.c:483-0 open dev: tape 3 opened
> > btape: dev.c:358-0 preserve=0x0 fd=3
> > btape: dev.c:336-0 Close fd for mode change.
> > btape: dev.c:345-0 open dev: type=2 dev_name="LTO-4" (/dev/nst0) vol=
> > mode=OPEN_READ_WRITE
> > btape: dev.c:394-0 Open dev: device is tape
> > 13-Aug 13:04 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
> > command.
> > btape: autochanger.c:273-0 Run program=/etc/bacula/mtx-changer /dev/sg4
> > loaded 0 /dev/nst0 0
> > btape: autochanger.c:275-0 run_prog: /etc/bacula/mtx-changer /dev/sg4
> > loaded 0 /dev/nst0 0 stat=0 result=AAM240L4
> > 13-Aug 13:04 btape JobId 0: 3302 Autochanger "loaded? drive 0", result:
> > nothing loaded.
> > btape: dev.c:409-0 Try open "LTO-4" (/dev/nst0) mode=OPEN_READ_WRITE
> > btape: dev.c:431-0 Rewind after open
> > btape: dev.c:2483-0 In set_os_device_parameters
> > btape: dev.c:2489-0 Set block size to zero
> > btape: dev.c:2505-0 MTSETDRVBUFFER
> > btape: dev.c:483-0 open dev: tape 3 opened
> > btape: dev.c:358-0 preserve=0x0 fd=3
> > btape: btape.c:383 open device "LTO-4" (/dev/nst0): OK
> > *
> >
> >
> > --
> > Dan Langille -- http://langille.org/
> >
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Bacula-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> >
>
>
> --
> Dan Langille -- http://langille.org/
>
<<attachment: artemide-logo.jpg>>
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
