Bacula-users

Re: [Bacula-users] seldom working tape (auto)mount (stating user unmounted)

2009-01-16 08:42:13
Subject: Re: [Bacula-users] seldom working tape (auto)mount (stating user unmounted)
From: Olaf Zevenboom <olaf AT artefact DOT nl>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Fri, 16 Jan 2009 14:40:15 +0100
John Drescher wrote:
> On Thu, Jan 15, 2009 at 9:23 AM, Olaf Zevenboom <olaf AT artefact DOT nl> 
> wrote:
>   
>> Dear List,
>>
>> We have a Seagate Scorpion DAT DDS-4 STD2401LW Internal SCSI Tape Drive
>> (single slot).
>> I have set Bacula to automount tapes. It does this sometimes but mostly
>> I have to manually mount tapes.
>> For some reason it does not automount although automount=yes is defined
>> in Bacula's config. No info in logs on the subject afaik and also no
>> email warning that the job cannot run due to a not mounted tape.
>> When I look at the status through bconsole the SD claims that the drive
>> is "user unmounted".
>> We run 3 jobs every night (in this sequence):
>> 1. backup server
>> 2, verify
>> 3. backup catalog
>> the last job has a postjob ejecting the tape.
>>
>> postjob Script:
>> #! /bin/sh
>> /etc/bacula/scripts/delete_catalog_backup
>> echo "unmount DDS-4" | /usr/bin/bconsole -c /etc/bacula/bconsole.conf
>> mt -f /dev/st0 rewind
>> mt -f /dev/st0 eject
>> exit 0
>>
>>
>> Obviously I can use a cronjob or a prejob on the first job to mount the
>> tape, but I prefer to tackle the issue of ignoring the automount. Any
>> ideas please on how I can tackle this issue?
>>
>>     
>
> Don't use the unmount command in bacula. Use release instead. unmount
> takes the drive out of bacula's control and thus automount will not
> work. After an umount in bconsole to put the tape drive back in
> bacula's control you must manually mount in bacula.
>
> John
>   
Thank you John for the prompt answer. However this seems not to fix the 
entire issue. The tape is not ejected.....
I have no idea how to do this from within Bacula and obviously I cannot 
use 'mt -f /dev/nst0 eject' from a script as Bacula still locks the device.
After some google-ing I found a workaround that suggests maintaining my 
original script, but adding a mount command at the end which would mount 
an empty drive and thus producing an error but with the side effect that 
Bacula has control over the tapedrive again.
Is there a more elegant way?


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users