Bug 694782

Summary: cdwriter links in /dev missing.....
Product: [Fedora] Fedora Reporter: udo <udovdh>
Component: udevAssignee: udev-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 16CC: harald, jonathan, stephent98
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-28 17:45:46 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 udo 2011-04-08 11:40:43 UTC
Description of problem:
I noticed that no /dev/cdrom or /dev/cdrw links were present in /dev anymore.
So I toyed with /lib/udev/write_cd_rules which denied taht /dev/hda was a cd writer or rom. (actually it is  a Plexwriter premium)

Version-Release number of selected component (if applicable):
udev-161-8.fc14.x86_64

How reproducible:
dunno, just run write_cd_rules

Steps to Reproduce:
1. See below
2.
3.
  
Actual results:
See below

Expected results:
Working links in /dev to my cdrom player/writer.

Additional info:
[root@surfplank2 dev]# export DEVPATH=/dev/hda
[root@surfplank2 dev]# /lib/udev/write_cd_rules 
/dev/hda is not a CD reader.
[root@surfplank2 dev]# rpm -qf /lib/udev/write_cd_rules 
udev-161-8.fc14.x86_64

Comment 1 Steve Tyler 2011-04-08 12:00:39 UTC
Something like this might give more information:
$ udevadm info --query=all --name=sr0

Comment 2 Harald Hoyer 2011-04-08 12:07:10 UTC
What's the output of:

# /lib/udev/cdrom_id --debug /dev/sr0

Comment 3 udo 2011-04-08 12:16:55 UTC
#  udevadm info --query=all --name=hda
P: /devices/pci0000:00/0000:00:14.1/ide0/0.0/block/hda
N: hda
S: block/3:0
S: disk/by-path/pci-0000:00:14.1
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:14.1/ide0/0.0/block/hda
E: SUBSYSTEM=block
E: DEVNAME=hda
E: ID_PATH=pci-0000:00:14.1
E: UDISKS_PRESENTATION_NOPOLICY=0
E: MAJOR=3
E: MINOR=0
E: DEVTYPE=disk
E: DEVLINKS=/dev/block/3:0 /dev/disk/by-path/pci-0000:00:14.1

# /lib/udev/cdrom_id --debug /dev/hda 
main: probing: '/dev/hda'
cd_inquiry: INQUIRY: [PLEXTOR ][CD-R   PREMIUM  ][1.07]
cd_profiles: current profile 0x08
cd_profiles: profile 0x08 media_cd_rom
cd_profiles: GET CONFIGURATION: size of features buffer 0x00b8
cd_profiles: GET CONFIGURATION: size of features buffer 0x00b8
cd_profiles: GET CONFIGURATION: feature 'profiles', with 3 entries
feature_profiles: profile 0x08 cd_rom
feature_profiles: profile 0x09 cd_r
feature_profiles: profile 0x0a cd_rw
cd_profiles: GET CONFIGURATION: feature 0x0001 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0002 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0003 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0010 <ignored>, with 0x08 bytes
cd_profiles: GET CONFIGURATION: feature 0x001d <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x001e <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0020 <ignored>, with 0x0c bytes
cd_profiles: GET CONFIGURATION: feature 0x0021 <ignored>, with 0x08 bytes
cd_profiles: GET CONFIGURATION: feature 0x0023 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x0024 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0026 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x0028 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x002d <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x002e <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0100 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x0101 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0103 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0104 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x0105 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x0107 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0108 <ignored>, with 0x08 bytes
cd_media_toc: READ TOC: len: 132, start track: 1, end track: 15
cd_media_toc: track=1 info=0x0(audio) start_block=0
cd_media_toc: track=2 info=0x0(audio) start_block=21881
cd_media_toc: track=3 info=0x0(audio) start_block=55717
cd_media_toc: track=4 info=0x0(audio) start_block=94884
cd_media_toc: track=5 info=0x0(audio) start_block=153708
cd_media_toc: track=6 info=0x0(audio) start_block=198442
cd_media_toc: track=7 info=0x0(audio) start_block=215467
cd_media_toc: track=8 info=0x0(audio) start_block=242473
cd_media_toc: track=9 info=0x0(audio) start_block=251003
cd_media_toc: track=10 info=0x0(audio) start_block=258295
cd_media_toc: track=11 info=0x0(audio) start_block=274115
cd_media_toc: track=12 info=0x0(audio) start_block=286940
cd_media_toc: track=13 info=0x0(audio) start_block=302969
cd_media_toc: track=14 info=0x0(audio) start_block=321294
cd_media_toc: track=15 info=0x0(audio) start_block=356325
cd_media_toc: last track 1 starts at block 0
cd_media_info: disk type 00
cd_media_info: hardware reported media status: complete
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT=15
ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=15
[root@surfplank2 dev]#

Comment 4 Harald Hoyer 2011-04-08 12:32:09 UTC
wow.. didn't know these IDE things still exist.

What is the output of:

# cat /proc/sys/dev/cdrom/info


... you might want to create "/etc/udev/rules.d/mycdrom.rules":

ACTION=="remove", GOTO="cdrom_end"
SUBSYSTEM!="block", GOTO="cdrom_end"
KERNEL!="hda", GOTO="cdrom_end"
ENV{ID_CDROM}="1"
IMPORT{program}="cdrom_id --export $tempnode"
LABEL="cdrom_end"

Comment 5 udo 2011-04-08 12:37:25 UTC
# cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name:		hda
drive speed:		40
drive # of slots:	1
Can close tray:		1
Can open tray:		1
Can lock tray:		1
Can change speed:	1
Can select disk:	0
Can read multisession:	1
Can read MCN:		1
Reports media changed:	1
Can play audio:		1
Can write CD-R:		1
Can write CD-RW:	1
Can read DVD:		0
Can write DVD-R:	0
Can write DVD-RAM:	0
Can read MRW:		1
Can write MRW:		1
Can write RAM:		1

