On Thu, Mar 22, 2018 at 23:03:33 +0000, Ryan, Lyle (US) wrote: > And one bonus question: I'm assuming Amanda will just make vtapes as > necessary, but is there any guidance as to how many vtape slots I > should create ahead of time? If my dumpcycle=14, maybe create 14 > slots just to make tapes easier to find?
Under v3.4, there are actually two separate "automatic" actions involved in using a vtape for the first time: The first is automatic creation of the slot subdirectories under the chg-disk: root directory. This is controlled by properties set in the changer definition within your amanda.conf, i.e.: define changer my_vtapes { tpchanger "chg-disk:/vtapes/TestBackup" property "num-slot" "10" property "auto-create-slot" "yes" } Since you are using a straight vtapes-on-a-single-giant-disk-that's- always-mounted configuration, it make sense to let Amanda do the slot creation that way rather than going through the process of creating them manually. (You can find more info on these properties in chg-disk section of the amanda-changers man page.) The other action is the initial creation of an Amanda label on the vtape (i.e. the first time an particular vtape slot is used). This is controlled by the "autolabel" option on the storage in question (or as set by the global "autolabel"); see the amanda.conf man page for more information on that parameter. For example, I have these lines in the TestBackup config's amanda.conf file: labelstr "^TESTBACKUP-[0-9][0-9]$" # label constraint regex: all tapes must match autolabel "TESTBACKUP-$2s" empty The "$2s" causes the generated label to be the two-digit version of the the slot number, so slot1 gets "TESTBACKUP-01", slot9 gets "TESTBACKUP-09", slot10 gets "TESTBACKUP-10", etc. (So that serves the purpose of making a particular volume "easy to find" in the vtapes directory tree.) (In this scenario I only expect to need autolabeling the very first time a slot is used, so I restrict autolabeling to "empty" tapes only to reduce the chances of having some actual data silently overwritten someday later.) So, if I have both these configured as described above, then when Amanda goes to find a new tape to write to, if there aren't yet num-slot slot directories out there, the chk-disk change will automatically create the next one, then Amanda will see a blank tape and auto-label it with the matching tape label, and then proceed to write data to this "newly-assembled" volume. Note that since your configuration has all your "tapes" under that single chg-disk changer, you actually need to set "num-slots" (i.e. the number of vtapes that you have) to some number greater than your *tapecycle* setting. Tapecycle is the parameter that controls when Amanda is willing to overwrite a previously-used volume, so you have to have at least that many volumes in your rotation (and a few extra is usually a good idea so there is are some spare tapes available). (To put it another way, while dumpcycle certainly influences what you choose for tapecycle [as discussed in earlier replies on this thread], it's the tapecycle setting [plus some spares] that determines the number of vtape slots you need...) Nathan ---------------------------------------------------------------------------- Nathan Stratton Treadway - natha...@ontko.com - Mid-Atlantic region Ray Ontko & Co. - Software consulting services - http://www.ontko.com/ GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239 Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239