Linux operating systems

Preventing tape label overwrites (Linux)

IBM Storage Protect tape labels can be overwritten by an application that uses a generic or native driver. If tape labels are overwritten, data can be lost.

About this task

The IBM Storage Protect Passthru device driver uses the Linux SCSI generic device driver (sg) to control and operate tape devices that are attached on the system. If the Linux generic SCSI tape device driver (st) is loaded to the kernel and configures attached tape devices, conflicts about how a device is managed can result. The reason for the conflicts is that the generic sg driver and the st driver can both control the same device. To prevent tape label overwrites, complete one of the following tasks:

If the st driver controls devices that are used by IBM Storage Protect, Tivoli Storage Manager internal tape labels can be overwritten and data can be lost. If an application uses the st driver to control devices and the non-rewind option is not specified, tapes are automatically rewound following completion of an operation. The auto-rewind operation relocates the tape header position to the beginning of the tape. If the tape remains loaded in the drive, the next non-IBM Storage Protect write operation overwrites the IBM Storage Protect tape label because the label is at the beginning of the tape.

To prevent IBM Storage Protect labels from being overwritten, ensure that only the IBM Storage Protect Passthru driver controls devices that are used by Tivoli Storage Manager. Remove the st driver from the kernel. Alternatively, if the driver is used by some applications on the system, delete the special files that correspond to Tivoli Storage Manager devices. Deleting the special files ensures that the st driver can no longer control them.

If you are using the IBMtape device driver to control devices on your system, you might encounter the same issues with device driver control conflicts. Review your IBMtape documentation to determine how to resolve this issue and prevent data loss.

Procedure

  • Remove the st driver.
    If no other applications on the system use st devices, remove the st driver from the kernel. Issue the following command to unload the st driver:
    rmmod st
  • Delete device special files that correspond to IBM Storage Protect devices.

    If there are applications that require use of the st driver, delete the special files that correspond to IBM Storage Protect devices. These special files are generated by the st driver, so when they are eliminated, the st driver can no longer control the corresponding IBM Storage Protect devices. Device special file names for tape drives are displayed in the /dev/ directory. They have the form /dev/[n]st[0-255][l][m][a].

    List the st drive special file names and IBM Storage Protect device special file names by using the ls command. Based on the output of the device sequences, you can find devices in the st devices list that matches devices in the IBM Storage Protect devices list. You can them use the rm command to delete st devices.

    Issue the following commands to list the st and IBM Storage Protect devices:
    ls -l /dev/*st*
    ls -l /dev/tsmscsi/mt*
    Delete the st devices with the rm command:
    rm /dev/*st*