[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

USB Floppy drive behavior with udev??? (long)



Hello.

I'm trying to get an understanding of udev and a usb floppy drive I have.
The drive is a Mitsumi usb floppy sold under the Nexxtech name and it
does work but there are a couple of behaviors that I don't understand.
First, without any udev rule mods, plugging the drive in results in a long
wait while 7 /dev/sd? are mounted at /media/usbdisk(s), usbdisk, usbdisk-1
thru usbdisk-6.  All are active and can be used.

/dev/sdh on /media/usbdisk type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8) /dev/sdi on /media/usbdisk-1 type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8) /dev/sdj on /media/usbdisk-2 type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8) /dev/sdk on /media/usbdisk-3 type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8) /dev/sdl on /media/usbdisk-4 type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8) /dev/sdm on /media/usbdisk-5 type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8) /dev/sdn on /media/usbdisk-6 type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8)


If I use one of the udev rules below there is only one mount at /media/usbdisk.

-------------------------------------------------------------------
##udev local rules  /etc/udev/rules.d/010_local.rules

##Using SUBSYSTEM(S) block, scsi attributes
#SUBSYSTEM=="block",SUBSYSTEMS=="scsi",DRIVERS=="sd", ATTRS{model}=="USB FDD 061M",NAME="NX_scsiflop"
#or
## Using SUBSYSTEM(S) block,usb
SUBSYSTEM=="block",SUBSYSTEMS=="usb",DRIVERS=="usb",ATTRS{model}=="MITSUMI USB FDD 061M",NAME="NX_usbflop"
-------------------------------------------------------------------
And the mount for the 'usb' rule above:

/dev/NX_usbflop on /media/usbdisk type vfat (rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8)

The relevant log report:

-----------------------------------------------------------------------------------------
usb 1-7: new full speed USB device using ohci_hcd and address 35
usb 1-7: configuration #1 chosen from 1 choice
scsi36 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 35
usb-storage: waiting for device to settle before scanning
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdg: 2880 512-byte hdwr sectors (1 MB)
sdg: Write Protect is off
sdg: Mode Sense: 00 46 02 00
sdg: assuming drive cache: write through
SCSI device sdg: 2880 512-byte hdwr sectors (1 MB)
sdg: Write Protect is off
sdg: Mode Sense: 00 46 02 00
sdg: assuming drive cache: write through
 sdg: unknown partition table
sd 36:0:0:0: Attached scsi removable disk sdg
sd 36:0:0:0: Attached scsi generic sg6 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdh: 2880 512-byte hdwr sectors (1 MB)
sdh: Write Protect is off
sdh: Mode Sense: 00 46 02 00
sdh: assuming drive cache: write through
SCSI device sdh: 2880 512-byte hdwr sectors (1 MB)
sdh: Write Protect is off
sdh: Mode Sense: 00 46 02 00
sdh: assuming drive cache: write through
 sdh: unknown partition table
sd 36:0:0:1: Attached scsi removable disk sdh
sd 36:0:0:1: Attached scsi generic sg7 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdi: 2880 512-byte hdwr sectors (1 MB)
sdi: Write Protect is off
sdi: Mode Sense: 00 46 02 00
sdi: assuming drive cache: write through
SCSI device sdi: 2880 512-byte hdwr sectors (1 MB)
sdi: Write Protect is off
sdi: Mode Sense: 00 46 02 00
sdi: assuming drive cache: write through
 sdi: unknown partition table
sd 36:0:0:2: Attached scsi removable disk sdi
sd 36:0:0:2: Attached scsi generic sg8 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdj: 2880 512-byte hdwr sectors (1 MB)
sdj: Write Protect is off
sdj: Mode Sense: 00 46 02 00
sdj: assuming drive cache: write through
SCSI device sdj: 2880 512-byte hdwr sectors (1 MB)
sdj: Write Protect is off
sdj: Mode Sense: 00 46 02 00
sdj: assuming drive cache: write through
sdj:<3>FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
 unknown partition table
sd 36:0:0:3: Attached scsi removable disk sdj
sd 36:0:0:3: Attached scsi generic sg9 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdk: 2880 512-byte hdwr sectors (1 MB)
sdk: Write Protect is off
sdk: Mode Sense: 00 46 02 00
sdk: assuming drive cache: write through
SCSI device sdk: 2880 512-byte hdwr sectors (1 MB)
sdk: Write Protect is off
sdk: Mode Sense: 00 46 02 00
sdk: assuming drive cache: write through
 sdk: unknown partition table
sd 36:0:0:4: Attached scsi removable disk sdk
sd 36:0:0:4: Attached scsi generic sg10 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdl: 2880 512-byte hdwr sectors (1 MB)
sdl: Write Protect is off
sdl: Mode Sense: 00 46 02 00
sdl: assuming drive cache: write through
SCSI device sdl: 2880 512-byte hdwr sectors (1 MB)
sdl: Write Protect is off
sdl: Mode Sense: 00 46 02 00
sdl: assuming drive cache: write through
 sdl: unknown partition table
sd 36:0:0:5: Attached scsi removable disk sdl
sd 36:0:0:5: Attached scsi generic sg11 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdm: 2880 512-byte hdwr sectors (1 MB)
sdm: Write Protect is off
sdm: Mode Sense: 00 46 02 00
sdm: assuming drive cache: write through
SCSI device sdm: 2880 512-byte hdwr sectors (1 MB)
sdm: Write Protect is off
sdm: Mode Sense: 00 46 02 00
sdm: assuming drive cache: write through
 sdm: unknown partition table
sd 36:0:0:6: Attached scsi removable disk sdm
sd 36:0:0:6: Attached scsi generic sg12 type 0
  Vendor: MITSUMI   Model: USB FDD 061M      Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdn: 2880 512-byte hdwr sectors (1 MB)
sdn: Write Protect is off
sdn: Mode Sense: 00 46 02 00
sdn: assuming drive cache: write through
SCSI device sdn: 2880 512-byte hdwr sectors (1 MB)
sdn: Write Protect is off
sdn: Mode Sense: 00 46 02 00
sdn: assuming drive cache: write through
 sdn: unknown partition table
sd 36:0:0:7: Attached scsi removable disk sdn
sd 36:0:0:7: Attached scsi generic sg13 type 0
usb-storage: device scan complete
----------------------------------------------------------------------------

My questions are:

Why do 7 generic scsi devices show up in the log when not using
the modified udev rules?

Why do 8 generic scsi devices show up in the log when the modified
udev rule(s) are in place. (above, and instead of only 1 for a usb
device.  I can see that the rule created a new device node, but why
still the other 7, but the rule prevents them from being attached).

Is there a way to cut the device discovery short to only find
AND use only one device, to make the whole process take
less time to mount and use the device?


I can live with what I have here, as I rarely use floppies, but it
would be nice to cut down the amount of time it takes to find
and mount this device.



thanks for the help,

-----------------
tony


Reply to: