This will enable us to detect filesystems or other formatting on md arrays. --- 70-anaconda.rules | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/70-anaconda.rules b/70-anaconda.rules index 42ac1d4..8ccfdcf 100644 --- a/70-anaconda.rules +++ b/70-anaconda.rules @@ -1,7 +1,7 @@ ACTION!="add|change", GOTO="anaconda_end" SUBSYSTEM!="block", GOTO="anaconda_end" -KERNEL!="dm-*", GOTO="anaconda_raid_probe" +KERNEL!="dm-*", GOTO="anaconda_mdraid" IMPORT{program}="/usr/sbin/dmsetup info -c --nameprefixes --unquoted --rows --noheadings -o name,uuid,suspended,readonly,major,minor,open,tables_loaded -j%M -m%m" ENV{DM_NAME}!="?*", GOTO="anaconda_end" @@ -15,8 +15,32 @@ IMPORT{program}="vol_id --export $tempnode" OPTIONS="link_priority=-100" ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -LABEL="anaconda_raid_probe" +LABEL="anaconda_mdraid" +KERNEL!="md*", GOTO="anaconda_mdraid_member" + +# container devices have a metadata version of e.g. 'external:ddf' and +# never leave state 'inactive' +ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" +TEST!="md/array_state", GOTO="anaconda_mdraid_member" +ATTR{md/array_state}=="|clear|inactive", GOTO="anaconda_mdraid_member" +LABEL="md_ignore_state" + +IMPORT{program}="/usr/sbin/mdadm --detail --export $tempnode" +ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace" +ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" +ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}" +ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace" +ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n" +ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n" +ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n" +IMPORT{program}="vol_id --export $tempnode" +OPTIONS+="link_priority=100" +OPTIONS+="watch" +ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" +ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + +LABEL="anaconda_mdraid_member" # probe raid metadata of mdraid member devices ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/usr/sbin/mdadm --examine --export $tempnode" -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list