cdi_reserve(8)                                                     cdi_reserve(8)

NAME

       cdi_reserve - issue a SCSI reservation command to a tape device

SYNOPSIS

          cdi_reserve -f device [ -T{ s | p } ] [ -k persistent reserve key ] 
         [ -v ] [ -t{ s | t | g | n | m | i } ]
      

DESCRIPTION

 	The cdi_reserve program issues a SCSI reservation command to a tape device.
	This will either be a "simple" SCSI reserve (default or -T s ) or a
	persistent reservation if you specify -T p.

	If you specify Persistent , you may also specify a persistent reserva-
	tion key. This key is used to identify the host you are running on to
	the tape drive, and may be an 8 character text string (e.g. NetWorkr )
	or a text representation of a 64-bit hex number (e.g.
	0x123456789abcdef0 ). The default reservation key is NetWorkr.
	This utility will always use the "exclusive access"
	type of persistent reservation.

	The cdi_reserve program also returns the status of the named SCSI
	device (specified by the -f option).


OPERANDS

       -f     device
              Specifies the device to send the reserve request to.
              
      -T     type
	      Specifies the type of the	 reservation  command  that you  wish  to issue.
	      Use  's'	 or  'S' for simple reserve, or 'p' or 'P' for
	      persistent reserve.  The default is simple if you do
	      not supply this operand.

      -k     persistent reserve key
	      Specifies	 the  key to use for a persistent reservation.
	      A persistent reservation command is a 64-bit value.  This can hold 8
	      text  characters or a 64-bit number.  You can specify either for
	      this parameter.  If the key entered starts with 0x (zero x) then
	      it  is  assumed  to  be  a  64-bit  number, otherwise it will be
	      treated as an 8 character text string.  The default value if you do not
	      a key is NetWorkr.
            

OPTIONS

        -t     Use the -t option to specify the method of tape functions to use
	      to issue the reserve SCSI command.  If  the  -t  option  is  not
	      specified,  the default method is to use the OS tape driver SCSI
	      passthrough functions.  Please refer to the libcdi(8) man page for the
	      complete	list  of  access  methods  currently  supported by the
	      cdi_reserve program.

        -v     Run the program in verbose mode.  This option will print out the
              version number of the CDI library used by the program.


EXAMPLES

 	Sample output including drive status information:

	CDI_RESERVE successful.
	   cdi_info.drivestat is:
	    status = 0, DRIVE_STATUS_READY
	    msg = The tape drive is ready for use


	If the drive is reserved by another host, you should see something like
	this:

	CDI_RESERVE failed.
	   cdi_info.status = CDI_RESERVATION_ERROR (c)
	   cdi_info.drivestat is:
	    status = 0, DEVICE_STATUS_READY
	    msg = The tape drive is ready for use

SEE ALSO

       libcdi(8), cdi_release(8), cdi_pr(8)

NetWorker 7.6.2			 Jul 14, 11		        cdi_reserve(8)