>>>Derek Atkins  said:
  > Quoting "Karl E. Kelley" <[EMAIL PROTECTED]>:
  > 
  > > I didn't want to try 1.4.0-rc5 on a system already running 1.4.0-rc7,
  > 
  > Well, you could try the 1.4.0 RPMs, as they've been finished.  However
  > the real point was to make sure that you could rebuild my RPMS on
  > x86_64 and that they would work.
  > 
  > Also, the 1.4.0 RPMS are done.  There's time to get changes into the
  > 1.4.1 RPMs....
  > 
  > >  - The openafs-client rc script doesn't provide the cache and afsd
  > >    configuration that the rc script that has been supplied with openafs
  > >    previously, and only provides 2 configuration parameters, AFSD_ARGS an
   > d
  > >    BOSSERVER_ARGS in /etc/sysconfig/openafs, not all the various paramete
   > r
  > >    settings for routines in /etc/init.d/afs, which I found very convenien
   > t
  > >    for providing a simple way to configure afsd.   I hope these are put
  > >    back in before 1.4.x goes GA.  If they don't, I will have to put them
  > >    back in myself and rebuild the rpms.
  > 
  > I dont understand what configuration you think you need that you
  > can't set in the AFSD_ARGS and BOSSERVER_ARGS.  Could you please
  > let me know?
  > 
  > >  - The README in the openafs-kernel-source is quite out of date as far
  > >    as telling how to install a rebuilt openafs kernel module, which is
  > >    obviouly different now the the openafs kernel modules are actually
  > >    being installed in /lib/modules, instead of in /usr/vice/etc/modload.
  > 
  > Can you send me a patch for this, or at least suggest better text?
  > There's also the "rpmbuild -bb --target=i686 openafs...src.rpm" to
  > build a kernel-module RPM for the currently-running kernel.
  > 
  > >  - to reiterate, the multiple openafs-kernel modules will cause a problem
  > >    with up2date, and I realize why that was done, but the only way I can
  > >    see is to put only the lowest kernel versions on the proxy server
  > >    and force everyone to recompile their own openafs kernel module for ne
   > wer
  > >    kernels, which isn't as good as it works now.
  > 
  > Why will this cause a problem with up2date?  Wont up2date already try
  > to install the most-recent kernel?  As I asked in my last email, how
  > does up2date deal with the redhat-distributed LKM RPMS?  Red hat must
  > have already solved this problem....
  > 
  > > Other than the above, openafs 1.4.0-rc5 seems to be working on:
  > >
  > > [EMAIL PROTECTED] uname -a
  > > Linux motley.ait.iastate.edu 2.6.9-22.EL #1 Mon Sep 19 18:20:28 EDT 
  > > 2005 i686 i686 i386 GNU/Linux
  > 
  > I was hoping to get an answer about x86_64, not x86.  But thanks.
  > 
  > -derek
  > 
  > -- 
  >        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  >        Member, MIT Student Information Processing Board  (SIPB)
  >        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
  >        [EMAIL PROTECTED]                        PGP key available
  > 
  > _______________________________________________
  > OpenAFS-info mailing list
  > [email protected]
  > https://lists.openafs.org/mailman/listinfo/openafs-info
  > 

As I briefly mentioned in the mail I sent regarding the aklog segment fault,
I have built openafs 1.4.0-rc8 using the openafs spec file setup, and
of course found the fatal aklog problem from the other thread, though
I knew almost immediately what the problem was, and patched it up.
I also patched the README and the openafs-client.init script the way I wanted
them to work, which means basically merging the original startup script 
with the one used by the spec file.  This also involves changing what
is put in /etc/sysconfig/openafs, and I have a patch for that also.

I finally got 1.4.0-rc8 working on my x86_64 box with the patches above.

The issue with up2date is that up2date will always want to install the 
latest version of an rpm, and you are providing multiple rpms with the
same name with different versions and releases,  By default up2date is 
configured NOT to install kernel rpms without manual interaction of some
sort.  It is very common to have systems updated with everything but the
kernel rpms.  Since the openafs-kernel rpms require specific kernel versions,
the latest openafs-kernel rpm might well be higher in version than the
installed kernel.  This will cause up2date to get an error when it
tries to install the latest openafs-kernel rpm.  This may not be
a really bad problem if only these rpms are involved, but very often
redhat has updated other rpms, and if 'up2date -u' is invoked, it will
try to build a single rpm install stream, and if anything fails in it,
everything fails.  There are other ways to get around this problem, though
they involve a lot of manual interaction. 

