Influencing Kernel Device Event Handling With Udev Rules; Persistent Device Naming - Novell LINUX ENTERPRISE SERVER 10 SP2 - INSTALLATION AND ADMINISTRATION Installation Manual

Hide thumbs Also See for LINUX ENTERPRISE SERVER 10 SP2 - INSTALLATION AND ADMINISTRATION:
Table of Contents

Advertisement

24.6 Influencing Kernel Device Event
Handling with udev Rules
A udev rule can match any property the kernel adds to the event itself or any information
that the kernel exports to sysfs. The rule can also request additional information from
external programs. Every event is matched against all provided rules. All rules are lo-
cated in the /etc/udev/rules.d directory.
Every line in the rules file contains at least one key value pair. There are two kinds of
keys, match and assignment keys. If all match keys match their values, the rule is applied
and the assignment keys are assigned the specified value. A matching rule may specify
the name of the device node, add symlinks pointing to the node, or run a specified
program as part of the event handling. If no matching rule is found, the default device
node name is used to create the device node. The rule syntax and the provided keys to
match or import data are described in the udev man page.

24.7 Persistent Device Naming

The dynamic device directory and the udev rules infrastructure make it possible to
provide stable names for all disk devices—regardless of their order of recognition or
the connection used for the device. Every appropriate block device the kernel creates
is examined by tools with special knowledge about certain buses, drive types, or file
systems. Along with the dynamic kernel-provided device node name, udev maintains
classes of persistent symbolic links pointing to the device:
/dev/disk
|-- by-id
|
|-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B -> ../../sda
|
|-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part1 -> ../../sda1
|
|-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part6 -> ../../sda6
|
|-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part7 -> ../../sda7
|
|-- usb-Generic_STORAGE_DEVICE_02773 -> ../../sdd
|
`-- usb-Generic_STORAGE_DEVICE_02773-part1 -> ../../sdd1
|-- by-label
|
|-- Photos -> ../../sdd1
|
|-- SUSE10 -> ../../sda7
|
`-- devel -> ../../sda6
|-- by-path
|
|-- pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
|
|-- pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
Dynamic Kernel Device Management with udev
467

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10 sp3

Table of Contents