I'm trying to set an encryption key on an LTO-4 drive under Linux. I successfully did this once, power cycled the drive, and now I cannot get the drive to accept the key again.
The command I am using is this:
$ stenc -f /dev/nst0 -a 1 -e on -k test.key Provided key length is 256 bits. Key checksum is 7a43. Turning on encryption on device '/dev/nst0'... Sense Code: Illegal Request (0x05) ASC: 0x26 ASCQ: 0x00 Additional data: 0x00000000000000000000000000000000 Error: Turning encryption on for '/dev/nst0' failed! Usage: stenc --version | -g <length> -k <file> [-kd <description>] | -f <device> [--detail] [-e <on/mixed/rawread/off> [-k <file>] [-kd <description>] [-a <index>] [--protect | --unprotect] [--ckod] ] Type 'man stenc' for more information.
The drive is HP so I need to use
-a 1 however different values don't change the result. Using
/dev/sg1 instead has the same issue.
The tape is LTO-4 so encryption is supported:
$ mt-st -f /dev/nst0 status SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 0 bytes. Density code 0x46 (LTO-4). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN
I ran the HP Tape & Library Tools and did an encryption test with this same tape and it passed, so the drive seems to be able to have keys set, just not via the
stenc program for some reason.
I found a SCSI manual that said ASC 0x26 is "Invalid field in parameter list" which doesn't really explain much.
Has anyone else seen this error before or have any ideas how to get the drive to accept the key?