* 082 cdsymlinks
@ 2006-01-26 19:09 Aaron Griffin
2006-01-26 19:16 ` Andrey Borzenkov
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Aaron Griffin @ 2006-01-26 19:09 UTC (permalink / raw)
To: linux-hotplug
Hello all,
With the removal of %e in udev 082, what do you all do with your cdsymlinks?
You can't really remove them efficiently, because quite alot of apps
default to /dev/cdrom0 or something similar.
Using a small script to attach the appropriate number (i.e. cdrom2)
doesn't work either because udev doesn't honor any sort of device
order, so an end user may end up placing a cd in 3 different drives to
get xmms to play some audio, for example.
I've noticed none of the 'big distros' have solved this problem yet.
Does anyone have a solution or any ideas at all?
Thanks,
Aaron
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 082 cdsymlinks
2006-01-26 19:09 082 cdsymlinks Aaron Griffin
@ 2006-01-26 19:16 ` Andrey Borzenkov
2006-01-26 20:27 ` Aaron Griffin
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2006-01-26 19:16 UTC (permalink / raw)
To: linux-hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 26 January 2006 22:09, Aaron Griffin wrote:
> Hello all,
> With the removal of %e in udev 082, what do you all do with your
> cdsymlinks?
>
> You can't really remove them efficiently, because quite alot of apps
> default to /dev/cdrom0 or something similar.
>
> Using a small script to attach the appropriate number (i.e. cdrom2)
> doesn't work either because udev doesn't honor any sort of device
> order, so an end user may end up placing a cd in 3 different drives to
> get xmms to play some audio, for example.
>
> I've noticed none of the 'big distros' have solved this problem yet.
> Does anyone have a solution or any ideas at all?
>
Well, I recently posted here a suggestion (with small patch) to create
persistent links for CD-ROMs in /dev/cd (actually in /dev/$env{ID_TYPE}).
This also solves the problem of pam_console - unfortunately it can match on
device name only and removing /dev/cdrom* removed also any distinguishing
name.
Having disks in /dev/disk and CD-ROMs in /dev/cd looks more logical and gives
you persistent names for CD-ROMs. See also recent discussion on lkml on how
to enumerate all available CD-ROMs :)
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD2SAUR6LMutpd94wRAmA9AJ4ibQwzNY/mimz6jnfnfV7yxZKLKQCeILw1
ZurGl/pApzwxTvwRE0kBFh8=wUU6
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 082 cdsymlinks
2006-01-26 19:09 082 cdsymlinks Aaron Griffin
2006-01-26 19:16 ` Andrey Borzenkov
@ 2006-01-26 20:27 ` Aaron Griffin
2006-01-26 23:24 ` Kay Sievers
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Aaron Griffin @ 2006-01-26 20:27 UTC (permalink / raw)
To: linux-hotplug
On 1/26/06, Andrey Borzenkov <arvidjaar@mail.ru> wrote:
> Well, I recently posted here a suggestion (with small patch) to create
> persistent links for CD-ROMs in /dev/cd (actually in /dev/$env{ID_TYPE}).
> This also solves the problem of pam_console - unfortunately it can match on
> device name only and removing /dev/cdrom* removed also any distinguishing
> name.
Sorry, but I'm unable to find this posting, and I only recently
subscribed. The closest I have come is the following:
---------------------------
From: Kay Sievers <kay@vr...>
> Yuu can match on ENV{ID_PATH} with custom rules for every device. On
> SUSE, the system management creates rules on installation or update, to
> have always the same names for optical drives, regardless of the order
> of discovery:
>
> $ cat /etc/udev/rules.d/65-cdrom.rules
> # cdrom links generated by YaST2
> #
> SUBSYSTEM="block", ENV{ID_PATH}="pci-0000:00:1f.2-scsi-1:0:0:0", \
> SYMLINK+="cdrecorder cdrom"
>
> Distros could also have a "default" rule, which catches unconfigured
> devices and automatically creates a rule for them to keep the name
> stable across reboots.
---------------------------
> Having disks in /dev/disk and CD-ROMs in /dev/cd looks more logical and gives
> you persistent names for CD-ROMs. See also recent discussion on lkml on how
> to enumerate all available CD-ROMs :)
Yes, I'll agree with that, but my main issue had to do with cdrom
ordering. I can easilly cram them in /dev/cd, but I'd like
a) for them to remain in the same order, which seems to involve
ID_PATH comparissons
b) to preserve symlinks for backwards compatability, at least for some
time - /dev/cdrom{0,1,2,3,4}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 082 cdsymlinks
2006-01-26 19:09 082 cdsymlinks Aaron Griffin
2006-01-26 19:16 ` Andrey Borzenkov
2006-01-26 20:27 ` Aaron Griffin
@ 2006-01-26 23:24 ` Kay Sievers
2006-01-27 17:08 ` Darren Salt
2006-01-27 20:58 ` Aaron Griffin
4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2006-01-26 23:24 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jan 26, 2006 at 01:09:32PM -0600, Aaron Griffin wrote:
> With the removal of %e in udev 082, what do you all do with your cdsymlinks?
%e is not removed now, it's just no longer in the man page and should be
avoided. But sure, some day I'll be happy to remove it, but we need a
simple replacement for the distros/systems that don't do centralized
management.
> You can't really remove them efficiently, because quite alot of apps
> default to /dev/cdrom0 or something similar.
>
> Using a small script to attach the appropriate number (i.e. cdrom2)
> doesn't work either because udev doesn't honor any sort of device
> order, so an end user may end up placing a cd in 3 different drives to
> get xmms to play some audio, for example.
>
> I've noticed none of the 'big distros' have solved this problem yet.
No, on SUSE YaST maintains a rule file, that matches with ID_PATH and
assigns the names for optical devices persistently.
> Does anyone have a solution or any ideas at all?
o Make a simple program, that can be used to edit a dedicated rules file
and let the user pick a device from the list and assign it a name. The
program should have simple subsystem specific knowlege, what properties
can be used for a device. So it could match on SYSFS{address} for network
interfaces and use ENV{ID_PATH} for a cdrom ...
o Or make it automatically write rules for new devices and assign them a
new name. That way you get at least everytime the same name, even when
hardware of the same class is removed from the system which would break
any simple enumeration.
o Use the persistent naming scheme to reference the devices, but that will
obviously not be cdrom, cdrom1, cdrom2.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 082 cdsymlinks
2006-01-26 19:09 082 cdsymlinks Aaron Griffin
` (2 preceding siblings ...)
2006-01-26 23:24 ` Kay Sievers
@ 2006-01-27 17:08 ` Darren Salt
2006-01-27 20:58 ` Aaron Griffin
4 siblings, 0 replies; 6+ messages in thread
From: Darren Salt @ 2006-01-27 17:08 UTC (permalink / raw)
To: linux-hotplug
I demand that Kay Sievers may or may not have written...
[snip]
> o Or make it automatically write rules for new devices and assign them a
> new name. That way you get at least everytime the same name, even when
> hardware of the same class is removed from the system which would break
> any simple enumeration.
... for some values of "break".
I'm thinking now, given your insistence on generated rules, that perhaps a
sequence number which does nothing more than provide the order in which the
devices should be numbered would be a Good Thing. That way, assuming
hdcÍrom and hddÍrom1 and there are no other cdrom* devices, physically
removing hdc would cause hdd to become cdrom after the next reboot - but hdb
would become cdrom2 regardless (even though this Just Feels Wrong), unless
the system was told that hdc was permanently gone.
This is a matter of compatibility: there are programs and libraries which do
things such as check only /dev/cdrom or default to /dev/cdrom: the VideoCD
input module in xine-lib defaults to /dev/cdrom, and its DVD input module
defaults to /dev/dvd.
Feel free to submit patches :->
--
| Darren Salt | d youmustbejoking,demon,co,uk | nr. Ashington,
| Debian, | s zap,tartarus,org | Northumberland
| RISC OS | @ | Toon Army
| Let's keep the pound sterling
Money can't buy you friends, but you get a better class of enemy.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 082 cdsymlinks
2006-01-26 19:09 082 cdsymlinks Aaron Griffin
` (3 preceding siblings ...)
2006-01-27 17:08 ` Darren Salt
@ 2006-01-27 20:58 ` Aaron Griffin
4 siblings, 0 replies; 6+ messages in thread
From: Aaron Griffin @ 2006-01-27 20:58 UTC (permalink / raw)
To: linux-hotplug
On 1/27/06, Darren Salt <linux@youmustbejoking.demon.co.uk> wrote:
> This is a matter of compatibility: there are programs and libraries which do
> things such as check only /dev/cdrom or default to /dev/cdrom: the VideoCD
> input module in xine-lib defaults to /dev/cdrom, and its DVD input module
> defaults to /dev/dvd.
The only solutions I've come up with require taking the scope outside
of udev. Keeping this compatible, at a fairly generic, non-Yast'ed
level, seems to be impossible within udev. It'd require some
execution after udev has finished, which then isn't that different
from a static /dev setup.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-01-27 20:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-26 19:09 082 cdsymlinks Aaron Griffin
2006-01-26 19:16 ` Andrey Borzenkov
2006-01-26 20:27 ` Aaron Griffin
2006-01-26 23:24 ` Kay Sievers
2006-01-27 17:08 ` Darren Salt
2006-01-27 20:58 ` Aaron Griffin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).