I'm testing some disaster recovery scenarios and I'm having problems
with the bls and bextract commands and encrypted LTO tapes.

Running bls results in the tape looking empty except for the header:

% sudo bls -V ND0000 /dev/nsa0
bls: butil.c:271-0 Using device: "/dev/nsa0" for reading.
26-Aug 14:48 bls JobId 0: No slot defined in catalog (slot=0) for Volume
"ND0000" on "lto6-1" (/dev/nsa0).
26-Aug 14:48 bls JobId 0: Cartridge change or "update slots" may be
required.
26-Aug 14:48 bls JobId 0: Ready to read from volume "ND0000" on device
"lto6-1" (/dev/nsa0).
26-Aug 14:49 bls JobId 0: End of Volume at file 1 on device "lto6-1"
(/dev/nsa0), Volume "ND0000"
26-Aug 14:49 bls JobId 0: End of all volumes.
0 files found.

The crypto cache file is up to date and that is where I got the key to
set with bscrypto.  And I verified in the debug output of bls that it
reads the crypto cache. And it loads the sd_plugin scsicrypto-sd.

Later on it clears the crypto key before reading the tape label, and
after reading the tape label it loads a new crypto key. The debugging
output for the crypto module when loading the new key doesn't look at
all like the key that I'm setting with bscrypto. The key from
scsicrytpo-sd debug is full of unprintable characters.

But if I turn off Drive Crypto Enabled and Query Crypto Status in the
bareos-sd.conf file and then set the encryption key by hand everything
works fine:

% sudo bscrypto -s /tmp/ND0000.key /dev/nsa0

% sudo bls -V ND0000 /dev/nsa0
bls: butil.c:271-0 Using device: "/dev/nsa0" for reading.
26-Aug 14:51 bls JobId 0: No slot defined in catalog (slot=0) for Volume
"ND0000" on "lto6-1" (/dev/nsa0).
26-Aug 14:51 bls JobId 0: Cartridge change or "update slots" may be
required.
26-Aug 14:51 bls JobId 0: Ready to read from volume "ND0000" on device
"lto6-1" (/dev/nsa0).
bls JobId 1: -rw-------   1 root     wheel           9837 2016-05-31
17:56:30  /root/.history
bls JobId 1: -rw-r--r--   2 root     wheel            969 2014-05-22
14:10:45  /root/.cshrc
bls JobId 1: -rw-------   1 root     wheel             46 2014-11-05
10:40:19  /root/.lesshst
bls JobId 1: -rw-r--r--   1 root     wheel            152 2014-05-22
14:10:45  /root/.k5login
[...]

This is Bareos 15.2.2 on FreeBSD.

Any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to