ADSM-L

Re: [ADSM-L] IBMtape / kernel problem on SUSE 10?

2008-03-05 08:08:20
Subject: Re: [ADSM-L] IBMtape / kernel problem on SUSE 10?
From: Michael Green <mishagreen AT GMAIL DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 5 Mar 2008 15:07:24 +0200
Here is  a short howto that I've put together for a friend of mine
that describes the steps necessary to compile the driver from source.

-- 
Warm regards,
Michael Green

- HTH
______________________________________

1. You go to and fill the form:
<https://www14.software.ibm.com/webapp/iwm/web/pick.do?source=lstdd>
(The link actually taken from
<ftp://ftp.software.ibm.com/storage/devdrvr/Linux/RHEL4/lin_tape_Ultrium_AMD.ReadMe>,
paragraph "10.  Open-source aspects")

2. In the next page that opens I've chosen file named
"lin_tape-1.10.0-rhel4.tgz  (2.2MB)" and downloaded it.

3. Place it on RHEL machine and decompress it, it will create a
directory lin_tape-1.10.0, go into it. There you will find several
src.rpm files for various architectures. I took
lin_tape-1.10.0-rhel4.i386.src.rpm because I have RHEL4 update 3 on 32
bit (i386).

4. Place the file into /usr/src/redhat/SRPMS/ (in fact it can be
anywhere in the system, but /.../redhat/SRPMS is the place intended
for SRPMs).

5. Run 'rpm -ihv lin_tape-1.10.0-rhel4.i386.src.rpm', this will create
a .spec file in /usr/src/redhat/SPECS and put a tarball in to
/usr/src/redhat/SOURCES

6. cd into /usr/src/redhat/SPECS and 'ls -l' should reveal the .spec file.

7. run 'rpmbuild -bb lin_tape.spec'  and cross your fingers. If
everything works as expected you will...

8. ...find your freshly baked RPM in /usr/src/redhat/RPMS/

Transcript (starts at paragraph 5):
[root@colibri SRPMS]# rpm -ihv lin_tape-1.10.0-rhel4.i386.src.rpm
   1:lin_tape               ########################################### [100%]
