Newsgroup: it.comp.os.linux.iniziare
Titolo: udev e /dev/dvd "variabile" ?

Uso ubuntu maverick;
presumo che il comportamento normale sia che /dev/dvd sia un link a sr0 
e /dev/dvd1 un link a /dev/sr1 ...
Qualche giorno fa mi sono accorto che erano scambiati;
Ho cancellato /etc/udev/rules.d/70-persistent-cd.rules e al reboot lo ha 
ricreato corretto.
Prima avvio il pc e mi trovo che i link a sr0 e sr1 non sono dvd e dvd1 
ma dvd2 e dvd3 ...
Ok al reboot successivo, ma nel file suddetto trovo comunque duplicati
(ma noto che il numero del device è diverso, eppure non ho fisicamente 
scollegato niente...
con wodim --scanbus vedo che i "numeri" sono 6 e 7 , quindi perchè ci 
sono anche 4 e 5 ?
# CDDVDW_SH-S203P (pci-0000:00:11.0-scsi-4:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-4:0:0:0", SYMLINK+="cdrom", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-4:0:0:0", SYMLINK+="cdrw", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-4:0:0:0", SYMLINK+="dvd", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-4:0:0:0", SYMLINK+="dvdrw", 
ENV{GENERATED}="1"
# DVDRAM_GH22NS40 (pci-0000:00:11.0-scsi-5:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-5:0:0:0", SYMLINK+="cdrom1", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-5:0:0:0", SYMLINK+="cdrw1", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-5:0:0:0", SYMLINK+="dvd1", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-5:0:0:0", SYMLINK+="dvdrw1", 
ENV{GENERATED}="1"
# CDDVDW_SH-S203P (pci-0000:00:11.0-scsi-6:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-6:0:0:0", SYMLINK+="cdrom2", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-6:0:0:0", SYMLINK+="cdrw2", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-6:0:0:0", SYMLINK+="dvd2", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-6:0:0:0", SYMLINK+="dvdrw2", 
ENV{GENERATED}="1"
# DVDRAM_GH22NS40 (pci-0000:00:11.0-scsi-7:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-7:0:0:0", SYMLINK+="cdrom3", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-7:0:0:0", SYMLINK+="cdrw3", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-7:0:0:0", SYMLINK+="dvd3", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.0-scsi-7:0:0:0", SYMLINK+="dvdrw3", 
ENV{GENERATED}="1"

 ricreato corretto.
Sembra risolto:
ho modificato quel file manualmente per "bloccare" sr0 e sr1 (vedi sotto).
Nota: ENV{GENERATED}="1" è necessario per evitare che vengano ricreate 
regole diverse...
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrw", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="dvd", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="dvdrw", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr1", SYMLINK+="cdrom1", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr1", SYMLINK+="cdrw1", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr1", SYMLINK+="dvd1", ENV{GENERATED}="1"
SUBSYSTEM=="block", KERNEL=="sr1", SYMLINK+="dvdrw1", ENV{GENERATED}="1"