I have a new bacula install using the ubuntu built in packages on ubuntu 16
with a new Dell EMC ML3 drive (an ibm 3573-TL)

I can get btape to work, and mt and mtx to work, but it seems the bconsole
will not work. I am not sure if I have something configured wrong or it does
not see the tape drive correctly. Any input would be appreciated. 

Below, I will show some configs, lsscsi and testing that I have 
performed. When I go to the console to test labels or the changer, it seems
to fail. 

my relevant portions from bacula-sd.conf:



Autochanger {
  Name = LTO5
  Device = Drive-1
  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/sg3
}

Device {
  Name = Drive-1
  Drive Index = 0
  Device Type = Tape
  Media Type = LTO-5
  Archive Device = /dev/nst0
  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
  Label Media = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  Automatic Mount = yes;               # when device opened, read it
  Removable Media = yes;
  Always Open = yes;
  Maximum Concurrent Jobs = 5
}



And  /etc/bacula# lsscsi -g
[0:2:0:0]    disk    DELL     PERC H730 Mini   4.24  /dev/sda   /dev/sg0 
[0:2:1:0]    disk    DELL     PERC H730 Mini   4.24  /dev/sdb   /dev/sg1 
[1:0:1:0]    tape    IBM      ULT3580-HH6      J451  /dev/st0   /dev/sg2 
[1:0:1:1]    mediumx IBM      3573-TL          1112  /dev/sch0  /dev/sg3 





/etc/bacula# btape -c bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:287-0 Using device: "/dev/nst0" for writing.
btape: btape.c:469-0 open device "Drive-1" (/dev/nst0): OK
*test

=== Write, rewind, and re-read test ===

I'm going to write 10000 records and an EOF
then write 10000 records and an EOF, then rewind,
and re-read the data to verify that it is correct.

This is an *essential* feature ...

btape: btape.c:1152-0 Wrote 10000 blocks of 64412 bytes.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1168-0 Wrote 10000 blocks of 64412 bytes.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1210-0 Rewind OK.
10000 blocks re-read correctly.
Got EOF on tape.
10000 blocks re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===

btape: btape.c:1277-0 Block position test
btape: btape.c:1289-0 Rewind OK.
Reposition to file:block 0:4
Block 5 re-read correctly.
Reposition to file:block 0:200
Block 201 re-read correctly.
Reposition to file:block 0:9999
Block 10000 re-read correctly.
Reposition to file:block 1:0
Block 10001 re-read correctly.
Reposition to file:block 1:600
Block 10601 re-read correctly.
Reposition to file:block 1:9999
Block 20000 re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===



=== Append files test ===

This test is essential to Bacula.

I'm going to write one record  in file 0,
                   two records in file 1,
             and three records in file 2

btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:469-0 open device "Drive-1" (/dev/nst0): OK
btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1420-0 Now moving to end of medium.
btape: btape.c:625-0 Moved to end of medium.
We should be in file 3. I am at file 3. This is correct!

Now the important part, I am going to attempt to append to the tape.

btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
Done appending, there should be no I/O errors

Doing Bacula scan of blocks:
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 4. This is correct!

The above Bacula scan should have output identical to what follows.
Please double check it ...
=== Sample correct output ===
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
=== End sample correct output ===

If the above scan output is not identical to the
sample output, you MUST correct the problem
or Bacula will not be able to write multiple Jobs to 
the tape.


=== Write, backup, and re-read test ===

I'm going to write three records and an EOF
then backup over the EOF and re-read the last record.
Bacula does this after writing the last block on the
tape to verify that the block was written correctly.

This is not an *essential* feature ...

btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:811-0 Wrote first record of 64412 bytes.
btape: btape.c:822-0 Wrote second record of 64412 bytes.
btape: btape.c:833-0 Wrote third record of 64412 bytes.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:849-0 Backspaced over EOF OK.
btape: btape.c:854-0 Backspace record OK.
btape: btape.c:871-0 
Block re-read correct. Test succeeded!
=== End Write, backup, and re-read test ===



=== Forward space files test ===

This test is essential to Bacula.

I'm going to write five files then test forward spacing

btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1907-0 Wrote one record of 64412 bytes.
btape: btape.c:1909-0 Wrote block to device.
btape: btape.c:604-0 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1634-0 Now forward spacing 1 file.
We should be in file 1. I am at file 1. This is correct!
btape: btape.c:1646-0 Now forward spacing 2 files.
We should be in file 3. I am at file 3. This is correct!
btape: btape.c:574-0 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1659-0 Now forward spacing 4 files.
We should be in file 4. I am at file 4. This is correct!

btape: btape.c:1677-0 Now forward spacing 1 more file.
We should be in file 5. I am at file 5. This is correct!

=== End Forward space files test ===




This is where I get mildly confused:

/etc/bacula# mtx -f /dev/nst0 status
mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 20
mtx: Request Sense: Additional Sense Qualifier = 00
mtx: Request Sense: Field in Error = 00
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=yes
mtx: Request Sense: SKSV=yes
mtx: Request Sense: Field Pointer = 00 00
READ ELEMENT STATUS Command Failed


/etc/bacula# mtx -f /dev/sg3 status
  Storage Changer /dev/sg3:1 Drives, 32 Slots ( 4 Import/Export )
Data Transfer Element 0:Full (Storage Element 1 Loaded)
      Storage Element 1:Empty
      Storage Element 2:Full 
      Storage Element 3:Full 
      Storage Element 4:Full 
      Storage Element 5:Full 
      Storage Element 6:Full 
      Storage Element 7:Full 
      Storage Element 8:Full 
      Storage Element 9:Full 
      Storage Element 10:Full 
      Storage Element 11:Full 
      Storage Element 12:Full 
      Storage Element 13:Full 
      Storage Element 14:Full 
      Storage Element 15:Full 
      Storage Element 16:Full 
      Storage Element 17:Empty
      Storage Element 18:Empty
      Storage Element 19:Empty
      Storage Element 20:Empty
      Storage Element 21:Empty
      Storage Element 22:Empty
      Storage Element 23:Empty
      Storage Element 24:Empty
      Storage Element 25:Empty
      Storage Element 26:Empty
      Storage Element 27:Empty
      Storage Element 28:Empty
      Storage Element 29 IMPORT/EXPORT:Full 
      Storage Element 30 IMPORT/EXPORT:Full 
      Storage Element 31 IMPORT/EXPORT:Full 
      Storage Element 32 IMPORT/EXPORT:Full 


OK, fine, I can also unload and load:

/etc/bacula# mtx -f /dev/sg3 unload 1 0
Unloading drive 0 into Storage Element 1...done
/etc/bacula# mtx -f /dev/sg3 load 1 0
Loading media from Storage Element 1 into drive 0...done

However, working from the bconsole fails. 

It only seems to see the tape in the drive and nothing else. 
I have actually tried this with all combinations of scsi devices
just to ensure there was no naming issue. 



/etc/bacula# bconsole 
Connecting to Director localhost:9101
1000 OK: 1 cmixhyperv03-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*update slots
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: File1
Connecting to Storage daemon File1 at localhost:9103 ...
3993 Device "Drive-1" (/dev/nst0) not an autochanger device.
Device "Drive-1" has 0 slots.
No slots in changer to scan.
*status 
Status available for:
     1: Director
     2: Storage
     3: Client
     4: Scheduled
     5: All
Select daemon type for status (1-5): 2
Automatically selected Storage: File1
Connecting to Storage daemon File1 at localhost:9103

cmixhyperv03-sd Version: 7.0.5 (28 July 2014) x86_64-pc-linux-gnu ubuntu 16.04
Daemon started 07-May-19 13:13. Jobs: run=0, running=0.
 Heap: heap=135,168 smbytes=213,200 max_bytes=343,348 bufs=68 max_bufs=72
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.
====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
====

Device status:
Autochanger "LTO5" with devices:
   "Drive-1" (/dev/nst0)

Device "Drive-1" (/dev/nst0) open but no Bacula volume is currently mounted.
    Total Bytes Read=64,512 Blocks Read=1 Bytes/block=64,512
    Positioned at File=0 Block=0
==
====

Used Volume status:
====

====

*list media
Pool: Default
No results to list.
Pool: File
+---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | 
VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       1 | Vol00-01   | Append    |       1 |   64,512 |        0 |   
31,536,000 |       1 |    0 |         0 | LTO-5     | 0000-00-00 00:00:00 |
+---------+------------+-----------+---------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: Scratch
No results to list.


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to