The project needs to use a tape library. first, install a virtual tape library mhvtl to simulate the installation. The following describes the installation steps. For more information, see Ubuntu.
1 download source code
From website.
2. ensure kernel version consistency
Make sure that your kernel development kit and the kernel running on your system are in the same version, because mhvtl has a kernel module that will compile it, if the kernel development kit is not the same version as the kernel running on your system, the kernel module in mhvtl cannot be loaded, although you can use include/linux/vermagic in the source code. modify VERMAGIC_STRING in h to be consistent with the current PC kernel uname-r, but it is not recommended.
3. decompress the source code
Tar xvfz mhvtl-2013-10-20.tgz
4 install four packages lsscsi, sg3_utils, liblzo2-dev, and can be directly installed with apt-get install command
Apt-get lsscsi sg3_utils liblzo2-dev
The liblzo2-dev package is not installed. the lzo/lzoconf. h file is not found when mhvtl is compiled.
5. create mhvtl groups and users
/Usr/sbin/groupadd -- system vtl
/Usr/sbin/useradd -- system-c "Vitrual Tape Library"-d/opt/vtl-g vtl-m vtl
6. Compile the kernel module
Cd mhvtl-2013-10-20/kernel
Make
Make install
7. compile user space code
Cd mhvtl-2013-10-20
Make
Make install
8. modify the directory owner of/opt/mhvtl and/etc/mhvtl.
Chown-R vtl: vtl/opt/mhvtl
Chown-R vtl: vtl/etc/mhvtl
/Etc/mhvtl is the configuration file path,/opt/mhvtl is the virtual tape library storage path
9 start the mhvtl daemon
/Etc/init. d/mhvtl start
10. view the status of the Virtual Tape Library
Lsscsi-g
We can see that our virtual device is mounted on HBA #6. the mediumx type device is a robotic arm. In this example,/dev/sg13,/dev/sg14.
Run the command maid status