prefetch(8)
prefetch(8)
NAME
prefetch - NetWorker prefetch command
SYNOPSIS
prefetch -v {ssh|acs} -j " jukebox1 centricstor1 " -j ...
DESCRIPTION
CentricStor (a Virtual tape library) can be used with NetWorker like
real tape libraries. NetWorker sees a (virtual) ACS robotic interface
and many (virtual) tape drives in a SAN. The timing behaviour of tape
operations may be different from physical libraries. Since CentricStor
uses a big internal disk cache for the virtual volumes, mount opera-
tions are very fast in case of a cache hit. The mount operation will
succeed immediately.
On the other hand, if a (virtual) volume is requested, that is purged
from the cache, the mount operation requires additional time. The real
tape has to be loaded and the entire virtual volume has to be read into
the cache. This would be a substantial disadvantage especially for
huge recovers with a high probability of cache misses for the virtual
volumes. Each volume needs the time to be read from the physical tape
into the disk array plus the time to recover the data from the virtual
tape drive back to its destination.
Therefore, to achieve maximum recover speed, a mechanism for read ahead
or prefetching of volumes is needed. Prefetching all needed volumes is
undesirable, because the cache might fill up with volumes that are not
needed (if the reocver process is aborted). Therefore, our prefetch
mechanism uses a number of volumes as a window size for the read ahead.
This window or bucket size is configurable with the variable
PREFETCH_BUCKET_SIZE_<jukebox name>=<value>
To avoid running out of prefetched volumes during the recover, the next
bucket of volumes will be prefetched, once the number of prefetched but
not yet read volumes has fallen below a low water mark. It is config-
urable with the variable
PREFETCH_LOW_WATER_MARK_<jukebox name>=<value>
A prefetch notification, which is triggered by the nsrmmd daemon, exe-
cutes the CentricStor prefetch command (usr/sbin/prefetch). A list of
volume names, barcodes and locations is the input of the prefetch noti-
fication.
CONFIGURATION
Set the following variables for nsrmmd:
PREFETCH_BUCKET_SIZE_<jukebox name>=<number of volumes for the read
ahead>
PREFETCH_LOW_WATER_MARK_<jukebox name>=<value>
<jukebox name> is the name attribute of the respective jukebox resource
with lower case letters transformed to upper case letters and nonal-
phanumeric characters transformed to "_".
A notification has to be created with the following resource
attributes:
- action:
/usr/sbin/prefetch -v {ssh|acs} -j "jb1 cs1" -j ...
- event: Media
- priority: Notice
Parameter for prefetch:
-v: Specifies the communication method to CentricStor
ssh: Communication via ssh
acs: Communication via ACSLS interface
-j:
Translates a jukebox name to the name of the corresponding CentricStor.
More than one "-j" option can be specified. If the jukebox name con-
tains blanks they have to be substituted by "_"
Prefetch using SSH as remote command execution method
-----------------------------------------------------
With CentricStor V4 and later the command execution on the CS host is
done with 'ssh'. For this to work one must create and install SSH keys
on the NetWorker server and on the CentricStor VLP.
On the NetWorker server, create a pair of SSH keys
# mkdir /nsr/res/.ssh
# ssh-keygen -t dsa -C 'NetWorker prefetch' -P '' -f
/nsr/res/.ssh/prefetch_key
This will create a key pair consisting of the files
/nsr/res/.ssh/prefetch_key /nsr/res/.ssh/prefetch_key.pub
Make sure the private key file /nsr/res/.ssh/prefetch_key is owned by
root and only the owner can read the file.
# ls -l /nsr/res/.ssh
-rw------- 1 root root 668 Dec 20 12:56 prefetch_key
-rw-r--r-- 1 root root 608 Dec 20 12:56 prefetch_key.pub
Install the public key in the authorized_keys file of user 'root' on
the CentricStor VLP
Copy the public key /nsr/res/.ssh/prefetch_key.pub to the CentricStor
VLP host.
Log in to the CentricStor VLP host and add the public key to the
allowed SSH keys:
# cat prefetch_key.pub >>/root/.ssh/authorized_keys
It should now be possible from the NetWorker server host to execute
commands on the CentricStor VLP via SSH without a password.
Example: On the NetWorker server execute
# ssh -i /nsr/res/.ssh/prefetch_key root@VLP uname -a
You should see the output of the 'uname -a' command without being asked
for a password.
NetWorker 8.0.1 Dec 02, 12 prefetch(8)