Date: 06/06
Affected NV Version: 7.4.x and up
OS Version: N/A
Plugin version: N/A
Application version: N/A
Description:
NetVault Version Excalibur(7.4) introduces new features enabling enterprise-level management and maintenance of virtual libraries. These include the ability to span libraries across multiple file systems, dynamically add drives and media items, fast media initialisation and larger media.
This document explains NetVault virtual libraries and procedures to modify them.
Library Structure
A NetVault virtual library is implemented as a file tree residing in a mounted file system. It consists of drives, slots and media items arranged in this form:
{library-name} /
drives /
1 /
.serial
{media item}
..
slots /
1 /
{media item}
..
media /
{media data file}
..
{library-name} is the top-level directory which contains the other components. There is a corresponding entry in {NetVault home}/config/diskdevices.cfg for each library.
Drives are named numerically, starting with 1. There is a corresponding entry in {NetVault config}/diskdevices.cfg for each drive. Each drive directory contains a file named '.serial. This contains the serial number of that drive. When a drive is loaded, it contains a single media item.
Slots are - like directories - named numerically starting with 1. There is one slot for each media item in the library. A slot either is empty or contains a single media item.
Media data files are large files that are treated as pieces of media. They vary in size from a few megabytes to hundreds of gigabytes. The Media data file's name is the media piece's barcode.
Media items are moved between slots and drives by the virtual library manager. They are either media data files, as described
A virtual library should be unmanaged, using the device management “Remove� method, prior to performing these procedures.
The procedures described here are not exhaustive: other operations might be required upon virtual libraries, hence this section should be regarded as a 'cook book' of examples.
Procedures should be performed using the root account under Unix, or an administrator account under Windows. In either case, familiarity with the operating system is assumed. Care must be taken when performing these operations: BakBone Software accepts no responsibility for accidentally deleted files, including media data files.
If performing multiple modifications, the library should be tested after each individual procedure.
Add a drive:
Go to {library-name}/drives. Note the existing subdirectories and their default serial numbers by examining the '.serial' file in each subdirectory. Create a new directory with the next number (e.g. if directories '1' and '2' exist, the new directory will be called '3'). Create a file named '.serial' in the new directory containing the new drive's serial number. This file should not contain any new-lines or carriage returns. Edit {NetVault config}/diskdevices.cfg and add an entry for the new drive below the existing ones.
Remove a drive:
Ensure the drive is unloaded. List the contents of {library-name}/drives/{drive} and confirm that only the '.serial' file is present. If so, delete that file, then remove that directory. Do NOT recursively delete the directory, as this introduces the risk of accidentally deleting a media reference file for even data file. (One of the testers didn't believe this then promptly proved it true by accidentally deleting a media data file).
Add a media item:
Decide the size and path of the intended new media item. Go to {library-name}/slots. Note the existing subdirectories. Create a new subdirectory with the next number. Go into this new directory and create a file named '.media' containing the full path of the new media item.
Create the {library-name}/media container directories for the media data file if it does not already exist.
Create the actual media data file. This may be done by copying an existing media data file (and then blanking the new item from within NetVault afterwards) or by using the supplied nvmakemedia utility, which has two modes:
nvmakemedia {media-size} makefiles [ {file} ] : creates multiple files of size {media-size}, at the supplied paths.
nvmakemedia {media-size} poplib {library} : checks all media reference files within {library} . If a corresponding media data file does not exist, interactively offers to create that file.
{media-size} is an integer value followed by either 'k' for kilobytes, 'm' for megabytes, 'g' for gigabytes or 't' for terabytes.
A media data file is written to in an analogous manner to a physical media item, hence a newly created data file has no special file-format of its own. It will typically consist entirely of zero-value bytes, however this is not mandated.
Example: adding a new media item
In this example we have a Virtual Tape Library containing 3 media items on a Windows machine. It is called candle and resides on drive d:\
Storage1(D:)
- candle
+ drives
media
- slots
1
2
3
We wish to add two additional media items. They are to reside on drive c:\ and are to be 200 megabytes each in size.
1. First, unmanage the library from NetVault by entering device management, selecting the library and choosing the 'Remove' method.
2. Create the directory structure on e necessary to store the new media files. This directory tree should be given the same name as the library. We therefore need to create these directories:
c:\candle
c:\candle\media
These can be created using a file manager tool such as windows explorer, or using a command line tool such as mkdir.
3. Create the slots for the two new media items. As three slots already exist, numbered 1 to 3, the next two will be named 4 and 5. We therefore need to create these directories:
d:\candle\slots\4
d:\candle\slots\5
4. The next step is to create a media reference file for each new media item. Move into one of the old slots. It should contain a file named .media . View this using a text viewer such as notepad and you shold see something like this:
D:\candle\media\B21s6001
This file contains the full path of an actual media data file (You can check this by locating d:\candle\media\B21S6001 using a file manager and confirming it exists).
The name of the media data file, in this case B21S6001, is used as its barcode. We can see that the barcode prefix used when creating this library was B21S6. The barcodes of the two new media items, which are numbered 4 and 5, are therefore B21S6004 and B21S6005.
Using a text editor such as notepad, create the two new '.media' files.
The first is created in d:\candle\slots\4 and contains the line c:\candle\media\B21S6004. The second is created in c:\candle\slots\5 and contains the line
d:\candle\media\B21S6005 .
5. Create the actual media data items. The easiest way is to run {netvault-home}/util/nvmakemedia 200m poplib d:\candle . This scans the library and offers to create 'missing' media data files (of which, in this case, there are two).
6. Once this has completed the library may be re-added to NetVault.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center