Skip to content

Commit

Permalink
tape: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Nov 30, 2017
1 parent da01e9c commit 6626dee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README.scsicrypto
@@ -1,5 +1,4 @@
LTO4 and LTO5 drives and other modern tape drives
support hardware encryption.
Modern tape drives, e.g. LTO >= 4, support hardware encryption.

There are several ways of using encryption with these drives
The following three types of key management are available for
Expand Down Expand Up @@ -191,7 +190,7 @@ The initial setup of SCSI crypto looks something like this:
If bareos-sd does not have the appropriate capabilities, all
other tape operations may still work correctly, but you will
get "Unable to perform SG_IO ioctl" errors.

On older kernels it can be you need CAP_SYS_ADMIN try
CAP_SYS_RAWIO first and if that doesn't work try CAP_SYS_ADMIN

Expand Down
Expand Up @@ -4,7 +4,7 @@
# on Linux use "lsscsi --generic"
# to get a list of your SCSI devices.
# However, normaly you should access your devices by-id
# (eg. /dev/tape/by-id/scsi-350011d00018a5f03-nst),
# (eg. /dev/tape/by-id/scsi-SSTK_L700_XYZZY_A) or by-path,
# because the short device names like /dev/sg7
# might change on reboot.
#
Expand Down
Expand Up @@ -4,7 +4,9 @@
# on Linux use "lsscsi --generic"
# to get a list of your SCSI devices.
# However, normaly you should access your devices by-id
# (eg. /dev/tape/by-id/scsi-350011d00018a5f03-nst),
# (eg. /dev/tape/by-id/scsi-350011d00018a5f03-nst)
# or by-path
# (eg. /dev/tape/by-path/pci-0000:0d:08.0-sas-phy4-0x500110a0015ec9e0-lun-0-nst),
# because the short device names like /dev/nst1
# might change on reboot.
#
Expand Down
1 change: 1 addition & 0 deletions src/stored/block.c
Expand Up @@ -441,6 +441,7 @@ bool DCR::write_block_to_dev()
return true;
}
if (job_canceled(jcr)) {
Dmsg0(100, "return write_block_to_dev, job is canceled\n");
return false;
}

Expand Down
7 changes: 5 additions & 2 deletions src/stored/btape.c
Expand Up @@ -2981,12 +2981,15 @@ do_tape_cmds()
Dsm_check(200);
found = false;
parse_args(cmd, args, &argc, argk, argv, MAX_CMD_ARGS);
for (i=0; i<comsize; i++) /* search for command */
/* search for command */
for (i=0; i<comsize; i++) {
if (argc > 0 && fstrsch(argk[0], commands[i].key)) {
(*commands[i].func)(); /* go execute command */
/* execute command */
(*commands[i].func)();
found = true;
break;
}
}
if (*cmd && !found) {
Pmsg1(0, _("\"%s\" is an invalid command\n"), cmd);
}
Expand Down

0 comments on commit 6626dee

Please sign in to comment.