Emulating a single drive (no library)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Emulating a single drive (no library)

danci1973
I need to emulate a single tape drive. I managed to add a device, but don't know how to add tapes to it...

My 'device.conf' contains:

Drive: 2 CHANNEL: 00 TARGET: 01 LUN: 00
 Vendor identification: IBM
 Product identification: ULT3580-TD5
 Unit serial number: XYZZY_A1
 NAA: 10:22:33:44:ab:00:01:00
 Compression: factor 1 enabled 1
 Compression type: lzo
 Backoff: 400


Then I try to make a tape:

mktape -l 2 -m 1234 -s 1024 -t data -d LTO4

mktape requires all parameters, including the library and it creates directories and files under /var/lib/mhvtl:

drwxrws--- 3 vtl vtl 4096 Jul  9 14:10 /var/lib/mhvtl/2/
drwxrws--- 2 vtl vtl 4096 Jul  9 14:10 /var/lib/mhvtl/2/1234/
-rw-rw---- 1 vtl vtl    0 Jul  9 14:10 /var/lib/mhvtl/2/1234/data
-rw-rw---- 1 vtl vtl    0 Jul  9 14:10 /var/lib/mhvtl/2/1234/indx
-rw-rw---- 1 vtl vtl 1536 Jul  9 14:10 /var/lib/mhvll/2/1234/meta

But when I try to load the tape using 'vtlcmd 02 load 1234', there is an error in my /var/log/messages:

Jul  9 14:14:46 barbie vtltape[11536]: processMessageQ(): Sender id: 32768, msg : load 1234 
Jul  9 14:14:46 barbie vtltape[11536]: ERROR: load_tape(): open of pcl 1234 file /var/lib/mhvtl/1234/data failed, No such file or directory
Jul  9 14:14:46 barbie vtltape[11536]: loadTape(): Media load failed.. Unsupported format

Notice that the path is missing a 'library' part.

I'm trying this on OpenSuSE 11.4 x86_64 (evergreen) with mhvtl 1.4.7.

What is the proper way of adding tapes to single emulated tape drive?


    D.
Reply | Threaded
Open this post in threaded view
|

Re: Emulating a single drive (no library)

Mark Harvey
Administrator
try 'vtlcmd 2 load 1234'

And to unload use 'mt /dev/stX offline'

Sent from my iPad

On Jul 9, 2013, at 22:24, "danci1973 [via mhVTL - A Linux Virtual Tape Library]" <[hidden email]> wrote:

I need to emulate a single tape drive. I managed to add a device, but don't know how to add tapes to it...

My 'device.conf' contains:

Drive: 2 CHANNEL: 00 TARGET: 01 LUN: 00
 Vendor identification: IBM
 Product identification: ULT3580-TD5
 Unit serial number: XYZZY_A1
 NAA: 10:22:33:44:ab:00:01:00
 Compression: factor 1 enabled 1
 Compression type: lzo
 Backoff: 400


Then I try to make a tape:

mktape -l 2 -m 1234 -s 1024 -t data -d LTO4

mktape requires all parameters, including the library and it creates directories and files under /var/lib/mhvtl:

drwxrws--- 3 vtl vtl 4096 Jul  9 14:10 /var/lib/mhvtl/2/
drwxrws--- 2 vtl vtl 4096 Jul  9 14:10 /var/lib/mhvtl/2/1234/
-rw-rw---- 1 vtl vtl    0 Jul  9 14:10 /var/lib/mhvtl/2/1234/data
-rw-rw---- 1 vtl vtl    0 Jul  9 14:10 /var/lib/mhvtl/2/1234/indx
-rw-rw---- 1 vtl vtl 1536 Jul  9 14:10 /var/lib/mhvll/2/1234/meta

But when I try to load the tape using 'vtlcmd 02 load 1234', there is an error in my /var/log/messages:

Jul  9 14:14:46 barbie vtltape[11536]: processMessageQ(): Sender id: 32768, msg : load 1234 
Jul  9 14:14:46 barbie vtltape[11536]: ERROR: load_tape(): open of pcl 1234 file /var/lib/mhvtl/1234/data failed, No such file or directory
Jul  9 14:14:46 barbie vtltape[11536]: loadTape(): Media load failed.. Unsupported format

Notice that the path is missing a 'library' part.

I'm trying this on OpenSuSE 11.4 x86_64 (evergreen) with mhvtl 1.4.7.

What is the proper way of adding tapes to single emulated tape drive?


    D.



If you reply to this email, your message will be added to the discussion below:
http://mhvtl-a-linux-virtual-tape-library.966029.n3.nabble.com/Emulating-a-single-drive-no-library-tp4025478.html
To start a new topic under mhVTL - A Linux Virtual Tape Library, email [hidden email]
To unsubscribe from mhVTL - A Linux Virtual Tape Library, click here.
NAML
Regards from Australia
Mark Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Emulating a single drive (no library)

danci1973
I actually have tried that (the '02' in my original post was a typo) and it doesn't work - it searches for the virtual tape in the wrong directory:

Jul  9 14:14:46 barbie vtltape[11536]: ERROR: load_tape(): open of pcl 1234 file /var/lib/mhvtl/1234/data failed, No such file or directory

'mktape' created the '1234/ data' file in '/var/lib/mhvtl/2/'

I did find a workaround - within '/var/lib/mhvtl' I create a symlink 1234 -> 2/1234/ and 'vtlcmd 2 load 1234' works.


   D.




On 10. 07. 2013 01:44, Mark Harvey [via mhVTL - A Linux Virtual Tape Library] wrote:
> try 'vtlcmd 2 load 1234'
> And to unload use 'mt /dev/stX offline'
>
> Sent from my iPad
Reply | Threaded
Open this post in threaded view
|

Re: Emulating a single drive (no library)

Mark Harvey
Administrator
Apologies for 'assuming' and not reading your post fully...

Looks like its been a while since anybody tried using standalone drive....

Many thanks for the bug report..

The 'mktape' is not doing the right thing... '-l 2' should only be valid if a library is device #2. Which in your case it isn't...

Specifying media location for standalone drive seems like something that should work.. I'll think about the best way to implement this..

Sent from my iPad

On Jul 10, 2013, at 17:44, "danci1973 [via mhVTL - A Linux Virtual Tape Library]" <[hidden email]> wrote:

I actually have tried that (the '02' in my original post was a typo) and it doesn't work - it searches for the virtual tape in the wrong directory:

Jul  9 14:14:46 barbie vtltape[11536]: ERROR: load_tape(): open of pcl 1234 file /var/lib/mhvtl/1234/data failed, No such file or directory

'mktape' created the '1234/ data' file in '/var/lib/mhvtl/2/'

I did find a workaround - within '/var/lib/mhvtl' I create a symlink 1234 -> 2/1234/then 'vtlcmd 2 load 1234' works.


   D.




On 10. 07. 2013 01:44, Mark Harvey [via mhVTL - A Linux Virtual Tape Library] wrote:
> try 'vtlcmd 2 load 1234'
> And to unload use 'mt /dev/stX offline'
>
> Sent from my iPad


If you reply to this email, your message will be added to the discussion below:
http://mhvtl-a-linux-virtual-tape-library.966029.n3.nabble.com/Emulating-a-single-drive-no-library-tp4025478p4025480.html
To start a new topic under mhVTL - A Linux Virtual Tape Library, email [hidden email]
To unsubscribe from mhVTL - A Linux Virtual Tape Library, click here.
NAML
Regards from Australia
Mark Harvey