2007-07-31 15:14:04 +04:00
# do not edit this file, it will be overwritten on update
2007-09-25 14:20:17 +04:00
# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path}
2005-09-18 06:41:09 +04:00
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de>
2015-03-24 17:15:45 +03:00
ACTION=="remove", GOTO="persistent_storage_end"
2016-07-15 19:47:42 +03:00
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
2015-03-24 17:15:45 +03:00
2021-07-01 22:19:57 +03:00
SUBSYSTEM!="block|ubi", GOTO="persistent_storage_end"
2019-08-16 14:37:14 +03:00
KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end"
2005-09-18 06:41:09 +04:00
2007-05-16 22:15:21 +04:00
# ignore partitions that span the entire disk
2008-04-03 23:05:19 +04:00
TEST=="whole_disk", GOTO="persistent_storage_end"
2007-06-21 04:15:17 +04:00
2020-01-06 10:10:32 +03:00
# For partitions import parent disk ID_* information, except ID_FS_*.
#
# This is particularly important on media where a filesystem superblock and
# partition table are found on the same level, e.g. common Linux distro ISO
# installation media.
#
# In the case where a partition device points to the same filesystem that
# was detected on the parent disk, the ID_FS_* information is already
# present on the partition devices as well as the parent, so no need to
# propagate it. In the case where the partition device points to a different
# filesystem, merging the parent ID_FS_ properties would lead to
# inconsistencies, so we avoid doing so.
ENV{DEVTYPE}=="partition", \
IMPORT{parent}="ID_[!F]*", IMPORT{parent}="ID_", \
IMPORT{parent}="ID_F[!S]*", IMPORT{parent}="ID_F", \
IMPORT{parent}="ID_FS[!_]*", IMPORT{parent}="ID_FS"
2005-09-18 06:41:09 +04:00
2023-05-24 07:05:56 +03:00
ENV{DEVTYPE}=="partition", ENV{.PART_SUFFIX}="-part%n"
ENV{DEVTYPE}!="partition", ENV{.PART_SUFFIX}=""
2016-04-29 14:02:57 +03:00
# NVMe
2023-05-24 07:05:56 +03:00
KERNEL!="nvme*[0-9]n*[0-9]|nvme*[0-9]n*[0-9]p*[0-9]", GOTO="nvme_end"
ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}"
ATTRS{wwid}=="?*", ENV{ID_WWN}="$attr{wwid}"
ATTRS{model}=="?*", ENV{ID_MODEL}="$attr{model}"
ATTRS{firmware_rev}=="?*", ENV{ID_REVISION}="$attr{firmware_rev}"
ATTRS{nsid}=="?*", ENV{ID_NSID}="$attr{nsid}"
ENV{ID_WWN}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_WWN}$env{.PART_SUFFIX}"
2023-04-20 22:54:59 +03:00
# obsolete symlink with non-escaped characters, kept for backward compatibility
2023-05-24 07:05:56 +03:00
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_MODEL}!="*/*", ENV{ID_SERIAL_SHORT}!="*/*", \
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
2023-03-02 14:06:13 +03:00
# obsolete symlink that might get overridden on adding a new nvme controller, kept for backward compatibility
2023-05-24 07:05:56 +03:00
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", OPTIONS="string_escape=replace", \
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_NSID}=="?*", OPTIONS="string_escape=replace", \
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}_$env{ID_NSID}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
LABEL="nvme_end"
2016-08-17 15:10:28 +03:00
2010-06-25 17:59:23 +04:00
# virtio-blk
2023-05-24 07:05:56 +03:00
KERNEL=="vd*", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}$env{.PART_SUFFIX}"
2010-06-25 17:59:23 +04:00
2015-03-12 17:03:30 +03:00
# ATA
2012-01-01 07:21:15 +04:00
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $devnode"
2024-01-16 08:57:07 +03:00
KERNEL=="sd*[!0-9]|sr*", ENV{ID_BUS}=="ata", ENV{ID_ATA_PERIPHERAL_DEVICE_TYPE}=="20", PROGRAM="scsi_id -u -g $devnode", \
SYMLINK+="disk/by-id/scsi-$result$env{.PART_SUFFIX}"
2015-03-12 17:03:30 +03:00
# ATAPI devices (SPC-3 or later)
2012-01-01 07:21:15 +04:00
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $devnode"
2011-03-30 16:11:03 +04:00
# Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures)
2012-01-01 07:21:15 +04:00
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode"
2015-03-12 17:03:30 +03:00
2022-10-30 03:43:05 +03:00
# Also import properties from usb_id for USB devices
KERNEL=="sd*[!0-9]|sr*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
2011-03-30 16:11:03 +04:00
2015-03-12 18:09:46 +03:00
# SCSI devices
2023-04-11 00:01:13 +03:00
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --allowlisted -d $devnode", ENV{ID_BUS}="scsi"
KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --allowlisted -d $devnode", ENV{ID_BUS}="cciss"
2023-05-24 07:05:56 +03:00
KERNEL=="sd*|sr*|cciss*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}$env{.PART_SUFFIX}"
2022-10-30 03:43:05 +03:00
# Previously, ata_id in the above might not be able to retrieve attributes correctly,
# and properties from usb_id were used as a fallback. See issue #24921 and PR #24923.
# To keep backward compatibility, still we need to create symlinks based on USB serial.
# See issue #25179.
2023-05-24 07:05:56 +03:00
KERNEL=="sd*|sr*|cciss*", ENV{ID_USB_SERIAL}=="?*", SYMLINK+="disk/by-id/usb-$env{ID_USB_SERIAL}$env{.PART_SUFFIX}"
2005-09-18 06:41:09 +04:00
2018-07-10 00:23:25 +03:00
# PMEM devices
2023-05-24 07:05:56 +03:00
KERNEL=="pmem*", ATTRS{uuid}=="?*", SYMLINK+="disk/by-id/pmem-$attr{uuid}$env{.PART_SUFFIX}"
2018-07-10 00:23:25 +03:00
2015-03-12 18:09:46 +03:00
# FireWire
2023-05-24 07:05:56 +03:00
KERNEL=="sd*|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}$env{.PART_SUFFIX}"
2008-10-01 16:42:58 +04:00
2015-03-12 17:03:30 +03:00
# MMC
2023-08-08 08:54:05 +03:00
KERNEL=="mmcblk[0-9]|mmcblk[0-9]p[0-9]*", SUBSYSTEMS=="mmc", GOTO="mmc_start"
GOTO="mmc_end"
LABEL="mmc_start"
2023-05-24 07:05:56 +03:00
ATTRS{name}=="?*", ENV{ID_NAME}="$attr{name}"
ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}"
ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}$env{.PART_SUFFIX}"
LABEL="mmc_end"
2015-03-12 17:03:30 +03:00
# Memstick
2023-08-08 08:54:05 +03:00
KERNEL=="msblk[0-9]|mspblk[0-9]|msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", SUBSYSTEMS=="memstick", GOTO="memstick_start"
GOTO="memstick_end"
LABEL="memstick_start"
2023-05-24 07:05:56 +03:00
ATTRS{name}=="?*", ENV{ID_NAME}="$attr{name}"
ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}"
ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}$env{.PART_SUFFIX}"
LABEL="memstick_end"
2008-11-19 13:24:03 +03:00
2015-03-12 17:03:30 +03:00
# by-path
2011-08-05 04:00:30 +04:00
ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id"
2022-09-20 20:26:42 +03:00
ENV{DEVTYPE}=="disk", SUBSYSTEMS=="nvme-subsystem", IMPORT{builtin}="path_id"
2023-05-01 20:28:35 +03:00
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-boot%n"
KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_WITH_USB_REVISION}-boot%n"
2023-05-24 07:05:56 +03:00
KERNEL!="mmcblk[0-9]boot[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}$env{.PART_SUFFIX}"
KERNEL!="mmcblk[0-9]boot[0-9]", ENV{ID_PATH_ATA_COMPAT}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_ATA_COMPAT}$env{.PART_SUFFIX}"
KERNEL!="mmcblk[0-9]boot[0-9]", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH_WITH_USB_REVISION}$env{.PART_SUFFIX}"
2007-06-21 04:15:17 +04:00
2017-03-01 23:30:17 +03:00
# legacy virtio-pci by-path links (deprecated)
2023-05-24 07:05:56 +03:00
KERNEL=="vd*", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}$env{.PART_SUFFIX}"
KERNEL=="vd*", ENV{ID_PATH_WITH_USB_REVISION}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH_WITH_USB_REVISION}$env{.PART_SUFFIX}"
2017-03-01 23:30:17 +03:00
2023-03-07 11:00:00 +03:00
{% if HAVE_BLKID %}
udev: add flag to allow disabling blkid probing
This can be useful for users of slow block devices.
For example, the persistent-storage rules are needed for USB floppy
drives be recognized by udisks2, but the extra blkid calls cause
thrashing for 25+ seconds after every disk change.
With this change, a user wishing to avoid the extra blkid invocation(s)
could create /etc/udev/rules.d/55-floppy-noprobe.rules as follows:
# Don't probe PC floppy drives
SUBSYSTEM=="block", KERNEL=="fd*", \
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"
# Don't probe USB floppy drives
SUBSYSTEM=="block", SUBSYSTEMS=="usb", \
ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", \
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"
I didn't exclude floppies by default in this change, because floppy
devices are also emulated by some BIOSes/hypervisors in some cases, and
I don't know how many systems would fail to boot if /dev/disk/by-uuid/*
became unavailable for 'floppy disks' on those systems.
2022-07-11 07:47:45 +03:00
# allow admin to disable probing the filesystem for slow devices like floppy disk drives
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}=="1", GOTO="persistent_storage_blkid_probe_end"
2008-08-22 12:11:34 +04:00
# probe filesystem metadata of optical drives which have a media inserted
2011-12-23 06:21:53 +04:00
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \
udev-builtin-blkid: add support for --hint offsets
The next libblkid v2.37 is going to support session offsets for
multi-session CD/DVDs. This feature is implemented by "hint offsets".
These offsets are optional and prober specific (e.g., iso, udf, ...).
For this purpose, the library provides a new function
blkid_probe_set_hint(), and blkid(8) provides a new command-line
option --hint <name>=<offset>. For CD/DVD, the offset name is
"session_offset".
The difference between classic --offset and the new --hint is that
--offset is very restrictive and defines the probing area and the rest
of the device is invisible to the library. The new --hint works
like a suggestion, it provides a hint where the user assumes the
filesystem, but the rest of the device is still readable for the
library (for example, to get some additional superblock information
etc.).
If the --hint is without a value then it defaults to zero.
The option --hint implementation in udev-builtin-blkid.c is backwardly
compatible. If compiled against old libblkid, then the option is used in
the same way as --offset.
Addresses: https://github.com/karelzak/util-linux/issues/1161
Addresses: https://github.com/systemd/systemd/pull/17424
2020-11-30 13:38:21 +03:00
IMPORT{builtin}="blkid --hint=session_offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
2009-09-20 21:07:51 +04:00
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
2011-12-23 06:21:53 +04:00
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
IMPORT{builtin}="blkid --noraid"
2008-08-22 12:11:34 +04:00
2009-02-11 23:54:43 +03:00
# probe filesystem metadata of disks
2021-02-13 06:08:28 +03:00
KERNEL!="sr*|mmcblk[0-9]boot[0-9]", IMPORT{builtin}="blkid"
2009-02-11 23:54:43 +03:00
udev: add flag to allow disabling blkid probing
This can be useful for users of slow block devices.
For example, the persistent-storage rules are needed for USB floppy
drives be recognized by udisks2, but the extra blkid calls cause
thrashing for 25+ seconds after every disk change.
With this change, a user wishing to avoid the extra blkid invocation(s)
could create /etc/udev/rules.d/55-floppy-noprobe.rules as follows:
# Don't probe PC floppy drives
SUBSYSTEM=="block", KERNEL=="fd*", \
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"
# Don't probe USB floppy drives
SUBSYSTEM=="block", SUBSYSTEMS=="usb", \
ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", \
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"
I didn't exclude floppies by default in this change, because floppy
devices are also emulated by some BIOSes/hypervisors in some cases, and
I don't know how many systems would fail to boot if /dev/disk/by-uuid/*
became unavailable for 'floppy disks' on those systems.
2022-07-11 07:47:45 +03:00
LABEL="persistent_storage_blkid_probe_end"
2023-03-07 11:00:00 +03:00
{% endif %}
udev: add flag to allow disabling blkid probing
This can be useful for users of slow block devices.
For example, the persistent-storage rules are needed for USB floppy
drives be recognized by udisks2, but the extra blkid calls cause
thrashing for 25+ seconds after every disk change.
With this change, a user wishing to avoid the extra blkid invocation(s)
could create /etc/udev/rules.d/55-floppy-noprobe.rules as follows:
# Don't probe PC floppy drives
SUBSYSTEM=="block", KERNEL=="fd*", \
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"
# Don't probe USB floppy drives
SUBSYSTEM=="block", SUBSYSTEMS=="usb", \
ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", \
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_BLKID_FLAG}="1"
I didn't exclude floppies by default in this change, because floppy
devices are also emulated by some BIOSes/hypervisors in some cases, and
I don't know how many systems would fail to boot if /dev/disk/by-uuid/*
became unavailable for 'floppy disks' on those systems.
2022-07-11 07:47:45 +03:00
2008-04-20 23:15:00 +04:00
# by-label/by-uuid links (filesystem metadata)
2007-05-17 22:19:25 +04:00
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
2018-05-15 17:51:07 +03:00
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
2005-09-18 06:41:09 +04:00
2009-11-25 19:06:10 +03:00
# by-id (World Wide Name)
2023-05-24 07:05:56 +03:00
ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}$env{.PART_SUFFIX}"
2009-11-25 19:06:10 +03:00
2011-06-11 15:35:53 +04:00
# by-partlabel/by-partuuid links (partition metadata)
2016-05-09 12:24:55 +03:00
ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
2011-06-11 15:35:53 +04:00
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}"
udev: generate system-unique storage symlinks using device path
When the same disk image is written to multiple storage units, for
example an external SD card and an internal eMMC, the symlinks in
/dev/disk/by-{label,uuid,partlabel,partuuid}/ are no longer unique, and
will point to the device that is probed last.
Adressing partitions via labels and UUIDs is nice to work with, and
depending on the use case, it might also be more robust than using the
symlinks in /dev/disk/by-path/ containing the partition number. Combine
the two approaches to create unique symlinks containing both the device
path as well as the respective UUIDs or labels, and throw in a symlink
using the devpath and the partition number for the sake of completeness.
For an exemplary GPT-partitioned disk at "platform-2198000.mmc" with a
partition containing an ext4 file system, this might create symlinks of
the following form:
/dev/disk/by-path/platform-2198000.mmc-part/by-partnum/1
/dev/disk/by-path/platform-2198000.mmc-part/by-partuuid/e5a75233-3b90-4aec-8075-b4dd7132b48d
/dev/disk/by-path/platform-2198000.mmc-part/by-partlabel/rootfs
/dev/disk/by-path/platform-2198000.mmc-part/by-uuid/b2c92f24-8215-4680-b931-f423aae5f1c9
/dev/disk/by-path/platform-2198000.mmc-part/by-label/rootfs
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
2023-09-18 12:52:06 +03:00
# by-path/<path>/by-* links (path + partition/filesystem metadata)
ENV{ID_PATH}=="", GOTO="persistent_storage_by-path_parts_end"
ENV{DEVTYPE}!="partition", GOTO="persistent_storage_by-path_parts_end"
SYMLINK+="disk/by-path/$env{ID_PATH}-part/by-partnum/%n"
ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part/by-partuuid/$env{ID_PART_ENTRY_UUID}"
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part/by-partlabel/$env{ID_PART_ENTRY_NAME}"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="persistent_storage_by-path_parts_end"
2022-03-31 11:10:37 +03:00
# by-diskseq link (if an app is told to open a path like this, they may parse
# the diskseq number from the path, then issue BLKGETDISKSEQ to verify they really got
# the right device, to access specific disks in a race-free fashion)
2023-05-24 07:05:56 +03:00
ENV{DISKSEQ}=="?*", ENV{ID_IGNORE_DISKSEQ}!="1", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}$env{.PART_SUFFIX}"
2022-03-31 11:10:37 +03:00
2023-07-21 04:26:13 +03:00
# Create symlinks that allow referencing loopback devices by their backing file's inode number
ENV{ID_LOOP_BACKING_DEVICE}!="", ENV{ID_LOOP_BACKING_INODE}!="", SYMLINK+="disk/by-loop-inode/$env{ID_LOOP_BACKING_DEVICE}-$env{ID_LOOP_BACKING_INODE}$env{.PART_SUFFIX}"
# Similar, but uses the .lo_file_name field of the loopback device (note that
# this is basically just a free-form string passed from userspace to the kernel
# when the device is created, it is not necessarily a file system path like the
# "loop/backing_file" sysfs attribute, which is always an absolute path)
ENV{ID_LOOP_BACKING_FILENAME_ENC}!="", SYMLINK+="disk/by-loop-ref/$env{ID_LOOP_BACKING_FILENAME_ENC}$env{.PART_SUFFIX}"
2006-03-21 18:20:54 +03:00
LABEL="persistent_storage_end"