[OpenAFS-devel] Is my volume in namei fileserver too broken to do a vos zap -force?

Harald Barth haba@pdc.kth.se
Fri, 30 Aug 2002 11:59:09 +0200 (CEST)


I did the following:

1. Move volume ftp.free.ports.a.5 from server dog to server tbr
2. Tickets expired duting move
3. I still have the volumes active on server dog and the volume on tbr
   OFFLINE but attached.

Now I wanted to clean up things up so I did:

4. /usr/afs/bin/vos zap tbr a 536884349 -force -verbose

And got some error message that I was not allowed to do that. Right:

5. /usr/afs/bin/vos zap tbr a 536884349 -force -verbose -local
vos: forcibly removing all traces of volume 536884349, please wait...failed with code 2.

During my attempts to zap, I got the following errors in FileLog:

Fri Aug 30 10:55:37 2002 VAttachVolume: Error reading diskDataHandle vol header 
/vicepa//V0536884349.vol; error=101
Fri Aug 30 10:55:37 2002 VAttachVolume: Error attaching volume /vicepa//V0536884
349.vol; volume needs salvage; error=101
Fri Aug 30 10:56:13 2002 VAttachVolume: Error reading diskDataHandle vol header 
/vicepa//V0536884349.vol; error=101
Fri Aug 30 10:56:13 2002 VAttachVolume: Error attaching volume /vicepa//V0536884
349.vol; volume needs salvage; error=101
Fri Aug 30 10:56:29 2002 VAttachVolume: Error reading diskDataHandle vol header 
/vicepa//V0536884349.vol; error=101
Fri Aug 30 10:56:29 2002 VAttachVolume: Error attaching volume /vicepa//V0536884
349.vol; volume needs salvage; error=101
Fri Aug 30 10:58:08 2002 VAttachVolume: Error reading diskDataHandle vol header 
/vicepa//V0536884349.vol; error=101
Fri Aug 30 10:58:08 2002 VAttachVolume: Error attaching volume /vicepa//V0536884
349.vol; volume needs salvage; error=101

6. Now the volume is detached. OK, let's try what salvage says:

tbr# bos salvage tbr a 536884349 -local -showlog
Starting salvage.
bos: salvage completed
SalvageLog:
@(#) OpenAFS devel built  2002-08-23 
08/30/2002 11:20:26 STARTING AFS SALVAGER 2.4 (/usr/afs/bin/salvager /vicepa 536884349)
08/30/2002 11:20:26 No applicable vice inodes on vicepa; not salvaged
Temporary file /vicepa/salvage.inodes.vicepa.59554 is missing...

7. Ok, let's see what gdb says about this:

I'm running a recently "current" namei fileserver on freebsd. Src is in 
/afs/pdc.kth.se/home/h/haba/src/openafs/.

Breakpoint 1 at 0x806e785: file ../vol/volume.c, line 386.
(gdb) c
Continuing.
[Switching to process 56195, thread 4]


Breakpoint 1, ReadHeader (ec=0xbfa10e5c, h=0x84ec5c8, to=0x8399b14 "", 
    size=552, magic=2023862981, version=1) at ../vol/volume.c:386
386     {
(gdb) n
390         *ec = 0;
(gdb) n
391         fdP = IH_OPEN(h);
(gdb) s
ih_open (ihP=0x84ec5c8) at ../vol/ihandle.c:262
262     {
(gdb) n
267         IH_LOCK
(gdb) 
270         for (fdP = ihP->ih_fdtail ; fdP != NULL ; fdP = fdP->fd_ihprev) {
(gdb) 
285         fdInUseCount += 1;
(gdb) 
286         IH_UNLOCK
(gdb) 
287         fd = OS_IOPEN(ihP);
(gdb) print ihP
$2 = (IHandle_t *) 0x84ec5c8
(gdb) print *ihP
$3 = {ih_vid = 536884349, ih_dev = 0, ih_flags = 0, 
  ih_ino = 2305900720823468031, ih_refcnt = 10, ih_fdhead = 0x0, 
  ih_fdtail = 0x0, ih_next = 0x8410438, ih_prev = 0x84ed988}
(gdb) s
namei_iopen (h=0x84ec5c8) at ../vol/namei_ops.c:563
563         namei_HandleToName(&name, h);
(gdb) n
564         fd = open(name.n_path, O_RDWR, 0666);
(gdb) print name
$4 = {n_base = "/vicepa/AFSIDat", '\000' <repeats 16 times>, 
  n_voldir1 = "x=\000\000\000\000\000\000\000\000\000", 
  n_voldir2 = "xF1+U", '\000' <repeats 26 times>, 
  n_dir1 = "special\000\000\000\000", n_dir2 = '\000' <repeats 11 times>, 
  n_inode = "zzzz5o5B++0", '\000' <repeats 20 times>, 
  n_path = "/vicepa/AFSIDat/x=/xF1+U/special/zzzz5o5B++0", '\000' <repeats 211 times>}
(gdb) n
565         return fd;
(gdb) print fd
$5 = -1
(gdb) c

Ah, and for some reason /vicepa/AFSIDat/x=/xF1+U/special/zzzz5o5B++
does not exist. There is no /vicepa/AFSIDat/x= even. So how do I 
clean up?

Do the handle names look reasonable to you? 

Harald.