Go to file
Marcio Barbosa 8375a7f7dd volser: warn if older version of volume is restored
Volume restores work by overwriting vnodes with the data in the given
volume dump. If we restore a partial incremental dump from an older
version of the volume, this generally results in a partly-corrupted
volume, since directory vnodes may contain references that don't exist
in the current version of the volume (or are supposed to be in a
different directory).

Currently, the volserver does not prevent restoring older volume data
to a volume, and this doesn't necessarily always result in corrupted
data (for instance, if we are restoring a full volume dump over an
existing volume). But restoring old volume data seems more likely to
be a mistake, since reverting a volume back to an old version, even
without corrupting data, is a strange thing to do and may cause
problems with our methods of cache consistency.

So, log a warning when this happens, so if this is a mistake, it
doesn't happen silently. But we still do not prevent this action, since
it's possible something could be doing this intentionally. We detect
this just by checking if the updateDate in the given header is older
than the current updateDate for the volume on disk.

Note: Restoring a full dump file (-overwrite f) will not result in
corrupted data. In this scenario, the restore operation removes the
volume on disk first (if present). After that, the dump file is
restored. In this case, we do not log anything (the volume is not
corrupted).

Change-Id: Iac55cc8bb1406ca6af9a5e43e7d37c6bfa889e91
Reviewed-on: https://gerrit.openafs.org/13251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2018-09-21 08:07:32 -04:00
build-tools regen.sh: Use libtoolize -i, and .gitignore generated build-tools 2016-11-06 00:36:18 -04:00
doc klog.krb5 -lifetime is not implemented 2018-09-20 22:31:51 -04:00
src volser: warn if older version of volume is restored 2018-09-21 08:07:32 -04:00
tests tests: partition name to id function tests 2018-09-14 08:35:18 -04:00
.gitignore Add .gitreview 2018-02-04 15:34:55 -05:00
.gitreview Add .gitreview 2018-02-04 15:34:55 -05:00
.mailmap git: add a mailmap file 2016-09-25 21:05:23 -04:00
.splintrc
acinclude.m4 autoconf: autoupdate macros 2018-08-11 12:31:51 -04:00
CODING CODING: one-line if statements should not have braces 2016-09-11 18:45:00 -04:00
configure-libafs.ac autoconf: updates and cleanup 2018-08-11 12:22:56 -04:00
configure.ac autoconf: Split out krb5/gss tests 2018-08-11 22:33:19 -04:00
CONTRIBUTING openafs: add a contributor code of conduct 2015-09-18 20:38:28 -04:00
INSTALL Add support for arm64_linux26 2018-02-10 13:19:58 -05:00
libafsdep
LICENSE autoconf: import gcc function attribute check macro 2018-08-10 07:55:00 -04:00
Makefile-libafs.in
Makefile.in Add rxgk_crypto_rfc3961.c 2018-09-14 08:33:33 -04:00
NEWS Default to crypt mode for unix clients 2017-08-05 18:47:04 -04:00
NTMakefile build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
README Tweak grammar in README 2015-12-28 19:32:17 -05:00
README-WINDOWS Update windows build documentation 2013-07-02 15:14:09 -07:00
regen.sh regen.sh: Use libtoolize -i, and .gitignore generated build-tools 2016-11-06 00:36:18 -04:00

AFS is a distributed file system that enables users to share and
access all of the files stored in a network of computers as easily as
they access the files stored on their local machines. The file system is
called distributed for this exact reason: files can reside on many
different machines, but are available to users on every machine.

OpenAFS 1.0 was originally released by IBM under the terms of the
IBM Public License 1.0 (IPL10).  For details on IPL10 see the LICENSE
file in this directory.  The current OpenAFS distribution is licensed
under a combination of the IPL10 and many other licenses as granted by
the relevant copyright holders.  The LICENSE file in this directory
contains more details, thought it is not a comprehensive statement.

See INSTALL for information about building and installing OpenAFS
on various platforms.

See CODING for developer information and guidelines.

See NEWS for recent changes to OpenAFS.