Whack-a-mole device assignments

Robert kerplop at sbcglobal.net
Thu Jan 20 14:31:37 UTC 2005


I'm running FC3, kernel 2.6.9-1.667 and thoroughly confused by hal & 
friends.
I have a USB disk drive (a real drive) and a 256MB flash drive.  
Consider  this snippet from /var/log/messages, with comments inserted:

# First, I insert the flash "drive", followed by the Maxtor drive

Jan 20 07:32:25 mavis kernel: usb 1-5: new high speed USB device using 
address 13
Jan 20 07:32:26 mavis kernel: scsi12 : SCSI emulation for USB Mass 
Storage devices
Jan 20 07:32:26 mavis kernel:   Vendor: LEXAR     Model: 
JUMPDRIVE         Rev: 1000
Jan 20 07:32:26 mavis kernel:   Type:   
Direct-Access                      ANSI SCSI revision: 02
Jan 20 07:32:26 mavis kernel: SCSI device sda: 506880 512-byte hdwr 
sectors (260 MB)
Jan 20 07:32:26 mavis kernel: sda: Write Protect is off
Jan 20 07:32:26 mavis kernel: sda: assuming drive cache: write through
Jan 20 07:32:26 mavis kernel:  sda: sda1
Jan 20 07:32:26 mavis kernel: Attached scsi removable disk sda at 
scsi12, channel 0, id 0, lun 0
Jan 20 07:32:26 mavis kernel: Attached scsi generic sg2 at scsi12, 
channel 0, id 0,lun 0,  type 0
Jan 20 07:32:26 mavis scsi.agent[3435]: disk at 
/devices/pci0000:00/0000:00:02.2/usb1/1-5/1-5:1.0/host12/12:0:0:0
Jan 20 07:32:27 mavis fstab-sync[3532]: added mount point 
/media/LEXAR_MEDIA for /dev/sda1

# O.K., flash drive gets /dev/sda
# Now, the Maxtor drive... (It contains a small vfat partition and a 
~150GB ext3 part.)

Jan 20 07:32:49 mavis kernel: usb 1-3: new high speed USB device using 
address 14
Jan 20 07:32:49 mavis kernel: scsi13 : SCSI emulation for USB Mass 
Storage devices
Jan 20 07:32:50 mavis kernel:   Vendor: Maxtor    Model: 
OneTouch          Rev: 0201
Jan 20 07:32:50 mavis kernel:   Type:   
Direct-Access                      ANSI SCSI revision: 02
Jan 20 07:32:50 mavis kernel: SCSI device sdb: 320171008 512-byte hdwr 
sectors (163928 MB)
Jan 20 07:32:50 mavis kernel: sdb: assuming drive cache: write through
Jan 20 07:32:50 mavis kernel:  sdb: sdb1 sdb2
Jan 20 07:32:50 mavis kernel: Attached scsi disk sdb at scsi13, channel 
0, id 0, lun 0
Jan 20 07:32:50 mavis scsi.agent[3620]: disk at  
/devices/pci0000:00/0000:00:02.2/usb1/1-3/1-3:1.0/host13/13:0:0:0
Jan 20 07:32:50 mavis kernel: Attached scsi generic sg3 at scsi13, 
channel 0, id 0,lun 0,  type 0
Jan 20 07:32:51 mavis fstab-sync[3722]: added mount point /media/NO_NAME 
for /dev/sdb1
Jan 20 07:32:51 mavis fstab-sync[3726]: added mount point /media/OTOT 
for /dev/sdb2

# So, the drive is /dev/sdb.  sdb1 is the vfat partition and sdb2 is the 
ext3 partition.  That's fine --
# If only it was repeatable...

# Now I pull both devices

Jan 20 07:34:39 mavis kernel: usb 1-5: USB disconnect, address 13
Jan 20 07:34:39 mavis fstab-sync[3895]: removed mount point 
/media/LEXAR_MEDIA for /dev/sda1
Jan 20 07:34:50 mavis kernel: usb 1-3: USB disconnect, address 14
Jan 20 07:34:50 mavis fstab-sync[3994]: removed mount point /media/OTOT 
for /dev/sdb2
Jan 20 07:34:50 mavis fstab-sync[3998]: removed mount point 
/media/NO_NAME for /dev/sdb1

