diff --git a/doc/man-pages/pod1/vos_restore.pod.in b/doc/man-pages/pod1/vos_restore.pod.in index 6c5dd70f6e..701af0cbff 100644 --- a/doc/man-pages/pod1/vos_restore.pod.in +++ b/doc/man-pages/pod1/vos_restore.pod.in @@ -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> > diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index de0b900a9a..a2c00ca143 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -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",