Bug#774080: udev: /dev/dvd symlink changed while a program using it was running

2015-12-27 Thread Martin Pitt
Control: severity -1 normal
Control: tag -1 pending

Vincent Danjean [2014-12-28 15:02 +0100]:
>   While the extraction was running (with the bash loop), I put a CD in
> the DVD writer. To my surprise (it tooks me time to identify the root of
> the problem), the /dev/dvd symlink changed to point to the other hardware
> (ie it was pointing to /dev/sr0 and now is was /dev/sr1). 

I just committed a fix for this:

 http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=792d45a

with that the links are now stable for the duration of the current
boot.

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



Bug#774080: udev: /dev/dvd symlink changed while a program using it was running

2014-12-28 Thread Vincent Danjean
reopen #774080
thanks

On 28/12/2014 15:40, m...@linux.it (Marco d'Itri) wrote:
 On Dec 28, Vincent Danjean vdanj...@debian.org wrote:
 
 In my situation, inserting a CD in the second hardware should not have 
 modified the /dev/dvd symlink that was used by a script and that was 
 pointing to a valid device.
 Sorry, I do not think that there is anything we can do about this.

There is no way to avoid to modify an existing valid symlink?

This is a pity, but, if this is really the case, you can at least
document the situation (hence the reopen). As said initially,
jessie fresh install wont even have a 70-persistent-cd.rules template
to adapt to workaround the bug.
  Hiding/closing the bug wont dismiss it. And, when it hits me, it
tooks me some times to identify it whereas I think I'm not so bad
about system administration.
  Having /dev/dvd that flips depending on the last inserted disk
is really silly.

  Regards,
Vincent

-- 
Vincent Danjean   GPG key ID 0xD17897FA vdanj...@debian.org
GPG key fingerprint: 621E 3509 654D D77C 43F5  CA4A F6AE F2AF D178 97FA
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://people.debian.org/~vdanjean/debian unstable main


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#774080: udev: /dev/dvd symlink changed while a program using it was running

2014-12-28 Thread Marco d'Itri
Control: severity -1 wishlist

On Dec 28, Vincent Danjean vdanj...@debian.org wrote:

 This is a pity, but, if this is really the case, you can at least
 document the situation (hence the reopen). As said initially,
Please send a patch.

-- 
ciao,
Marco


pgp0yugCmKVtk.pgp
Description: PGP signature


Bug#774080: udev: /dev/dvd symlink changed while a program using it was running

2014-12-28 Thread Vincent Danjean
On 28/12/2014 16:03, m...@linux.it (Marco d'Itri) wrote:
 Control: severity -1 wishlist
 
 On Dec 28, Vincent Danjean vdanj...@debian.org wrote:
 
 This is a pity, but, if this is really the case, you can at least document 
 the situation (hence the reopen). As said initially,
 Please send a patch.

To add into the README.Debian (for example, or another specific file):

**
Since jessie, udev does not provide persistent name for CD/DVD readers/
writers (see #655924 for more details). This is not a problem with one
CD/DVD reader/writer (as it will automaticcaly be linked to /dev/cdrom,
/dev/dvd, ...) but it is with more than one hardware. Moreover, in the
latter case, the symlinks (/dev/cdrom, /dev/dvd, ...) can change
each time a CD/DVD is inserted into one reader/writer (as reported in
#774080), even while they are used!

To come back to persistent names, old wheezy users can change their
/etc/udev/rules.d/70-persistent-cd.rules to use ID_SERIAL instead
of ID_PATH. And new jessie installation can manually wrote such a
file. As an example, to be adapted to your hardware, here is
such a file:
==
# DVD-ROM_GD-7500 (pci-:03:05.0-scsi-0:0:0:0)
SUBSYSTEM==block, ENV{ID_CDROM}==?*, 
ENV{ID_SERIAL}==HITACHI_DVD-ROM_GD-7500, SYMLINK+=cdrom, ENV{GENERATED}=1
SUBSYSTEM==block, ENV{ID_CDROM}==?*, 
ENV{ID_SERIAL}==HITACHI_DVD-ROM_GD-7500, SYMLINK+=dvd, ENV{GENERATED}=1

# DRW-1814BL (pci-:03:05.0-scsi-0:0:1:0)
SUBSYSTEM==block, ENV{ID_CDROM}==?*, ENV{ID_SERIAL}==ASUS_DRW-1814BL, 
SYMLINK+=cdrom1, ENV{GENERATED}=1
SUBSYSTEM==block, ENV{ID_CDROM}==?*, ENV{ID_SERIAL}==ASUS_DRW-1814BL, 
SYMLINK+=cdrw1, ENV{GENERATED}=1
SUBSYSTEM==block, ENV{ID_CDROM}==?*, ENV{ID_SERIAL}==ASUS_DRW-1814BL, 
SYMLINK+=dvd1, ENV{GENERATED}=1
SUBSYSTEM==block, ENV{ID_CDROM}==?*, ENV{ID_SERIAL}==ASUS_DRW-1814BL, 
SYMLINK+=dvdrw1, ENV{GENERATED}=1
==

The identifier for ID_SERIAL (or other way to identify the hardware)
can be found by running:
# udevadm info --query=all --name=/dev/sr0
# udevadm info --query=all --name=/dev/sr1
...

And, once these new udev rules are in place, they can immediately be
taken into account (without rebooting) by running:
# udevadm trigger

**

A test for several /dev/sr* file at config time that would display
a debconf notice pointing on this documentation would probably also
be a very good thing.

  Regards,
Vincent

-- 
Vincent Danjean   GPG key ID 0xD17897FA vdanj...@debian.org
GPG key fingerprint: 621E 3509 654D D77C 43F5  CA4A F6AE F2AF D178 97FA
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://people.debian.org/~vdanjean/debian unstable main


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org