'bad address' when loading kernel module

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

'bad address' when loading kernel module

tjmitchem
/etc/init.d/mhvtl start

FATAL: Error inserting mhvtl (/lib/modules/2.6.18-128.el5/kernel/drivers/scsi/mhvtl.ko): Bad address
No kernel module loaded to feed these daemons.

Need mhvtl kernel module version at least 0.18.11

Did you remember to compile the 'mhvtl' kernel module ?

Please see http://sites.google.com/site/linuxvtl2/


The module shows version 0.8.15

Any suggestions?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: 'bad address' when loading kernel module

Mark Harvey
Administrator
Can you provide the following information please:

Output of the following command:
# lsmod | grep mhvtl
# ls -l /lib/modules/`uname -r`/kernel/drivers/scsi/mhvtl.ko
# file /lib/modules/`uname -r`/kernel/drivers/scsi/mhvtl.ko
# modinfo /lib/modules/`uname -r`/kernel/drivers/scsi/mhvtl.ko
# uname -a
# modprobe -a mhvtl opts=0

Thanks
Regards from Australia
Mark Harvey
Reply | Threaded
Open this post in threaded view
|

Re: 'bad address' when loading kernel module

tjmitchem
I just figured it out Mark, and I've now had my 'stupid moment' for the day

I need to pay more attention.  The error was basically 'module already loaded'.  Everything is fine now, so all I need to do is concentrate on seting up iSCSI.

Thanks,
Terrence Mitchem

Terrence_Mitchem@symantec.com
terrence.mitchem@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: 'bad address' when loading kernel module

Mark Harvey
Administrator
The 'rc' script is supposed to check for a loaded kernel module and not attempt to re-load it..

FATAL: Error inserting mhvtl (/lib/modules/2.6.18-128.el5/kernel/drivers/scsi/mhvtl.ko): Bad address
The .el5 indicates a RedHat 5.<something> box..

Care to elaborate on how to reproduce the error ?

The error message you pasted is coming from the rc script..
I'd like to fix any startup script to be smarter.

If I get a chance, I'll run up a RH5 box and see if I can reproduce..

Setting up iSCSI
Quick overview:
- "lsscsi -g" and identify your '/dev/sgXX' to export via iSCSI
- Compile & install SCSI Target Framework (http://stgt.sourceforge.net/) - Don't use the OS supplied one, it will be way out of date..
- Create / edit /etc/tgt/targets.conf to look something like below..
(you can create one target and add all LUNs to that or multiple targets with one LUN each - or a combo of both.)
  ==================
<target iqn.2008-09.com.mhvtl75.nbusyd.com.au:mhvtl.target2>

       device-type pt
       bs-type sg

       backing-store /dev/sg3
       backing-store /dev/sg4
       backing-store /dev/sg5
       backing-store /dev/sg6

       allow-in-use yes
</target>
  ==================
Use 'tgtadm --op show --mode target' to display the scsi target configuration.
Regards from Australia
Mark Harvey
Reply | Threaded
Open this post in threaded view
|

Re: 'bad address' when loading kernel module

tjmitchem
I'm not having any luck reproducing it :(

I think this was a case of me having an old version of the kernel mod loaded (from 1.3) when I tried to install the new package.

A reboot fixed everything.

Thanks for the iSCSI info.

Reply | Threaded
Open this post in threaded view
|

Re: 'bad address' when loading kernel module

yushulinfeng
In reply to this post by tjmitchem
In my test environment,I update the kernel and then after reboot,I successfully installed scst,but when I install mhvtl,in the kernel directory,I execute make distclean,make && make install,but unfortunately,I got the error message:
FATAL:Error inserting mhvtl (/lib/modules/2.6.32/kernel/drivers/scsi/mhvtl.ko):Bad address.

so,what's your sollution to solve this.can you tell me the may to fix it?thank you.