more problems on freebsd

Alec Wolman wolman at cs.washington.edu
Tue Jul 14 09:54:08 CEST 1998



> > I'm trying to setup arla-0.7.2 with a FreeBSD 2.2.6 system.
> > I can't seem to get through the INSTALL directions.  The first
> > problem I ran into is that when I use the modload command to install
> > the xfs module, it doesn't tell me what the major device number
> > is.  I fixed that problem (I've appended my one-line patch below),
> > but I still get an error when I attempt to mount the afs filesystem.
> 
> You should get that output on your console (and in your
> /var/log/messages), do you?

yes.  but it is strange to see a bunch of output to stdout, none of
which contains the one thing you might be interested in.  perhaps
having both printf and uprintf would do the trick.

> > miles# /usr/arla/bin/mount_xfs /dev/xfs0 /afs
> > mount_xfs: mount: Operation not supported by device
> 
> This can be due to a number of reasons, the most common being using
> the wrong major number for /dev/xfs0.  Have you double-checked that
> it's correct?

yes, it is correct.  I tracked down the problem to mount_xfs.c, and
then created a patch (included at the end of this message) which improves
things significantly.  The hard-coded 17 is what was breaking things.
With this patch, you no longer need to run modload by hand, the call to
vfsload() takes care of everything.  The only limitation is that now the
xfs_mod.o file needs to be in a place where vfsload() can find it, namely
in the /lkm directory.  If you install this patch, you'll have to update
the instructions in the INSTALL file so that they reflect the new reality.


> rcsdiff -C3 mount_xfs.c
===================================================================
RCS file: RCS/mount_xfs.c,v
retrieving revision 1.1
diff -C3 -r1.1 mount_xfs.c
*** mount_xfs.c 1998/07/14 07:01:34     1.1
--- mount_xfs.c 1998/07/14 07:29:06
***************
*** 89,97 ****
        usage();
  
  #if defined(__FreeBSD__)
!     error = mount( /* XXX */ 17, argv[1], 0, argv[0]);
  #else
!     error = mount("xfs", argv[1], 0, argv[0]);
  #endif
  
      if (error != 0)
--- 89,113 ----
        usage();
  
  #if defined(__FreeBSD__)
!     {
!       struct vfsconf *vfc;
!       vfc = getvfsbyname("xfs");
!       /* if getvfsbyname fails the first time, then call vfsload.
!        */
!       if (!vfc && vfsisloadable("xfs")) {
!           if (vfsload("xfs")) {
!               err(1, "vfsload(xfs)");
!           }
!           endvfsent();
!           vfc = getvfsbyname("xfs");
!       }
!       if (!vfc) {
!           err(1,"xfs filesystem not available");
!       }
!       error = mount(vfc->vfc_index, argv[1], mntflags, argv[0]);
!     }
  #else
!     error = mount("xfs", argv[1], mntflags, argv[0]);
  #endif
  
      if (error != 0)







More information about the Arla-drinkers mailing list