Accepting request 35700 from Base:System

checked in (request 35700)

OBS-URL: https://build.opensuse.org/request/show/35700
OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=19
This commit is contained in:
OBS User autobuild 2010-03-26 00:36:14 +00:00 committed by Git OBS Bridge
parent b4b044b24c
commit 3e16800e9e
6 changed files with 6 additions and 92 deletions

View File

@ -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="/bin/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"

View File

@ -1,38 +1,4 @@
-------------------------------------------------------------------
Wed Mar 24 17:37:27 CET 2010 - mmarek@suse.cz
- 64-md-raid.rules: Use absolute path to grep, otherwise udev will
only search in /lib/udev (bnc#590832).
-------------------------------------------------------------------
Tue Mar 23 14:49:38 CET 2010 - mmarek@suse.cz
- mkinitrd-*.sh: Assemble md arrays even if the root= or resume=
option doesn't directly refer to md (bnc#589676, bnc#586837,
bnc#583424).
-------------------------------------------------------------------
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).

View File

@ -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

View File

@ -42,9 +42,6 @@ md_assemble()
{
local dev=$1 mdconf container
if test -e "$dev"; then
return
fi
case "$dev" in
/dev/md[0-9]*p[0-9]*)
dev=${dev%p[0-9]*}
@ -87,8 +84,5 @@ if [ -n "$need_mdadm" ]; then
if [ -n "$md_dev" ] ; then
md_assemble "$md_dev"
fi
for dev in $md_devs; do
md_assemble "$dev"
done
wait_for_events
fi

View File

@ -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"
@ -87,10 +84,6 @@ if [ -n "$root_md" ] ; then
eval echo -e \"\$md_conf_$md\" >> $tmp_mnt/etc/mdadm.conf
done
fi
# Remember which arrays are needed for the root or swap device and assemble
# them all during boot. The root= or resume= option might not directly refer to
# the array.
md_devs=$(printf '/dev/%s ' $md_devs)
save_var need_mdadm
save_var md_devs
save_var root_md

0
ready
View File