[OpenAFS] Duplicate special inodes in volume header

Hartmut Reuter reuter@rzg.mpg.de
Tue, 20 Nov 2001 16:54:51 +0100


Martin Schulz wrote:
> 
> Hartmut Reuter <reuter@rzg.mpg.de> writes:
> > > Is there any way to copy the "RO" over the "RW" to get a working RW
> > > volume again?
> >
> > You can "copy" the RO to a RW volume by
> >
> > vos dump 536870916 0 | vos restore <otherserver> <partition> <name> -id
> > 536870915 -overwrite full
> 
> Nice idea, but does not work:
> 
> $ vos restore iwrsun1 /vicepa -name root.afs -id 536870915 -file /tmp/working_root_afs_RO
> The volume root.afs 536870915 already exists in the VLDB
> Do you want to do a full/incremental restore or abort? [fia](a): f
> Volume exists; Will delete and perform full restore
> Restoring volume root.afs Id 536870915 on server iwrsun1.mathematik.uni-karlsruhe.de partition /vicepa ..Failed to start transaction on 536870915
> Volume needs to be salvaged
> Error in vos restore command.
> Volume needs to be salvaged
> 
> > The salvager should be able to rebuild the volume-header in the case he
> > finds all the volume special files. I have no idea how it was possible
> > to get duplicate special inodes in the header,
> 
> Nor do I;
> 
> > but - after you have
> > dumped the RO-volume - you could try to remove the volume-header and
> > then rerun the salvager.
> 
> Hmm. I got a little closer to the problem. In the early days of this
> installation, I had some problems with the first server and switched
> over to another platform. This could be the reason for the following:
> 
> In fact, the output from vos listvol and the vos listvldb were not
> consistent.
> 
> vldb showed me:
> 
> root.afs
>     RWrite: 536870915     ROnly: 536870916     Backup: 536870917
> 
> but listvol tells:
> --------------------------------------------------------------------
> root.afs                          536870912 RW          4 K On-line
> root.afs.backup                   536870917 BK          4 K On-line
> root.afs.readonly                 536870916 RO          5 K On-line
> **** Could not attach volume 536870915 ****
> --------------------------------------------------------------------

Did you the restore to another server or to the one with the bad volume?
I don't know whether the volserver and/or the salvager are clever enough
to compare the names of the volumes they find. If so the 536870912 could
have caused that 536870915 with the same name could not be attached. 

In such a case you should use "vos zap <server> <partition> <volume-id>"
to get rid of the wrong volume. To do a remove using the volume name is
dangerous because vos asks the vldb to translate the volume name to the
volume-id and then proceeds with this one (removing possibly the wrong
volume).

One more reason to use the namei-Interface because you can easily see
what is really there and what is missing! But if you want to migrate to
namei you will have to move the volumes to another server, of course.

Hartmut Reuter
> 
> By know, I was able to remove the 536870912 volume, and run vos
> syncvldb without errors. By now, the listvol does not mention this
> anymore but no other root.afs as well (the root.afs.backup and
> .readonly are shown and working, however).
> 
> A try to restore as above yields:
> 
> ------------------------------------------------------------------
> Volume exists; Will delete and perform full restore
> Restoring volume root.afs Id 536870915 on server
> iwrsun1.mathematik.uni-karlsruhe.de partition /vicepa ..Failed to
> start transaction on 536870915
> Volume needs to be salvaged
> Error in vos restore command.
> ------------------------------------------------------------------
> 
> I cannot remove that volume:
> -----------------------------------------------------------------
> $ vos remove iwrsun1 /vicepa 536870915
> Transaction on volume 536870915 failed
> Volume needs to be salvaged
> Error in vos remove command.
> -----------------------------------------------------------------
> 
> And trying to salvage yield the same messages as above.
> 
> > > Any hints greatly appreaciated,
> 
> Yours,
> --
> Martin Schulz                             schulz@iwrmm.math.uni-karlsruhe.de
> Uni Karlsruhe, Institut f. wissenschaftliches Rechnen u. math. Modellbildung
> Engesser Str. 6, 76128 Karlsruhe
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info

-- 
-----------------------------------------------------------------
Hartmut Reuter                           e-mail reuter@rzg.mpg.de
					   phone +49-89-3299-1328
RZG (Rechenzentrum Garching)               fax   +49-89-3299-1301 
Computing Center of the Max-Planck-Gesellschaft (MPG) and the
Institut fuer Plasmaphysik (IPP)
-----------------------------------------------------------------