mirror of
https://github.com/ceph/ceph
synced 2024-12-22 11:31:55 +00:00
42ad86e14e
The dm-* devices are not excluded and will have by-partuuid symlinks etc. This will include devices managed by multipath as well as others. Since this only is used on partitions: # ignore partitions that span the entire disk TEST=="whole_disk", GOTO="persistent_storage_end_two" It may create symlinks for dm-* devices that are unrelated to Ceph and we assume this is going to be ok. Signed-off-by: Loic Dachary <ldachary@redhat.com>
38 lines
1.7 KiB
Plaintext
38 lines
1.7 KiB
Plaintext
#
|
|
# this is a kludge installed by ceph to fix the /dev/disk/by-partuuid
|
|
# symlinks on systems with old udev (< 180). it's a stripped down
|
|
# version of a newer 60-persistent-storage.rules file that hopefully
|
|
# captures the same set of conditions for setting up those symlinks.
|
|
#
|
|
|
|
# forward scsi device event to corresponding block device
|
|
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
|
|
|
|
ACTION=="remove", GOTO="persistent_storage_end_two"
|
|
|
|
SUBSYSTEM!="block", GOTO="persistent_storage_end_two"
|
|
|
|
# skip rules for inappropriate block devices
|
|
KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|md*", GOTO="persistent_storage_end_two"
|
|
|
|
# ignore partitions that span the entire disk
|
|
TEST=="whole_disk", GOTO="persistent_storage_end_two"
|
|
|
|
# for partitions import parent information
|
|
ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
|
|
|
|
# skip unpartitioned removable media devices from drivers which do not send "change" events
|
|
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end_two"
|
|
|
|
# probe filesystem metadata of disks
|
|
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
|
|
|
|
# by-partlabel/by-partuuid links (partition metadata)
|
|
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
|
|
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}"
|
|
|
|
# NEW: by-parttypeuuid links (type.id)
|
|
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="?*", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-parttypeuuid/$env{ID_PART_ENTRY_TYPE}.$env{ID_PART_ENTRY_UUID}"
|
|
|
|
LABEL="persistent_storage_end_two"
|