Carry a jukebox with you (if you’re using Linux)
Posted by Preston on 2009-07-13
Hi!
To read this article, please go to the maintained version at the NetWorker Information Hub.
23 Responses to “Carry a jukebox with you (if you’re using Linux)”
Sorry, the comment form is closed at this time.
Piotr said
Hi
Can You publish the “step by step” installation of those VTL please? I’m trying to create one in my test environment. Do you try to connect this VTL to other hosts via iSCSI?
Regards from Poland
Preston said
I’ve been configuring the VTL only with local storage – I don’t think Mark’s VTL is yet at the stage of supporting iSCSI. I’ll try to remember this weekend to fire up a new/clean virtual machine and run through the installation/configuration process again and document.
Mark Harvey said
Some success has been had using the iSCSI Enterprise Target + rawio patch set and mapping IET to the mhvtl.
Refer: http://www.wlug.org.nz/XenNotes for rawio patches.
Peter said
Another option would be SCST (http://scst.sourceforge.net/index.html) as iSCSI target using the passthrough mode.
I managed to get this running quite well except of tape loading issues which are my fault I guess because of misconfigured (virtual) tape hardware.
Mark Harvey said
Default media capacity can also be set in /etc/mhvtl/mhvtl.conf
Look for the “CAPACITY=XXX” where XXX is defined in MBytes
New media will be created from the rc script using this default size – if it does not currently exist in /opt/vtl/
Preston said
Mark thanks for the tip!
Tomas said
Hi,
I installed mhvtl and created jukebox (3times). But I still have a one big problem.
I created jukebox without problems. I see all tapes and drive.
I can load \ unload tape.
I can label tape.
But my problem is that I can not read the label.
here is error from daemon.log:
67985 09/23/2009 04:09:08 PM nsrmmgd Loading volume `800843S3′ from slot `1′ into device `/dev/nst0′.
38752 09/23/2009 04:09:15 PM nsrd /dev/nst0 Verify label operation in progress
38758 09/23/2009 04:09:17 PM nsrd media warning: /dev/nst0 reading: no tape label found
72504 09/23/2009 04:09:17 PM nsrd /dev/nst0 verify label operation failed: no tape label found
0 09/23/2009 04:09:18 PM nsrmmgd 09/23/09 16:09:18 nsrmmgd: [Jukebox `brusko_virtual’, operation # 2]. Expected volume `800843S3′ in slot `1′. The actual volume is `’.
7224 09/23/2009 04:09:18 PM nsrd [Jukebox `brusko_virtual’, operation # 2]. Expected volume `800843S3′ in slot `1′. The actual volume is `’.
38752 09/23/2009 04:09:18 PM nsrd /dev/nst0 Eject operation in progress
67986 09/23/2009 04:09:25 PM nsrmmgd Unloading volume `-‘ from device `/dev/nst0′ to slot 1.
7224 09/23/2009 04:09:31 PM nsrd [Jukebox `brusko_virtual’, operation # 2]. Expected volume `800843S3′ in slot `1′. The actual volume is `’.
0 09/23/2009 04:09:33 PM nsrmmdbd pools supported: Default;
12361 09/23/2009 04:09:35 PM nsrd [Jukebox `brusko_virtual’, operation # 2]. Finished with status: failed
Can you help me?
I am using opensuse 11.1 and networker 74sp5
Preston said
I can’t say I’ve experienced that problem. What’s your nsrjb -C output?
Tomas said
after of mount tape from slot 1
Jukebox brusko_virtual: (Ready to accept commands)
slot volume pool barcode volume id recyclable
1: -* 800843S3 –
2: 800844S3 Default 800844S3 4290456513 no
3: 800845S3 Default 800845S3 4273679332 no
4: 800846S3 Default 800846S3 4256902147 no
5: 800847S3 Default 800847S3 4240124965 no
6: 800848S3 Default 800848S3 4223347780 no
7: 800849S3 Default 800849S3 4206570598 no
8: 800850S3 Default 800850S3 4189793415 no
9: 800851S3 Default 800851S3 4173016232 no
10: 800852S3 Default 800852S3 4156239051 no
11: 800853S3 Default 800853S3 4139461870 no
12: 800854S3 Default 800854S3 4122684685 no
13: 800855S3 Default 800855S3 4105907504 no
14: 800856S3 Default 800856S3 4089130320 no
15: 800857S3 Default 800857S3 4072353137 no
16: 800858S3 Default 800858S3 4055575955 no
17: 800859S3 Default 800859S3 4038798771 no
18: 800860S3 Default 800860S3 4022021587 no
19: 800861S3 Default 800861S3 4005244405 no
20: 800862S3 Default 800862S3 3988467221 no
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32: Cleaning Tape (5 uses left) CLN002L1 –
*not registered in the NetWorker media data base
drive 1 (/dev/nst0) slot :
brusko-1:~ #
here is output from mount operation (load in working, I have problem only with reading label from tape):
brusko-1:~ # nsrjb -lvv -S1 -f /dev/nst0
setting verbosity level to `2′
Info: Using pool `Default’.
Info: Loading volume `800843S3′ from slot `1′ into device `/dev/nst0′.
Info: Load sleep for 5 seconds.
Info: Performing operation `Verify label’ on device `/dev/nst0′.
Info: Operation `Verify label’ in progress on device `/dev/nst0′
Info: Ejecting media.
Info: Performing operation `Eject’ on device `/dev/nst0′.
Info: Operation `Eject’ in progress on device `/dev/nst0′
Info: Eject sleep for 5 seconds.
Info: Unloading volume `-‘ from device `/dev/nst0′ to slot 1.
Error: Expected volume `800843S3′ in slot `1′. The actual volume is `’.
Info: Unload sleep for 5 seconds.
Error: Expected volume `800843S3′ in slot `1′. The actual volume is `’.
39077:nsrjb: error, Jukebox command terminated with errors.
Preston said
OK your output indicates problems with slot 1 – out of curiosity what happens if you attempt a load operation on slot 2?
Is there any chance you configured the drive to be something other than SDLT600?
What happens if you load without mounting the virtual tape in slot 1 and running a scanner -m against it?
E.g.,
nsrjb -nl -S 1
scanner -mnv /dev/nst0
Tomas said
here is output:
brusko-1:~ # nsrjb -lvv -n -S1 -f /dev/nst0 && scanner -mnv /dev/nst0
setting verbosity level to `2′
Info: Loading volume `-‘ from slot `1′ into device `/dev/nst0’.
8909:scanner: using ‘/dev/nst0′ as the device name
9000:scanner: /dev/nst0: opened for reading
9003:scanner: /dev/nst0: rewinding
9067:scanner: Rewinding done
8968:scanner: Reading the label…
8969:scanner: Reading the label done
39074:scanner: NetWorker notice: no tape label found
39074:scanner: NetWorker notice: no tape label found
8944:scanner: scanning for valid records…
8945:scanner: read: 0 bytes
9000:scanner: /dev/nst0: opened for reading
8945:scanner: read: 0 bytes
8945:scanner: read: -1 bytes : Input/output error8946:scanner: Cannot continue
8947:scanner: No valid tape records found
brusko-1:~ #
brusko-1:~ #
brusko-1:~ # nsrjb -lvv -n -S2 -f /dev/nst0 && scanner -mnv /dev/nst0
setting verbosity level to `2′
Info: Performing operation `Eject’ on device `/dev/nst0′.
Info: Operation `Eject’ in progress on device `/dev/nst0′
Info: Eject sleep for 5 seconds.
Info: Unloading volume `-‘ from device `/dev/nst0′ to slot 1.
Info: Unload sleep for 5 seconds.
Info: Loading volume `800844S3′ from slot `2′ into device `/dev/nst0’.
8909:scanner: using ‘/dev/nst0′ as the device name
9000:scanner: /dev/nst0: opened for reading
9003:scanner: /dev/nst0: rewinding
9067:scanner: Rewinding done
8968:scanner: Reading the label…
8969:scanner: Reading the label done
39074:scanner: NetWorker notice: no tape label found
39074:scanner: NetWorker notice: no tape label found
8944:scanner: scanning for valid records…
8945:scanner: read: 0 bytes
9000:scanner: /dev/nst0: opened for reading
8945:scanner: read: 0 bytes
8945:scanner: read: -1 bytes : Input/output error8946:scanner: Cannot continue
8947:scanner: No valid tape records found
brusko-1:~ #
I have the same problem for all tapes. I cal load tapes but I can not mount tapes. I have problem with reading label…
I did not try to configure different virtual drive. I am using standard configuration for DL600
brusko-1:~ # mminfo -a -r’type’
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
sdlt600
brusko-1:~ #
scsidev@2.1.0:QUANTUM SDLT600 5500|Tape, /dev/nst0
S/N: ZF7584364
ATNN=QUANTUM SDLT600 ZF7584364
WWNN=3735383433363420
Preston said
Is your environment virtual, or a physical machine? I’ve had less success with physical machines – every time I’ve done a successful configuration it’s been in a VM. Mark assures me however that it does work on physical machines, I’ve just not been able to get it there myself. It’s possible there’s something interfering from within OpenSuSE as well. Is it at all possible to try to setup a CentOS VM to see if the problem still occurs? I’d suggest you may want to touch base with Mark over at http://linuxvtl.googlepages.org in case he can suggest something, or walk you through the debugging options (if he’s got time) so that he can determine what’s happening at the SCSI layer when the label is being written.
Tomas said
The environment is physical machine but I tested this on virtual machine too (again with opensuse) and I have the same problem.
I will install CentOS to my virtual machine and test virtual lib on the CentOS.
I will inform you after this …
But today I don’t have a time for playing (lot of real problems ..)
Tomas said
Hello,
I installed CentOS 5.3 to my virtual. and The mhvtl it’s working without any problems (I can mount tape and read data from tape) :)
Preston said
Hi Tomas,
Thanks for the feedback … it would seem to suggest then there’s some incompatibility with OpenSuSE.
Cheers,
Preston.
nia said
2.6.30.5-43.fc11.x86_64 #1 SMP:
make -C /lib/modules/2.6.30.5-43.fc11.x86_64/build SUBDIRS=/store/mhvtl/mhvtl-0.16/kernel modules
make[1]: Entering directory `/usr/src/kernels/2.6.30.5-43.fc11.x86_64′
CC [M] /store/mhvtl/mhvtl-0.16/kernel/mhvtl.o
In file included from /store/mhvtl/mhvtl-0.16/kernel/mhvtl.c:331:
/store/mhvtl/mhvtl-0.16/kernel/fetch27.c: In function âvtl_sg_copy_userâ:
/store/mhvtl/mhvtl-0.16/kernel/fetch27.c:33: warning: ignoring return value of âcopy_to_userâ, declared with attribute warn_unused_result
/store/mhvtl/mhvtl-0.16/kernel/fetch27.c:35: warning: ignoring return value of âcopy_from_userâ, declared with attribute warn_unused_result
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c: At top level:
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c:1385: error: unknown field âbus_idâ specified in initializer
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c:1385: error: expected â=â before string constant
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c:1385:22: warning: missing terminating ” character
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c:1385: error: missing terminating ” character
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c: In function âvtl_add_adapterâ:
/store/mhvtl/mhvtl-0.16/kernel/mhvtl.c:1435: error: âstruct deviceâ has no member named âbus_idâ
make[2]: *** [/store/mhvtl/mhvtl-0.16/kernel/mhvtl.o] Error 1
make[1]: *** [_module_/store/mhvtl/mhvtl-0.16/kernel] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.30.5-43.fc11.x86_64′
make: *** [default] Error 2
Preston said
This is something you need to discuss with the developer.
Abhay said
I have tried installing VTL (ver mhvtl-2009-10-09.tgz) on CentOS 5.3. Also made the changes in the device.conf and library_contents file as mentioned above. However here is what I receive when I try to start the VTL using init script:
**************
[root@storm etc]# /etc/init.d/mhvtl start
FATAL: Module mhvtl not found.
ls: /proc/scsi/mhvtl: No such file or directory
Incorrect (or no) kernel module loaded to feed these daemons.
Need mhvtl kernel module version at least 0.16.0
Please see http://linuxvtl.googlepages.com
**************
Kindly let me know how do I go about getting this to work…
Preston said
It looks to me like the kernel module has not been built. I’d suggest re-checking the readme/install file to confirm, then if you’re still having problems, checking in with the developer over at http://linuxvtl.googlepages.com.
Mark Harvey said
Hi Preston & Tomas,
Please feel free in contacting me with these problems. While I’m no NetWorker expert, I may be able to point you in the right direction (from the library/drive point of view).
I do know the latest OpenSuSE and NetBackup 6.x does not get along. The format of /sys changed somewhat (can’t remember exact details), but the result is NetBackup does not see the tape drives correctly. NetWorker may be suffering as well.
As a debugging tip, you can shutdown a selected daemon “vtlcmd exit” or “vtlcmd library exit”, then start that daemon in debug mode “vtltape -q -d” or “vtllibrary -d”.
NetWorker and linuxvtl, Redux « NetWorker Blog said
[…] by Preston Some time ago, I posted a blog entry titled Carry a Jukebox with you, if you’re using Linux, which referred to using linuxvtl with NetWorker. The linuxvtl project is run by my friend Mark […]
LA said
I beleive I installed all corectly. My purpose of using VTL is not to use with Networker. We are trying to simulate a block device or file/Directory as tape device so oracle can dump data on it. I did mt status on st0 and nst0, but they returned with No Medium.
How the virtual tapes on /opt/vtl/* is mapped on /dev?
Any help/hint much appreciated.
Thanks!!
~LA
Preston said
Once the VTL is setup, you still need to manage loading/unloading virtual media into the virtual drives – e.g., the ‘mtx’ package. Alternatively, the vtlcmd program may be able to be used for media movement, but I currently am between locations with VTLs setup, so I can’t answer this for sure.