Re: unique identifiers for cdrom drives

2011-05-17 Thread Ron Johnson

On 05/17/2011 12:17 AM, Paul E Condon wrote:

On 20110516_120833, Camaleón wrote:

[snip]


How does your /etc/udev/rules.d/70-persistent-cd.rules look like?


There are too many entries in it. More entries than I have ever had distinct
cdrom drives installed. I think these spurious entries maybe part of the
problem.


Probably accumulated cruft.  How long/many versions since your last 
fresh install?  (Parson if you already answered that...)


You can delete the stuff that's obviously now-useless (though of course 
save a copy first), reboot and see what happens.


Camaleón is right that the the answer lays in udev rules.


OTOH, the initial problem of the two drives swapping identities
has gone away without my having done anything, at least nothing intentional.
I had always been using what happens to cdrom trays when I issue eject
commands with various device and/or mount-point strings.


Eh?  Grammar confusion.

[snip]

the 'safe demount' icon is clicked. Some of my USB hard disks are
Western Digital models that have 'Virtual CDroms' installed on the disk.
I think these may be a source of clutter in 70-persistent-cd.rules.



That's an interesting likelihood.

--
Neither the wisest constitution nor the wisest laws will secure
the liberty and happiness of a people whose manners are universally
corrupt.
Samuel Adams, essay in The Public Advertiser, 1749


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

Archive: http://lists.debian.org/4dd22bc4.4000...@cox.net



Re: unique identifiers for cdrom drives

2011-05-16 Thread Camaleón
On Sun, 15 May 2011 13:39:20 -0600, Paul E Condon wrote:

 On 20110514_160848, Camaleón wrote:

(...)
 
  I've googled and see reference to vol_id, but I don't have vol_id,
  and can't find it, or even a man page.
 
 There is a file located at /etc/udev/rules.d/70-persistent-cd.rules
 that can be manually edited to make static names for the optical
 devices (or so it seems), maybe you can do something there.
 
 Thanks.
 I'm reading
 
 http://www.debian.org/doc/manuals/debian-reference/ch01.en.html#_device_files
 and
 http://www.reactivated.net/writing_udev_rules.html#about
 
 looking for how to write a rule that meets my needs. But I have a
 problem understanding. I don't see anything in udev rules that allows me
 to control the mount point of a device, i.e. what connects the symlink
 /dev/cdrom, with the mountpoint /media/cdromX ? Udev rules seem to be
 concerned only with what appears in /dev/ .
 
 What am I missing? Is there a fixed, invariant mapping that just always
 happens?

How does your /etc/udev/rules.d/70-persistent-cd.rules look like?

I thought udev should manage this automatically without needing to make 
static mount points in /etc/fstab in the same way it does when you 
insert an USB flash drive and it gets mounted under /media/MYUSB_TAG 
unless you tell otherwise :-?

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.05.16.12.08...@gmail.com



Re: unique identifiers for cdrom drives

2011-05-16 Thread Paul E Condon
On 20110516_120833, Camaleón wrote:
 On Sun, 15 May 2011 13:39:20 -0600, Paul E Condon wrote:
 
  On 20110514_160848, Camaleón wrote:
 
 (...)
  
   I've googled and see reference to vol_id, but I don't have vol_id,
   and can't find it, or even a man page.
  
  There is a file located at /etc/udev/rules.d/70-persistent-cd.rules
  that can be manually edited to make static names for the optical
  devices (or so it seems), maybe you can do something there.
  
  Thanks.
  I'm reading
  
  http://www.debian.org/doc/manuals/debian-reference/ch01.en.html#_device_files
  and
  http://www.reactivated.net/writing_udev_rules.html#about
  
  looking for how to write a rule that meets my needs. But I have a
  problem understanding. I don't see anything in udev rules that allows me
  to control the mount point of a device, i.e. what connects the symlink
  /dev/cdrom, with the mountpoint /media/cdromX ? Udev rules seem to be
  concerned only with what appears in /dev/ .
  
  What am I missing? Is there a fixed, invariant mapping that just always
  happens?
 
 How does your /etc/udev/rules.d/70-persistent-cd.rules look like?

There are too many entries in it. More entries than I have ever had distinct
cdrom drives installed. I think these spurious entries maybe part of the
problem. OTOH, the initial problem of the two drives swapping identities 
has gone away without my having done anything, at least nothing intentional.
I had always been using what happens to cdrom trays when I issue eject
commands with various device and/or mount-point strings. Now the result is
consistent. I am waiting to see if the problem returns. As it is, there is
nothing to fix. I'm not inclined to attempt to break it so that I can 
continue trying to fix it. I don't see why any of the few updates that have
happened would have fixed this. 

I have learned a lot, so my efforts, and yours, have not been entirely 
wasted. Thanks. And we shall see, some day.

 
 I thought udev should manage this automatically without needing to make 
 static mount points in /etc/fstab in the same way it does when you 
 insert an USB flash drive and it gets mounted under /media/MYUSB_TAG 
 unless you tell otherwise :-?

I distinctly remember that some time in the past, the static mount
point definitions for cdroms disappeared from /etc/fstab. It was about
the time that Squeeze/testing started using sdxn rather than hdxn block
device names. But now when I looked again, the cdroms are mentioned in
/etc/fstab just as Andrei said they should be. You might think that their
being there is good, but a further check of system backups shows no
indication that they were once missing. I could have failed to do any
backups during that time, but I just don't know.

