Accepting request 79195 from Base:System
New upstream mdadm release, and assort minor tidy-ups. - boot.md: improve 'status' and add 'reload' function. Also change 'Raid' to 'RAID' for consistency (bnc#709474) - Use udev rules file from upstream package, rather have having a separate one. - Update to new upstream 3.2.2 plug git patches. Also update FSF address in boot-md. OBS-URL: https://build.opensuse.org/request/show/79195 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=60
This commit is contained in:
@@ -1,40 +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"
|
|
||||||
|
|
||||||
ENV{DEVTYPE}!="disk",GOTO="md_not_disk"
|
|
||||||
#this extra caution avoids some races with the device disappearing
|
|
||||||
TEST!="md/array_state", 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{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
|
|
||||||
ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
|
|
||||||
ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
|
|
||||||
|
|
||||||
LABEL="md_not_disk"
|
|
||||||
|
|
||||||
ENV{DEVTYPE}!="partition", GOTO="md_vol_id"
|
|
||||||
IMPORT{program}="/sbin/mdadm --detail --export %r/$parent"
|
|
||||||
ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
|
|
||||||
ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
|
|
||||||
ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
|
|
||||||
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"
|
|
33
boot.md
33
boot.md
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# SUSE system startup script for MD Raid autostart
|
# SUSE system startup script for MD RAID autostart
|
||||||
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
|
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
|
||||||
# Copyright (C) 2006 Marian Jancar, SUSE / Novell Inc.
|
# Copyright (C) 2006 Marian Jancar, SUSE / Novell Inc.
|
||||||
#
|
#
|
||||||
@@ -15,9 +15,9 @@
|
|||||||
# Lesser General Public License for more details.
|
# Lesser General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# USA.
|
# 02110-1301 USA.
|
||||||
#
|
#
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: boot.md
|
# Provides: boot.md
|
||||||
@@ -96,7 +96,7 @@ function _rc_exit {
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting MD Raid "
|
echo -n "Starting MD RAID "
|
||||||
|
|
||||||
# create the /var/run/mdadm symlink if needed
|
# create the /var/run/mdadm symlink if needed
|
||||||
mkdir -p /dev/.mdadm
|
mkdir -p /dev/.mdadm
|
||||||
@@ -137,17 +137,32 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Shutting down MD Raid "
|
echo -n "Not shutting down MD RAID - reboot/halt scripts do this."
|
||||||
|
rc_failed 3
|
||||||
# Remember status and be verbose
|
# Remember status and be verbose
|
||||||
rc_status -v
|
rc_status -v
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
rc_failed 4
|
echo -n "MD RAID arrays:"
|
||||||
|
count=`grep -c ' active ' /proc/mdstat 2> /dev/null`
|
||||||
|
case $count in
|
||||||
|
0 ) echo -n " No arrays active"; rc_failed 3;;
|
||||||
|
1 ) echo -n " 1 array active";;
|
||||||
|
* ) echo -n " $count arrays active";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
# We cannot really reload the kernel module, or reassemble the
|
||||||
|
# arrays, but we can restart mdmon. It will replace existing
|
||||||
|
# mdmon, or exit quietly if there is nothing to do.
|
||||||
|
echo -n "MD RAID: restarting mdmon if it is needed."
|
||||||
|
/sbin/mdmon --all --takeover
|
||||||
rc_status -v
|
rc_status -v
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|status}"
|
echo "Usage: $0 {start|stop|status|reload}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:849ad0ad4ad3c1d2d8806a16b30e1f59ab2daf313cb103807207f7cba889ea63
|
|
||||||
size 288578
|
|
3
mdadm-3.2.2.tar.bz2
Normal file
3
mdadm-3.2.2.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0d1a04e688b082bc88846e3f524abd50bc782b6ffc06123140f7d358c8f9b906
|
||||||
|
size 357234
|
1003
mdadm-3.2.2_git3b1dab1bdbda0
Normal file
1003
mdadm-3.2.2_git3b1dab1bdbda0
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 18 06:30:45 UTC 2011 - nfbrown@novell.com
|
||||||
|
|
||||||
|
- boot.md: improve 'status' and add 'reload'
|
||||||
|
function. Also change 'Raid' to 'RAID'
|
||||||
|
for consistency (bnc#709474)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 18 06:01:39 UTC 2011 - nfbrown@novell.com
|
||||||
|
|
||||||
|
- Use udev rules file from upstream package, rather
|
||||||
|
have having a separate one.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 18 03:01:57 UTC 2011 - nfbrown@novell.com
|
||||||
|
|
||||||
|
- Update to new upstream 3.2.2 plug git patches.
|
||||||
|
Also update FSF address in boot-md.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 10 02:54:57 UTC 2011 - crrodriguez@opensuse.org
|
Wed Aug 10 02:54:57 UTC 2011 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
12
mdadm.spec
12
mdadm.spec
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: mdadm
|
Name: mdadm
|
||||||
Version: 3.1.4
|
Version: 3.2.2
|
||||||
Release: 21
|
Release: 1
|
||||||
BuildRequires: sgmltool
|
BuildRequires: sgmltool
|
||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
Obsoletes: raidtools
|
Obsoletes: raidtools
|
||||||
@@ -37,9 +37,7 @@ Source3: mdadmd
|
|||||||
Source4: boot.md
|
Source4: boot.md
|
||||||
Source5: mkinitrd-setup.sh
|
Source5: mkinitrd-setup.sh
|
||||||
Source6: mkinitrd-boot.sh
|
Source6: mkinitrd-boot.sh
|
||||||
Source7: 64-md-raid.rules
|
Patch0: mdadm-3.2.2_git3b1dab1bdbda0
|
||||||
# PATCH-FIX-OPENSUSE Fix crash if /proc/mdstat lists 0.9 superblocks (should be upstreamed)
|
|
||||||
Patch2: mdmon-0.9-superblock-crash.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Mdadm is a program that can be used to control Linux md devices. It is
|
Mdadm is a program that can be used to control Linux md devices. It is
|
||||||
@@ -54,7 +52,7 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a1
|
%setup -q -a1
|
||||||
%patch2 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{suse_update_config -f}
|
%{suse_update_config -f}
|
||||||
@@ -78,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT/var/run/mdadm
|
|||||||
mkdir -p $RPM_BUILD_ROOT/var/run
|
mkdir -p $RPM_BUILD_ROOT/var/run
|
||||||
ln -s mdadm $RPM_BUILD_ROOT/var/run/mdadm
|
ln -s mdadm $RPM_BUILD_ROOT/var/run/mdadm
|
||||||
install -d $RPM_BUILD_ROOT/lib/udev/rules.d
|
install -d $RPM_BUILD_ROOT/lib/udev/rules.d
|
||||||
install -m 644 %_sourcedir/64-md-raid.rules $RPM_BUILD_ROOT/lib/udev/rules.d
|
install -m 644 udev-md-raid.rules $RPM_BUILD_ROOT/lib/udev/rules.d/64-md-raid.rules
|
||||||
|
|
||||||
%post
|
%post
|
||||||
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
From c4dc5c0aa7aa412bf85f0f6d646ea0c307eb4591 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Marek <mmarek@suse.cz>
|
|
||||||
Date: Fri, 19 Mar 2010 11:59:20 +0100
|
|
||||||
Subject: [PATCH] mdmon: Fix crash if /proc/mdstat lists 0.9 superblocks
|
|
||||||
|
|
||||||
Signed-off-by: Michal Marek <mmarek@suse.cz>
|
|
||||||
================================================================================
|
|
||||||
--- mdadm-3.1.4/mdmon.c
|
|
||||||
+++ mdadm-3.1.4/mdmon.c
|
|
||||||
@@ -300,7 +300,8 @@
|
|
||||||
/* launch an mdmon instance for each container found */
|
|
||||||
mdstat = mdstat_read(0, 0);
|
|
||||||
for (e = mdstat; e; e = e->next) {
|
|
||||||
- if (strncmp(e->metadata_version, "external:", 9) == 0 &&
|
|
||||||
+ if (e->metadata_version &&
|
|
||||||
+ strncmp(e->metadata_version, "external:", 9) == 0 &&
|
|
||||||
!is_subarray(&e->metadata_version[9])) {
|
|
||||||
devname = devnum2devname(e->devnum);
|
|
||||||
/* update cmdline so this mdmon instance can be
|
|
Reference in New Issue
Block a user