On 9/14/2011 10:56 AM, Stefan Seyfried wrote:
Am Wed, 14 Sep 2011 00:39:39 +0400 schrieb Ilya Chernykh<anixxsus@gmail.com>:
On Tuesday 13 September 2011 22:46:04 Greg Freemyer wrote:
Unfortunately libata is still under the scsi stack, so it gets the /dev/sdx style names.
Why then the CD/DVD has different name if it uses the same stack?
Trying to use simple english:
The SCSI storage stack has several "device types". One of them is the "SCSI-Harddrive", another one is the "SCSI-Opticaldisk".
In the Linux kernel configuration, it's expressed like that:
# # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=m CONFIG_CHR_DEV_OSST=m CONFIG_BLK_DEV_SR=m
so you get a compiled in driver "sd_mod", which is the driver for "SCSI-Harddrive" and a driver module "sr_mod" (which in turn depends on the generic "cdrom" driver) and that one is for SCSI-CDROM.
They all talk SCSI, but they send different messages. It's a bit like TCP and UDP both using the IP protocol in networking.
(Greg F. could probably explain this much better, but I think my inter- pretation is sufficient to understand the reasoning behind "sr" and "sd".)
Indeed, there are also many non-block devices that are reached via scsi, backplanes and hot-swap enclosures of course for the obvious starters, but also scanners and even terminal servers, thus sg* and other names. I don't mean usb looking like scsi, literally scsi. sr* is no mystery in that sense, although, a cdrom IS a block device not a scanner or a tty. He is right that if GKH's argument about consistency is to hold much water, optical media should be just yet another flavor of sd*, the fact that it's read-only and needs special handling to write should hardly matter, they come on all the same interfaces as all the other block devices, ide, sata, scsi, usb, parallel. But that just comes down to "you're right, it's inconsistent, go tell LKML". It still doesn't mean libata shouldn't be used or that there's anything especially confusing or wrong about the way usb drives are detected and named currently. Hardware is simply highly dynamic these days unlike in the past. "most other unix" simply make little or no attempt to have adapted to the current realities of hardware. At least nowhere near as much as Linux and Windows has. My "other unix" experience is SCO and FreeBSD and a little Solaris. It comes as no surprise to me and is not a new thing either, that there are certain assumptions I can safely make about mtab and /dev on sco that I can't on Linux, but it's only because SCO simply can't do or handle half of what Linux does in the first place. You have to reboot to add a drive to a sco box! You have to reboot to change a nics IP! (rare arcane theoretical exceptions excluded) There is a usb driver, barely, in the very last version, completely overhauled and changed in an update pack, and is possibly less consistent than Linux, certainly less flexible and less in line with actual usage. CHeck out the directions to usb hard drive: http://osr507doc.sco.com/en/HANDBOOK/USB_configuring.html A legacy-free system with only usb versions of serial, parallel, floppy drives, should those devices appear as funky new unpredictable usb names or as the ancient names that are hardcoded in countless commercial apps who no longer even have vendors to update them? Both answers make sense. I see nothing especially wrong about the way libata, usb, and sg are used. As with everything always, it could be improved, but it's hardly stupid or obviously all backwards or anything like that. -- bkw -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org