I hope this clarifies things a bit, I would like to try actually putting
the new rpm structure on our proxy server, but because is only a proxy 
server, it is overly complicated because we only have partial control
over it, since Redhat still manages the database for it.  I may try later
to do so, but I just don't have time to do it now.

I'm attaching the 3 patches to this mail.

Karl Kelley


--

--- SOURCES/openafs-README.orig	2002-05-12 12:47:51.000000000 -0500
+++ SOURCES/openafs-README	2005-10-31 09:19:27.000000000 -0600
@@ -2,28 +2,38 @@
 and the SUN ONC RPC license, with are included in the files
 LICENSE.IBM and LICENSE.Sun in the same directory as this README.
 
-To build the AFS kernel module on a local system, run:
+To build the AFS kernel module on a Red Hat Enterprise Linux 4 system,
+you first need to install the 'kernel-devel' RPM package for the version
+of the kernel you are running. Then run:
 
-    ./configure
+    cd /usr/src/openafs-<openafs-version>/src
+    ./configure --with-linux-kernel-headers=/usr/src/kernels/VERSION
     make
 
-When it's done, the binary module will be src/MODLOAD-XXX/libafs-XXX.o
+where VERSION corresponds to the version of the kernel you want to build 
+the module for. (e.g. 2.6.9-5.0.3.ELsmp-x86_64)
+
+
+When it's done, the binary module will be src/libafs/MODLOAD-XXX/openafs.ko
 and must be manually installed for your kernel.  To do this you
-generally copy the file to /usr/vice/etc/modload:
+generally copy the file to /lib/modules/<kernel-version>/fs/openafs/:
+
+Note that the openafs directory may need to be created:
+    mkdir /lib/modules/<kernel-version>/fs/openafs
+
+    cp src/libafs/MODLOAD-XXX/openafs.ko /lib/modules/<kernel-version>/fs/openafs/openafs.ko
+
+(where <kernel-version> is the value of 'uname -r'  e.g. 2.6.9-5.0.3.ELsmp )
+
+You should also strip the debugging symbols from the resulting module, 
+else it will be vastly oversized:
+
+    chmod 744 /lib/modules/<kernel-version>/fs/openafs/openafs.ko
+    strip -g /lib/modules/<kernel-version>/fs/openafs/openafs.ko
+
+Now run depmod to rebuild modules.dep et. al.
 
-    cp src/MODLOAD-XXX/libafs-XXX.o /usr/vice/etc/modload/
+    depmod -ae
 
-Then you need to add this module to your SymTable by using "afsmodname"
-to generate a new SymTable:
+Then you can reboot to activate the new openafs kernel module.
 
-    cd /usr/vice/etc/modload
-    ../afsmodname -f SymTable.local -g libafs-XXX.o
-
-NOTE: This only works if you have your kernel compiled with symbol
-version support.  Without symbol version support you will not be able
-to choose kernel modules.  If you compile without kernel module
-support then you need to remove the SymTable file from
-/usr/vice/etc/modload to allow the init scripts to choose a module
-based on 'uname -r' instead of /proc/ksyms.  Keep in mind that using
-/proc/ksyms is MUCH better, so it is NOT recommended to use this
-method!
--- SOURCES/openafs-client.init.orig	2005-09-15 09:51:29.000000000 -0500
+++ SOURCES/openafs-client.init	2005-10-28 14:53:11.000000000 -0500
@@ -10,6 +10,94 @@
 . /etc/init.d/functions
 [ -f /etc/sysconfig/openafs ] && . /etc/sysconfig/openafs
 
+CACHEINFO=${CACHEINFO:-/usr/vice/etc/cacheinfo}
+CACHE=${CACHEDIR:-/usr/vice/cache}
+AFS=${AFSDIR:-/afs}
+
+# is_on returns 1 if value of arg is "on"
+is_on() {
+        if  test "$1" = "on" ; then return 0
+        else return 1
+        fi
+}
+
+on_network() {
+    ADDRS=`LANG=C ifconfig -a | grep 'inet addr' | grep -v 127.0.0.1 | wc -l`
+    if [ "$ADDRS" = "" ]; then
+       echo openafs: No interfaces with IP address 1>&2
+       return 1
+    elif [ $ADDRS = 0 ]; then
+       echo openafs: No interfaces with IP address 1>&2
+       return 1
+    fi
+    return 0
+}
+
+generate_cacheinfo() {
+    if [ "$CACHESIZE" = "AUTOMATIC" ]; then
+        LINE=`df -k $CACHE | tail -1`
+        PART=`echo $LINE | awk '{ if ( ($NF != "/usr")  && ($NF != "/") ) print
+$NF; else print "NONE";}'`
+
+        # Check to see if df has pretty-printed for long dev (i.e. LVM)
+        FCHAR=`echo $LINE | cut -c 1`
+        if [ "$FCHAR" = "/" ]; then
+            PARTSIZE=`echo $LINE | awk '{print $2}'`
+            PARTFREE=`echo $LINE | awk '{print $4}'`
+        else
+            PARTSIZE=`echo $LINE | awk '{print $1}'`
+            PARTFREE=`echo $LINE | awk '{print $3}'`
+        fi
+        if [ "$PART" = "NONE" ]; then
+
+            # Check to see that at least 200 MB are free
+            if [ $PARTFREE -lt 200000 ]; then
+                echo "$CACHE or /usr/vice is not a separate partition"
+                echo "The partition containing $CACHE has <200 MB free"
+                echo "Please add a separate partition for AFS cache, or set the
+cache size"
+                echo "manually in /etc/sysconfig/openafs"
+                echo "The openafs-client is not starting."
+                exit 1
+            else
+                CACHESIZE=100000
+            fi
+        else
+            CACHESIZE=`echo $PARTSIZE | awk '{printf "%d",int(($1*.8)/1000)*1000}'`
+        fi
+    fi
+    if [ "x$CACHESIZE" != "x" ]; then
+        echo $AFS:$CACHE:$CACHESIZE >$CACHEINFO
+        chmod 0644 $CACHEINFO
+    else
+        CACHESIZE=`awk -F: '{print $3}' < $CACHEINFO`
+    fi
+}
+
+choose_afsdoptions() {
+        if [ -z "$OPTIONS" -o "$OPTIONS" = "AUTOMATIC" ]; then
+                if [ $CACHESIZE -lt 131072 ]; then
+                        OPTIONS=$SMALL
+                elif [ $CACHESIZE -lt 524288 ]; then
+                        OPTIONS=$MEDIUM
+                elif [ $CACHESIZE -lt 1048576 ]; then
+                        OPTIONS=$LARGE
+                elif [ $CACHESIZE -lt 2097152 ]; then
+                        OPTIONS=$XLARGE
+                else
+                        OPTIONS=$XXLARGE
+                fi
+        fi
+        AFSD_OPTIONS="$OPTIONS $VERBOSE"
+        if is_on $ENABLE_AFSDB; then
+                AFSD_OPTIONS="$AFSD_OPTIONS -afsdb"
+        fi
+        if is_on $ENABLE_DYNROOT; then
+                AFSD_OPTIONS="$AFSD_OPTIONS -dynroot"
+        fi
+}
+
+
 
 start() {
 	echo -n $"Starting openafs-client: "
@@ -19,6 +107,9 @@
 		echo
 		return 1
 	fi
+        if [ `echo "$AFSD_OPTIONS" | grep -c dynroot` = 0 ]; then
+            on_network || return 1
+        fi
 	modprobe openafs
 	RETVAL=$?
 	if [ $RETVAL -ne 0 ] ; then
@@ -27,7 +118,13 @@
 		echo
 		return $RETVAL
 	fi
-	/usr/vice/etc/afsd $AFSD_ARGS
+	generate_cacheinfo
+	if [ -z "$AFSD_ARGS" ] ; then
+        	choose_afsdoptions
+		/usr/vice/etc/afsd ${AFSD_OPTIONS}
+	else
+		/usr/vice/etc/afsd $AFSD_ARGS
+	fi
 	RETVAL=$?
 	echo
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/openafs-client
--- SOURCES/openafs.sysconfig.orig	2005-09-11 20:06:44.000000000 -0500
+++ SOURCES/openafs.sysconfig	2005-10-28 14:54:41.000000000 -0500
@@ -1,3 +1,102 @@
+#! /bin/sh
+# Copyright 2000, International Business Machines Corporation and others.
+# All Rights Reserved.
+# 
+# This software has been released under the terms of the IBM Public
+# License.  For details, see the LICENSE file in the top-level source
+# directory or online at http://www.openafs.org/dl/license10.html
+
+############################################################################
+# On most linuces copy this file to
+#        /etc/sysconfig/afs
+# so afs.rc can use it as config file.
+############################################################################
+
+# Configuration information for AFS client
+
+# ENABLE_AFSDB and ENABLE_DYNROOT determine whether AFSDB support and
+# Dynroot support (dynamically generated /afs), respectively, should be
+# enabled in the AFS client.
+ENABLE_AFSDB=on
+ENABLE_DYNROOT=on
+
+# AFS client configuration options:
+# ---------------------------------------------------------------------------
+# possible AFS client afsd configuration options (from 1.3.74) are
+#      -blocks     The number of blocks available in the workstation cache.
+#      -files      The target number of files in the workstation cache (Default:
+#                  1000).
+#      -rootvol            The name of the root volume to use.
+#      -stat       The number of stat cache entries.
+#      -hosts      List of servers to check for volume location info FOR THE
+#                  HOME CELL.
+#      -memcache   Use an in-memory cache rather than disk.
+#      -cachedir    The base directory for the workstation cache.
+#      -mountdir   The directory on which the AFS is to be mounted.
+#      -confdir    The configuration directory .
+#      -nosettime  Don't keep checking the time to avoid drift.
+#      -verbose     Be chatty.
+#      -debug     Print out additional debugging info.
+#      -kerndev    [OBSOLETE] The kernel device for AFS.
+#      -dontfork   [OBSOLETE] Don't fork off as a new process.
+#      -daemons   The number of background daemons to start (Default: 2).
+#      -rmtsys    Also fires up an afs remote sys call (e.g. pioctl, setpag)
+#                 support daemon
+#      -chunksize [n]   2^n is the chunksize to be used.  0 is default.
+#      -dcache    The number of data cache entries.
+#      -biods     Number of bkg I/O daemons (AIX3.1 only)
+#      -prealloc  Number of preallocated "small" memory blocks
+#      -pininodes Number of inodes which can be spared from inode[] for
+#                 pointing at Vfiles.  If this is set too high, you may have
+#                 system problems, which can only be ameliorated by changing
+#                 NINODE (or equivalent) and rebuilding the kernel.
+#                 This option is now disabled.
+#      -logfile   Place where to put the logfile (default in <cache>/etc/AFSLog.
+#      -waitclose make close calls always synchronous (slows em down, tho)
+#      -files_per_subdir [n]   number of files per cache subdir. (def=2048)
+#      -shutdown  Shutdown afs daemons
+# ---------------------------------------------------------------------------
+XXLARGE="-fakestat -stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+XLARGE="-fakestat -stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+LARGE="-fakestat -stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+MEDIUM="-fakestat -stat 2000 -dcache 800 -daemons 3 -volumes 70"
+SMALL="-fakestat -stat 300 -dcache 100 -daemons 2 -volumes 50"
+
+# cachesize and according options are set by /afs/rc.d/init.d/afs
+#   * if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
+#     deduced by parition sizes (does not work if your cache is on / or /usr)
+#   * if you set OPTIONS to "AUTOMATIC", the init script will choose a set
+#     of options based on the cache size
+# otherwise the values specified here will be used. So be careful!
+# Note: if you leave these as-is, no changes are made.
+CACHESIZE=AUTOMATIC
+#CACHESIZE=50000
+OPTIONS=AUTOMATIC
+#OPTIONS=$SMALL
+
+# force startup script to wait for salvage to finish before proceeding
+# with machine boot
+WAIT_FOR_SALVAGE=no
+
+# you should never need to change these settings
+AFSDIR=/afs
+CACHEDIR=/usr/vice/cache
+CACHEINFO=/usr/vice/etc/cacheinfo
+
+# Set to "-verbose" for a lot of debugging information from afsd. Only
+# useful for debugging as it prints _a lot_ of information.
+VERBOSE=
+
+# Sample server preferences function. Set server preferences using this.
+# afs_serverprefs() {
+#    /usr/afsws/etc/fs setserverprefs <host> <rank>
+#}
+
+# Either the name of an executable script or a set of commands go here.
+# AFS_POST_INIT=afs_serverprefs
+AFS_POST_INIT=
+
+# Overrides for the above
 # OpenAFS Client Configuration
 AFSD_ARGS=
 
Karl E. Kelley                     <[EMAIL PROTECTED]>
Systems Programmer                 
Iowa State University Information Technology Services   Phone (515) 294-0005
Ames, Iowa 50011

Reply via email to