cd-rom drive with data media not showing the volume
david at fubar.dk
Mon Dec 6 07:50:26 PST 2004
On Sat, 2004-12-04 at 16:21 +1300, leon breedt wrote:
> i'm not sure what the desired behaviour is in this case, but this is
> the scenario:
> on one of my machines, inserting a disc into the cd-rom drive causes a
> volume entry to show up in the device tree, under the storage device,
> without requiring that the disc be mounted.
> on another machine, the volume entry only shows up when the disc is mounted.
If we don't poll the drive, e.g. storage.media_check_enabled is set to
FALSE, we only add volumes when something is mounted for the drive. That
is on purpose.
> this is causing problems for a script of mine, whose purpose is to
> mount newly inserted media. is the behaviour in the first scenario the
> expected behaviour? if so, what can i do to track down why the second
> scenario is not working?
> the hardware details:
> machine #1 (working):
> - dell gx270 intel i865 motherboard
> - Lite-On LTN486S (hdc)
> - DVD-ROM BDV316E (hdd)
> machine #2 (not working):
> - asus p4c800-e intel i875p motherboard
> - Pioneer DVD-ROM ATAPIModel DVD-106S 012 (hdc)
> - LITE-ON LTR-52246S (hdd)
Btw, in general it's a bad idea to have two optical drives on the same
IDE channel because polling one drive for media may interfere with the
other. This is mostly only an issue for laptops because such drives
normally have quite aggressive power management.
You may look here
for a long explanation.
Basically, as I see it, the problem is that when the application close
(2)'es a fd from the drive, the kernel sends a "unlock door request" and
this can make the kernel power up the drive; now, the IDE channel
(shared by two drives) is locked in this interval which typically is
1.5s - now, if we poll every two seconds (and we do need the open
(2)/close(2) for every poll cf. wanting to use O_EXCL, we hit the issue.
Sigh. I submit this should be fixed in the kernel.
> on both machines, the kernel is the Ubuntu 188.8.131.52 kernel, the version
> of hal is 0.4.2, and the version of hotplug is the 20040329 ubuntu
> kernel, and udev is 046.
Please attach the output of lshal.
hal mailing list
hal at lists.freedesktop.org
More information about the Hal