Bug 656089

Summary: udev deletes existing /dev/cdrom entry when a USB cdrom is attached to the system.
Product: Red Hat Enterprise Linux 5 Reporter: Bill Muller <bill.muller>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: low    
Version: 5.4CC: cww, jwilleford
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-18 18:36:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bill Muller 2010-11-23 02:39:37 UTC
Description of problem:

On a system with an internal cdrom drive the /dev/cdrom link is overwritten and then removed when a USB cdrom is attached and then removed from the system.


Version-Release number of selected component (if applicable):

udev-095-14.21.el5


How reproducible:

Attach a USB cdrom to a system with an internal cdrom drive then remove the USB cdrom drive from the system.


Steps to Reproduce:

1. Boot the system and examine the /dev/cdrom entries, on my system they are:

/dev/cdrom -> hda
/dev/cdrom-hda -> hda


2. Attach a USB cdrom drive to the system, the device entries change to:

/dev/cdrom -> hda
/dev/cdrom-hda -> hda
/dev/cdrom-sr0 -> scd0


3. Detach the USB cdrom drive from the system, the device entries change to:

/dev/cdrom-hda -> hda



Actual results:

The /dev/cdrom link is erroneously deleted from the system when a USB cdrom is attached to and then detached from the system



Expected results:

The /dev/cdrom link which existed prior to the USB cdrom being attached should not be overwritten and then deleted by attaching and then removing the USB cdrom drive.

Comment 1 Jason Willeford 2010-12-14 17:29:19 UTC
Here are cdrom samples from both RHEL4 and RHEL5.

RHEL4 udev entry
----------------
KERNEL="hd[a-z]", BUS="ide", SYSFS{removable}="1", RESULT="cdrom", SYMLINK="cdrom%e"


RHEL5 udev entry
----------------
KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k"


Notice that the %e enumeration variable that existed in RHEL4 has been removed in RHEL5 and instead a new "cdrom-%k" link is created.


In addition, the "old compat" section doesn't contain the %e enumeration either.  What is the proceedure for getting symlinks to increment in RHEL 5?

Comment 2 Bill Muller 2010-12-14 17:48:38 UTC
There is a type in step 2 of the original message.  Step 2 should read:


2. Attach a USB cdrom drive to the system, the device entries change to:

/dev/cdrom -> scd0
/dev/cdrom-hda -> hda
/dev/cdrom-sr0 -> scd0

Comment 3 Chris Williams 2012-01-18 18:36:50 UTC
This issue appears to have been resolved in Customer Portal case 00384446. Closing NOTABUG. Feel free to open a new case with Red Hat Support if this is still an issue.