Re: udev cdrom_id rules prevent unmounted CD from spinning down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 May 2010 18:27:48 +0200, Kay Sievers wrote:
> On Mon, May 17, 2010 at 14:43, Nick Bowler <nbowler@xxxxxxxxxxxxxxxx>
> wrote:
>> On 12:06 Mon 17 May     , Kay Sievers wrote:
>>> To make sure you don't have any other stuff accessing the device,
>>> can you please attach the output of:
>>>   udevadm test /class/block/sr0
>>> so we can make sure it's nothing we don't think of.
>>
>> Appended.
> 
> Loos all fine and with the usual behavior so far.
> 
>>> To narrow down the blkid issue, if you comment out the rule, and let
>>> the drive spin down, then run:
>>>   /sbin/blkid -p -oudev /dev/sr0
>>> manually, do you see while doing that any events generated in:
>>>   udevadm monitor
>>> ?
>>
>> The command causes the cd to spin up, but nothing is printed by
>> udevadm monitor as a result.
> 
> Ok, and if you enable the blkid rules again, then you see events in
> the monitor?

Sorry, the above statement that udevadm monitor prints nothing was a lie!
(I must have been insane and/or lacking in coffee first thing in the
morning).

With the rules commented out, the command /sbin/blkid -p -oudev /dev/sr0
on the non-spinning drive causes three distinct bursts of events to
occur:

(a) First, immediately after the disk spins up (and blkid prints stuff)
  KERNEL[1274136271.742645] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
  KERNEL[1274136271.743204] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)
  UDEV  [1274136271.743255] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
  UDEV  [1274136271.792800] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)

(b) Then, after a few seconds the disk spins down, but it's still humming:
  KERNEL[1274136276.306739] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
  KERNEL[1274136276.307182] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)
  UDEV  [1274136276.307295] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
  UDEV  [1274136276.353864] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)

(c) Finally, after a few more seconds the drive totally shuts up:
  KERNEL[1274136304.187396] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
  KERNEL[1274136304.187954] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)
  UDEV  [1274136304.188004] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
  UDEV  [1274136304.231548] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux