[OpenAFS-devel] Can't load kernel module on custom Linux 6.5.2

Cheyenne Wills cwills@sinenomine.net
Tue, 5 Nov 2024 07:32:43 -0700


The in-kernel AFS is different entity from OpenAFS and the two will
conflict with each other.

If you are trying to use OpenAFS, make sure that the kernel AFS module
is not loaded

Check the kernel .config to see if CONFIG_AFS_FS=y (the kernel AFS
module is built into the kernel.  Or if CONFIG_AFS_FS=m (the kernel AFS
module is loadable) and if kafs.ko is loaded (lsmod|grep kafs).  Either
of these situations will conflict with openAFS's kernel module. 

Other things to check:

Check the OpenAFS configure and build logs to ensure that the kernel
module was built cleanly.

After installing the OpenAFS kernel module (openafs.ko) to the
appropriate directory, make sure that you run a depmod -a.  You can
manually do a modprobe openafs to see if the kernel module loads (check
dmesg for any errors), then you can do a rmmod to unload the kernel
module. 

If you are still having problems, post the kernel level you are trying
to build.  Just be aware that Linux 6.12-rc will require some patches
that I haven't yet pushed to gerrit.

-- 
Cheyenne Wills
cwills@sinenomine.net



On Tue, 5 Nov 2024 04:17:36 +0000
Ben Huntsman <ben@huntsmans.net> wrote:
> Hi Ben-
>    Thank you for the reply!  I posted this on behalf of a colleague.
> It was determined that this was due to the user not building the
> kernel with the AFS Support option.
> 
> Thank you!!
> 
> -Ben
> 
> ________________________________
> From: Benjamin Kaduk <kaduk@mit.edu>
> Sent: Monday, November 4, 2024 7:52 PM
> To: Ben Huntsman <ben@huntsmans.net>
> Cc: openafs-devel@openafs.org <openafs-devel@openafs.org>
> Subject: Re: [OpenAFS-devel] Can't load kernel module on custom Linux
> 6.5.2
> 
> To answer the question as stated, no, I have not seen this myself.
> But ...
> 
> On Tue, Nov 05, 2024 at 01:07:22AM +0000, Ben Huntsman wrote:
> > Hi there-
> >    This is totally unrelated to my previous e-mail regarding
> > FreeBSD.
> >
> >    Has anyone seen this error on Linux:
> >
> > # insmod openafs.ko
> > insmod: ERROR: could not insert module openafs.ko: Device or
> > resource busy
> 
> There is sometimes some more helpful information in the dmesg output;
> is there anything relevant there?
> 
> -Ben
> 
> >
> >    This is on a "custom" Linux system not based on
> > RHEL/SLES/Ubuntu/Debian.  The architecture is amd64, the kernel is
> > 6.5.2, and the configure options were --enable-transarc-paths
> > --with-linux-kernel-packaging
> >
> >    The kernel was recently recompiled to eliminate that as an issue
> > also.
> >
> > Thank you!
> >
> > -Ben
> >
> >