Bug#948358: (no subject)

pioruns at gmail.com pioruns at gmail.com
Mon Jan 13 13:57:04 GMT 2020


Thank you.

I have following in rules.d/60:

$ grep -E "scsi_id|cdrom_id" /lib/udev/rules.d/60-*
/lib/udev/rules.d/60-cdrom_id.rules:ENV{DISK_EJECT_REQUEST}=="?*",
RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
/lib/udev/rules.d/60-cdrom_id.rules:IMPORT{program}="cdrom_id
--lock-media $devnode"
/lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sd*[!0-9]|sr*",
ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted
-d $devnode", ENV{ID_BUS}="scsi"
/lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="cciss*",
ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id
--export --whitelisted -d $devnode", ENV{ID_BUS}="cciss"
/lib/udev/rules.d/60-persistent-storage-tape.rules:SUBSYSTEM=="scsi_generic",
SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id
--sg-version=3 --export --whitelisted -d $devnode", \
/lib/udev/rules.d/60-persistent-storage-tape.rules:KERNEL=="st*[0-9]|nst*[0-9]",
ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --whitelisted --export
--device=$env{.BSG_DEV}", ENV{ID_BUS}="scsi"

So I run following commands:

/lib/udev/cdrom_id --eject-media /dev/sr0
/lib/udev/cdrom_id --lock-media /dev/sr0
/lib/udev/scsi_id --export --whitelisted -d /dev/sr0
/lib/udev/scsi_id --sg-version=3 --export --whitelisted -d /dev/sr0

None of them returned any error in dmesg so far.

On 12/01/2020 14:50, Michael Biebl wrote:
> Am 12.01.20 um 15:49 schrieb Michael Biebl:
>> Am 12.01.20 um 15:12 schrieb pioruns at gmail.com:
>>> On 12/01/2020 13:54, Michael Biebl wrote:
>>> 
>>>>> As far as udev is concerned, I can only think of the
>>>>> following possible places:
>>>>> 
>>>>>> $ grep -E "scsi_id|cdrom_id" /lib/udev/rules.d/60-* 
>>>>>> /lib/udev/rules.d/60-cdrom_id.rules:ENV{DISK_EJECT_REQUEST}=="?*",
>>>>>>
>>>>>> 
RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
>>>>>> /lib/udev/rules.d/60-cdrom_id.rules:IMPORT{program}="cdrom_id
>>>>>>
>>>>>> 
--lock-media $devnode"
>>>>>> /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sd*[!0-9]|sr*",
>>>>>>
>>>>>> 
ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export
>>>>>> --whitelisted -d $devnode", ENV{ID_BUS}="scsi" 
>>>>>> /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="cciss*",
>>>>>>
>>>>>> 
ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*",
>>>>>> IMPORT{program}="scsi_id --export --whitelisted -d
>>>>>> $devnode", ENV{ID_BUS}="cciss" 
>>>>>> /lib/udev/rules.d/60-persistent-storage-tape.rules:SUBSYSTEM=="scsi_generic",
>>>>>>
>>>>>> 
SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id
>>>>>> --sg-version=3 --export --whitelisted -d $devnode", \ 
>>>>>> /lib/udev/rules.d/60-persistent-storage-tape.rules:KERNEL=="st*[0-9]|nst*[0-9]",
>>>>>>
>>>>>> 
ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --whitelisted
>>>>>> --export --device=$env{.BSG_DEV}", ENV{ID_BUS}="scsi"
>>>> 
>>>> Any news? Have you been able to narrow the problem down to a 
>>>> RUN/IMPORT rule?
>>>> 
>>> 
>>> 
>>> No, sorry, I don't know how to do that.
>>> 
>> 
>> execute the command as listed in the udev rules $devnode resolves
>> to /dev/sr0
>> 
>> e.g. 
>> /lib/udev/rules.d/60-cdrom_id.rules:ENV{DISK_EJECT_REQUEST}=="?*",
>>
>> 
RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
>> 
>> => /lib/udev/cdrom_id eject-media /dev/sr0
>> 
>> or lib/udev/rules.d/60-cdrom_id.rules:IMPORT{program}="cdrom_id 
>> --lock-media $devnode"
>> 
>> => /lib/udev/cdrom_id --lock-media /dev/sr0
>> 
>> you get the idea.
>> 
>> 
> 
> and after each test, check dmesg if it triggers the kernel
> message.
> 


-- 
Kind regards,
Piotr Drozdek



More information about the Pkg-systemd-maintainers mailing list