Submit
Path:
~
/
/
lib
/
udev
/
rules.d
/
File Content:
56-dm-mpath.rules
ACTION!="add|change", GOTO="mpath_end" ENV{DM_UDEV_RULES}!="?*", GOTO="mpath_end" ENV{DM_UUID}!="mpath-?*", GOTO="mpath_end" IMPORT{db}="DM_DISABLE_OTHER_RULES_FLAG_OLD" IMPORT{db}="MPATH_DEVICE_READY" # If this uevent didn't come from dm, don't try to update the # device state ENV{DM_COOKIE}!="?*", ENV{DM_ACTION}!="PATH_*", IMPORT{db}="DM_UDEV_DISABLE_OTHER_RULES_FLAG", IMPORT{db}="DM_NOSCAN", GOTO="scan_import" ENV{.MPATH_DEVICE_READY_OLD}="$env{MPATH_DEVICE_READY}" # multipath sets DM_SUBSYSTEM_UDEV_FLAG2 when it reloads a # table with no active devices. If this happens, mark the # device not ready ENV{DM_SUBSYSTEM_UDEV_FLAG2}=="1", ENV{MPATH_DEVICE_READY}="0",\ GOTO="mpath_action" # If the last path has failed mark the device not ready # Note that DM_NR_VALID_PATHS is only set for PATH_FAILED|PATH_REINSTATED # events. # This may not be reliable, as events aren't necessarily received in order. ENV{DM_NR_VALID_PATHS}=="0", ENV{MPATH_DEVICE_READY}="0", GOTO="mpath_action" ENV{MPATH_SBIN_PATH}="/sbin" TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin" # Don't run multipath -U during "coldplug" after switching root, # because paths are just being added to the udev db. ACTION=="add", ENV{.MPATH_DEVICE_READY_OLD}=="1", GOTO="paths_ok" # Check the map state directly with multipath -U. # This doesn't attempt I/O on the device. PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -U -v1 %k", GOTO="paths_ok" ENV{MPATH_DEVICE_READY}="0", GOTO="mpath_action" LABEL="paths_ok" # Don't mark a device ready on a PATH_FAILED event. even if # DM_NR_VALID_PATHS is greater than 0. Just keep the existing # value ENV{DM_ACTION}=="PATH_FAILED", GOTO="mpath_action" # This event is either a PATH_REINSTATED or a table reload where # there are active paths. Mark the device ready ENV{MPATH_DEVICE_READY}="1" LABEL="mpath_action" # DM_SUBSYSTEM_UDEV_FLAG0 is the "RELOAD" flag for multipath subsystem. # Drop the DM_ACTIVATION flag here as mpath reloads tables if any of its # paths are lost/recovered. For any stack above the mpath device, this is not # something that should be reacted upon since it would be useless extra work. # It's exactly mpath's job to provide *seamless* device access to any of the # paths that are available underneath. ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", \ ENV{DM_ACTIVATION}="0", ENV{MPATH_UNCHANGED}="1" # For path failed or reinstated events, unset DM_ACTIVATION. # This is similar to the DM_SUBSYSTEM_UDEV_FLAG0 case above. ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", \ ENV{DM_ACTIVATION}="0", ENV{MPATH_UNCHANGED}="1" # Do not initiate scanning if no path is available, # otherwise there would be a hang or IO error on access. # We'd like to avoid this, especially within udev processing. ENV{MPATH_DEVICE_READY}=="0", ENV{DM_NOSCAN}="1" # Also skip all foreign rules if no path is available. # Remember the original value of DM_DISABLE_OTHER_RULES_FLAG # and restore it back once we have at least one path available. ENV{MPATH_DEVICE_READY}=="0", ENV{.MPATH_DEVICE_READY_OLD}=="1",\ ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}=="",\ ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="$env{DM_UDEV_DISABLE_OTHER_RULES_FLAG}" ENV{MPATH_DEVICE_READY}=="0", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1" ENV{MPATH_DEVICE_READY}!="0", ENV{.MPATH_DEVICE_READY_OLD}=="0",\ ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}",\ ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="",\ ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0" # The code to check multipath state ends here. We need to set # properties and symlinks regardless whether the map is usable or # not. If symlinks get lost, systemd may auto-unmount file systems. LABEL="scan_import" ENV{DM_NOSCAN}!="1", GOTO="import_end" IMPORT{db}="ID_FS_TYPE" IMPORT{db}="ID_FS_USAGE" IMPORT{db}="ID_FS_UUID" IMPORT{db}="ID_FS_UUID_ENC" IMPORT{db}="ID_FS_LABEL" IMPORT{db}="ID_FS_LABEL_ENC" IMPORT{db}="ID_FS_VERSION" LABEL="import_end" # Multipath maps should take precedence over their members. ENV{DM_UDEV_LOW_PRIORITY_FLAG}!="1", OPTIONS+="link_priority=50" # Set some additional symlinks that typically exist for mpath # path members, too, and should be overridden. # kpartx_id is very robust, it works for suspended maps and maps # with 0 dependencies. It sets DM_TYPE, DM_PART, DM_WWN TEST=="/lib/udev/kpartx_id", \ IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}" ENV{DM_TYPE}=="?*", ENV{DM_SERIAL}=="?*", \ SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_SERIAL}" ENV{DM_WWN}=="?*", SYMLINK+="disk/by-id/wwn-$env{DM_WWN}" LABEL="mpath_end"
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
01-md-raid-creating.rules
321 bytes
0644
40-usb_modeswitch.rules
42861 bytes
0644
40-vm-hotadd.rules
655 bytes
0644
50-apport.rules
165 bytes
0644
50-firmware.rules
210 bytes
0644
50-udev-default.rules
4846 bytes
0644
55-dm.rules
7274 bytes
0644
55-scsi-sg3_id.rules
6664 bytes
0644
56-dm-mpath.rules
4560 bytes
0644
56-dm-parts.rules
1442 bytes
0644
56-lvm.rules
2420 bytes
0644
58-scsi-sg3_symlink.rules
2863 bytes
0644
60-autosuspend.rules
419 bytes
0644
60-block.rules
703 bytes
0644
60-cdrom_id.rules
1071 bytes
0644
60-drm.rules
413 bytes
0644
60-evdev.rules
990 bytes
0644
60-fido-id.rules
491 bytes
0644
60-input-id.rules
282 bytes
0644
60-multipath.rules
3863 bytes
0644
60-open-vm-tools.rules
250 bytes
0644
60-persistent-alsa.rules
616 bytes
0644
60-persistent-input.rules
2719 bytes
0644
60-persistent-storage-dm.rules
1794 bytes
0644
60-persistent-storage-tape.rules
2135 bytes
0644
60-persistent-storage.rules
9145 bytes
0644
60-persistent-v4l.rules
769 bytes
0644
60-sensor.rules
736 bytes
0644
60-serial.rules
1190 bytes
0644
60-tpm-udev.rules
243 bytes
0644
61-persistent-storage-android.rules
455 bytes
0644
63-md-raid-arrays.rules
2452 bytes
0644
64-btrfs-dm.rules
387 bytes
0644
64-btrfs-zoned.rules
346 bytes
0644
64-btrfs.rules
612 bytes
0644
64-md-raid-assembly.rules
1462 bytes
0644
66-azure-ephemeral.rules
1951 bytes
0644
68-del-part-nodes.rules
1141 bytes
0644
69-bcache.rules
1044 bytes
0644
69-lvm-metad.rules
5813 bytes
0644
69-md-clustered-confirm-device.rules
846 bytes
0644
70-iscsi-network-interface.rules
226 bytes
0644
70-joystick.rules
432 bytes
0644
70-memory.rules
184 bytes
0644
70-mouse.rules
734 bytes
0644
70-open-iscsi.rules
253 bytes
0644
70-power-switch.rules
576 bytes
0644
70-touchpad.rules
473 bytes
0644
70-uaccess.rules
2676 bytes
0644
71-power-switch-proliant.rules
461 bytes
0644
71-seat.rules
3810 bytes
0644
73-seat-late.rules
643 bytes
0644
73-special-net-names.rules
969 bytes
0644
75-net-description.rules
452 bytes
0644
75-probe_mtd.rules
174 bytes
0644
78-graphics-card.rules
965 bytes
0644
78-sound-card.rules
4816 bytes
0644
80-debian-compat.rules
594 bytes
0644
80-drivers.rules
617 bytes
0644
80-net-setup-link.rules
295 bytes
0644
81-net-dhcp.rules
528 bytes
0644
85-hdparm.rules
82 bytes
0644
90-bolt.rules
359 bytes
0644
90-console-setup.rules
265 bytes
0644
95-dm-notify.rules
479 bytes
0644
95-kpartx.rules
1401 bytes
0644
96-e2scrub.rules
171 bytes
0644
99-lxd-agent.rules
141 bytes
0644
99-systemd.rules
4600 bytes
0644
99-vmware-scsi-udev.rules
433 bytes
0644
N4ST4R_ID | Naxtarrr