This documentation only applies to QUADStor Tape Test Framework software (quadstor-ttf)
Listing sense data information
/quadstorvtl/bin/sensectl -l -v <vtl name> -d <drive number>
In the case of a medium changer or a stand alone tape drive, drive number does not apply. For drives within a VTL drive numbers start from 1.
For example
/quadstorvtl/bin/sensectl -l -v VTL1 Initiator: Interface: iSCSI I Port: 343939312e6e7169 2e6d6f632e35302d Name: iqn.1994-05.com.redhat:eab4cbe82f8 Res. Code Sense Key ASC/ASCQ Description 70 NOT READY 04/18 LOGICAL UNIT NOT READY, A DOOR IS OPEN Initiator: Interface: Local I Port: 0000000000000000 0000000000000000 Name: Res. Code Sense Key ASC/ASCQ Description 70 NOT READY 04/18 LOGICAL UNIT NOT READY, A DOOR IS OPEN
Adding sense data information
/quadstorvtl/bin/sensectl -a -v <vtl name> -d <drive number> -r <response code> -s <sense key> -c <asc> -q <ascq>
For example
/quadstorvtl/bin/sensectl -a -v VTL1 -r 70 -s 02 -c 04 -q 18
Response code, sense key, asc and ascq must be hexadecimal values
A maximum of 64 sense data information can be queued. sensctl does not check for the validity of the response code, sense key, asc or ascq.
If a sense key specified is RECOVERED ERROR (01h) then a command is first completed and if the command is successful then the RECOVERED ERROR sense data is returned. For any other sense key, the command is terminated and the sense data is returned.
For example
We first try to fetch the tape alert log page information for a medium changer without any sense data configuration
sg_raw -r 64 /dev/pass3 4D 00 2E 00 00 00 00 00 40 00 SCSI Status: Good Received 44 bytes of data: 00 2e 00 00 28 00 01 40 01 00 00 02 40 01 00 00 03 ...(..@....@.... 10 40 01 00 00 04 40 01 00 00 05 40 01 00 00 06 40 @....@....@....@ 20 01 00 00 07 40 01 00 00 08 40 01 00 ....@....@..
Now we add sense data information with sense key as ILLEGAL REQUEST
/quadstorvtl/bin/sensectl -a -v VTL1 -r 70 -s 02 -c 04 -q 18 sg_raw -r 64 /dev/pass3 4D 00 2E 00 00 00 00 00 40 00 SCSI Status: Check Condition Sense Information: Fixed format, current; Sense key: Not Ready Additional sense: Logical unit not ready, a door is open No data received
Now we add sense data information with sense key as RECOVERED ERROR
/quadstorvtl/bin/sensectl -a -v VTL1 -r 70 -s 01 -c 04 -q 18 sg_raw -r 64 /dev/pass3 4D 00 2E 00 00 00 00 00 40 00 SCSI Status: Check Condition Sense Information: Fixed format, current; Sense key: Recovered Error Additional sense: Logical unit not ready, a door is open Received 44 bytes of data: 00 2e 00 00 28 00 01 40 01 00 00 02 40 01 00 00 03 ...(..@....@.... 10 40 01 00 00 04 40 01 00 00 05 40 01 00 00 06 40 @....@....@....@ 20 01 00 00 07 40 01 00 00 08 40 01 00 ....@....@..
If the response code is either 72h or 73h then sense descriptors are returned instead of the fixed sense format
For example
/quadstorvtl/bin/sensectl -a -v VTL1 -r 72 -s 02 -c 04 -q 18 sg_raw -r 64 /dev/pass3 4D 00 2E 00 00 00 00 00 40 00 SCSI Status: Check Condition Sense Information: Descriptor format, current; Sense key: Not Ready Additional sense: Logical unit not ready, a door is open No data received
Deleting sense data information
/quadstorvtl/bin/sensectl -x -v <vtl name> -d <drive number> -r <response code> -s <sense key> -c <asc> -q <ascq>
For example
/quadstorvtl/bin/sensectl -x -v VTL1 -r 70 -s 02 -c 04 -q 18