Sorry to send this out again, but I got some mail from Sam Sarasin at
Digital which answers the original question.
He says:
--------------------------------------------------------------------------
AdvFS creates its own unique filesystem identifier that is unique across
the system and between reboots. Unlike UFS, the major/minor device numbers
do not represent a specific disk device partition since there can be
multiple physical disks within one AdvFS domain.
You can run the following simple program to match the major/minor numbers
to the nfs stale error message, which reports "...fs(major,minor)...file x...
You should be able to map file x, where x is an inode (or tag number for
AdvFS) to a filename by running "vncheck -i x domain#fileset.
***********
#include <sys/mount.h>
#include <sys/types.h>
#include <fstab.h>
#include <stdio.h>
#include <errno.h>
main(argc,argv)
int argc;
char *argv[];
{
int sts;
struct statfs buf;
char * path;
struct fstab * fstab_entry;
setfsent();
/* For each fstab entry, print the major/minor info, if applicable.*/
while (fstab_entry=getfsent()) {
sts=statfs(fstab_entry->fs_file,&buf,sizeof(buf));
if (sts){
printf("statfs error = %d on entry %s\n",errno,fstab_entry->fs_file);
continue;
}
printf("major = %d minor = %d mount=%s\n",
major(buf.f_fsid.val[0]),minor(buf.f_fsid.val[0]),fstab_entry->fs_file);
}
endfsent();
}
--------------------------------------------------------------------------
I've compiled the above program, and it seems to work. Vncheck can be
used for mapping inode numbers to files under advfs - it seems a
little faster than find at the same task. /usr/field/tag2name is much
quicker than either vncheck or find, but its undocumented & since its
in /usr/field, its subject to change in the future.
Drew
##############################################################################
# Andrew Gallatin, Computer Project Manager #
# Institute of Statistics and Decision Sciences #
# Box 90251, Duke University, Durham, NC 27708-0251 #
##############################################################################
Received on Mon Nov 20 1995 - 21:05:58 NZDT