AMANDA-TAPERSCAN(7) | Miscellanea | AMANDA-TAPERSCAN(7) |
amanda-taperscan - Amanda Taperscan Algorithms
Amanda uses a taperscan algorithm to select volumes on which to store dumps. Historically Amanda has provided only one, fairly complex taperscan algorithm, but this algorithm did not suit the needs of all users. Now Amanda offers a wide array of algorithms to suit varied needs. Adding new algorithms is not difficult.
The taperscan algorithm is specified with the taperscan parameter, which has a default value of traditional.
Taperscan algorithms are implemented as perl packages with the prefix Amanda::Taper::Scan::. See the perl documentation for Amanda::Taper::Scan for more information.
An taperscan is defined in amanda.conf(5) as follows:
define taperscan $taperscan_name {and then referenced in the global section as
comment "$comment"
plugin "$pluginname"
property "$PROPERTY_NAME" "$PROPERTY_VALUE"
... }
taperscan "$taperscan_name"
Taperscan properties, like Amanda configuration parameters, are insensitive to case, and - (dash) and _ (underscore) may be used interchangeably.
See the individual plugin documentation below for properties applicable to each plugin.
In general, these algorithms will only select reusable volumes. These are volumes which are listed in the tapelist(5) with the reuse flag, and which are not among the tapecycle-1 most recent volumes in the list. Put another way, reusable volumes do not contain data that must be retained. Note that if fewer than tapecycle-1 volumes have been written then there are no reusable volumes. Newly labeled volumes (volumes that have been labeled with amlabel but never used) are considered reusable.
Many of these algorithms look for the oldest reusable volume. In most cases, this is the best volume to overwrite, as the data it contains is older than that on any other volume. If there are no reusable volumes, then there is no oldest reusable volume.
This algorithm duplicates Amanda's historical behavior, and it operates in two stages.
First, if there is an oldest reusable volume and if the changer supports "fast" searches, then the algorithm uses the changer to search for that volume. Newly labeled volumes are not considered when calculating the oldest reusable volume. Consequently, this taperscan algorithm prefers volumes which have been used before to newly-labeled volumes when a fast-searchable changer is in use.
Second, if there is no oldest reusable volume, or if that volume is not available in the changer, then the algorithm begins a sequential scan of the changer, starting at the current slot. It selects the first suitable volume it finds: a reusable volume (perhaps newly-labeled) or, if autolabel includes empty, a blank volume. Even across multiple invocations (when runtapes > 1), it will not return the same slot twice.
This algorithm works with the Changer API (see amanda-changers(7)), using the inventory returned by the changer to locate the oldest acceptable volume available. Note that this will not work with changers that do not support inventory (old changers). The algorithms scans unknown slots only if no known usable volume is found in the inventory.
An acceptable volume is a reusable volume, a new labeled volume or an unlabeled volume that can be labeled according to autolabel. Note that changers do not always know the contents of every slot - for example, a tape with an unknown barcode will not be considered usable.
Use amtape CONF inventory to see the changer's inventory, and use amtape CONF update to update it.
This algorithm also works with the Changer API, using the inventory to determine the acceptable volumes; it then uses the volume which follows the last-used volume in lexical order. For volume labels containing leading zeros, e.g., CORP-010, this algorithm will run through the volumes in the natural order.
It scans unknown slots only if no usable volume is found in the inventory.
See oldest, above, for a definition of acceptable volumes.
amanda(8), amanda.conf(5), tapelist(5), amanda-changers(7), amanda-interactivity(7)
The Amanda Wiki: : http://wiki.zmanda.com/
Dustin J. Mitchell <dustin@zmanda.com>
12/01/2017 | Amanda 3.5.1 |