How To - Setup MHVTL on Oracle Enterprise Linux 5 (You can do this for RHEL5/CentOS5)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How To - Setup MHVTL on Oracle Enterprise Linux 5 (You can do this for RHEL5/CentOS5)

zu_shyong_aik
 Compile and Install
1. Make sure the following packages are installed
 a. kernel source
 b. lsscsi
 c. mt-st
 d. mtx
 e. sg3_utils

2. Create group vtl and user vtl
 # groupadd vtl
 # useradd -m vtl -G vtl

3. Extract the tarball mhvtl-2010-11-17.tgz
 # tar -xzvf mhvtl-2010-11-17.tgz

4. Go into the directory mhvtl-0.18
 # cd /path/to/mhvtl-0.18

5.  Compile the binaries
 # make
 # make kernel

6. Install the binaries and other scripts/docs
 # make install

7. Install the kernel module
 # cd kernel
 # make install



 Using it
1. Insert the module mhvtl
 # modprobe mhvtl
 # lsmod | grep mhvtl

2. Startup mhvtl service
 # /etc/init.d/mhvtl start

3. What my MHVTL scsi tapes ?
 # lsscsi -g

4. Which one is the device to my robotic arm ?
 [root@node01 ~]# lsscsi -g
 [0:0:0:0] disk VBOX HARDDISK 1.0 /dev/sda /dev/sg0
 [0:0:1:0] disk VBOX HARDDISK 1.0 /dev/sdb /dev/sg1
 [0:0:2:0] disk VBOX HARDDISK 1.0 /dev/sdc /dev/sg2
 [0:0:3:0] disk VBOX HARDDISK 1.0 /dev/sdd /dev/sg3
 [0:0:4:0] disk VBOX HARDDISK 1.0 /dev/sde /dev/sg4
 [1:0:0:0] mediumx STK L700 550V - /dev/sg13 --> THIS ONE :)
 [1:0:1:0] tape IBM ULT3580-TD5 550V /dev/st0 /dev/sg5
 [1:0:2:0] tape IBM ULT3580-TD5 550V /dev/st1 /dev/sg6
 [1:0:3:0] tape IBM ULT3580-TD4 550V /dev/st2 /dev/sg7
 [1:0:4:0] tape IBM ULT3580-TD4 550V /dev/st3 /dev/sg8
 [1:0:8:0] mediumx SPECTRA PYTHON 550V - /dev/sg14 --> THIS ONE :)
 [1:0:9:0] tape IBM ULT3580-TD4 550V /dev/st7 /dev/sg12
 [1:0:10:0] tape IBM ULT3580-TD4 550V /dev/st4 /dev/sg9
 [1:0:11:0] tape IBM ULT3580-TD4 550V /dev/st5 /dev/sg10
 [1:0:12:0] tape IBM ULT3580-TD4 550V /dev/st6 /dev/sg11
 [root@node01 ~]#

5. How do I know how many drives and tapes i have via mtx ?
 # mtx -f /dev/sg13 status

6. How do I load tape 1 (Storage Element ID 1) to Tape Drive 0 on Disk Library 10 ?
 # mtx -f /dev/sg13 load 1 0

7. How do I check my tape is loaded disk library 10?
 # mt -f /dev/st0 status

Example Output
 [root@node01 ~]# mt -f /dev/st0 status
 SCSI 2 tape drive:
 File number=0, block number=0, partition=0.
 Tape block size 0 bytes. Density code 0x46 (no translation).
 Soft error count since last status=0
 General status bits on (41010000):
 BOT ONLINE IM_REP_EN --> When you see this, it's loaded :)
 [root@node01 ~]#
 

 Some Noob FAQs
1. Where are the configuration files ?
 # ls /etc/mhtvl

2. Why are the files referring to ?
 mhvtl.conf - how you want mhvtl service/daemon to behave
 devices.conf - The details on what kind of tape you want to have
 library_contents.10 - The leading 10 behind means it's disk library 10, refer to devices.conf
 library_contents.30 - The leading 30 behind means it's disk library 30, refer to devices.conf

3. Where are the tapes located ? (I mean the tape data file on my linux fs)
 # ls /opt/mhvtl