[Eisfair] udev-Regel nach SCSI-ID

Detlef Paschke schabau at t-online.de
So Aug 20 21:51:03 CEST 2017


Am 20.08.2017 um 21:36 schrieb Marcus Roeckrath:
> Hallo Detlef,

Hallo Marcus,

es wird mal etwas länger.
Hier ist der udevadm Auszug von der Platte bzw. dem Port um den es mir
geht. Was dort wo jetzt sdf1 steckt angesteckt wird soll immer am
definierten Ort gemountet werden.

Also die 1. Partition der Festplatte an SCSI-ID4 des host0 am Controller
aic79xx.


eisfair # udevadm info --query=all --attribute-walk /dev/sdf1

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device
'/devices/pci0000:00/0000:00:03.0/0000:02:00.0/0000:03:02.0/host0/target0:0:4/0:0:4:0/block/sdf/sdf1':
    KERNEL=="sdf1"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{ro}=="0"
    ATTR{size}=="71817448"
    ATTR{stat}=="     396      388     6266      576     1677   173084
1398088  1536772        0    11772  1537344"
    ATTR{partition}=="1"
    ATTR{start}=="2048"
    ATTR{discard_alignment}=="0"
    ATTR{alignment_offset}=="0"
    ATTR{inflight}=="       0        0"

  looking at parent device
'/devices/pci0000:00/0000:00:03.0/0000:02:00.0/0000:03:02.0/host0/target0:0:4/0:0:4:0/block/sdf':
    KERNELS=="sdf"
    SUBSYSTEMS=="block"
    DRIVERS==""
    ATTRS{ro}=="0"
    ATTRS{size}=="71819496"
    ATTRS{stat}=="     704     2057    11325     1032     1678   173084
1398096  1536776        0    11996  1537804"
    ATTRS{range}=="16"
    ATTRS{discard_alignment}=="0"
    ATTRS{events}==""
    ATTRS{ext_range}=="256"
    ATTRS{events_poll_msecs}=="-1"
    ATTRS{alignment_offset}=="0"
    ATTRS{inflight}=="       0        0"
    ATTRS{removable}=="0"
    ATTRS{capability}=="50"
    ATTRS{events_async}==""

  looking at parent device
'/devices/pci0000:00/0000:00:03.0/0000:02:00.0/0000:03:02.0/host0/target0:0:4/0:0:4:0':
    KERNELS=="0:0:4:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sd"
    ATTRS{rev}=="0104"
    ATTRS{type}=="0"
    ATTRS{scsi_level}=="4"
    ATTRS{model}=="MAU3036NC       "
    ATTRS{state}=="running"
    ATTRS{queue_type}=="ordered"
    ATTRS{iodone_cnt}=="0x9d5"
    ATTRS{iorequest_cnt}=="0x9d5"
    ATTRS{device_busy}=="0"
    ATTRS{evt_capacity_change_reported}=="0"
    ATTRS{timeout}=="30"
    ATTRS{evt_media_change}=="0"
    ATTRS{ioerr_cnt}=="0xa"
    ATTRS{queue_depth}=="32"
    ATTRS{vendor}=="FUJITSU "
    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{iocounterbits}=="32"
    ATTRS{vpd_pg80}==""
    ATTRS{eh_timeout}=="10"

  looking at parent device
'/devices/pci0000:00/0000:00:03.0/0000:02:00.0/0000:03:02.0/host0/target0:0:4':
    KERNELS=="target0:0:4"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device
'/devices/pci0000:00/0000:00:03.0/0000:02:00.0/0000:03:02.0/host0':
    KERNELS=="host0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device
'/devices/pci0000:00/0000:00:03.0/0000:02:00.0/0000:03:02.0':
    KERNELS=="0000:03:02.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="aic79xx"
    ATTRS{irq}=="16"
    ATTRS{subsystem_vendor}=="0x15d9"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x010000"
    ATTRS{driver_override}=="(null)"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{dma_mask_bits}=="39"
    ATTRS{local_cpus}=="ff"
    ATTRS{device}=="0x801d"
    ATTRS{enable}=="1"
    ATTRS{msi_bus}==""
    ATTRS{local_cpulist}=="0-7"
    ATTRS{vendor}=="0x9005"
    ATTRS{subsystem_device}=="0x5480"

  looking at parent device '/devices/pci0000:00/0000:00:03.0/0000:02:00.0':
    KERNELS=="0000:02:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{irq}=="0"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x060400"
    ATTRS{driver_override}=="(null)"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{local_cpus}=="ff"
    ATTRS{device}=="0x0329"
    ATTRS{enable}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{vendor}=="0x8086"
    ATTRS{subsystem_device}=="0x0000"

  looking at parent device '/devices/pci0000:00/0000:00:03.0':
    KERNELS=="0000:00:03.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="pcieport"
    ATTRS{irq}=="16"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x060400"
    ATTRS{driver_override}=="(null)"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{local_cpus}=="ff"
    ATTRS{device}=="0x3596"
    ATTRS{enable}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{local_cpulist}=="0-7"
    ATTRS{vendor}=="0x8086"
    ATTRS{subsystem_device}=="0x0000"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

eisfair #

Viele Grüße
Detlef Paschke

-- 
registered Fli4l-User #00000209
Das "Zitat des Augenblicks" gibt es nur auf
http://www.schabau.goip.de


Mehr Informationen über die Mailingliste Eisfair