dracut/modules.d/90mdraid/65-md-incremental-imsm.rules

26 lines
763 B
Plaintext

# This file causes block devices with Linux RAID (mdadm) signatures to
# automatically cause mdadm to be run.
# See udev(8) for syntax
ACTION!="add|change", GOTO="md_inc_end"
SUBSYSTEM!="block", GOTO="md_inc_end"
ENV{ID_FS_TYPE}!="linux_raid_member|isw_raid_member", GOTO="md_inc_end"
ENV{ID_FS_TYPE}=="isw_raid_member", ENV{rd_NO_MDIMSM}=="?*", GOTO="md_inc_end"
TEST=="/tmp/.mdraid_start-%k", GOTO="md_inc_end"
IMPORT{program}="/sbin/mdadm --examine --export $tempnode"
# UUID CHECK
LABEL="do_md_inc"
ENV{DEVTYPE}!="partition", \
RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
RUN+="/sbin/mdadm -I --no-degraded $env{DEVNAME}"
RUN+="/bin/sh -c '>/tmp/.mdraid_start-%k; /bin/ln -s /sbin/mdraid_start /initqueue/mdraid_start.sh'"
LABEL="md_inc_end"