Coda File System

Re: NetBSD 1.6 hanging on venus startup

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: 03 Jan 2003 18:57:17 -0500
Good point.  I had forgotten that it was odd not to have an fstab
entry in the first place.  Looking at the arla startup script, it
loads kernel modules (coda is static in the kernel, so that's not
needed), mounts /afs with 'mount_xfs', and then starts arlad.

Two points arise: mount_xfs is called first, so presumably it doesn't
need arlad, but this could certainly be swapped.  And, it would be
nice to be able to mount/unmount /coda indepently of venus, even if
one needed a servicing venus to be present.  This could ease running
multiple venii.  I append the arla startup script.

        Greg Troxel <gdt_at_ir.bbn.com>

#!/bin/sh
#
# A simple startupscript to start arla for *BSD.
# 
# You must have a path that includes, modload, ld, 
# mount_xfs, and arlad.
#
# $Id: startarla.in,v 1.18.2.5 2001/07/11 20:12:32 mattiasa Exp $
#


PATH=/sbin:/usr/sbin:/usr/bin:/bin
SBINDIR=/usr/pkg/sbin
LKMDIR=/usr/pkg/lkm
CACHEDIR=/usr/pkg/cache
LIBEXECDIR=/usr/pkg/libexec
VARDB=/var/db

if [ ! -e $CACHEDIR ] ; then
   mkdir $CACHEDIR
   chmod 700 $CACHEDIR
   chown root $CACHEDIR
fi

if test -f  $LKMDIR/xfs.ko; then
  if test ! -c /dev/xfs0; then
    mknod /dev/xfs0 c 128 0
  fi
  kldload $LKMDIR/xfs.ko
elif test -x /sbin/kmodload; then
  rm -f $VARDB/xfs_sym
  kmodload -o $VARDB/xfs_sym $LKMDIR/xfs_mod.o
  kmodstat > $VARDB/xfs_modstat 2>&1
elif test -x /sbin/sysconfig; then
  /sbin/sysconfig -c xfs
  if test ! -c /dev/xfs0; then
    SYSCALL=`/sbin/sysconfig -q xfs major | awk '{print $3}'`
    mknod /dev/xfs0 c ${SYSCALL} 0
  fi
elif test -x /sbin/modload; then
  rm -f $VARDB/xfs_sym
  modload -o $VARDB/xfs_sym -e xfs_mod -p $SBINDIR/xfs_makedev \
	$LKMDIR/xfs_mod.o
  modstat > $VARDB/xfs_modstat 2>&1
else
  echo "Couldn't figure out how to load your kernel module"
  exit 1
fi
test -d /afs || mkdir /afs
${SBINDIR}/mount_xfs /dev/xfs0 /afs
${LIBEXECDIR}/arlad -z /dev/xfs0
Received on 2003-01-03 19:01:39