PDA

View Full Version : chg-disk, NFS, and state file lock



mushuweasel
June 6th, 2011, 11:25 AM
Hello all,

I've been wrestling with a chg-disk taper on a Scale Computing NAS device. As far as I can tell from their documentation, they don't support NFS locking at all. All attempts to flush to that taper yields:

ERROR taper no-tape error [Error locking '<path to vtapes>/state']
WARNING driver Taper error: "Error locking '<path to vtapes>/state'"

in the log. To hack around this, I changed Amanda/Changer/disk.pm to use:
state_filename => "/var/lock/amanda/state-" . $config->{name},
instead of:
state_filename => "$dir/state",

But this feels very kludgy, and won't work with a possible secondary amanda server. If NFS locking is unavailable for a vtape, what would be the reasonable behavior? Sendmail style dotlocking an option? Thanks.

pyeatman
October 4th, 2013, 03:37 PM
The location of the state file for a chg-disk taper can now simply be specified with the changerfile parameter in the changer definition, ie.:

define changer "local_vtapes" {
tpchanger "chg-disk:/mnt/vtapes/Daily"
changerfile "/var/lib/amanda/Daily/state"
}