Josh Fisher wrote:

> 
> Michael Fung wrote:
>> Dear Josh,
>>
>>
>> Thanks for releasing the vchanger script and HOWTO!
>>
>> However, I found a problem around line 94:
>>
>>   # Create nextmag file to hold max magazine index used
>>   if [ ! -f "${statedir}/nextmag" ]; then
>>      echo 0 >"${statedir}/nextmag"
>>
>> It created the nextmag file with content "0". That makes the following
>> section allways gives error "nextmag has invalid value".
>>
>>   # Check nextmag value
>>   nextmag=`cat "${statedir}/nextmag"`
>>   if [ $? -ne 0 -o "${nextmag}" == "" -o $nextmag -lt 1 -o $nextmag
>> -gt 99 ]; then
>>      echo "${statedir}/nextmag has invalid value"
>>      return 1
>>   fi
> 
> Yes, thank you. That is a bug. It should be:
> 
>   # Check nextmag value
>   nextmag=`cat "${statedir}/nextmag"`
>   if [ $? -ne 0 -o "${nextmag}" == "" -o $nextmag -lt 0 -o $nextmag -gt
> 99 ]; then
>      echo "${statedir}/nextmag has invalid value"
>      return 1
>   fi
> 
> I will post an updated version to this list.
> 
>>
>> Also, before and after changed the script to not gives error, I still
>> got the error after issue the "label barcodes" command:
>>    Connecting to Storage daemon USBChanger1 at 192.168.1.1:9103 ...
>>    3306 Issuing autochanger "slots" command.
>>    Device "usb-changer-1" has 0 slots.
>>    No slots in changer to scan.
>>
>> I run the script by hand to test output:
>> [EMAIL PROTECTED] bacula]# ./vchanger /etc/bacula/vchanger1.conf slots
>> 7
>>
>> It reports 7 slots correctly. Could you give me some hints?  I am
>> using Bacula 1.38.11 on RHEL 4 clone.
>>
> Did you run the test by hand as root? If so, then it is likely a
> permissions problem. Normally, vchanger will run as the user and group
> that bacula-sd runs as (usually bacula.disk if installed from RPMs).
> Make sure /etc/bacula/vchanger1.conf can be read by the bacula-sd user
> and/or group. Likewise, make sure the bacula-sd user and/or group  has
> read/write permissions for the vchanger state directory (probably at
> /var/bacula/vchanger1). Also, the bacula-sd user/group must have
> read/write permissions for the mounted USB disk partition.
>>
>> Many thanks!
>> Michael
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your opinions on IT & business topics through brief surveys - and earn
>> cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>   
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys - and earn
> cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
I am also trying to run this script and I get the sane error as reported by
Michael..even after I make the suggested changes. In addition to that I
don't quite understand this Device Resource statement - especially where it
says ArchiveDecice = /var/bacula/vchanger1/drive0.

#--- drive 0 of the usb-changer-1 autochanger
Device {
 Name = usb-changer-1-drive-0
 DriveIndex = 0
 Autochanger = yes;
 DeviceType = File
 MediaType = File
 ArchiveDevice = /var/bacula/vchanger1/drive0
 RemovableMedia = no;
 RandomAccess = yes;
}

Why is that being done? That directory does not actually exist. Perhaps I am
missing something. If so I would appreciate any help from anyone who has
managed to get this to work

Jerome

 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to