USB hard disks that are formatted with ext2/3/4 and have partition labels
get mounted automatically in /media with that partition labels used as 
mount points. The mount points are created as needed, and deleted when
the 'safe demount' icon is clicked. Some of my USB hard disks are 
Western Digital models that have 'Virtual CDroms' installed on the disk.
I think these may be a source of clutter in 70-persistent-cd.rules.

I need a rest from thinking about this. The lack of a demonstrable problem
now is forcing be to take one.

-- 
Paul E Condon   
pecon...@mesanetworks.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110517051705.ga7...@big.lan.gnu



Re: unique identifiers for cdrom drives

2011-05-15 Thread Paul E Condon
On 20110514_160848, Camaleón wrote:
 On Sat, 14 May 2011 09:58:27 -0600, Paul E Condon wrote:
 
  My Squeeze installs on machines that have two cdrom drives seem to boot
  sometimes with the upper drive as /media/cdrom0 and lower drive as
  /media/cdrom2, and other times with the identities reversed. I'm sure
  there must be a way to fix on one assignment and keep with it, but how?
  
  There is nothing about cdrom drives in /etc/fstab. I suppose that
  something added there will fix the problem, but what?
 
 I'm sure you already know the answer... udev? :-)
 
  I've googled and see reference to vol_id, but I don't have vol_id, and
  can't find it, or even a man page.
 
 There is a file located at /etc/udev/rules.d/70-persistent-cd.rules that 
 can be manually edited to make static names for the optical devices (or 
 so it seems), maybe you can do something there.

Thanks.
I'm reading 

http://www.debian.org/doc/manuals/debian-reference/ch01.en.html#_device_files
and
http://www.reactivated.net/writing_udev_rules.html#about

looking for how to write a rule that meets my needs. But I have a
problem understanding. I don't see anything in udev rules that allows
me to control the mount point of a device, i.e. what connects the 
symlink /dev/cdrom, with the mountpoint /media/cdromX ? Udev rules
seem to be concerned only with what appears in /dev/ . 

What am I missing? Is there a fixed, invariant mapping that just always
happens?

-- 
Paul E Condon   
pecon...@mesanetworks.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110515193920.gj3...@big.lan.gnu



Re: unique identifiers for cdrom drives

2011-05-15 Thread Andrei Popescu
On Du, 15 mai 11, 13:39:20, Paul E Condon wrote:
  On Sat, 14 May 2011 09:58:27 -0600, Paul E Condon wrote:
  
   My Squeeze installs on machines that have two cdrom drives seem to boot
   sometimes with the upper drive as /media/cdrom0 and lower drive as
   /media/cdrom2, and other times with the identities reversed. I'm sure
   there must be a way to fix on one assignment and keep with it, but how?
   
   There is nothing about cdrom drives in /etc/fstab. I suppose that
   something added there will fix the problem, but what?
 
 looking for how to write a rule that meets my needs. But I have a
 problem understanding. I don't see anything in udev rules that allows
 me to control the mount point of a device, i.e. what connects the 
 symlink /dev/cdrom, with the mountpoint /media/cdromX ? Udev rules
 seem to be concerned only with what appears in /dev/ . 
 
 What am I missing? Is there a fixed, invariant mapping that just always
 happens?

After you convince udev to assign the same device name to the same drive 
you need two fstab entries, something like:

/dev/scd0   /media/cdrom0   udf,iso9660 user,noauto 0   0
/dev/scd1   /media/cdrom1   udf,iso9660 user,noauto 0   0

Regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


unique identifiers for cdrom drives

2011-05-14 Thread Paul E Condon
My Squeeze installs on machines that have two cdrom drives seem to
boot sometimes with the upper drive as /media/cdrom0 and lower drive as
/media/cdrom2, and other times with the identities reversed. I'm sure
there must be a way to fix on one assignment and keep with it, but how?

There is nothing about cdrom drives in /etc/fstab. I suppose that 
something added there will fix the problem, but what?

I've googled and see reference to vol_id, but I don't have vol_id, and
can't find it, or even a man page.

TIA
-- 
Paul E Condon   
pecon...@mesanetworks.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110514155827.gd3...@big.lan.gnu



Re: unique identifiers for cdrom drives

2011-05-14 Thread Camaleón
On Sat, 14 May 2011 09:58:27 -0600, Paul E Condon wrote:

 My Squeeze installs on machines that have two cdrom drives seem to boot
 sometimes with the upper drive as /media/cdrom0 and lower drive as
 /media/cdrom2, and other times with the identities reversed. I'm sure
 there must be a way to fix on one assignment and keep with it, but how?
 
 There is nothing about cdrom drives in /etc/fstab. I suppose that
 something added there will fix the problem, but what?

I'm sure you already know the answer... udev? :-)

 I've googled and see reference to vol_id, but I don't have vol_id, and
 can't find it, or even a man page.

There is a file located at /etc/udev/rules.d/70-persistent-cd.rules that 
can be manually edited to make static names for the optical devices (or 
so it seems), maybe you can do something there.

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.05.14.16.08...@gmail.com