Bug 190037
Summary: | "eject" command opens different drive in FC5 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Steve Tyler <stephent98> |
Component: | udev | Assignee: | Harald Hoyer <harald> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | FC6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-09-20 11:05:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Steve Tyler
2006-04-26 21:29:36 UTC
$ cat /proc/sys/dev/cdrom/info CD-ROM information, Id: cdrom.c 3.20 2003/12/17 drive name: hdd hdc drive speed: 40 48 drive # of slots: 1 1 Can close tray: 1 1 Can open tray: 1 1 Can lock tray: 1 1 Can change speed: 1 1 Can select disk: 0 0 Can read multisession: 1 1 Can read MCN: 1 1 Reports media changed: 1 1 Can play audio: 1 1 Can write CD-R: 1 0 Can write CD-RW: 1 0 Can read DVD: 0 1 Can write DVD-R: 0 0 Can write DVD-RAM: 0 0 Can read MRW: 1 1 Can write MRW: 1 1 Can write RAM: 1 0 > Are the release notes correct? yes > If so, it seems to me udev should ensure that /dev/cdrom > points to a definite, not a random, device, > and, preferably, that it points to the first device. well, tell me how what is the first cdrom? - sda vs. hda (In reply to comment #0) > My workaround is to create the file > /etc/udev/rules.d/51-udev.rules containing these rules: > KERNEL=="hdc", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", > SYMLINK+="cdrom" > KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", > SYSFS{device/media}=="cdrom", SYMLINK+="cdrom-%k" This didn't seem to work consistently, so I modified 50-udev.rules. I suspect that I really can override the standard cdrom rules by adding another rules file, but have not experimented much beyond the above. $ rcsdiff -u 50-udev.rules =================================================================== RCS file: RCS/50-udev.rules,v retrieving revision 1.1 diff -u -r1.1 50-udev.rules --- 50-udev.rules 2006/04/26 19:19:20 1.1 +++ 50-udev.rules 2006/04/27 10:27:04 @@ -237,7 +237,8 @@ SYSFS{device/media}=="floppy", \ SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k" +KERNEL=="hdc", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom-%k" KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="check-cdrom.sh %k DVD", SYMLINK+="dvd dvd-%k" (In reply to comment #3) > what is the first cdrom? > - sda vs. hda <g> Good question. I can come up with several ways to order devices so that there is a "first" device. 1. sort by device name. 2. sort by device number (major, minor) 3. sort first by system address of device controller and then by device number on the controller. (I'm thinking of the PCI address of the controller as displayed by lspci.) Any of these would be deterministic and predictable, however none are satisfying, because how symbolic device names are assigned to devices is really a matter of user preference. This makes me think a GUI or configuration tool (e.g. system-config-devices) would provide be a better approach to setting up device names in general. If, during system installation or booting or after a new device is hotplugged, there is any ambiguity about which device is the user's preferred cdrom, the user could be prompted for it. > I can come up with several ways to order devices so that there is a "first"
device.
A fourth way:
4. specify in a udev rules file what the ordering should be: hd* < sd*
|