SCSI reservation clear tool
The SCSI reservation clear tool issues a release command to tape devices that are tied up
with a device busy
error.
In some instances, a tape device that was reserved by a SCSI command, from a process in a TSLM
client machine, cannot be opened from other TSLM client machines. The problem is listed by the
report from the HDM as a device busy
error during the SCSI open for accessing the device. The
cause of the behavior might be a forced shutdown or reboot actions of the TSM that is accessing the
device. Previously, the customer ran a power cycle to the tape drive from the TS3500 or TS4500 to
solve this situation. Now, the SCSI reservation clear tool can be used to issue a release command to
devices corresponding to the specified drive on the all TSLM clients that are connected via HDM.
ermmtool> chdm -scsirelease -drive "3592-3-257"
Example of testing for an explanation:
- Server A is a TSLM Server + TSLM Client on an RHEL 6.X machine.
- Server B is a TSLM Client + ITDT on an RHEL 6.X machine that is connected to a previous TSLM Server.
- Issue a SCSI reservation with the ITDT tool on SERVER B.
- Try a mount operation with HDM on SERVER A. Then, confirm it failed because of a device busy error. (Check the HDM log that is on SERVER A.)
- Issue a chdm -scsirelease -drive <drivename> command on SERVER A.
- Try a mount operation with HDM on SERVER A again. Then, confirm whether it succeeded.
- Mount and unmount operations without any reservation (CLI at SERVER
A).
ermmtool> mount -drive 3592-3-257 -pcl J11913JA ermmtool> lsdrive Name Library DM PCL DriveGroup Online Disabled Broken ====================================================================================== 3592-3-257 3592-3 /dev/IBMtape11@127.0.0.1 J11913JA Default true false false 3592-3-258 3592-3 Default false false false 3592-3-259 3592-3 Default false false false 3592-3-260 3592-3 Default false false false LTO-257 LTO Default false false false LTO-258 LTO Default false false false ermmtool> unmount -drive 3592-3-257 - Taking a reservation by ITDT on SERVER
B.
---------------------------- General Commands: ---------------------------- [1] Open a Device [5] Reserve Device [9] Mode Sense [2] Close a Device [6] Release Device [10] Query Driver Ver. [3] Inquiry [7] Request Sense [11] Query All Paths [4] Test Unit Ready [8] Log Sense [12] Query Runtime Info ---------------------------- Tape Drive Commands: ------------------------- [20] Rewind [28] Erase [36] Display Message [21] Forward Space Filemarks [29] Load Tape [37] Report Density Supp [22] Backward Space Filemarks [30] Unload Tape [38] Test Encryp. Path [23] Forward Space Records [31] Write Filemarks [39] Config. TCP/IP Port [24] Backward Space Records [32] Synchronize Buffers [25] Space to End of Data [33] Query/Set Parameter [26] Read and Write Tests [34] Query/Set Tape Position [27] Read or Write Files [35] Query Encryption Status ---------------------------- Tape Library Commands: ----------------------- [50] Element Information [55] Initialize Element Status [51] Position to Element [56] Prevent/Allow Medium Removal [52] Element Inventory [57] Initialize Element Status Range [53] Exchange Medium [58] Read Device IDs [54] Move Medium [59] Read Cartridge Location ---------------------------- Service Aid Commands: ------------------------ [70] Dump/Force Dump/Dump [71] Firmware Update <[H] Help | [Q] Quit | [M] Main Menu | [N] Next | Command > 1 ITDT- Open a Device +---------------------------------------------+ Device Name | /dev/IBMtape0 | +---+-----------------------------------------+ Mode | 1 | 1=Read/Write, 2=Read Only, 3=Write Only, 4=Append) +---+ <[R] Return | [Q] Quit | Enter to execute > Command Result +-----------------------------------------------------------------------------+ | Opening Device... | | | | | +-----------------------------------------------------------------------------+ Command Result +-----------------------------------------------------------------------------+ | Opening Device... | | Open Device PASSED | | | | Device:/dev/IBMtape0 opened | | | | | +-----------------------------------------------------------------------------+ < [Q] Quit | [N] Next| [P] Previous | + | - | [Enter] Return > ---------------------------- General Commands: ---------------------------- [1] Open a Device [5] Reserve Device [9] Mode Sense [2] Close a Device [6] Release Device [10] Query Driver Ver. [3] Inquiry [7] Request Sense [11] Query All Paths [4] Test Unit Ready [8] Log Sense [12] Query Runtime Info ---------------------------- Tape Drive Commands: ------------------------- [20] Rewind [28] Erase [36] Display Message [21] Forward Space Filemarks [29] Load Tape [37] Report Density Supp [22] Backward Space Filemarks [30] Unload Tape [38] Test Encryp. Path [23] Forward Space Records [31] Write Filemarks [39] Config. TCP/IP Port [24] Backward Space Records [32] Synchronize Buffers [25] Space to End of Data [33] Query/Set Parameter [26] Read and Write Tests [34] Query/Set Tape Position [27] Read or Write Files [35] Query Encryption Status ---------------------------- Tape Library Commands: ----------------------- [50] Element Information [55] Initialize Element Status [51] Position to Element [56] Prevent/Allow Medium Removal [52] Element Inventory [57] Initialize Element Status Range [53] Exchange Medium [58] Read Device IDs [54] Move Medium [59] Read Cartridge Location ---------------------------- Service Aid Commands: ------------------------ [70] Dump/Force Dump/Dump [71] Firmware Update <[H] Help | [Q] Quit | [M] Main Menu | [N] Next | Command > 5 Command Result +-----------------------------------------------------------------------------+ | Reserving device... | | Reserve Device PASSED | | | | | +-----------------------------------------------------------------------------+ < [Q] Quit | [N] Next| [P] Previous | + | - | [Enter] Return > ---------------------------- General Commands: ---------------------------- [1] Open a Device [5] Reserve Device [9] Mode Sense [2] Close a Device [6] Release Device [10] Query Driver Ver. [3] Inquiry [7] Request Sense [11] Query All Paths [4] Test Unit Ready [8] Log Sense [12] Query Runtime Info ---------------------------- Tape Drive Commands: ------------------------- [20] Rewind [28] Erase [36] Display Message [21] Forward Space Filemarks [29] Load Tape [37] Report Density Supp [22] Backward Space Filemarks [30] Unload Tape [38] Test Encryp. Path [23] Forward Space Records [31] Write Filemarks [39] Config. TCP/IP Port [24] Backward Space Records [32] Synchronize Buffers [25] Space to End of Data [33] Query/Set Parameter [26] Read and Write Tests [34] Query/Set Tape Position [27] Read or Write Files [35] Query Encryption Status ---------------------------- Tape Library Commands: ----------------------- [50] Element Information [55] Initialize Element Status [51] Position to Element [56] Prevent/Allow Medium Removal [52] Element Inventory [57] Initialize Element Status Range [53] Exchange Medium [58] Read Device IDs [54] Move Medium [59] Read Cartridge Location ---------------------------- Service Aid Commands: ------------------------ [70] Dump/Force Dump/Dump [71] Firmware Update <[H] Help | [Q] Quit | [M] Main Menu | [N] Next | Command > 2 Command Result +-----------------------------------------------------------------------------+ | Closing Device... | | Close Device PASSED | | | | | +-----------------------------------------------------------------------------+ < [Q] Quit | [N] Next| [P] Previous | + | - | [Enter] Return > - Try to mount a cartridge on the drive "3592-3-257" from SERVER A (reserved by ITDT at SERVER
B).
ermmtool> mount -drive 3592-3-257 -pcl J11913JA EMM3007E: All retries failed for command tur for drive serial number 000007893350 on host 127.0.0.1. Giving up. Last error: errno = 16, description: Device or resource busy. - Release drive
3592-3-257
by using the following command:ermmtool> chdm -scsirelease -drive 3592-3-257 - Try to mount again to check whether the drive resource is
released.
ermmtool> mount -drive 3592-3-257 -pcl J11913JA ermmtool> lsdrive Name Library DM PCL DriveGroup Online Disabled Broken ====================================================================================== 3592-3-257 3592-3 /dev/IBMtape11@127.0.0.1 J11913JA Default true false false 3592-3-258 3592-3 Default false false false 3592-3-259 3592-3 Default false false false 3592-3-260 3592-3 Default false false false LTO-257 LTO Default false false false LTO-258 LTO Default false false false