ScsiCmd Tool


Overview

Using ScsiCmd Tool

 

Overview

The ScsiCmd Tool is used to test whether the hardware supports SCSI-3 reservation. (SCSI-3 reservation is used when you enable the Use SCSI Reserve for contention resolution option in the Library Properties dialog box.) This tool is installed along with the MediaAgent software and available on all the MediaAgent computers.

The following section provides the steps for using this tool.

Using ScsiCmd Tool

1. Navigate to the <software installation path>\Base folder and double-click ScsiCmdTool.exe.

Press <Enter> twice to display the main menu and then choose 1 to read the devices.

There are currently 0 SCSI or Fibre-Channel Devices in our list.
You can update the list by selecting items 1-3 below.
Or hit 4 to proceed to device operation menu.
  1.  Perform a quick bus scan
  2.  Perform an extensive bus scan
  3.  Select a device for testing.

  0.  Exit
Operation [1]:

2. Press <Enter> to continue.

The tool detects the devices and a message similar to the one shown in the sample, will be displayed.

Press <Enter> to continue.

We're ready to scan for all connected SCSI and Fibre Channel devices now.
Note that on some systems (notably AIX) it may take minutes to complete
so please be patient!

Press <ENTER> to begin the scan ...

Scanning now ... done.

Successfully read 10 devices...

Press <ENTER> to continue ...
3. From the main menu, choose 3 to select a device for testing. There are currently 10 SCSI or Fibre-Channel Devices in our list.
You can update the list by selecting items 1-3 below.
Or hit 4 to proceed to device operation menu.
  1.  Perform a quick bus scan
  2.  Perform an extensive bus scan
  3.  Select a device for testing.

  0.  Exit
Operation [1]:3

4. From the next menu, choose 13 to query the data from the target. Please pick an action for tape device scsidev@Scsi4:0.0.2 below:

   1. Send TEST_UNIT_READY command
   2. Send INQUIRY command
   3. Get SERIAL Number
   4. Send MODE_SENSE command
   5. Send LOAD/UNLOAD command
   6. Send REWIND command
   7. Reposition tape (SPACE command)
   8. WRITE data
   9. WRITE filemark
  10. READ data
  11. READ and display data block-by-block
  12. Get drive READ/WRITE Statistics.
  13. Persistent Reserve In.
  14. Persistent Reserve Out.
  15. Send arbitrary SCSI command.

  0. Select another SCSI device.

Operation [1]: 13
5. A list of devices will be displayed. Choose a device and then press <Enter> to continue.

The tool should display a message similar to the one shown in the sample. (Note that in some cases, a registered key may also be found.)

If the tool displays a message similar to the following, SCSI-3 is not supported by the device.

UXScsi::send(): INQUIRY SCSI command to scsidev@Scsi4:0.0.2 failed with error=Incorrect function

Get READ KEY or READ RESERVATION? [k]:
Counter: 1
No registered key has been found

Press <ENTER> to continue ...
6. From the next menu, choose 14 to perform a task in the target device. Please pick an action for tape device scsidev@Scsi4:0.0.2 below:

   1. Send TEST_UNIT_READY command
   2. Send INQUIRY command
   3. Get SERIAL Number
   4. Send MODE_SENSE command
   5. Send LOAD/UNLOAD command
   6. Send REWIND command
   7. Reposition tape (SPACE command)
   8. WRITE data
   9. WRITE filemark
  10. READ data
  11. READ and display data block-by-block
  12. Get drive READ/WRITE Statistics.
  13. Persistent Reserve In.
  14. Persistent Reserve Out.
  15. Send arbitrary SCSI command.

  0. Select another SCSI device.

Operation [1]: 14
7. From the next menu, choose 7 and make sure that it executes successfully, as shown in the sample image. 1.Register    2.Reserve    3.Release
4.Clear       5,Prempt     6.Prempt And Abort
7.Register And Ignore Key

Please enter a service action? [1]: 7

1.Write Exclusive(0x01)    2.Exculsive(0x03)
3.Write Exclusive RO(0x05) 4.Exclusive RO(0x06)
5.Write Exclusive AR(0x07) 6.Exclusive AR(0x08)

Please enter a access type? [1]: 2

Please enter a registered key?:

Please enter a service action key?: key1

Executing the command...

Successful
8. Again from the menu, choose 2 and make sure that it executes successfully. 1.Register    2.Reserve    3.Release
4.Clear       5,Prempt     6.Prempt And Abort
7.Register And Ignore Key

Please enter a service action? [1]: 2

1.Write Exclusive(0x01)    2.Exculsive(0x03)
3.Write Exclusive RO(0x05) 4.Exclusive RO(0x06)
5.Write Exclusive AR(0x07) 6.Exclusive AR(0x08)

Please enter a access type? [1]: 3

Please enter a registered key?: key2

Please enter a service action key?:

Executing the command...

Successful
9. Execute the Persistent Reserve In described in step 4 and 5 and make sure that the key is reserved. Get READ KEY or READ RESERVATION? [k]:
Counter: 1 ***Found Reservation***

1 key=key2 type=3

Press <ENTER> to continue ...

10. Again from the menu, choose 3 and make sure that it executes successfully.

If any of the above 3 commands do not execute successfully, check the inter-connecting hardware, such as storage routers or bridge, to see whether these commands are supported. (Refer to the hardware manufacturer's documentation to see if this operation is supported.)

1.Register    2.Reserve    3.Release
4.Clear       5,Prempt     6.Prempt And Abort
7.Register And Ignore Key

Please enter a service action? [1]: 2

1.Write Exclusive(0x01)    2.Exculsive(0x03)
3.Write Exclusive RO(0x05) 4.Exclusive RO(0x06)
5.Write Exclusive AR(0x07) 6.Exclusive AR(0x08)

Please enter a access type? [1]: 2

Please enter a registered key?: key3

Please enter a service action key?:

Executing the command...

Successful