]> git.ipfire.org Git - thirdparty/mdadm.git/blame - udev-md-clustered-confirm-device.rules
Create.c: fix uclibc build
[thirdparty/mdadm.git] / udev-md-clustered-confirm-device.rules
CommitLineData
0e23c597
GJ
1# do not edit this file, it will be overwritten on update
2
3SUBSYSTEM!="block", GOTO="clustermd_end"
4
5# handle md arrays
6KERNEL!="md*", GOTO="clustermd_end"
7ENV{DEVTYPE}!="disk", GOTO="clustermd_end"
8ACTION!="change", GOTO="clustermd_end"
9ENV{EVENT}!="ADD_DEVICE", GOTO="clustermd_end"
10ENV{DEVICE_UUID}!="?*", GOTO="clustermd_end"
11ENV{RAID_DISK}!="?*", GOTO="clustermd_end"
12
13# Based on the received UUID, node confirms the device if
14# it is found by blkid, otherwise the node reports it is
15# missing.
16PROGRAM="BINDIR/blkid -o device -t UUID_SUB=$env{DEVICE_UUID}", ENV{.md.newdevice} = "$result"
17
18ENV{.md.newdevice}!="", RUN+="BINDIR/mdadm --manage $env{DEVNAME} --cluster-confirm $env{RAID_DISK}:$env{.md.newdevice}"
19ENV{.md.newdevice}=="", RUN+="BINDIR/mdadm --manage $env{DEVNAME} --cluster-confirm $env{RAID_DISK}:missing"
20
21LABEL="clustermd_end"