DEFINE LIBRARY (Define a SCSI library)
Use this syntax to define a SCSI library.
Privilege class
To issue this command, you must have system privilege or unrestricted storage privilege.
Syntax
Parameters
- library_name (Required)
- Specifies the name of the library to be defined. The maximum length of this name is 30 characters.
- LIBType=SCSI (Required)
- Specifies that the library has a SCSI-controlled media changer device. To mount volumes on drives in this type of library, the server uses the media changer device.
- SHAREd
- Specifies whether this library is shared with other servers in a storage area network (SAN).
This parameter is required when you define a library to the library manager.
- YES
- Specifies that this library can be shared with other servers. When you specify YES, the library manager server mounts volumes as requested by other servers and tracks drive and volume allocation to other servers.
- NO
- Specifies that this library cannot be shared with other servers. SHARED=NO is required if the library is controlled by passing commands through a NAS file server.
- AUTOLabel
- Specifies whether the server attempts to automatically label tape volumes. This parameter is
optional. The default is NO.
To use this option, you must check in the tapes with CHECKLABEL=BARCODE on the CHECKIN LIBVOLUME command.
Restriction: If you are defining a library that has drives that are attached to a network-attached storage (NAS) device, you must use the LABEL LIBVOLUME command to label the volumes for this library.- No
- Specifies that the server does not attempt to label any volumes.
- Yes
- Specifies that the server labels only unlabeled volumes.
- OVERWRITE
- Specifies that the server attempts to overwrite an existing label. The server overwrites existing labels only if both the existing label and the bar code label are not already defined in any server storage pool or volume history list.
- RELABELSCRatch
- Specifies whether the server relabels volumes that were deleted and returned to scratch. When
this parameter is set to YES, a LABEL LIBVOLUME operation is started and the existing volume label
is overwritten. This parameter is optional and intended for use with a Virtual Tape Library
(VTL).
If you have both virtual and real volumes in your VTL, both types are relabeled when this parameter is enabled. If the VTL includes real volumes, specifying this option might impact performance.
Restriction: If you are defining a library that has drives that are attached to a network-attached storage (NAS) device, you must use the LABEL LIBVOLUME command to label the volumes for this library.- No
- Specifies that the server does not relabel volumes that are deleted and returned to scratch.
- Yes
- Specifies that the server relabels volumes that are deleted and returned to scratch.
- RESETDrives
- Specifies whether the server preempts a drive reservation if the drive is already reserved by
persistent reserve when the server tries to access the drive. For example, a storage agent becomes
unavailable, but the agent still holds the drive that is reserved through persistent reserve. With
persistent reserve, the server can break a drive reservation and access the drive.

If the drive is reserved by a SCSI-2 reserve, (and not by persistent
reserve), the server uses a LUN reset to break the drive reservation to access the target
device.
LUN resets are not supported by the Linux® operating system. If a drive is reserved by a SCSI-2 reserve, (and not by
persistent reserve), the server is unable to break the reservation to access the drive. In this
case, you can break the reservation by power cycling the device.For network-attached storage (NAS) devices, reservation is controlled by the NAS file server. IBM Storage Protect does not control NAS devices and the RESETDrives parameter is not relevant for NAS devices.
Support for persistent reserve has the following limitations:- If you are using the IBM Storage Protect device driver, persistent reserve is supported only on some tape drives. See Technote 1470319 for details.
- If you are using the IBM® device driver, persistent reserve must be enabled at the device driver level. For information about driver configuration, see the IBM Tape Device Drivers Installation and User's Guide.
- If you are using a virtual tape library that is emulating a supported drive, persistent reserve might not be supported.
- A library manager is not able to break a drive reservation if the system that has the drive reservation is not configured to use persistent reserve.

- Yes
- Specifies that drive preemption through persistent reserve or target reset is used. YES is the default for a library that is defined with SHARED=YES.
- No
- Specifies that drive preemption through persistent reserve or target reset is not used. NO is the default for a library that is defined with SHARED=NO. The RESETDrives parameter must be set to YES in a clustered environment when SHARED=NO.
- Yes
- Specifies that drive preemption through persistent reserve is used. YES is the default for a library that is defined with SHARED=YES.
- No
- Specifies that drive preemption through persistent reserve is not used. NO is the default for a library that is defined with SHARED=NO.
- SERial
- Specifies the serial number for the library that is being defined. This parameter is optional.
The default is AUTODETECT.
If SERIAL=AUTODETECT, then when you define the path to the library, the serial number reported by the library is used as the serial number.
If SERIAL=serial_number, then the number you entered is compared to the number detected by the server.
Attention: Depending on the capabilities of the device, SERIAL=AUTODETECT might not be supported. In this case, the serial number is reported as blank.
Example: Define a SCSI library
define library scsilib libtype=scsi 
/dev/lb0
/dev/tsmscsi/lb0
lb3.0.0.0

define path server1 scsilib srctype=server desttype=library
device=/dev/lb0
define path server1 scsilib srctype=server desttype=library
device=/dev/tsmscsi/lb0
define path server1 scsilib srctype=server desttype=library
device=lb3.0.0.0