[root@colibri SRPMS]# cd ../SPECS/
[root@colibri SPECS]# ls -l
total 8
-rw-------  1 root root 4804 Oct  8 21:04 lin_tape.spec
[root@colibri SPECS]# rpmbuild -bb lin_tape.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.23828
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf lin_tape-1.10.0
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/lin_tape-1.10.0.tgz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd lin_tape-1.10.0
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.23828
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lin_tape-1.10.0
+ LANG=C
+ export LANG
+ unset DISPLAY
++ echo i386-redhat-linux-gnu
++ cut -f 1 -d -
+ p=i386
+ '[' i386 == i386 ']'
+ proc=Intel
+ '[' i386 == ppc64 ']'
+ '[' i386 == powerpc ']'
+ '[' i386 == s390 ']'
+ '[' i386 == s390x ']'
+ '[' i386 == ia64 ']'
+ '[' i386 == x86_64 ']'
+ cp -af lin_tape_359X_Intel.ReadMe lin_tape_359X.ReadMe
+ cp -af lin_tape_Ultrium_Intel.ReadMe lin_tape_Ultrium.ReadMe
+ make KERNEL=2.6.9-34.ELhugemem PROC=i386 alldevs
make -C /lib/modules/2.6.9-34.ELhugemem/build
SUBDIRS=/usr/src/redhat/BUILD/lin_tape-1.10.0
PWD=/usr/src/redhat/BUILD/lin_tape-1.10.0 clean
make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-hugemem-i686'
make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-hugemem-i686'
rm -rf *.tgz *.ko bldtmp
mkdir bldtmp
make KERNEL=2.6.9-34.EL compileclean lin_tape.ko
make[1]: Entering directory `/usr/src/redhat/BUILD/lin_tape-1.10.0'
rm -f *.o
export PWD
make -C /lib/modules/2.6.9-34.EL/build
SUBDIRS=/usr/src/redhat/BUILD/lin_tape-1.10.0
PWD=/usr/src/redhat/BUILD/lin_tape-1.10.0 modules
make[2]: Entering directory `/usr/src/kernels/2.6.9-34.EL-i686'
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_config.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_tape.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_trace.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_ioctl_tape.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_ioctl_changer.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_extra_ioctl.o
  LD [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.o
  Building modules, stage 2.
  MODPOST
  CC      /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.mod.o
  LD [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-i686'
make[1]: Leaving directory `/usr/src/redhat/BUILD/lin_tape-1.10.0'
mv lin_tape.ko bldtmp/lin_tape-2.6.9-34.EL.ko
make KERNEL=2.6.9-34.ELhugemem compileclean lin_tape.ko
make[1]: Entering directory `/usr/src/redhat/BUILD/lin_tape-1.10.0'
rm -f *.o
export PWD
make -C /lib/modules/2.6.9-34.ELhugemem/build
SUBDIRS=/usr/src/redhat/BUILD/lin_tape-1.10.0
PWD=/usr/src/redhat/BUILD/lin_tape-1.10.0 modules
make[2]: Entering directory `/usr/src/kernels/2.6.9-34.EL-hugemem-i686'
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_config.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_tape.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_trace.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_ioctl_tape.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_ioctl_changer.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_extra_ioctl.o
  LD [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.o
  Building modules, stage 2.
  MODPOST
  CC      /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.mod.o
  LD [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-hugemem-i686'
make[1]: Leaving directory `/usr/src/redhat/BUILD/lin_tape-1.10.0'
mv lin_tape.ko bldtmp/lin_tape-2.6.9-34.ELhugemem.ko
make KERNEL=2.6.9-34.ELsmp compileclean lin_tape.ko
make[1]: Entering directory `/usr/src/redhat/BUILD/lin_tape-1.10.0'
rm -f *.o
export PWD
make -C /lib/modules/2.6.9-34.ELsmp/build
SUBDIRS=/usr/src/redhat/BUILD/lin_tape-1.10.0
PWD=/usr/src/redhat/BUILD/lin_tape-1.10.0 modules
make[2]: Entering directory `/usr/src/kernels/2.6.9-34.EL-smp-i686'
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_config.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_tape.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_scsi_trace.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_ioctl_tape.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_ioctl_changer.o
  CC [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape_extra_ioctl.o
  LD [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.o
  Building modules, stage 2.
  MODPOST
  CC      /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.mod.o
  LD [M]  /usr/src/redhat/BUILD/lin_tape-1.10.0/lin_tape.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-smp-i686'
make[1]: Leaving directory `/usr/src/redhat/BUILD/lin_tape-1.10.0'
mv lin_tape.ko bldtmp/lin_tape-2.6.9-34.ELsmp.ko
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.93995
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lin_tape-1.10.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/lin_tape-1.10.0-1-root-root
+ install -D -m 644 bldtmp/lin_tape-2.6.9-34.EL.ko
/var/tmp/lin_tape-1.10.0-1-root-root/lib/modules/2.6.9-34.EL/kernel/drivers/scsi/lin_tape.ko
+ install -D -m 644 bldtmp/lin_tape-2.6.9-34.ELhugemem.ko
/var/tmp/lin_tape-1.10.0-1-root-root/lib/modules/2.6.9-34.ELhugemem/kernel/drivers/scsi/lin_tape.ko
+ install -D -m 644 bldtmp/lin_tape-2.6.9-34.ELsmp.ko
/var/tmp/lin_tape-1.10.0-1-root-root/lib/modules/2.6.9-34.ELsmp/kernel/drivers/scsi/lin_tape.ko
+ install -D -m 644 IBM_tape.h
/var/tmp/lin_tape-1.10.0-1-root-root/usr/include/sys/IBM_tape.h
+ install -D -m 644 lin_taped.conf
/var/tmp/lin_tape-1.10.0-1-root-root/etc/lin_taped.conf
+ install -D -m 644 ibmekm.conf
/var/tmp/lin_tape-1.10.0-1-root-root/etc/ibmekm.conf
+ install -D -m 644 98-lin_tape.rules
/var/tmp/lin_tape-1.10.0-1-root-root/etc/udev/rules.d/98-lin_tape.rules
+ install -D -m 755 udev.get_lin_tape_id.sh
/var/tmp/lin_tape-1.10.0-1-root-root/sbin/udev.get_lin_tape_id.sh
++ uname -m
+ PROC=i686
+ p=i686
+ '[' i686 == i386 ']'
+ '[' i686 == i586 ']'
+ '[' i686 == i686 ']'
+ PROC=i386
+ install -D -m 700 -s lin_taped
/var/tmp/lin_tape-1.10.0-1-root-root/usr/bin/lin_taped
+ install -D -m 700 lin_tape
/var/tmp/lin_tape-1.10.0-1-root-root/etc/init.d/lin_tape
+ cd /var/tmp/lin_tape-1.10.0-1-root-root
+ cd /var/tmp/lin_tape-1.10.0-1-root-root
+ ln -sf /etc/init.d/lin_tape /usr/sbin/rclin_tape
+ cd -
/usr/src/redhat/BUILD/lin_tape-1.10.0
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/lin_tape-1.10.0
0 blocks
find: /var/tmp/lin_tape-1.10.0-1-root-root/usr/lib/debug: No such file
or directory
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: lin_tape-1.10.0-1
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.37685
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lin_tape-1.10.0
+ DOCDIR=/var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ export DOCDIR
+ rm -rf /var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ /bin/mkdir -p
/var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ cp -pr lin_tape_Ultrium.ReadMe
/var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ cp -pr lin_tape_359X.ReadMe
/var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ cp -pr lin_taped.ReadMe
/var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ cp -pr License
/var/tmp/lin_tape-1.10.0-1-root-root/usr/share/doc/lin_tape-1.10.0
+ exit 0
Processing files: lin_tape-debuginfo-1.10.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/lin_tape-1.10.0-1-root-root
Wrote: /usr/src/redhat/RPMS/i386/lin_tape-1.10.0-1.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/lin_tape-debuginfo-1.10.0-1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.71488
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lin_tape-1.10.0
+ rm -rf /var/tmp/lin_tape-1.10.0-1-root-root
+ exit 0
[root@colibri SPECS]# rpm -e IBMtape
[root@colibri SPECS]# cd ../
BUILD/   RPMS/    SOURCES/ SPECS/   SRPMS/
[root@colibri SPECS]# cd ../RPMS/
[root@colibri RPMS]# ls -l
total 48
drwxr-xr-x  2 root root 4096 Nov 22  2005 athlon
drwxr-xr-x  2 root root 4096 Nov 26 13:16 i386
drwxr-xr-x  2 root root 4096 Nov 22  2005 i486
drwxr-xr-x  2 root root 4096 Nov 22  2005 i586
drwxr-xr-x  2 root root 4096 Nov 22  2005 i686
drwxr-xr-x  2 root root 4096 Nov 22  2005 noarch
[root@colibri RPMS]# cd i686/
[root@colibri i686]# ls -l
total 0
[root@colibri i686]# cd ../
[root@colibri RPMS]# cd i386/
[root@colibri i386]# ls -l
total 1668
-rw-r--r--  1 root root 1696720 Nov 26 13:16 lin_tape-1.10.0-1.i386.rpm
-rw-r--r--  1 root root    1766 Nov 26 13:16
lin_tape-debuginfo-1.10.0-1.i386.rpm
[root@colibri i386]# rpm -ihv lin_tape-1.10.0-1.i386.rpm
Preparing...                ########################################### [100%]
   1:lin_tape               ########################################### [100%]
Starting lin_tape:
lin_tape loaded
[root@colibri i386]# lin_taped stop
[root@colibri i386]# rmmod lin_tape
[root@colibri i386]# modprobe qla2300
[root@colibri i386]# modprobe lin_tape
[root@colibri i386]# cat /proc/scsi/IBMtape
lin_tape version: 1.10.0
lin_tape major number: 252
Attached Tape Devices:
Number  model       SN                HBA                             FO Path
0       ULT3580-TD4 0007854306        qla2xxx                         NA

On Wed, Mar 5, 2008 at 1:11 PM, Rainer Schöpf
<rainer.schoepf AT proteosys DOT com> wrote:
> Hello,
>
>  I seem to be unable to find the SRPM package. Could someone provide a 
> pointer?
>
>  Thank you.
>
>   Rainer Schöpf
>
>  
> --------------------------------------------------------------------------------
>
>
> On Fri, 29 Feb 2008, Michael Green wrote:
>
>   > Henry,
>   >
>   > If the driver you are looking for isn't available for your platform,
>   > then you might to compile it from source using the SRPM package that
>   > IBM provides.
>   >
>   > - HTH
>   >
>   > On Fri, Feb 29, 2008 at 1:35 PM, Henry Pan <panh AT us.ibm DOT com> wrote:
>   > >
>   > >
>   > > Good Morning Michael,Richard & Johnny,
>   > >
>   > >  Thanks for sharing your experience on IBMtape:>).
>   > >
>   > >  Would you please also advice what is the latest tape drivers set for 
> SUSE
>   > > 10 kernel 2.6 running on IBM z9 mainframe host for IBM Tape library 
> TS3500
>   > > as well?
>   > >
>   > >  Thanks in advance & looking forward to hear from you
>   > >
>   > >  Good w/e
>   > >
>   > >--
>   > Warm regards,
>   > Michael Green
>   >
>
>  --------------------------------------------------------
>  ProteoSys AG
>  Carl-Zeiss-Straße 51
>  55129 Mainz
>
>  Dr. Rainer Schöpf
>  Leiter Software/Softwareentwicklung
>
>  Mail:   rainer.schoepf AT proteosys DOT com
>  Phone:  +49-(0)6131-50192-41
>  Fax:    +49-(0)6131-50192-11
>  WWW:    http://www.proteosys.com/

<Prev in Thread] Current Thread [Next in Thread>