# Then re-insert, but in reverse order:

Jan 20 07:35:01 mavis kernel: usb 1-3: new high speed USB device using 
address 15
Jan 20 07:35:02 mavis kernel: scsi14 : SCSI emulation for USB Mass 
Storage devices
Jan 20 07:35:04 mavis kernel:   Vendor: Maxtor    Model: 
OneTouch          Rev: 0201
Jan 20 07:35:04 mavis kernel:   Type:   
Direct-Access                      ANSI SCSI revision: 02
Jan 20 07:35:04 mavis kernel: SCSI device sda: 320171008 512-byte hdwr 
sectors (163928 MB)
Jan 20 07:35:04 mavis kernel: sda: assuming drive cache: write through
Jan 20 07:35:04 mavis scsi.agent[4123]: disk at 
/devices/pci0000:00/0000:00:02.2/usb1/1-3/1-3:1.0/host14/14:0:0:0
Jan 20 07:35:04 mavis kernel:  sda: sda1 sda2
Jan 20 07:35:04 mavis kernel: Attached scsi disk sda at scsi14, channel 
0, id 0, lun 0
Jan 20 07:35:04 mavis kernel: Attached scsi generic sg2 at scsi14, 
channel 0, id 0,lun 0,  type 0
Jan 20 07:35:05 mavis fstab-sync[4225]: added mount point /media/NO_NAME 
for /dev/sda1
Jan 20 07:35:05 mavis fstab-sync[4229]: added mount point /media/OTOT 
for /dev/sda2

# The hard drive is now /dev/sda

Jan 20 07:35:22 mavis kernel: usb 1-6: new high speed USB device using 
address 16
Jan 20 07:35:22 mavis kernel: scsi15 : SCSI emulation for USB Mass 
Storage devices
Jan 20 07:35:22 mavis kernel:   Vendor: LEXAR     Model: 
JUMPDRIVE         Rev: 1000
Jan 20 07:35:22 mavis kernel:   Type:   
Direct-Access                      ANSI SCSI revision: 02
Jan 20 07:35:22 mavis kernel: SCSI device sdb: 506880 512-byte hdwr 
sectors (260 MB)
Jan 20 07:35:22 mavis kernel: sdb: Write Protect is off
Jan 20 07:35:22 mavis kernel: sdb: assuming drive cache: write through
Jan 20 07:35:22 mavis kernel:  sdb: sdb1
Jan 20 07:35:22 mavis kernel: Attached scsi removable disk sdb at 
scsi15, channel 0, id 0, lun 0
Jan 20 07:35:22 mavis kernel: Attached scsi generic sg3 at scsi15, 
channel 0, id 0,lun 0,  type 0
Jan 20 07:35:22 mavis scsi.agent[4307]: disk at 
/devices/pci0000:00/0000:00:02.2/usb1/1-6/1-6:1.0/host15/15:0:0:0
Jan 20 07:35:23 mavis fstab-sync[4405]: added mount point 
/media/LEXAR_MEDIA for /dev/sdb1

# And the flash drive is /dev/sdb

This doesn't really matter when I manually mount the drive(s) from a 
terminal 'cause it all gets worked out with /etc/fstab:
[rj at mavis ~]$ mount /media/LEX*
[rj at mavis ~]$ mount
/dev/hdb2 on / type ext3 (rw)
<snip>
/dev/sdb1 on /media/LEXAR_MEDIA type vfat 
(rw,nosuid,nodev,sync,noatime,user=rj)
[rj at mavis ~]$
...but it sure plays hell with trying to use device icons on the KDE 
desktop because apparently a snapshot of the fstab is taken when the 
desktop device is created and that's that.
Perhaps someone else has already fought this battle and won?





More information about the users mailing list