[OpenAFS-devel] OpenAFS for FreeBSD 5.2 patch
Garance A Drosihn
drosih@rpi.edu
Wed, 10 Mar 2004 00:03:38 -0500
At 10:08 PM -0500 3/9/04, Garrett Wollman wrote:
><<On Tue, 9 Mar 2004, Garance A Drosihn <drosih@rpi.edu> said:
>
>> I don't understand this comment. Everything for my kernel is
>> under /usr/src/sys... Or do you mean I have to build openafs
>> under /usr/src/sys?
>
>Actually, the real issue (which the patches don't address at all) is
>that you absolutely must build the kernel parts of OpenAFS (or any
>kernel module, for that matter) against the correct kernel option
>headers for the kernel you plan to use. The Makefile simply assumes
>that you are using GENERIC (or are sufficiently similar to GENERIC
>as makes no difference). If you dig into the Makefile you will see an
>explicit reference to sys/${arch}/compile/GENERIC; you need to update
>that to point to wherever your kernel was compiled.
Well, if it was doing that, then who knows *what* set of options
I was compiling it with the last time!
Well, I had just gone through a buildworld/buildkernel cycle, and
I have nothing under /usr/src/sys/i386/compile . It looks like my
opt_global.h file is sitting at:
/usr/obj/usr/src/sys/Dual-Athlon2k/opt_global.h
And I have a 'cvs checkout' of the present openafs source sitting
at /usr/cvs/openafs. So, this time I did:
cd /usr/src/sys
rm -Rf openafs
cp -rp /usr/cvs/openafs .
cd openafs
export MAKE=/usr/local/bin/gmake
patch -p0 </root/rees-fbsd.diff
vi +/GENERIC src/libafs/MakefileProto.FBSD.in
# in my case, I changed the line:
-I${KSRC}/i386/compile/GENERIC -include opt_global.h ...
# to
-I/usr/obj/usr/src/sys/Dual-Athlon2k -include opt_global.h ...
./regen.sh
./configure --with-afs-sysname=i386_fbsd_52 --enable-transarc-paths
gmake
gmake install
cd /usr/vice/etc
cp -p libafs.ko /boot/kernel
# and then setup ThisCell, CellServDB, cacheinfo,
# and maybe config/afsd.options as appropriate for
# the local machine & AFS cell. My cacheinfo is the
# line: '/afs:/usr/vice/cache:100000', so I then:
mkdir /afs
chmod 755 /afs
mkdir /usr/vice/cache
chmod 700 /usr/vice/cache
sync ; sleep 2 ; sync
# I 'umount' any UFS partitions that I don't need right now,
# just in case this panics... :-)
kldload libafs.ko
/usr/local/sbin/afsd -stat 1200 -dcache 800 -daemons 3 -volumes 70
And it seemed to come up okay! I then did a:
cd /afs
ls -ltr
and it paniced. But I think that's because the CellServDB file
that I'm using does not match the root.cell for rpi.edu. I'll
do some more testing.
(the Panicstring was: "getnewvnode: free vnode isn't"
but at the moment I'm thinking that might be my fault)
--
Garance Alistair Drosehn = gad@gilead.netel.rpi.edu
Senior Systems Programmer or gad@freebsd.org
Rensselaer Polytechnic Institute or drosih@rpi.edu