Download the latest lin_tape source rpm and lin_taped binary rpm for your Linux distribution. In this article we are working with RHEL/CentOS and we have the following files downloaded
sh# ls -1 lin_tape* lin_tape-1.74.0-1.src.rpm lin_taped-1.74.0-rhel6.x86_64.rpm
As superuser rebuild the lin_tape source rpm
rpmbuild --rebuild lin_tape-1.74.0-1.src.rpm
The above rpmbuild command would compile the source on the system and create a binary RPM. The location of this binary RPM can be got from the rpmbuild output. Look for a line similar to the below line
Wrote: /root/rpmbuild/RPMS/x86_64/lin_tape-1.74.0-1.x86_64.rpm
As superuser, install the lin_tape binary rpm and the lin_taped binary rpm
rpm -i /root/rpmbuild/RPMS/x86_64/lin_tape-1.74.0-1.x86_64.rpm rpm -i lin_taped-1.74.0-rhel6.x86_64.rpm
Update: Depending on whether you have x86 compatibility libraries installed on x86_64 systems, you may get the following error during installation
Starting lin_tape: lin_tape loaded Starting lin_tape: /etc/init.d/lin_tape: /usr/bin/lin_taped: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
In such a case install the glibc.i386 package as shown below
yum install glibc.i686
During the installation the lin_tape service is also installed and configured to start for runlevel 2,3 and 5 as seen in the chkconfig below
/sbin/chkconfig --list lin_tape lin_tape 0:off 1:off 2:on 3:on 4:off 5:on 6:off
The lin_tape service can also be manually started or stopped by the following commands
service lin_tape start service lin_tape stop
After the lin_tape service is started, the tape devices will be accessed using /dev/IBMtape[x] rather than /dev/st[x] as seen below. Most utilities from IBM require that the lin_tape service is started.
# ls -l /dev/IBM* crw-rw-rw-. 1 root root 248, 2048 Nov 20 01:07 /dev/IBMchanger0 crw-r--r--. 1 root root 248, 3071 Nov 20 00:45 /dev/IBMtape crw-rw-rw-. 1 root root 248, 0 Nov 20 01:06 /dev/IBMtape0 crw-rw-rw-. 1 root root 248, 1024 Nov 20 01:06 /dev/IBMtape0n crw-rw-rw-. 1 root root 248, 1 Nov 20 01:07 /dev/IBMtape1 crw-rw-rw-. 1 root root 248, 1025 Nov 20 01:07 /dev/IBMtape1n
The difference between the IBMtape0 and the IBMtape0n is that the latter is the no rewind device path. It is similar to /dev/st0 and /dev/nst0 where nst0 is the no rewind device path. IBMchanger[x] are the changer device paths.