[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Modifications to storage


Hello Dirk,

I'm a bit tied up now -- giving my Bacula presentation in a few hours, so I 
will add more information later.  However, one point, see below ...

On Saturday 17 May 2008 10:19:20 Dirk Bartley wrote:
> Greetings
>
> With the now modified storage tree which allows for a view of the media
> that is currently in the storage device for changers, I am having two
> issues which are unrelated.
>
> First is that I have a storage device that has a stanza in bacula-dir
> that looks like:
>
> Storage {
>   Name = DDS-4
>   Address = srvalum2.schupan.com
>   SDPort = 9103
>   Password = "IeMSHAKuwjFMJentFA7/757/ICK3Pz5JKVqgTpkkS7SH"
>   Device = DDS-4
>   Media Type = DDS-4
>   Autochanger = no
> }
>
> The issue is that the database and therefore bat shows it as having the
> changer flag on.
>
> Here is the stanza from the storage daemon
>
> Device {
>   Name = DDS-4                        #
>   Media Type = DDS-4
>   Archive Device = /dev/nst0
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   RandomAccess = no;
> # Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
> # Changer Device = /dev/sg0
> # AutoChanger = yes
>   # Enable the Alert command only if you have the mtx package loaded
>  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> }
>
> So why does my database say changer is present for this device.
>
> OK, so you may ask why I did not ask that question of the users list,
> but it relates to my second thing.  If I want to have the storage tree
> behave differently based on if the storage object has a changer or not.
>
>
> The second thing is that for storage devices without a changer, I don't
> see a good sql command to determine what tape is in the device.  Would
> it be possible for a relatively simple dot command to query the director
> for what one media is in a storage device without a changer??  Or would
> it be preferable for non changer storage devices to just not display
> media contained in the device as sub objects in the storage tree.

None of the information about the Storage daemon details is kept in the 
catalog.  There is some really rudimentary info.  Consequently an SQL command 
won't help.

I did implement a series of .status queries for you to get individual 
information from the SD -- e.g. one piece that you can get is the volumes it 
is currently using.  Please look back at the commands that I implemented for 
you some time ago.  

In brief they were (please check the exact syntax the order is important, you 
may need to put the command before the storage -- I forget ...):

  .status storage=xxx <command>


<command>  can be one of the following:
header
running
waitreservation
devices
volumes
spooling
terminated 

Kern

>
> Dirk
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Bacula-devel mailing list
> Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/bacula-devel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.