[Stgt-devel] Thoughts on vtl setup

Albert Pauw pauw
Thu Apr 5 21:32:51 CEST 2007


Here are a few thoughts I wanted to share regarding the virtual tape library, just shoot at it if you think otherwise. Hope you don't find this too nosy Mark (Harvey) as you started the idea.

General - Best would be to have the changer and the tapedrives on one target, the changer can be LUN 0, the drive(s) LUN 1 and onwards.

Configuration - Would be best to keep this simple. The changer can be a standard one, implementing all necessary functions. For the drives you define the type once, and how many drives you want. If you use symbolic names (as to numeric) for the drive types, then this can be easily expanded. E.g. LTO3, DDS4, etc. for the drive type. If you need three different type of drives, then you just add one of each type. Since these types are predefined you don't have to set other parameters for these drives (like size etc). Lastly you define the directory where the tapeslots are.

Tapes - Well, virtual tapes. I guess the filename can be the barcode, the extension the tape type, e.g. A00001.LTO2. However, when these files are accidentally renamed you loose the barcode and type. So every tape should have a header containing the barcode, and tape type. The barcode and tapetype should be in clear text (e.g. 4 characters LTO2). Another addition could be a two-byte field, containing bitfields, like this:

0000 0000 0000 RCCC

were
CCC -> compression 0-7, where 0 is no compression, 1 is LZ, etc. for different types of compression, if implemented. We can start without compression.

R -> Readonly bit, even if the file was readonly and set to readwrite, it would protect the data. Don't know if this setting can be done in the SCSI set.

Tape handling - Before starting stgt vtl and point it to the tapeslot directory you create tape slot subdirectories like this, where you define at startup the directory /var/tape as the slot directory:

/var/tape/slot-01
...
/var/tape/slot-24

In the /var/tape directory there would be symbolic links like this

/var/tape/drive-1 -> /var/slot-01/A00001.LTO3

if a tape is loaded into drive-1, when a drive is empty (startup setting) it does not have a symbolic link.

Note that by creating these directories by hand you can define how many slots you have, but also leave existing "tapes" in the slots between restarts of the vtl stgt service. And stopping the service should delete the symbolic drive links, so the drives "eject" the virtual tape and start up "empty" next time.

Well, just a thought.

Albert




More information about the stgt mailing list