9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: [9fans] fs config problem status update (still unsolved)
Date: Fri, 22 Feb 2002 19:39:35 +0100	[thread overview]
Message-ID: <200202221839.g1MIdaR09315@copernicus.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Fri, 22 Feb 2002 13:55:03 +0100." <200202221255.g1MCt3q02259@copernicus.cs.utwente.nl>

[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]

For those who are interested, (and/or able to help or offer advice :-),
a short update on what I tried and how far I got.

I guessed my filsys lines, as below, but this did not give full success.
       filsys main cp(w0)0.25f(w1.<0-1>.0)
       filsys dump o
       filsys temp p(w0)25.75
I'm pretty sure that for the worm I just concatenated the two w1*
devices; I'm slightly less sure about the partitions I had chosen
for the cache and for temp (but I'm sure they make up w0).

So far I noticed the following:
 - somehow, occasionally, when reading the config info from disk,
   it turns out to be corrupted, i.e. one of the keywords has been
   changed such that it is not recognized -> panic
   After the panic, on reading again, some other keyword may be
   corrupted -> panic again, until finally the whole thing is read OK.
   Since I don't (yet) have a way to just look at (what's on) the disks,
   I don't know what's there. I intend to add another disk to the fs,
   and install p9 on it, to be able to look at the disks from it.
 
 - when it is able to read the config, the fs shows the initialisation
   that it does for main, upto and including the devinit for drives
   (devices) w1.0.0 and w1.1.0, after which it hangs -- and one time
   I waited for about an hour to see if it would make any progress,
   which it didn't.

 - with the guessed strings, I tried a config of
      recover main
   but then I got a panic message about no superblock(s)

 - I tried to add debugging print statements to see where it hangs,
   which is in cwinit, in 
        p = getbuf(cw->cdev, h->maddr + m/BKPERBLK, Bread);
   at the moment where m=260 (plus or minus a few), and
   h->msize=11000 (where I rounded to the neares thousand, I think).
   In the hope of getting more feedback I also added a checktag
   call, don't know if that is indeed the right one at the right place.
   It passes the checktag call, but that could be(?) because of the
   recover config request that I gave, even though it failed?
   (according to the source, cwrecover only invokes settag _after_
    looking for a superblock in the worm)
   For completeness I attached my debugging version of cwinit.

Now it's time for weekend; after the weekend I hope to install p9
on a new disk in the fs, to see if that gives anything.

Axel.


[-- Attachment #2: fsdebg --]
[-- Type: text/plain , Size: 863 bytes --]

void
cwinit(Device *dev)
{
	Cw *cw;
	Cache *h;
	Iobuf *cb, *p;
	long l, m;

	cwinit1(dev);

	cw = dev->private;
	l = devsize(cw->wdev);
	cb = getbuf(cw->cdev, CACHE_ADDR, Bread|Bmod|Bres);
	if(!cb || checktag(cb, Tcache, QPSUPER))		/* AFEB */
		panic("cwinit: checktag c bucket");	/* AFEB */
	h = (Cache*)cb->iobuf;
	h->toytime = toytime() + SECOND(30);
	h->time = time();
	m = h->wsize;
	if(l != m) {
		print("wdev changed size %ld to %ld\n", m, l);
		h->wsize = l;
		cb->flags |= Bmod;
	}

	for(m=0; m<h->msize; m++) {
		print("cwinit reading/checking %ld of %ld <r", m, h->msize); /* AFEB DEBUG*/
		p = getbuf(cw->cdev, h->maddr + m/BKPERBLK, Bread);
		print("><c");
		if(!p || checktag(p, Tbuck, h->maddr + m/BKPERBLK))
			panic("cwinit: checktag c bucket");
		print("><w");
		putbuf(p);
		print(">\n");
	}
	putbuf(cb);
}

  reply	other threads:[~2002-02-22 18:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-22 12:37 [9fans] fs config problem: accidental config deletion? forsyth
2002-02-22 12:55 ` Axel Belinfante
2002-02-22 18:39   ` Axel Belinfante [this message]
2002-02-28 21:06     ` [9fans] fs config problem status update (still unsolved) Axel Belinfante
2002-02-28 21:09 Russ Cox
2002-02-28 21:17 ` Axel Belinfante
2002-02-28 21:19 forsyth
2002-02-28 21:59 ` Axel Belinfante
2002-03-01  8:09 Fco.J.Ballesteros
2002-03-01 10:35 ` Axel Belinfante
2002-03-01 13:16 Fco.J.Ballesteros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200202221839.g1MIdaR09315@copernicus.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).