[Debburn-devel] udev link vanishes if burn programs load the drive tray on Debian 6.0.2 amd64
Thomas Schmitt
scdbackup at gmx.net
Mon Sep 5 10:49:35 UTC 2011
Hi,
i write in the hope to get advise about where to report this problem,
which affects wodim and libburn alike. I am not sure whether the Debian
bug tracker is the right place and to what package i should attribute
the report.
If several drives are attached to a modern Linux system, then their
addresses /dev/srN or /dev/scdN may differ from reboot to reboot.
The recommended solution to this problem is to use udev links, like
/dev/dvdrw or /dev/cdrom2.
But /dev/dvdrw vanishes on my Debian 6.0.2 amd64, if wodim or libburn
load the tray. It comes back only if some program uses the /dev/sr
device file to which the link should point.
I wrote a script "watch_dvdrw" which reports
WATCH_DVDRW : /dev/dvdrw : $(date) : $state
with $state being on start-up: "Exists" or "Missing", and later on:
"Vanished" or Appeared"
I unloaded the tray, waited a few seconds, and then caused wodim or
xorriso to load the tray. Both use SCSI/SBC command START/STOP UNIT
for that task.
A few seconds later, the udev link is reported as vanished.
The vanishing is well reprducible. Re-appearance might need a second
or third try. It may last a few seconds until it happens.
I made lots of attempts to let the link vanish when the tray was
already closed. No vanishing experienced. All seems well.
The machine is running headless, no desktop is started, i am logged
in via ssh. (With desktop, there is obviously an automounter active.
udisks ?)
The drive is attached via SATA.
---------------------------------------------------------------------
$ watch_dvdrw &
[1] 1684
$
WATCH_DVDRW : /dev/dvdrw : Mon Sep 5 10:51:53 CEST 2011 : Exists
$ eject /dev/sr0 ; sleep 5
$ echo "XORRISO_START : $(date)" ; xorriso -outdev /dev/sr0 ; echo "XORRISO_END : $(date)"
XORRISO_START : Mon Sep 5 10:52:51 CEST 2011
...
WATCH_DVDRW : /dev/dvdrw : Mon Sep 5 10:52:58 CEST 2011 : Vanished
...
XORRISO_END : Mon Sep 5 10:53:11 CEST 2011
$
$ echo "XORRISO_START : $(date)" ; xorriso -outdev /dev/sr0 ; echo "XORRISO_END : $(date)"
XORRISO_START : Mon Sep 5 10:54:27 CEST 2011
...
XORRISO_END : Mon Sep 5 10:54:31 CEST 2011
$
WATCH_DVDRW : /dev/dvdrw : Mon Sep 5 10:54:37 CEST 2011 : Appeared
---------------------------------------------------------------------
The cycle of eject, xorriso , and another xorriso worked three time in a row.
Now for wodim. which needed two attempts to make the link re-appear:
---------------------------------------------------------------------
$ echo "WODIM_START : $(date)" && wodim dev=/dev/sr0 -toc && echo "WODIM_END : $(date)"
WODIM_START : Mon Sep 5 11:53:00 CEST 2011
...
WATCH_DVDRW : /dev/dvdrw : Mon Sep 5 11:53:07 CEST 2011 : Vanished
...
WODIM_END : Mon Sep 5 11:53:19 CEST 2011
$ echo "WODIM_START : $(date)" && wodim dev=/dev/sr0 -toc && echo "WODIM_END : $(date)"
WODIM_START : Mon Sep 5 11:55:45 CEST 2011
...
WODIM_END : Mon Sep 5 11:55:45 CEST 2011
$ echo "WODIM_START : $(date)" && wodim dev=/dev/sr0 -toc && echo "WODIM_END : $(date)"
WODIM_START : Mon Sep 5 11:56:25 CEST 2011
...
WODIM_END : Mon Sep 5 11:56:26 CEST 2011
$
WATCH_DVDRW : /dev/dvdrw : Mon Sep 5 11:56:31 CEST 2011 : Appeared
---------------------------------------------------------------------
I am willing to change libburn in order to accomodate to the needs
of udev.
Using ioctl(CDROMCLOSETRAY) before START/STOP UNIT did not help.
Any other ideas ?
Have a nice day :)
Thomas
More information about the Debburn-devel
mailing list