On Fri, May 14, 2010 at 20:48, Nick Bowler <nbowler@xxxxxxxxxxxxxxxx> wrote: > On 16:41 Fri 14 May , Kay Sievers wrote: >> Does cdrom_id work as expected otherwise? What does: >> /lib/udev/cdrom_id --debug /dev/sr0 >> print? > > Output from this command is appended. > >> Does running cdrom_id spin up the drive? > > No, the above does not cause the drive to spin up. > >> There is a call to /sbin/blkid in: >> /lib/udev/rules.d/60-persistent-storage.rules >> with: >> KERNEL=="sr*", IMPORT{program}="/sbin/blkid ... >> If you comment that out, does the issue go away? > > I commented both of the following lines: > > KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" > KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" > > and the issue indeed goes away. Hmm, weird behavior. 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. 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 ? That would look like a bug in the device or the kernel. Because they are not supposed to flip the media-present bit when the media has not changed. Thanks, Kay -- 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