Re: [CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-30 Thread Leon Fauster via CentOS

Am 30.10.19 um 00:37 schrieb John H Nyhuis:

hmmm, I thought := assigned a key just like +=, except := locked it so
it could not be changed later.  Am I misunderstanding the man page for udev?

Thanks,

John H. Nyhuis
Desk: (206)-685-8334
jnyh...@uw.edu
Box 359461, 15th floor, 106

On 10/29/2019 4:31 PM, Leon Fauster via CentOS wrote:

Am 29.10.19 um 23:41 schrieb John H Nyhuis:

Thanks, I did catch the mistype (after IU posted).  Still no match with
the typo fixed... :-(

Thanks,

John H. Nyhuis
Desk: (206)-685-8334
jnyh...@uw.edu
Box 359461, 15th floor, 106

On 10/29/2019 4:03 AM, Tony Mountifield wrote:

In article <7025a0a8-1471-530d-dad0-3770e902c...@uw.edu>,
John H Nyhuis  wrote:

The mtx binary requires my tape library to be assigned a sg# driver,
but
the kernel periodically renumbers the sg devices.  Normally, we would
write a udev rule to manually assign a persistent name, but it looks
like things have changed as I can't seem to get a match on CEntOS7.
I'd
appreciate any feedback or pointers to help me get my rule working.  My
two attempts are below.

cat /etc/udev/rules.d/90-local.rules

KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", \
ENV{ID_SERIAL}=="1QUANTUM_D0H0112430_LLA", SYMLINK+="sg8"

SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \
ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"


You have a typo: scsi_genric instead of scsi_generic.

Don't know if that is the reason.




SYMLINK:="sg8" -> SYMLINK+="sg8"





Could you try putting the link aside via SYMLINK+="mytape/mydevice".
Is this feasible for you having it in a sub directory?

--
Leon


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-29 Thread John H Nyhuis
hmmm, I thought := assigned a key just like +=, except := locked it so 
it could not be changed later.  Am I misunderstanding the man page for udev?

Thanks,

John H. Nyhuis
Desk: (206)-685-8334
jnyh...@uw.edu
Box 359461, 15th floor, 106

On 10/29/2019 4:31 PM, Leon Fauster via CentOS wrote:
> Am 29.10.19 um 23:41 schrieb John H Nyhuis:
>> Thanks, I did catch the mistype (after IU posted).  Still no match with
>> the typo fixed... :-(
>>
>> Thanks,
>>
>> John H. Nyhuis
>> Desk: (206)-685-8334
>> jnyh...@uw.edu
>> Box 359461, 15th floor, 106
>>
>> On 10/29/2019 4:03 AM, Tony Mountifield wrote:
>>> In article <7025a0a8-1471-530d-dad0-3770e902c...@uw.edu>,
>>> John H Nyhuis  wrote:
 The mtx binary requires my tape library to be assigned a sg# driver, 
 but
 the kernel periodically renumbers the sg devices.  Normally, we would
 write a udev rule to manually assign a persistent name, but it looks
 like things have changed as I can't seem to get a match on CEntOS7.  
 I'd
 appreciate any feedback or pointers to help me get my rule working.  My
 two attempts are below.

 cat /etc/udev/rules.d/90-local.rules

 KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", \
 ENV{ID_SERIAL}=="1QUANTUM_D0H0112430_LLA", SYMLINK+="sg8"

 SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \
 ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"
>>>
>>> You have a typo: scsi_genric instead of scsi_generic.
>>>
>>> Don't know if that is the reason.
>>>
> 
> 
> SYMLINK:="sg8" -> SYMLINK+="sg8"
> 
> -- 
> Leon
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-29 Thread Leon Fauster via CentOS

Am 29.10.19 um 23:41 schrieb John H Nyhuis:

Thanks, I did catch the mistype (after IU posted).  Still no match with
the typo fixed... :-(

Thanks,

John H. Nyhuis
Desk: (206)-685-8334
jnyh...@uw.edu
Box 359461, 15th floor, 106

On 10/29/2019 4:03 AM, Tony Mountifield wrote:

In article <7025a0a8-1471-530d-dad0-3770e902c...@uw.edu>,
John H Nyhuis  wrote:

The mtx binary requires my tape library to be assigned a sg# driver, but
the kernel periodically renumbers the sg devices.  Normally, we would
write a udev rule to manually assign a persistent name, but it looks
like things have changed as I can't seem to get a match on CEntOS7.  I'd
appreciate any feedback or pointers to help me get my rule working.  My
two attempts are below.

cat /etc/udev/rules.d/90-local.rules

KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", \
ENV{ID_SERIAL}=="1QUANTUM_D0H0112430_LLA", SYMLINK+="sg8"

SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \
ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"


You have a typo: scsi_genric instead of scsi_generic.

Don't know if that is the reason.




SYMLINK:="sg8" -> SYMLINK+="sg8"

--
Leon

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-29 Thread John H Nyhuis
Thanks, I did catch the mistype (after IU posted).  Still no match with 
the typo fixed... :-(

Thanks,

John H. Nyhuis
Desk: (206)-685-8334
jnyh...@uw.edu
Box 359461, 15th floor, 106

On 10/29/2019 4:03 AM, Tony Mountifield wrote:
> In article <7025a0a8-1471-530d-dad0-3770e902c...@uw.edu>,
> John H Nyhuis  wrote:
>> The mtx binary requires my tape library to be assigned a sg# driver, but
>> the kernel periodically renumbers the sg devices.  Normally, we would
>> write a udev rule to manually assign a persistent name, but it looks
>> like things have changed as I can't seem to get a match on CEntOS7.  I'd
>> appreciate any feedback or pointers to help me get my rule working.  My
>> two attempts are below.
>>
>> cat /etc/udev/rules.d/90-local.rules
>>
>> KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", \
>> ENV{ID_SERIAL}=="1QUANTUM_D0H0112430_LLA", SYMLINK+="sg8"
>>
>> SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \
>> ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"
> 
> You have a typo: scsi_genric instead of scsi_generic.
> 
> Don't know if that is the reason.
> 
> Cheers
> Tony
> 
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-29 Thread Tony Mountifield
In article <7025a0a8-1471-530d-dad0-3770e902c...@uw.edu>,
John H Nyhuis  wrote:
> The mtx binary requires my tape library to be assigned a sg# driver, but 
> the kernel periodically renumbers the sg devices.  Normally, we would 
> write a udev rule to manually assign a persistent name, but it looks 
> like things have changed as I can't seem to get a match on CEntOS7.  I'd 
> appreciate any feedback or pointers to help me get my rule working.  My 
> two attempts are below.
> 
> cat /etc/udev/rules.d/90-local.rules
> 
> KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", \
> ENV{ID_SERIAL}=="1QUANTUM_D0H0112430_LLA", SYMLINK+="sg8"
> 
> SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \
> ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"

You have a typo: scsi_genric instead of scsi_generic.

Don't know if that is the reason.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-28 Thread Bob Marcan
On Mon, 28 Oct 2019 17:14:09 +
John H Nyhuis  wrote:

> SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \

^^
> ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] udev on CEntOS7 - can't get a match, looking for tips...

2019-10-28 Thread John H Nyhuis
The mtx binary requires my tape library to be assigned a sg# driver, but 
the kernel periodically renumbers the sg devices.  Normally, we would 
write a udev rule to manually assign a persistent name, but it looks 
like things have changed as I can't seem to get a match on CEntOS7.  I'd 
appreciate any feedback or pointers to help me get my rule working.  My 
two attempts are below.

cat /etc/udev/rules.d/90-local.rules

KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", \
ENV{ID_SERIAL}=="1QUANTUM_D0H0112430_LLA", SYMLINK+="sg8"

SUBSYSTEM=="scsi", SUBSYSTEMS=="scsi_genric", \
ATTRS{model}=="Scalar i40-i80  ", SYMLINK:="sg8"

Neither rule above generates a match with udev, so I still have 
something wrong.  Right now the assignment is sg7 (but it's had other 
names in the past.

udevadm info --query=all --name=/dev/sg7
P: 
/devices/pci:00/:00:07.0/:04:00.0/:05:00.0/:06:00.1/host8/rport-8:0-0/target8:0:0/8:0:0:1/scsi_generic/sg7
N: sg7
S: tape/by-id/scsi-1QUANTUM_D0H0112430_LLA
E: DEVLINKS=/dev/tape/by-id/scsi-1QUANTUM_D0H0112430_LLA
E: DEVNAME=/dev/sg7
E: 
DEVPATH=/devices/pci:00/:00:07.0/:04:00.0/:05:00.0/:06:00.1/host8/rport-8:0-0/target8:0:0/8:0:0:1/scsi_generic/sg7
E: ID_MODEL=Scalar_i40-i80
E: ID_MODEL_ENC=Scalar\x20i40-i80\x20\x20
E: ID_REVISION=190G
E: ID_SCSI=1
E: ID_SCSI_SERIAL=QUANTUMD0H0112430_LLA
E: ID_SERIAL=1QUANTUM_D0H0112430_LLA
E: ID_SERIAL_SHORT=QUANTUM_D0H0112430_LLA
E: ID_TYPE=generic
E: ID_VENDOR=QUANTUM
E: ID_VENDOR_ENC=QUANTUM\x20
E: MAJOR=21
E: MINOR=7
E: SUBSYSTEM=scsi_generic
E: USEC_INITIALIZED=28815292891


Assigned and parent device listed below:
udevadm info -a -p `udevadm info -q path -n /dev/sg7`

   looking at device 
'/devices/pci:00/:00:07.0/:04:00.0/:05:00.0/:06:00.1/host8/rport-8:0-0/target8:0:0/8:0:0:1/scsi_generic/sg7':
 KERNEL=="sg7"
 SUBSYSTEM=="scsi_generic"
 DRIVER==""

   looking at parent device 
'/devices/pci:00/:00:07.0/:04:00.0/:05:00.0/:06:00.1/host8/rport-8:0-0/target8:0:0/8:0:0:1':
 KERNELS=="8:0:0:1"
 SUBSYSTEMS=="scsi"
 DRIVERS=="ch"
 ATTRS{rev}=="190G"
 ATTRS{type}=="8"
 ATTRS{scsi_level}=="4"
 ATTRS{model}=="Scalar i40-i80  "
 ATTRS{state}=="running"
 ATTRS{unpriv_sgio}=="0"
 ATTRS{queue_type}=="none"
 ATTRS{iodone_cnt}=="0xe2"
 ATTRS{iorequest_cnt}=="0xe2"
 ATTRS{queue_ramp_up_period}=="12"
 ATTRS{device_busy}=="0"
 ATTRS{evt_capacity_change_reported}=="0"
 ATTRS{timeout}=="0"
 ATTRS{evt_media_change}=="0"
 ATTRS{ioerr_cnt}=="0x7"
 ATTRS{queue_depth}=="30"
 ATTRS{vendor}=="QUANTUM "
 ATTRS{evt_soft_threshold_reached}=="0"
 ATTRS{device_blocked}=="0"
 ATTRS{evt_mode_parameter_change_reported}=="0"
 ATTRS{evt_lun_change_reported}=="0"
 ATTRS{evt_inquiry_change_reported}=="0"
 ATTRS{dh_state}=="detached"
 ATTRS{iocounterbits}=="32"
 ATTRS{eh_timeout}=="10"


Would anyone mind pointing out the error in my udev rule or proposing a 
better way of getting a persistent sg device name?

-- 
Thanks in advance,

John H. Nyhuis
Desk: (206)-685-8334
jnyh...@uw.edu
Box 359461, 15th floor, 106
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos