Persistent naming attributes

Persistent naming attributes (PNAs) provide stable, predictable device identification based on unique hardware characteristics. They ensure consistent naming across system reboots and hardware changes.

The way you identify and manage storage devices ensures the stability and predictability of the system.

RHEL 10 uses two primary naming schemes for this purpose: traditional device names and persistent naming attributes.

Traditional device names

The Linux kernel assigns traditional device names based on the order in which they appear in the system or their enumeration. For example, the first SATA drive is usually labeled as /dev/sda, the second as /dev/sdb, and so on. While these names are straightforward, they can change when devices are added or removed, hardware configuration is modified, or the system reboots. This can pose challenges for scripting and configuration files. Furthermore, traditional names lack descriptive information about the purpose or characteristics of the device.

Persistent naming attributes

Persistent naming attributes (PNAs) are based on unique characteristics of storage devices. This makes them more stable and predictable when presented to the system, even across system reboots. A key benefit of PNAs is their resilience to hardware configuration changes, making them ideal for maintaining consistent naming conventions. When using PNAs, you can reference storage devices within scripts, configuration files, and management tools without concerns about unexpected name changes. Additionally, PNAs often include valuable metadata, such as device type or manufacturer information like vendor, model name, and serial number. This enhances their descriptiveness for effective device identification and management. PNAs are eventually used to create device links in /dev/disk directory to access individual devices. The way the device link names are constructed and managed is driven by udev rules.

The following is a list of directories we can find in /dev/disk/:

  • Directories with content that remain unique even after system restart:
    • by-id: based on hardware attributes, with the vendor/model/serial_string combination.
    • by-path: Based on physical hardware placement. For devices or disks physically attached to a machine, this refers to the connection point. It is the slot or port connecting to the host bus on the motherboard. However, for devices or disks attached over a network, this contains the network address specification.
    • by-partlabel: Based on a label assigned to a device partition. These labels are assigned by the user.
    • by-partuuid: Based on a unique number in the form of UUID that is auto-generated.
    • by-uuid: Based on a unique number in the form of UUID that is autogenerated.
  • Directory with content that remain unique during the current system run, but not after system restart:
    • by-diskseq: diskseq is 'disk sequence number' that starts at 1 when the system boots. It assigns this number to a newly attached disk and each one after that gets the next number in sequence. When the system reboots, the counter restarts at 1.
  • Directories with content that are used specifically for loop devices:
    • by-loop-ref
    • by-loop-inode