man amanda-devices
MAX_VOLUME_USAGE
(read-write) On devices that support it, this property will
limit
the total amount of data written to a volume; attempts to write
beyond this point will cause the device to simulate "out of
space."
Zero means no limit. The tapetype parameter length sets this
property.
ENFORCE_MAX_VOLUME_USAGE
(read-write) If this property is false, limit set by
MAX_VOLUME_USAGE property (and thus the tapetype LENGTH
parameter)
will not be verified while writing to device, allowing the
volume
to expand without limit. If this property is true, then
MAX_VOLUME_USAGE will be enforced, limiting the total size
of the
volume. This property is not available on all devices; see
below.
Set the ENFORCE_MAX_VOLUME_USAGE
The tapetype length is use in the estimate phase, so it must be the same
as the MAX_VOLUME_USAGE.
Jean-Louis
On 10/25/2013 09:50 AM, John G. Heim wrote:
Last week I asked a few questions about virtual tape size. Well, I
wouldn't say I resolved them but I think I have one clue. One of the
things I asked about is the meaning of the "length" parameter for a
tape definition. I had set it to 25G for my virtual tapes but amanda
was writing 38G to each vtape. This was going to be a problem
because I have a quota on my virtual tape file system of 2Tb and I had
therefore calculated that I could create 80 25Gb tapes. Here is what
the amanda.conf man page has to say about the tape length parameter:
> length int
> Default: 2000 kbytes. How much data will fit on a tape, expressed in
> kbytes. Note that this value is only used by Amanda to schedule which
> backupswill be run. Once the backups start, Amanda will continue to
> write to a tape until it gets an error, regardless of what value is
> entered for length (but see amanda-devices(7) for exceptions).
The device for virtual tapes is vfs-disk or something like that. But I
couldn't find anything in the docs for how it determines how much to
write to a vtape. If it keeps writing until it got an error, in my
case, it would write over 2Tb until it hit the hard quota on the
filesystem. So that couldn't be.
Then it occured to me that 25 * 150% = 38G. . Coincidence? I
recreated the vtapes with a size of 16Gb. Now amanda is writing 25Gb
to each tape. My first backup wrote to 11 tapes. Slots 1-10 have 25Gb
on them with 19G on the last. The amount of stuff on tapes 1-10 is
not exactly the same on each tape but it's a little over 24G each.
IMO, this borders on a bug. The wiki strongly implies that you can
take your disk file system size and divide by the number of tapes to
get the tape size. While the amanda developers aren't responsibe for
the wiki being misleading, it is natural to assume the length
parameter for a virtual tape is the actual size of the tape. I'm not
the only one who made that assumption, so did whoever wrote the wiki
entry on virtual tapes.
Anyway, I'd still like to know how amanda determines when to stop
writing to a vtape. I can put comments in my amanda.conf to say that
the tape length is set to 16G so amanda writes 24G to 25G to each
tape. But that's hardly an ideal solution.