Comment 6 Steve Tyler 2011-04-08 13:49:54 UTC
Another thing to try is
# rm /etc/udev/rules.d/70-persistent-cd.rules
# reboot

Disappearing links have been a problem before:
Bug 577659 - /dev/cdrom may be removed after CD loaded

Comment 7 udo 2011-09-03 11:55:05 UTC
I don't reboot the box too often but currently the links look OK.
I'd check one more after updating and rebooting.

Comment 8 Fedora Admin XMLRPC Client 2011-10-20 16:09:53 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora Admin XMLRPC Client 2011-10-20 16:11:49 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Fedora Admin XMLRPC Client 2011-10-20 16:14:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 11 udo 2012-01-27 18:07:08 UTC
# /lib/udev/write_cd_rules
/dev/hda is not a CD reader.

(while it is!)

Comment 12 udo 2012-01-28 07:14:12 UTC
(other box)

# DEVPATH=/dev/sr0 
# export DEVPATH
# /lib/udev/write_cd_rules
/dev/sr0 is not a CD reader.
# ls -l /dev/sr0
brw-rw----+ 1 root cdrom 11, 0  6 dec 15:30 /dev/sr0

Same for sr0 as DEVPATH.

So what now?

Comment 13 udo 2012-01-28 13:53:11 UTC
(another box with IDE/PATA Plextor)
# /lib/udev/write_cd_rules
/dev/hdb is not a CD reader.

Comment 14 Kay Sievers 2012-01-28 17:45:46 UTC
Udev does not support the deprecated IDE (hd*) drivers, but only the
libata (sr*) ones.

You run your own kernel, I guess, please base your kernel on the Fedora
kernel config, which uses libata only, and not IDE.

To comment#12, DEVPATH= is the path in sysfs, not in /dev.

I'm closing this bug, because IDE devices are not supported today,
they have be officially deprecated since quite some time.

Comment 15 udo 2012-01-28 18:00:47 UTC
It is nice to see that someone else decides what hardware I should use and throws away code.
Of course there is no easy quality control yet... (yes, I know!)

Comment 16 udo 2012-01-28 18:03:07 UTC
Also the fact that it takes so long to see that IDE is not supported...
So we have a kernel that has not dropped support, yet we compile a subset and the tools are a subset on top of that subset and we dismiss users that do use technology that is not so very old at all.

Comment 17 Kay Sievers 2012-01-28 18:29:38 UTC
Your host controller (not the connected drives) does not work with the
libata drivers? Then please open a kernel bug for that, and we will see
what can be done.

The base system just does not support IDE drivers any more. Most basic
things will work, but there is almost no integration in tools any more.

Comment 18 Steve Tyler 2012-01-28 19:53:11 UTC
(In reply to comment #14)
> Udev does not support the deprecated IDE (hd*) drivers, but only the
> libata (sr*) ones.
> 
> You run your own kernel, I guess, please base your kernel on the Fedora
> kernel config, which uses libata only, and not IDE.
> 
> To comment#12, DEVPATH= is the path in sysfs, not in /dev.
> 
> I'm closing this bug, because IDE devices are not supported today,
> they have be officially deprecated since quite some time.

Could you provide a link to the Fedora release notes that say "IDE devices are not supported"?

Comment 19 Kay Sievers 2012-01-28 21:55:13 UTC
It is not Fedora specific, they are not supported by upstream udev and
other base system tools.

This is what the upstream kernel code says:
  menuconfig IDE
  tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)"

Please base your config on the Fedora kernel's config, there is not much we
can do here.

Comment 20 Kay Sievers 2012-01-28 21:57:54 UTC
And in case this isn't clear. IDE _devices_ are very well supported, but IDE
_drivers_ are not. IDE devices are handled by libata since quite some time.

I'm very confident, with libata drivers used, the same device you have would
just show up as sr0 instead of hda, and all would just work fine.

Comment 21 Steve Tyler 2012-01-28 22:23:51 UTC
(In reply to comment #20)
> And in case this isn't clear. IDE _devices_ are very well supported, but IDE
> _drivers_ are not. IDE devices are handled by libata since quite some time.
> 
> I'm very confident, with libata drivers used, the same device you have would
> just show up as sr0 instead of hda, and all would just work fine.

Thanks, Kay. I have an older laptop with an IDE internal DVD drive, and it does indeed show up as sr0 not hda (using stock Fedora kernels through F16).

Udo: If you are building your own kernels, you know way more about this than I do. Have you tried a stock Fedora kernel?

Comment 22 udo 2012-01-29 05:55:18 UTC
I do not run stock kernels.
I do have  
<*> Serial ATA and Parallel ATA drivers
in my kernels.

Comment 23 Kay Sievers 2012-01-29 06:19:46 UTC
Then fix your kernel config, you need /dev/sr* devices instead of /dev/hd*.

Boot a Fedora kernel and see which driver is loaded for the host controller.
This driver needs to be enabled in the kernel config, and the IDE driver which
is currently used entirely disabled.

Comment 24 Steve Tyler 2012-01-29 12:25:28 UTC
(In reply to comment #22)
> I do not run stock kernels.
> I do have  
> <*> Serial ATA and Parallel ATA drivers
> in my kernels.

Thanks for confirming what Kay guessed. :-)

Do you update your kernel config to track Fedora releases?

Fedora is too complicated for any one person to understand. There are too many pieces that need to work together. If you really need to build your own kernels you might be better off with a simpler distro, or resign yourself to updating your customizations with every Fedora release.