On Tue, Sep 13, 2011 at 02:08:10PM +0400, Ilya Chernykh wrote:
On Tuesday 13 September 2011 09:07:04 you wrote:
Thanks, but no need to report it here, I've marked it invalid :)
=== The current Lanana devices list http://www.kernel.org/pub/linux/docs/device-list/devices.txt reserves sd* name for SCSI block devices, while USB devices should have name of the type ub*:
USB block devices 0 = /dev/uba First USB block device 8 = /dev/ubb Second USB block device 16 = /dev/ubc Thrid USB block device
That is if you are using the ub.ko kernel driver, which no one does anymore, it is not needed.
Normal usb devices use the usb-storage driver, which use the scsi device naming scheme, as you have noticed. That is the correct thing to do.
It is obviously incorrect, if to follow the Lanana specification, and any intuitive logic. Why this driver uses SCSI names for USB devices?
Because USB storage devices are really just SCSI devices, look at the USB storage spec for details if you are curious. The ub driver was an attempt to handle the fact that for a while in the 2.4 kernel days the SCSI stack could not handle removable devices in a stable manner. For 2.6 this really wasn't needed anymore so the distros stopped enabling the ub driver, but it remains for those few users who don't want an entire SCSI stack for a single USB device.
But in openSUSE USB devices are actually assigned names in sd* range making automatic device type detection impossible or difficult. I faced this issue when making a patch for KDE3 that should detect removable media without hal and which is based on analysis of /proc/self/mounts entries.
Why would you do that? Why not use the proper api to detect removable block devices and not rely on the device name?
There are different backends that use different methods. Currently KDE3 has two backends: a HAL backend that uses HAL api, and mtab/fstab backend that scans mtab table. HAL backend will be useless in a system without hal.
Also note that mtab/fstab backend is the most universal because any system no and in the future will have there tables, regardless whether it has udisks or other more complicated components.
But it sounds like the mtab/fstab backend is buggy. Please fix it :)
Thus the mtab backend thinks about USB drives as of hard disks.
Lots of them are hard disks :)
Still this is incorrect, there in a "removable" device type that should be used. When using hal, the usb drives are shown with "flash drive" icon.
That's wrong then, fix HAL :)
It is actually interesting why USB devices are assigned SCSI-names, and should not they receive USB names.
No it isn't, it's been that way for over 10 years now, nothing new here at all
As I already said this contradicts at least the Lanana specification adopted in 2009. Even if this was the case for a long time, it obviously contradicts the modern specification.
Again, no, it does not, your USB device is really using the SCSI stack, so it is a SCSI device.
Another question is that it seems that even SATA and parallel IDE devices also receive the SCSI-name.
Again, on purpose, has been this way for over 5 years now.
On which purpose and why this purpose is not reflected in specification?
Because your SATA device is using libata which is using the SCSI stack. Having a consistant naming scheme for all block devices works out very well, and is not something that will be changed to go back to the old, broken days. thanks, greg k-h -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org