A list of recommended base packages for trouble-shooting SCSI devices on Linux
- sg3_utils
- mt
- mtx
- lsscsi
RedHat/CentOS/Scientific Linux/Oracle Linux distributions:
If all you want/need to do is get the VTL up and running as soon as possible, with a minimum of fuss:
Many thanks to the ELRepo project : http://elrepo.org/tiki/tiki-index.php
Import the ELRepo public key:
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
Decide if your distribution is based around RH 5 or RH 6
If RH 5:
Install the ELRepo RPM for RHEL-5 / SL-5 or CentOS-5
rpm -Uvh http://elrepo.org/elrepo-release-5-4.el5.elrepo.noarch.rpm
If RH 6:
Install the ELRepo RPM for RHEL-6 / SL-6 or CentOS-6
rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
Install mhVTL packages:
yum install kmod-mhvtl mhvtl-utils
Start mhVTL:
services mhvtl start
All that’s left is to configure your backup application..
Non RedHat based RPM Linux distributions:
This requires the gcc development environment to be installed as there is a pseudo SCSI hba driver to compile and install.
To install and get the package running:
1. Install both src.rpm & x86/x86_64 (depending on your CPU/OS version – check using uname -p)
2. Build kernel module from source you just installed:
Note: The directory in the example below is a SuSE RPM home dir (which is /usr/src/packages)
If you are installing on RedHat:
/usr/src/redhat or $HOME/rpmbuild/ (depending on release of RedHat)
Other RPM distributions may have different default RPM home directories.
cd /usr/src/packages/BUILD tar xvfz ../SOURCES/mhvtl-2013-03-22.tgz cd mhvtl-1.4/kernel make make install
3. Start the package using the rc script.
/etc/init.d/mhvtl start
4. Check it’s all running:
lsscsi -g ps -ef|grep vtl
(default with 10 daemons – 2 vtllibrary & 8 vtltape)
5. Configure your backup software 😉
NON-RPM based Linux distributions: (or you just want to do it the manual way)
To install and get the package running:
1. Download the ‘mhvtl-YYYY-MM-DD.tgz
2. Extract source code
cd /some/where/safe tar xvfz /where/you/downloaded/mhvtl-YYYY-MM-dd.tgz
3. Build user-space daemons
cd mhvtl-1.4 make
Note: Since mhvtl-1.3, both lzo and zlib are required to build vtltape
Typical error (missing lzo devel package) looks like:
cc -Wall -Wshadow -g -O2 -D_LARGEFILE64_SOURCE -I../kernel -DMHVTL_VERSION=\"1.4.0\" -DMHVTL_DEBUG -DUSR=\"vtl\" -DMHVTL_HOME_PATH=\"/opt/mhvtl\" -DMHVTL_CONFIG_PATH=\"/etc/mhvtl\" -c -o vtltape.o vtltape.c vtltape.c:92:25: error: lzo/lzoconf.h: No such file or directory vtltape.c:93:23: error: lzo/lzo1x.h: No such file or directory vtltape.c: In function 'uncompress_lzo_block':
To fix, install lzo development package and rerun the ‘make’ command
4. Add a user ‘vtl’
sudo useradd -c "mhvtl user" vtl
5. Install binaries
sudo make install
6. Build kernel module from source you just installed:
cd kernel make make install
7. Start the package using the rc script.
/etc/init.d/mhvtl start
Note: If you can’t find the ‘mhvtl’ rc script in /etc/init.d, you most likely swapped the order of 4 & 5.
i.e. You ran ‘sudo make install’, found it failed due to missing ‘vtl’ user account and didn’t re-run the ‘make install’ after creating the account.
8. Check it’s all running:
lsscsi -g ps -ef|grep vtl
(default with 10 daemons – 2 vtllibrary & 8 vtltape)
9. Configure your backup software 😉
Compiling the kernel module
tar xvfz mhvtl-2013-10-20.tgz (latest at time of edit) cd mhvtl-1.4/kernel make make install rmmod mhvtl (remove original kernel module - if loaded) modprobe mhvtl opts=0 (load new kernel module) cat /sys/modules/mhvtl/version (confirm version is 0.18.15)