In my /etc/init.d/bacula-sd script the argument that I use to start the
bacula sd daemon is

ARGS="-c /opt/bacula/bacula-sd.conf -u root -g tape"

Mike


Arno Lehmann wrote:
> 
> Hi,
> 
> On 5/10/2007 11:41 PM, Mike Vasquez wrote:
>> Boy, I do need new glasses,  Changer Command =
>> "/opt/bacula/bin/mtx-changer
>> %c %o %S %a %d".
>> 
>> It should have been  Changer Command = "/opt/bacula/scripts/mtx-changer
>> %c
>> %o %S %a %d"
> 
> Yeah, that's what you get for customizing your installation ;-) I can 
> assure you, though, that glasses don't necessarily help with this sort 
> of problems :-)
> 
>> Now I am getting the following error:
>> 
>> bin/btape /dev/nst0
>> Tape block granularity is 1024 bytes.
>> btape: butil.c:286 Using device: "/dev/nst0" for writing.
>> 10-May 14:26 btape: 3301 Issuing autochanger "loaded? drive 0" command.
>> 10-May 14:26 btape: 3302 Autochanger "loaded? drive 0", result is Slot 1.
>> 10-May 14:31 btape: Fatal Error at device.c:280 because:
>> dev open failed: dev.c:425 Unable to open device "Drive-1" (/dev/nst0):
>> ERR=Input/output error
>> 
>> 10-May 14:31 btape: btape Fatal error: butil.c:195 Cannot open "Drive-1"
>> (/dev/nst0)
> 
> Have you tried to access the tape drive as the user the SD runs as?
> 
> "permission denied" or "no such file" would be what I expected, but 
> "cannot open" might also indicate a permissions problem or, perhaps, the 
> tape is not fully loaded into the drive, or something.
> 
> Trying 'mt -f /dev/nst0 status' as the Bacula user should work, and if 
> it doesn't, it might tell us something...
> 
> Arno
> 
> 
>> Here is the Drive-1 configuration.
>>  SD.conf file (New)
>>  Autochanger {
>>    Name = Autochanger
>>    Device = Drive-1
>>    Changer Command = "/opt/bacula/scripts/mtx-changer %c %o %S %a %d"
>>    Changer Device = /dev/sg0
>>  }
>>  
>>  Device {
>>    Name = Drive-1                      
>>    Drive Index = 0
>>    Media Type = LTO-1
>>    Archive Device = /dev/nst0
>>    AutomaticMount = yes;     
>>    AlwaysOpen = yes;
>>    RemovableMedia = yes;
>>    RandomAccess = no;
>>    AutoChanger = yes
>>    Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
>>  }
>> 
>> Any Ideas.
>> 
>> Mike
>> 
>> Arno Lehmann wrote:
>>> Hi,
>>>
>>> On 5/10/2007 8:17 PM, Mike Vasquez wrote:
>>>> I just upgraded to 2.0.3.  I am having problems mounting the
>>>> Autochanger. 
>>>> Here are my test results.
>>>>
>>>> tapeinfo -f /dev/sg0 
>>>> Product Type: Medium Changer
>>>> Vendor ID: 'DELL    '
>>>> Product ID: 'PV-122T         '
>>>> Revision: 'D37r'
>>>> Attached Changer: No
>>>> SerialNumber: '3123B92743'
>>>> Invalid tapealert page: 0
>>>>
>>>> mtx -f /dev/sg0 inquiry  
>>>> Product Type: Medium Changer
>>>> Vendor ID: 'DELL    '
>>>> Product ID: 'PV-122T         '
>>>> Revision: 'D37r'
>>>> Attached Changer: No
>>>>
>>>> /btape /dev/nst0
>>>> Tape block granularity is 1024 bytes.
>>>> btape: butil.c:286 Using device: "/dev/nst0" for writing.
>>>> 10-May 10:20 btape: 3301 Issuing autochanger "loaded? drive 0" command.
>>>> 10-May 10:20 btape: 3991 Bad autochanger "loaded? drive 0" command:
>>>> ERR=No
>>>> such file or directory.
>>>> Results=
>>>> ## It just hangs here.
>>> Probably it doesn't find the mtx-changer script (or whatever it tries to 
>>> use in your case - I always use btabe with the SD configuration).
>>>
>>>> When I try to mount to take using the console here is what I get.
>>>>
>>>> SD.conf file
>>>> Autochanger {
>>>>   Name = Autochanger
>>>>   Device = Drive-1
>>>>   Changer Command = "/opt/bacula/bin/mtx-changer %c %o %S %a %d"
>>> Are you sure the Bacula user can run this script, and it works as
>>> expected?
>>>
>>>>   ChangerDevice = /dev/sg0
>>>> }
>>>>
>>>> Device {
>>>>   Name = Drive-1                      #
>>>>   Drive Index = 0
>>>>   Media Type = LTO-1
>>>>   Archive Device = /dev/nst0
>>>>   AutomaticMount = yes;     
>>>>   AlwaysOpen = yes;
>>>>   RemovableMedia = yes;
>>>>   RandomAccess = no;
>>>>   AutoChanger = yes
>>>>   Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
>>>> }
>>> ...
>>>> *mount ToTape
>>>> Connecting to Storage daemon ToTape at nmc-sdca-mon1:9103 ...
>>>> Enter autochanger slot: 1
>>>> 3301 Issuing autochanger "loaded? drive 0" command.
>>>> 3991 Bad autochanger "loaded? drive 0" command: ERR=No such file or
>>>> directory.
>>> Looks like the SD, too, can't run mtx-changer.
>>>
>>>> Results=
>>>> 3301 Issuing autochanger "loaded? drive 0" command.
>>>> 3991 Bad autochanger "loaded? drive 0" command: ERR=No such file or
>>>> directory.
>>>> Results=
>>>> 3304 Issuing autochanger "load slot 1, drive 0" command.
>>>> 3992 Bad autochanger "load slot 1, drive 0": ERR=No such file or
>>>> directory.
>>>> Results=
>>>> 3301 Issuing autochanger "loaded? drive 0" command.
>>>> 3991 Bad autochanger "loaded? drive 0" command: ERR=No such file or
>>>> directory.
>>>> Results=
>>>> 3901 open device failed: ERR=dev.c:425 Unable to open device "ToTape.0"
>>>> (/dev/nst0): ERR=Input/output error
>>>>
>>>> What could be wrong.  It was working before I upgraded.
>>> Permissions, probably. It's possible that, before the upgrade, the SD 
>>> ran as root and it now runs as a different user.
>>>
>>> Arno
>>>
>>>> Mike
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> -- 
>>> IT-Service Lehmann                    [EMAIL PROTECTED]
>>> Arno Lehmann                  http://www.its-lehmann.de
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Bacula-users mailing list
>>> Bacula-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>>
>>>
>> 
> 
> -- 
> IT-Service Lehmann                    [EMAIL PROTECTED]
> Arno Lehmann                  http://www.its-lehmann.de
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Autochanger-problem-tf3723302.html#a10422402
Sent from the Bacula - Users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to