tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: How do you interpret NFS file handle messages under AdvFS?
@ 1995-11-20 19:14 Andrew Gallatin
  0 siblings, 0 replies; only message in thread
From: Andrew Gallatin @ 1995-11-20 19:14 UTC (permalink / raw)
  To: tru64-unix-managers



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		     #
##############################################################################

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-11-20 19:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-20 19:14 SUMMARY: How do you interpret NFS file handle messages under AdvFS? Andrew Gallatin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox