LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB Storage with Kernel 2.6.7 acting very strangely and not mounting correctly (https://www.linuxquestions.org/questions/linux-hardware-18/usb-storage-with-kernel-2-6-7-acting-very-strangely-and-not-mounting-correctly-241421/)

animehair 10-11-2004 02:38 PM

USB Storage with Kernel 2.6.7 acting very strangely and not mounting correctly
 
I recently upgraded to 2.6.7 kernel in slackware 10. Previously in 2.4.27 kernel i had FSTAB setup to mount /dev/sda1 to a moint point, and in gnome i would click on the usb folder located in the computer icon and my kingston usb device would automatically mount. However now it seems that hotplug isnt handling the usb stick correctly. The first time i plug it in it mounts fine, but if i remove the usb device and stick it back in hotplug still thinks the first one is plugged in, and assigns the new usb device a new /dev point. I put a dmesg result below (i put the spaces in myself to make it easier to read). You will notice that my computer thinks i have more then one Kingston USB device plugged in even though I definatly dont. The more and more i unlplug it and plug it back in the more it adds scsi dev points.

I attribute this to how the new kernel uses hotplug and /dev points. Can anyone enlighten me on this situation please, and help me get back to easily mounting my usb devices in gnome? Thanks in advance.


usb 1-6: new high speed USB device using address 7
scsi5 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0
USB Mass Storage device found at 7
usb 1-6: USB disconnect, address 7
usb 1-5: new high speed USB device using address 8

scsi6 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi6, channel 0, id 0, lun 0
USB Mass Storage device found at 8
usb 1-5: USB disconnect, address 8
usb 1-6: new high speed USB device using address 9

scsi7 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi7, channel 0, id 0, lun 0
USB Mass Storage device found at 9
usb 1-6: USB disconnect, address 9
usb 1-6: new high speed USB device using address 10

scsi8 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi8, channel 0, id 0, lun 0
USB Mass Storage device found at 10

animehair 10-13-2004 07:04 AM

Ive been messing with UDEV a bit. My goal is to create a /dev symlink for my usb drive so that it can always be easily mounted with the proper fstab line, and using nautilius/gnome. However, I am noticing that although the device is showing under /sys/block/sda using udevinfo, Its not attaching to a /dev point according to my rules. In fact with the 2.4 kernel it would grab /dev/sda1, but now its not even doing this.

Im using http://www.reactivated.net/udevrules.php as a guide, and my rule is written like (actually im at my work... i actually use the serial number for the usb drive):

BUS="usb", SYSFS{manufacturer}="Kingston", KERNEL="sda1", NAME="%k",
SYMLINK="thumbdrive"

This should put my usb thumdrive at /dev/sda1 and /dev/thumbdrive as soon as its plugged in.

Im using a Kingston DataTraveler2.0
Slackware 10
UDEV - 035

thanks for any help.

geomatt 10-13-2004 10:17 AM

Seems like a sound approach. Lemme know how you make out. I just had a nightmare of a time getting my usb drive working under udev on Slack 10 with a 2.6.8 kernel. Your rule helped me get out of a problem - the kernel was refusing to admit that the usb device was indeed a block device. Every time I'd try mounting the node created by udev I'd get "/dev/usbstick is not a block device."

Here's my rule:
BUS="usb", KERNEL="sda*" SYSFS{serial}="serialNum", NAME="%k", SYMLINK="usbkey"

The missing link was the KERNEL key. I used the wildcard, since my whole reason for trying udev was because depending on which order I plugged usb devices in I'd end up with different device numbers, so I had to constantly rewrite the fstab.


cheers,
-geomatt


All times are GMT -5. The time now is 11:05 AM.