IBM Support

Library and tape drives permissions reset on Linux reboot.

Troubleshooting


Problem

A Tivoli Storage Manager server instance is configured with an IBM tape library on Linux. On reboot, the permissions for the library and tape device are reset to default.

Symptom

The lin_tape driver is installed. The library and tape drive devices permissions are then changed with the chmod commands so that server instance userid has access to the devices. The following commands are used to change the permissions :

chmod a+rw /dev/IBMtape*
chmod a+rw /dev/IBMchanger*

After the commands are run, the devices have the following permissions :

crw-rw-rw- 1 root root 251, 2048 Feb 6 10:53 /dev/IBMchanger0
crw-rw-rw- 1 root root 251, 0 Feb 6 10:53 /dev/IBMtape0
crw-rw-rw- 1 root root 251, 1 Feb 6 10:53 /dev/IBMtape1

The Linux machine is then rebooted and the devices permissions are automatically changed as follows :

crw------- 1 root root 251, 2048 Feb 6 11:26 /dev/IBMchanger0
crw------- 1 root root 251, 0 Feb 6 11:26 /dev/IBMtape0
crw------- 1 root root 251, 1 Feb 6 11:26 /dev/IBMtape1

Subsequently, the Tivoli Storage Manager instance fails to access the library and drives and the following error is logged in the activity log :

ANR8840E Unable to open device /dev/IBMchanger0 with file handle 13 and PVRRC 153.

Cause

The lin_taped daemon is not installed or the udev rule is not configured.

Diagnosing The Problem

When the lin_taped daemon is installed, the library and tape devices are configured with root owership and permissions are set to 666. For example :

crw-rw-rw- 1 root root 251, 2048 Feb  6 11:26 /dev/IBMchanger0
crw-rw-rw- 1 root root 251, 2049 Feb  6 11:26 /dev/IBMchanger1
crw-r--r-- 1 root root 251, 3071 Feb  6 11:31 /dev/IBMtape
crw-rw-rw- 1 root root 251,    0 Feb  6 11:26 /dev/IBMtape0
crw-rw-rw- 1 root root 251, 1024 Feb  6 11:26 /dev/IBMtape0n
crw-rw-rw- 1 root root 251,    1 Feb  6 11:26 /dev/IBMtape1
crw-rw-rw- 1 root root 251, 1025 Feb  6 11:26 /dev/IBMtape1n
crw-rw-rw- 1 root root 251,    2 Feb  6 11:26 /dev/IBMtape2
crw-rw-rw- 1 root root 251, 1026 Feb  6 11:26 /dev/IBMtape2n
crw-rw-rw- 1 root root 251,    3 Feb  6 11:26 /dev/IBMtape3
crw-rw-rw- 1 root root 251, 1027 Feb  6 11:26 /dev/IBMtape3n

When the lin_taped daemon is not installed and no udev rule is configured, the library and tape devices are configured with root owership and permissions set to 600. For example :

crw------- 1 root root 251, 2048 Feb  6 11:26 /dev/IBMchanger0
crw------- 1 root root 251, 2049 Feb  6 11:26 /dev/IBMchanger1
crw------- 1 root root 251,    0 Feb  6 11:26 /dev/IBMtape0
crw------- 1 root root 251, 1024 Feb  6 11:26 /dev/IBMtape0n
crw------- 1 root root 251,    1 Feb  6 11:26 /dev/IBMtape1
crw------- 1 root root 251, 1025 Feb  6 11:26 /dev/IBMtape1n
crw------- 1 root root 251,    2 Feb  6 11:26 /dev/IBMtape2
crw------- 1 root root 251, 1026 Feb  6 11:26 /dev/IBMtape2n
crw------- 1 root root 251,    3 Feb  6 11:26 /dev/IBMtape3
crw------- 1 root root 251, 1027 Feb  6 11:26 /dev/IBMtape3n

In this case, the lin_taped daemon was not installed and no udev rule was configured. Despite manually changing the device permissions with the chmod commands, the device permissions are reset on reboot.

Resolving The Problem

When the lin_taped daemon is not installed, you must create a udev rule to assign device permissions that remain consistent across reboot.

For example, create the following file to modify the library and drive devices permissions to 666 :
/etc/udev/rules.d/98-lin_tape.rules

Add the following contents to the file :

KERNEL=="IBMchanger*", NAME="%k", MODE="0666"
KERNEL=="IBMtape*[!n]", NAME="%k", MODE="0666"
KERNEL=="IBMtape*n", NAME="%k", MODE="0666"


For example, create the following file to modify the library and drive devices owner to tsminst1 and group to tsmsrvrs :
/etc/udev/rules.d/98-lin_tape.rules

Add the following contents to the file :

KERNEL=="IBMchanger*", NAME="%k", OWNER="tsminst1", GROUP="tsmsrvrs"
KERNEL=="IBMtape*[!n]", NAME="%k", OWNER="tsminst1", GROUP="tsmsrvrs"
KERNEL=="IBMtape*n", NAME="%k", OWNER="tsminst1", GROUP="tsmsrvrs"


Save the file and reboot.

Note : Another way to ensure that the device permissions (666) stay consistent across reboots is to implement persistent naming support with the IBM device driver on Linux.

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

Modified date:
17 June 2018

UID

swg21696413