repairing an AdvFS domain

From: Andrew Gallatin <gallatin_at_isds.Duke.EDU>
Date: Thu, 28 Sep 1995 22:37:22 -0400

I'm wondering if anybody knows how to use any/all of the undocumented tools
/usr/field?

I managed to severely confuse AdvFS while upgrading a 300LX from 3.2A
to 3.2C. I re-installed the OS from scratch, being careful not to
touch the non-system related partitions on its 2 disks. Before
starting the process, I had a 2-volume domain, with one volume on
/dev/rz3h and the other on /dev/rz0g. rz3 is the system disk, and was
re-labeled with new bootblocks (AdvFS replacing UFS) during the OS
re-install, but the placement of the rz3h partition didn't change, and
I was careful to re-mark it as AdvFS using disklabel -e. rz0 wasn't
touched.

When I re-constructed /etc/fdmns I managed to leave out the link for
/dev/rz0g. When I attempted to mount the sole fileset in the domain,
I got an I/O error from mount, and the following error message went to
syslog:
Domain local_domain is missing the log volume.
Check /etc/fdmns/local_domain for missing links

All of this makes perfect sense so far. But here is where it gets
weird - I manually added the link in /etc/fdmns for rz0g, then I got
an error message talking about a volume count mismatch:
Volume count mismatch for domain local_domain. local_domain expects 1 volumes,
/etc/fdmns/local_domain has 2 links.

Being of a curious nature, I removed the link to rz3h, and re-tried
the mount to see what it had to say. Surprisingly, the mount
succeeded. However, accessing any files in the fileset caused a
kernel panic.

I then tried rebooting, remounting, and running /usr/field/msfsck. It
didn't help much, just gave a few thousand error messages w/o doing
anything useful.

Next, I tried /usr/field/mssh. It seems to be totally undocumented,
but it also seems like a tool that could help in this situation. I
have a feeling that my attempting to mount the volume managed
introduce some sort of inconsistancy related to the number of volumes
in the AdvFS equiv of a superblock. mssh has a command called vdset
which is supposed to 'set vol attributes' according to its (very
terse) help screen.

Has anybody used this or know of any pointers to more documentation?

Also, does anybody know if the purchase of a kermel source license
gets you the AdvFS sources too? I think I probably could have written
a simple program to fix the problem if I had knew exactly what the
internal layout of an AdvFS domain looks like. Sigh..

I'm restoring the fileset from tape right now, so if the restore goes
OK this information isn't critical, but if I get any responses I'll be
sure to summarize because having the the docs to these tools could
really save somebody a LOT of trouble. And definately a lot of time.

Drew
##############################################################################
# Andrew Gallatin, Computer Project Manager #
# Institute of Statistics and Decision Sciences #
# Box 90251, Duke University, Durham, NC 27708-0251 #
##############################################################################
Received on Fri Sep 29 1995 - 04:02:04 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT