From c2912a06085959cf3620a65d2d52960fad22868a79e6ada9f98880399315ad9c Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Sun, 21 Mar 2010 10:51:29 +0000 Subject: [PATCH] Accepting request 35415 from openSUSE:Factory Copy from openSUSE:Factory/mdadm based on submit request 35415 from user coolo OBS-URL: https://build.opensuse.org/request/show/35415 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=40 --- 64-md-raid.rules | 35 ----------------------------------- mdadm.changes | 21 --------------------- mdadm.spec | 10 +++------- mkinitrd-setup.sh | 7 ++----- 4 files changed, 5 insertions(+), 68 deletions(-) delete mode 100644 64-md-raid.rules diff --git a/64-md-raid.rules b/64-md-raid.rules deleted file mode 100644 index deccce4..0000000 --- a/64-md-raid.rules +++ /dev/null @@ -1,35 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM!="block", GOTO="md_end" -ACTION!="add|change", GOTO="md_end" - -# import data from a raid member and activate it -ENV{ID_FS_TYPE}=="linux_raid_member", PROGRAM="grep -qs '^AUTO -all' /etc/mdadm.conf", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}" -# import data from a raid set -KERNEL!="md*", GOTO="md_end" - -# 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" -ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" -LABEL="md_ignore_state" - -IMPORT{program}="/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", GOTO="md_vol_id" -IMPORT{program}="/sbin/mdadm --detail --export %r/$parent" -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" - -LABEL="md_vol_id" -IMPORT{program}="/sbin/blkid -o udev -p $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}" -ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - -LABEL="md_end" diff --git a/mdadm.changes b/mdadm.changes index 5b5d3f3..322d019 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,25 +1,4 @@ ------------------------------------------------------------------- -Thu Mar 11 10:18:18 CET 2010 - mmarek@suse.cz - -- 64-md-raid.rules: Use blkid instead of vol_id. - -------------------------------------------------------------------- -Thu Mar 11 09:58:21 CET 2010 - mmarek@suse.cz - -- 64-md-raid.rules: Allow --incremental assembly if "AUTO -all" is - given in mdadm.conf (fate#307478). - -------------------------------------------------------------------- -Tue Mar 9 16:15:41 CET 2010 - mmarek@suse.cz - -- Install udev rules in /lib/udev/rules.d (fate#307478). - -------------------------------------------------------------------- -Mon Feb 22 15:14:03 CET 2010 - mmarek@suse.cz - -- mkinitrd-setup.sh: call mdadm --scan only if necessary - (bnc#581769). - Fri Jan 15 17:37:26 CET 2010 - mmarek@suse.cz - fix modprobe invocation in boot.md (bnc#565293). diff --git a/mdadm.spec b/mdadm.spec index 2848587..2b84225 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -20,7 +20,7 @@ Name: mdadm Version: 3.0.3 -Release: 3 +Release: 4 BuildRequires: sgmltool PreReq: %fillup_prereq %insserv_prereq Obsoletes: raidtools @@ -37,7 +37,6 @@ Source3: mdadmd Source4: boot.md Source5: mkinitrd-setup.sh Source6: mkinitrd-boot.sh -Source7: 64-md-raid.rules %description Mdadm is a program that can be used to control Linux md devices. It is @@ -74,8 +73,8 @@ ln -sf ../../etc/init.d/mdadmd $RPM_BUILD_ROOT/%{_sbindir}/rcmdadmd rm -rf $RPM_BUILD_ROOT/var/run/mdadm mkdir -p $RPM_BUILD_ROOT/var/run ln -s mdadm $RPM_BUILD_ROOT/var/run/mdadm -install -d $RPM_BUILD_ROOT/lib/udev/rules.d -install -m 644 %_sourcedir/64-md-raid.rules $RPM_BUILD_ROOT/lib/udev/rules.d +# remove here, using the one in the udev package +rm -f $RPM_BUILD_ROOT/lib/udev/rules.d/64-md-raid.rules %post [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup @@ -118,8 +117,5 @@ rm -rf $RPM_BUILD_ROOT %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-md.sh /lib/mkinitrd/scripts/boot-md.sh -%dir /lib/udev -%dir /lib/udev/rules.d -/lib/udev/rules.d/64-md-raid.rules %changelog diff --git a/mkinitrd-setup.sh b/mkinitrd-setup.sh index 5f25c80..750508c 100644 --- a/mkinitrd-setup.sh +++ b/mkinitrd-setup.sh @@ -6,7 +6,7 @@ mdblockdev= # Full mdadm.conf generated by mdadm. # Contains all created MD RAIDs -mdadm_conf= +mdadm_conf=$(mdadm --examine --brief --scan) cont_list= md_devs= @@ -64,10 +64,7 @@ for bd in $blockdev ; do mdconf="$(mdadm -Db "$container")\\n$mdconf" ;; [0-9a-f]*[0-9a-f]) - if test -z "$mdadm_conf"; then - mdadm_conf=$(mdadm --examine --brief --scan) - fi - mdconf="$(echo "$mdadm_conf" | grep "UUID=$container")\\n$mdconf" + mdconf="$(mdadm -Ebs | grep "UUID=$container")\\n$mdconf" ;; *) echo "unrecognized container for $md_dev: $container"