mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
volser: document 'vos restore -readonly' restriction
Commit 0c03f8607e
vos-command-enhancements-20011008 introduced the
'vos restore' -readonly option, which allows the restored volume to be
RO instead of the default RW. The commit message documents the
following restriction:
- ... This option causes the restored volume to be an RO volume. It is
not permitted to restore an RO volume when the associated RW volume
already exists. While it is possible to restore an RW volume where an
RO volume exists, caution should be used to avoid doing this with VLDB
entries created by 'vos restore -readonly', since such entries have
their ROVOL and RWVOL ID's set to the same thing.
Document this restriction in the 'vos restore' man page, and in a code
comment.
No functional change is incurred by this commit.
Change-Id: I34f6c5434b82da538a38a9d219207b33dcf62b17
Reviewed-on: https://gerrit.openafs.org/14348
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
0bcfe89d68
commit
8e1c321dc8
@ -193,7 +193,8 @@ Leaves the new volume flagged as off-line in the volume database.
|
||||
|
||||
=item B<-readonly>
|
||||
|
||||
Flags the new volume as read-only in the volume database.
|
||||
Flags the new volume as read-only in the volume database. This option
|
||||
is prohibited if an RW volume is already defined in the VLDB entry.
|
||||
|
||||
=item B<-creation> <I<dump | keep | new>>
|
||||
|
||||
|
@ -4542,6 +4542,7 @@ UV_RestoreVolume2(afs_uint32 toserver, afs_int32 topart, afs_uint32 tovolid,
|
||||
error = vcode;
|
||||
goto refail;
|
||||
} else if (flags & RV_RDONLY) {
|
||||
/* -readonly restore is prohibited if an RW already exists */
|
||||
if (entry.flags & VLF_RWEXISTS) {
|
||||
fprintf(STDERR,
|
||||
"Entry for ReadWrite volume %s already exists!\n",
|
||||
|
Loading…
Reference in New Issue
Block a user