Use it when a device gets the wrong name or permissions, or a rule does not run.
udev
udev is the device manager that creates /dev entries, names network interfaces and disks' /dev/disk/by-* links, sets permissions and runs rules (in /etc/udev/rules.d) when devices appear.
1. udevadm info -a /dev/<dev> — attributes to match.
2. Rule syntax: udevadm test $(udevadm info -q path -n /dev/<dev>).
3. Reload: udevadm control --reload && udevadm trigger.
4. Watch events: udevadm monitor.
5. Check result: ls -l /dev/<dev>.
kernel uevent → udev rules matched → name/link/permissions set → device available
For Disks & Block Devices → udev, continue with the first unproven Topic check: Confirm the kernel emitted add/change/remove events for the expected device. If that boundary is healthy, advance to the adjacent check: Inspect udev properties used by rules and persistent naming. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
kernel device event → uevent properties → udev rules → device node/permissions/symlinks → consumer lookup → storage operation
Healthy evidence: kernel events are observed, udev properties match expected hardware identity, rules settle cleanly and resulting nodes/symlinks resolve to correct major/minor devices.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Confirm the kernel emitted add/change/remove events for the expected device.
- Inspect udev properties used by rules and persistent naming.
- Validate resulting /dev nodes, permissions and /dev/disk/by-* links against major/minor identity.
- Retry the consuming mount/LVM operation only after event processing and identity are confirmed.
Verification chain. kernel device event → uevent properties → udev rules → device node/permissions/symlinks → consumer lookup → storage operation
Step 3 Commands Verify boundary
udevadm info /dev/sda
udevadm monitor
udevadm control --reload && udevadm trigger
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: rule races, changed hardware properties, stale symlinks or custom naming rules can make storage disappear from consumers while the kernel still sees it.
udev evidence shows userspace device-event processing and naming, not device media health, partition metadata or filesystem correctness.
Step 5 Common mistakes Narrow the fault
- Rules that match too broadly.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Write custom rules in /etc/udev/rules.d with a high number. Match on stable attributes (udevadm info -a). Test with udevadm test and apply with udevadm control --reload && udevadm trigger.
udevadm monitor— live device eventslsblk -f— disks, partitions, filesystems, UUIDs and mount pointsblkid— UUIDs, labels and typesfdisk -l / parted -l— partition tablesudevadm info /dev/<dev>— device properties
ReferenceWhat it is1 section · depth on demand
Core model
Start with the kernel device and event, then inspect udev properties/rules and resulting links. A missing /dev/disk/by-* link can be a udev/rule timing issue even when the kernel block device exists. Conversely, a stale node or symlink does not show the device remains present.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
udev evidence shows userspace device-event processing and naming, not device media health, partition metadata or filesystem correctness.
In depth
udev: device events, rules and naming
udev is the user-space device manager. The udev(7) manual page describes its role:
- It receives device events from the kernel, keeps a database of device properties, and sets permissions on device nodes.
- It creates symlinks such as
/dev/disk/by-uuid, and it can rename network interfaces. - Rules are read from
/usr/lib/udev/rules.d,/run/udev/rules.dand/etc/udev/rules.d./etchas the highest priority, and all files are processed together in lexical order. - A symlink to
/dev/nullin/etcdisables a rules file with the same name.
Rule syntax (manual)
| Element | Examples |
|---|---|
| Match keys | ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ATTR{size}=="...", ENV{ID_SERIAL}=="..." |
| Parent match keys | ATTRS{idVendor}=="0403", SUBSYSTEMS=="usb" |
| Assignment keys | SYMLINK+="name", OWNER=, GROUP=, MODE=, RUN+="/path", TAG+= |
| Operators | == and != (match), = (assign), += (add), -= (remove), := (final value) |
Device nodes themselves can't be renamed, only given extra symlinks. NAME applies to network interfaces.
Typical rules
| Goal | Rule |
|---|---|
| Stable name for a USB serial adapter | SUBSYSTEM=="tty", ATTRS{serial}=="A9X1QK2D", SYMLINK+="console-sw1" |
| Group access to a device | SUBSYSTEM=="usb", ATTRS{idVendor}=="1234", GROUP="plugdev", MODE="0660" |
| Disk scheduler per type | ACTION=="add", SUBSYSTEM=="block", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="mq-deadline" |
Finding attributes to match
udevadm info --attribute-walk prints the device's attributes and those of all its parents. Match keys must come from the device itself (ATTR), or from one single parent (ATTRS).
host$ udevadm info --query=property --name=/dev/ttyUSB0 | grep -E "ID_VENDOR_ID|ID_MODEL_ID|ID_SERIAL_SHORT"
ID_VENDOR_ID=0403
ID_MODEL_ID=6001
ID_SERIAL_SHORT=A9X1QK2D
host$ echo 'SUBSYSTEM=="tty", ATTRS{serial}=="A9X1QK2D", SYMLINK+="console-sw1", GROUP="dialout", MODE="0660"' | sudo tee /etc/udev/rules.d/70-console.rules
host$ sudo udevadm control --reload
host$ sudo udevadm trigger --subsystem-match=tty
host$ ls -l /dev/console-sw1
lrwxrwxrwx 1 root root 7 Nov 28 12:10 /dev/console-sw1 -> ttyUSB0
host$ udevadm test /sys/class/tty/ttyUSB0 2>&1 | grep -i console-sw1
host$ udevadm monitor --udev --subsystem-match=block
Testing rules
udevadm test simulates rule processing for one device and shows which rules applied. udevadm monitor shows events live, for example while plugging in a device. After changing rules, control --reload and trigger apply them without a reboot.
Documented example, not captured output.
How it works at runtime
udev is part of Disks & Block Devices → udev. udev is the userspace device manager that reacts to kernel device events, applies rules and properties, and creates or updates device-node permissions and persistent symlinks used by Linux storage consumers.
Topic-specific state model. udev is the userspace device manager that reacts to kernel device events, applies rules and properties, and creates or updates device-node permissions and persistent symlinks used by Linux storage consumers.
Technical metadata. Host, kernel/distribution, timestamp, device major/minor, /dev + sysfs path, model/serial/WWN where available, size/sector geometry, partition-table type and boundaries, UUID/PARTUUID, udev links, filesystem type/UUID/features, mount namespace/source/target/options, free blocks/inodes, PV/VG/LV UUIDs, extents/segments, device-mapper mapping, snapshot/thin state, kernel/storage errors, original workload path and I/O result.
Interpretation rule. - Kernel device present ≠ udev rules completed successfully.
- /dev node or symlink exists ≠ backing kernel device is still present.
- udev rule match ≠ rule action produced intended permissions/name.
- Persistent symlink ≠ underlying disk or filesystem is healthy.
Quick reference
udev applies rules when devices appear: names, symlinks, permissions, attributes, and running helpers.
udevadm info -a -n /dev/sdb | less # attributes to match on
udevadm monitor --udev --property
udevadm test $(udevadm info -q path -n /dev/sdb)
udevadm control --reload; udevadm trigger --subsystem-match=block
# /etc/udev/rules.d/70-usb-backup.rules
SUBSYSTEM=="block", ENV{ID_SERIAL}=="WD_My_Passport_25E2_57584B314135", SYMLINK+="backupdisk", MODE="0660", GROUP="backup"
Rules in /etc/udev/rules.d override /usr/lib/udev/rules.d. Long-running programs must not be started from udev rules (use ENV{SYSTEMD_WANTS}).
Limits and how it fails
Primary failure point. udev evidence shows userspace device-event processing and naming, not device media health, partition metadata or filesystem correctness.
ReferenceConfiguration & state2 sections · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. udev owns userspace device-event handling and persistent symlink creation. Kernel & Hardware owns low-level discovery; storage branches own on-device metadata.
Lifecycle
systemd generators and drop-ins, package scripts, udev, mount helpers, netlink, resolver caches, namespaces, SELinux/AppArmor policy and kernel drivers can make runtime state differ from the file or command that appears to own it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Disks & Block Devices → udev. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/filesystems/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
udev operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for udev.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | udev is the userspace device manager that reacts to kernel device events, applies rules and properties, and creates or updates device-node permissions and persistent symlinks used by Linux storage consumers. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + incident/change time → capture block topology and stable identities → validate partition/device metadata → validate filesystem identity/integrity and effective mount namespace/options → validate PV/VG/LV/device-mapper state where used → make one controlled change at the first failed boundary → re-read effective storage state → repeat original workload I/O/acceptance test. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | kernel device event → uevent properties → udev rules → device node/permissions/symlinks → consumer lookup → storage operation | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | udev evidence proves userspace device-event processing and naming, not device media health, partition metadata or filesystem correctness. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux storage evidence can establish this proof path: kernel device event → uevent properties → udev rules → device node/permissions/symlinks → consumer lookup → storage operation | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured device, metadata, mapping, mount or workload scope. udev evidence proves userspace device-event processing and naming, not device media health, partition metadata or filesystem correctness. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: prove backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change. | Continue to the next unresolved boundary while preserving the original test condition. |
udev · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | udev |
|---|---|
| Topic path | Disks & Block Devices → udev |
| Runtime state | udev is the userspace device manager that reacts to kernel device events, applies rules and properties, and creates or updates device-node permissions and persistent symlinks used by Linux storage consumers. |
| Fast checks | - Confirm the kernel emitted add/change/remove events for the expected device. - Inspect udev properties used by rules and persistent naming. - Validate resulting /dev nodes, permissions and /dev/disk/by-* links against major/minor identity. - Retry the consuming mount/LVM operation only after event processing and identity are proven. |
| Verification chain | kernel device event → uevent properties → udev rules → device node/permissions/symlinks → consumer lookup → storage operation Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | udev evidence proves userspace device-event processing and naming, not device media health, partition metadata or filesystem correctness. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |