IBM Support

SCSI tape persistent reservation using IBM device driver

Technote (troubleshooting)


Verifying whether the SCSI tape persistent reservation is used on AIX, Windows and Linux.


Tivoli Storage Manager Server or Storage Agent on AIX, Windows and Linux

Resolving the problem

SCSI reservations are used to control access to a device by a specific system. An initiator sets a reservation on the device in order to prevent the access to the same device from any other initiator at the same time.

The commonly used reservation types are SCSI-2 (Reserve and Release) and SCSI-3 (Persistent Reservation).

SCSI-2 reservation (Reserve and Release)

Using this method, an initiator would set a reservation using the SCSI Reserve command. This reservation is released by the source host issuing a SCSI Release command or by a SCSI bus reset.
In this case, SCSI LUN reset can force to release the device which is reserved by the SCSI 2 reserve. This LUN reset is available on AIX and Windows platform.

SCSI-3 reservation (Persistent Reservation)

Using this method, permits the initiator reservation to persist even if the bus is reset for error recovery.
The reservations using this method are set using the SCSI Persistent Reserve In and Persistent Reserve Out commands.

SCSI-2 Reserve vs SCSI-3 Persistent Reserve

The two kind of reservations are mutually exclusive.

If a SCSI-2 reservation is controlling a device, all Persistent Reservation requests against that device will fail until a SCSI-2 Release unlocks the device.
The SCSI-3 persistent reserve is unable to break a reservation which is made by the SCSI-2 reserve.

If a SCSI-3 reservation is controlling a device, all SCSI-2 requests against that device will fail until a Persistent Reserve OUT unlocks the device.
The SCSI-2 release is unable to break a reservation which is made by the SCSI-3 persistent reserve.

In order to verify the SCSI reservation type used, perform the following actions:

Linux - lin_tape:

Tape Reserve Type' section describes how to configure reservations lin_tape.

The short version is in /etc/modprobe.conf (or /etc/modprobe.conf.local) add the following line:
options lin_tape tape_reserve_type=persistent

If the file does not exist you may need to create modeprobe.conf or with newer Linux distributions instead create a file called /etc/modprobe.d/lin_tape.conf and add the same line:
options lin_tape tape_reserve_type=persistent

AIX - Atape:

Running the command "lsattr -El" against the rmt device configured a similar output will be displayed:

alt_pathing no Enable Alternate Pathing Support
autoload no Use Autoloading Feature at End-of-Tape
block_size 0 Block Size (0=Variable Length)
compress yes Use Hardware Compression on Tape
debug_trace no Debug Trace Logging Enabled
dev_status N/A
devtype ULT3580- Device Type
location Location
logging no Activate volume information logging
lun_id 0x0 Logical Unit Number
max_log_size 500 Maximum size of log file (in # of
entries) True
new_name New Logical Name
node_name 0x2007000e11102933 World Wide Node Name
primary_device rmt0 Primary Logical Device
reserve_key Persistent Reservation Key
reserve_type reserve_6 Reservation Type
retain_reserve no Retain Reservation
rew_immediate no Use Immediate Bit in Rewind Commands
scsi_id 0x20000 SCSI Target ID
space_mode SCSI Backward Space/Forward Space Record
Mode True
sys_encryption no Use System Encryption FCP Proxy
Manager True
trace_logging yes Trace Logging Enabled
trailer_labels no Trailer Label Processing
wrt_encryption custom System Encryption for Write Commands
at BOP True
ww_name 0x2008000e11102933 World Wide Port Name

The value "reserve_type" displayed provides the information about the persistent reservation. In case the value is "reserve_6" SCSI-2 reserve and release reservation type is used.

To set SCSI-3 persistent reservation in AIX:

# chdev -l rmt0 -a reserve_type=persistent

Windows - IBMTape

For the reservation type on Windows platform, issuing the Windows regedit command to check a line like [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ibmtp2k12 first. Then check ReserveType value. If the value is 0x00000000(0), it means the SCSI-2 reserve is used. If this value is 1, then the SCSI-3 persistent reserve is use.

Note: Some Virtual Tape Libraries (VTL) do not properly emulate persistent reservation. If the VTL does not support persistent reservation when emulating IBM tape changing this setting will not help. Verify with your VTL vendor to determine whether there is newer firmware available that more completely emulates IBM tape drives.

Related information

Persistent Reservations
SCSI command
SCSI Status Code

Document information

More support for: Tivoli Storage Manager

Software version: All Supported Versions

Operating system(s): AIX, Linux, Windows

Software edition: All Editions

Reference #: 1689436

Modified date: 25 November 2016

Translate this page: