Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: hasan on June 02, 2009, 08:48:22 AM

Title: USB Storage Module
Post by: hasan on June 02, 2009, 08:48:22 AM
Hello All,
          Recently I removed usb-storage drives on some machines in my network using the code 
Code: [Select]
ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root

Now I want to re-enable usb on these machines, so I copied back the usb-storage.ko from /root to the /lib/modules/$(uname -r)/kernel/drivers/usb/storage, but its not working and I do not knwo what to do.

Is there any way I can reinstall the driver.

Please help

Regards
Hasan
Title: Re: USB Storage Module
Post by: cactus on June 02, 2009, 09:28:44 AM
Hello All,
          Recently I removed usb-storage drives on some machines in my network using the code 
Code: [Select]
ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root

Now I want to re-enable usb on these machines, so I copied back the usb-storage.ko from /root to the /lib/modules/$(uname -r)/kernel/drivers/usb/storage, but its not working and I do not knwo what to do.

Is there any way I can reinstall the driver.
Why would you do such a thing? You probably need to reload the drivers, perhaps this might work:

Code: [Select]
depmod -a
modprobe usb-storage

After that scroll trough the output of below command to see if it is loaded:
Code: [Select]
dmesg | more
Title: Re: USB Storage Module
Post by: hasan on June 02, 2009, 11:54:27 AM
Hello Cactus,
           I was trying to disable all the usb devices in the LAN and while searching on net I got the link http://www.cyberciti.biz/faq/linux-disable-modprobe-loading-of-usb-storage-driver/ .

But now I have to enable usb device on some machines which I don't have any clue of how to do.

Also appreciate your help, but it didn' work.

I got this message in the

dmesg | more

Code: [Select]
usb 1-7: new high speed USB device using ehci_hcd and address 3
usb 1-7: configuration #1 chosen from 1 choice
usb 1-7: New USB device found, idVendor=058f, idProduct=6387
usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-7: Product: Mass Storage Device
usb 1-7: Manufacturer: JetFlash
usb 1-7: SerialNumber: B4CNE8A6

Regards
Hasan
Title: Re: USB Storage Module
Post by: cactus on June 02, 2009, 11:56:23 AM
Also appreciate your help, but it didn' work.
Not? How are you reading below information then?

dmesg | more

Code: [Select]
usb 1-7: new high speed USB device using ehci_hcd and address 3
usb 1-7: configuration #1 chosen from 1 choice
usb 1-7: New USB device found, idVendor=058f, idProduct=6387
usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-7: Product: Mass Storage Device
usb 1-7: Manufacturer: JetFlash
usb 1-7: SerialNumber: B4CNE8A6
AFAIK that is the detection of a USB mass storage device.
Title: Re: USB Storage Module
Post by: hasan on June 02, 2009, 12:00:57 PM
Hello Cactus,
             Yeah thats the whole problem, dmesg is showing it but when I am doing fdisk -l
it is not detected
Code: [Select]
[root@hasan ~]# /sbin/fdisk  -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90909090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26       19457   156087540   8e  Linux LVM
[root@hasan ~]#
/dev/sda is my hard drive.

the usb is missing ...


Don't know wat to do
Title: Re: USB Storage Module
Post by: cactus on June 02, 2009, 12:04:35 PM
Don't know wat to do
Most likely the drive is not automatically mounted. I think you will find some clues here: http://wiki.contribs.org/USBDisks
Title: Re: USB Storage Module
Post by: hasan on June 02, 2009, 12:12:08 PM
Thanks Cactus for the link,
              but it didn't help as the information regarding enabling of usbs is not present.

Regards
Hasan
Title: Re: USB Storage Module
Post by: cactus on June 02, 2009, 12:19:44 PM
Thanks Cactus for the link,
              but it didn't help as the information regarding enabling of usbs is not present.
I told you you already have your drivers loaded, otherwise your drive would not be detected.
Now you need to configure your server to mount your drive, this information is in the link I provided you, especially the sections on identifying your drive should get you running.
Title: Re: USB Storage Module
Post by: CharlieBrady on June 02, 2009, 10:33:09 PM
AFAIK that is the detection of a USB mass storage device.

That's the detection of the usb device. That doesn't show loading of the usb-storage module, or registration of the new device with that module.

If Hasan hasn't rebooted, I'd at least recommend doing that. I'd also recommend:

rpm -V kernel kernel-smp
Title: Re: USB Storage Module
Post by: CharlieBrady on June 02, 2009, 10:34:29 PM
          Recently I removed usb-storage drives on some machines in my network

Please promise that you won't do that again.
Title: Re: USB Storage Module
Post by: hasan on June 03, 2009, 07:48:46 AM
Hi Charlie,
      Thanks for the help and suggestions.
I rebooted my machine, and wen I do
rpm -V kernel kernel-smp
I get the following output
Code: [Select]
root /home/hasan/Desktop #  rpm -V kernel kernel-smp
.......T    /lib/modules/2.6.27.12-170.2.5.fc10.i686/kernel/drivers/usb/storage/usb-storage.ko
.......T    /lib/modules/2.6.27.12-170.2.5.fc10.i686/modules.alias.bin
.......T    /lib/modules/2.6.27.12-170.2.5.fc10.i686/modules.dep.bin
.......T    /lib/modules/2.6.27.12-170.2.5.fc10.i686/modules.symbols.bin
S.5....T    /lib/modules/2.6.27.15-170.2.24.fc10.i686/kernel/drivers/usb/storage/usb-storage.ko
.......T    /lib/modules/2.6.27.15-170.2.24.fc10.i686/modules.alias.bin
S.5....T    /lib/modules/2.6.27.15-170.2.24.fc10.i686/modules.dep.bin
S.5....T    /lib/modules/2.6.27.15-170.2.24.fc10.i686/modules.symbols.bin
S.5....T    /lib/modules/2.6.27.21-170.2.56.fc10.i686/kernel/drivers/usb/storage/usb-storage.ko
.......T    /lib/modules/2.6.27.21-170.2.56.fc10.i686/modules.alias.bin
S.5....T    /lib/modules/2.6.27.21-170.2.56.fc10.i686/modules.dep.bin
S.5....T    /lib/modules/2.6.27.21-170.2.56.fc10.i686/modules.symbols.bin
S.5....T    /lib/modules/2.6.27.24-170.2.68.fc10.i686/kernel/drivers/usb/storage/usb-storage.ko
S.5....T    /lib/modules/2.6.27.24-170.2.68.fc10.i686/modules.alias.bin
S.5....T    /lib/modules/2.6.27.24-170.2.68.fc10.i686/modules.dep.bin
S.5....T    /lib/modules/2.6.27.24-170.2.68.fc10.i686/modules.symbols.bin
package kernel-smp is not installed
root /home/hasan/Desktop # 


so though the machine is detecting the usb but still its not loading it

Thanks and Regards

Title: Re: USB Storage Module
Post by: Stefano on June 03, 2009, 07:53:37 AM
Quote
2.6.27.24-170.2.68.fc10.i686

this is  not SME's kernel.. why are you using fc10 one?

Stefano
Title: Re: USB Storage Module
Post by: hasan on June 03, 2009, 07:58:01 AM
Hey Stefano ,
             I am using FC10 in my LAN and using sme as my server.

So this problem of usb occurred on my LAN and not in on my SME.

Regards
Hasan
Title: Re: USB Storage Module
Post by: Stefano on June 03, 2009, 08:54:10 AM
Hey Stefano ,
             I am using FC10 in my LAN and using sme as my server.

So this problem of usb occurred on my LAN and not in on my SME.

Regards
Hasan

ops.. I didn't see we are in "general discussion" :-)

anyway, you should ask in fedora's forum, even if Charlie's and Cactus' advices are good.. :-)

Ciao
Stefano
Title: Re: USB Storage Module
Post by: cactus on June 03, 2009, 09:25:32 AM
ops.. I didn't see we are in "general discussion" :-)
I had not noticed either and was assuming we were on SME Server as well... but hey it is linux :-)
Title: Re: USB Storage Module
Post by: hasan on June 03, 2009, 10:47:58 AM
hahaha  :P I guess everybody got confused ..... sorry ... I shud have mentioned that in the very beginning ....

but yeah as well said sme is also Linux so no issues a such.

Hasan
Title: Re: USB Storage Module
Post by: hasan on August 15, 2009, 03:09:34 PM
hey after a long time i got a fix i guess
Code: [Select]
http://www.cyberciti.biz/faq/linux-disable-modprobe-loading-of-usb-storage-driver/

Author: Mohanraj Subramaniam
Comment:
insert the module by using insmod command.

insmod /lib/modules/$(uname -r)/kernel/drivers/usb/storage/
modprobe usb-storage.ko