Bacula-users

[Bacula-users] bconsole(8) mount / Autochanger Mount Logic in stored/autochanger.c

2008-09-12 10:11:53
Subject: [Bacula-users] bconsole(8) mount / Autochanger Mount Logic in stored/autochanger.c
From: "Brian A. Seklecki" <bseklecki AT collaborativefusion DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 12 Sep 2008 10:11:47 -0400
All:

In *BSD, sa(4)/mt(4) devices can't be fopen()'d until they have media
loaded.

So, when you issue "mount" command in bconsole(8), and the autochanger
doesn't have a tape loaded, why would it try to access the tape drive
w/o issuing a load command first?

I'm looking at the code a bit lost get_autochanger_loaded_slot() is
called by autoload_device() on line 170 of stored/autochanger.c

  if (loaded != slot)

      try_to_unload

I think in this case, there should be a case for: 
   if (loaded = 0) -- nothing loaded.

      - Don't try to unload
      - Load

It's like something in unload_autochanger(), for some reason, is trying
to access the drive.

* mount
The defined Storage resources are:
     1: Bar
     2: Foo
     3: TapeChanger
Select Storage resource (1-3): 3
Enter autochanger slot: 0
3301 Issuing autochanger "loaded? drive 0" command.
3302 Autochanger "loaded? drive 0", result: nothing loaded.
3901 Unable to open device "Ultrium" (/dev/nsa0): ERR=dev.c:432 Unable
to open device "Ultrium" (/dev/nsa0): ERR=Device not configured


Error 3901 only happens in stored/dircmd.c mount_cmd().  I don't see the
path between autoload_device() and mount_cmd().

Also, we seem to be missing the step in "mount" where we actually load
the tape into the drive :)

Is there maybe another CLI command hidden/undocumented?


-- 
Brian A. Seklecki <bseklecki AT collaborativefusion DOT com>
Collaborative Fusion, Inc.




IMPORTANT: This message contains confidential information and is intended only 
for the individual named. If the reader of this message is not an intended 
recipient (or the individual responsible for the delivery of this message to an 
intended recipient), please be advised that any re-use, dissemination, 
distribution or copying of this message is prohibited. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>