OBS User unknown 2007-01-10 16:49:57 +00:00 committed by Git OBS Bridge
commit f22bb8396f
12 changed files with 1118 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
Software-RAID.HOWTO.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

152
boot.md Normal file
View File

@ -0,0 +1,152 @@
#!/bin/sh
#
# SUSE system startup script for MD Raid autostart
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
# Copyright (C) 2006 Marian Jancar, SUSE / Novell Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.
#
### BEGIN INIT INFO
# Provides: boot.md
# Required-Start: boot.udev boot.rootfsck
# X-SUSE-Should-Start: boot.scsidev boot.multipath
# Default-Start: B
# Default-Stop:
# Short-Description: Multiple Device RAID
# Description: Start MD RAID
# RAID devices are virtual devices created from two or more real block devices.
# This allows multiple devices (typically disk drives or partitions there-of)
# to be combined into a single device to hold (for example) a single filesystem.
# Some RAID levels include redundancy and so can survive some degree of device failure.
### END INIT INFO
# Source LSB init functions
# providing start_daemon, killproc, pidofproc,
# log_success_msg, log_failure_msg and log_warning_msg.
# This is currently not used by UnitedLinux based distributions and
# not needed for init scripts for UnitedLinux only. If it is used,
# the functions from rc.status should not be sourced or used.
#. /lib/lsb/init-functions
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v be verbose in local rc status and clear it afterwards
# rc_status -v -r ditto and clear both the local and overall rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear both the local and overall rc status
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
mdadm_BIN=/sbin/mdadm
mdrun_BIN=/sbin/mdrun
raidautorun_BIN=/sbin/raidautorun
mdadm_CONFIG="/etc/mdadm.conf"
mdadm_SYSCONFIG="/etc/sysconfig/mdadm"
# udev integration
if [ -x /sbin/udevsettle ] ; then
[ -z "$MDADM_DEVICE_TIMEOUT" ] && MDADM_DEVICE_TIMEOUT=60
else
MDADM_DEVICE_TIMEOUT=0
fi
function _rc_exit {
[ "x$2" != x"" ] && echo -n $2
rc_failed $1
rc_status -v
rc_exit
}
case "$1" in
start)
echo -n "Starting MD Raid "
# Check for existence of needed config file and read it
[ -r $mdadm_SYSCONFIG ] || _rc_exit 6 "... $mdadm_SYSCONFIG not existing "
# Read config
. $mdadm_SYSCONFIG
[ "x$MDADM_CONFIG" != x"" ] && mdadm_CONFIG="$MDADM_CONFIG"
# Check for missing binaries (stale symlinks should not happen)
[ -x $mdadm_BIN ] || _rc_exit 5 "... $mdadm_BIN not installed "
[ -x $mdrun_BIN ] || _rc_exit 5 "... $mdrun_BIN not installed "
# Try to load md_mod
[ ! -f /proc/mdstat -a -x /sbin/modprobe ] && /sbin/modprobe -k md_mod 2>&1 | :
[ -f /proc/mdstat ] || _rc_exit 5 "... no MD support in kernel "
# Wait for udev to settle
if [ "$MDADM_DEVICE_TIMEOUT" -gt 0 ] ; then
/sbin/udevsettle --timeout="$MDADM_DEVICE_TIMEOUT"
fi
# Fallback to raidautorun / mdrun when $mdadm_CONFIG missing
# or mdadm exits with an error
[ "$BOOT_MD_USE_MDADM_CONFIG" = "yes" -a -s "$mdadm_CONFIG" ]
[ $? = 0 ] && { $mdadm_BIN -A -s -c $mdadm_CONFIG || rc_failed 1; }
if [ $? != 0 ]; then
if test -b /dev/md0; then
$raidautorun_BIN
else
$mdrun_BIN
fi
fi
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down MD Raid "
# Remember status and be verbose
rc_status -v
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
rc_exit

11
mdadm-2.5.3-infoname.diff Normal file
View File

@ -0,0 +1,11 @@
--- super1.c
+++ super1.c
@@ -538,7 +538,7 @@
strncpy(info->name, c+1, 31 - (c-sb->set_name));
else
strncpy(info->name, sb->set_name, 32);
- info->name[33] = 0;
+ info->name[32] = 0;
}
if (strcmp(update, "name") == 0) {
if (info->name[0] == 0)

3
mdadm-2.5.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22e8364dcc528b1e5e4ee8f25ef4a6f0e9c648f1f1d2d7dbe688c929a3369672
size 135019

289
mdadm.changes Normal file
View File

@ -0,0 +1,289 @@
-------------------------------------------------------------------
Wed Jan 10 11:58:14 CET 2007 - mmarek@suse.cz
- use raidautorun instead of mdrun to autodetect the raid arrays in
boot.md [#230733]
-------------------------------------------------------------------
Wed Nov 8 10:51:13 CET 2006 - prusnak@suse.cz
- fixed subscript out of range [#212697]
-------------------------------------------------------------------
Wed Sep 20 17:17:22 CEST 2006 - mjancar@suse.cz
- update to 2.5.3
* lots bugfixes
* drop all patches (integrated upstream)
-------------------------------------------------------------------
Fri Jul 28 13:12:47 CEST 2006 - olh@suse.de
- remove dropped boot.ibmsis from boot.md
- boot.rootfsck should start before boot.md (#181972)
-------------------------------------------------------------------
Fri Jul 21 14:16:28 CEST 2006 - olh@suse.de
- remove boot.proc from Required-Start: in boot.md (#178753)
-------------------------------------------------------------------
Wed May 3 13:12:42 CEST 2006 - mjancar@suse.cz
- fix false SparesMissing error (#171326)
-------------------------------------------------------------------
Wed Apr 26 09:46:28 CEST 2006 - hare@suse.de
- Fix init script dependencies
- Implement MDADM_DEVICE_TIMEOUT to set a timeout for
udevsettle (#149979)
-------------------------------------------------------------------
Tue Apr 25 13:39:38 CEST 2006 - mjancar@suse.cz
- add static device nodes for udev (#168824)
-------------------------------------------------------------------
Wed Apr 19 10:27:19 CEST 2006 - mjancar@suse.cz
- set $BOOT_MD_USE_MDADM_CONFIG to "yes" by default (#155120)
-------------------------------------------------------------------
Fri Apr 7 11:33:15 CEST 2006 - mjancar@suse.cz
- detach mdadmd from tty in rcmdadmd (#160881)
-------------------------------------------------------------------
Mon Apr 3 09:54:55 CEST 2006 - mjancar@suse.cz
- fix garbled output with --detail (#160827)
- fix fix write-mostly with --add and --re-add (#162968)
-------------------------------------------------------------------
Fri Mar 24 21:31:54 CET 2006 - mjancar@suse.cz
- add /sbin/raidautorun (#159460)
-------------------------------------------------------------------
Wed Mar 8 18:33:12 CET 2006 - mjancar@suse.cz
- add $BOOT_MD_USE_MDADM_CONFIG sysconfig variable (#155120)
-------------------------------------------------------------------
Thu Feb 9 16:59:52 CET 2006 - mjancar@suse.cz
- round free size to chunk size multiply on --create (#148562)
-------------------------------------------------------------------
Tue Feb 7 08:59:50 CET 2006 - mjancar@suse.cz
- move boot.multipath to Should-Start instead of Required-Start
-------------------------------------------------------------------
Mon Feb 6 15:27:47 CET 2006 - mjancar@suse.cz
- add "Obsoletes: raidtools"
- start boot.md after boot.multipath
- call mdadm without -a from mdrun, an argument is required in 2.2
-------------------------------------------------------------------
Mon Feb 6 11:36:26 CET 2006 - mjancar@suse.de
- don't start mdadmd by default
-------------------------------------------------------------------
Sun Feb 5 20:46:43 CET 2006 - mjancar@suse.cz
- include option for email to be sent on start (#142105)
- fix missing md autostart due to raidtools dropped (#148234)
* include mdrun script from Debian
* create boot.md initscipt
-------------------------------------------------------------------
Sun Feb 5 17:46:32 CET 2006 - schwab@suse.de
- Fix memset parameters.
-------------------------------------------------------------------
Thu Feb 2 12:30:26 CET 2006 - mjancar@suse.cz
- fix segfault on --assemble (#146514)
-------------------------------------------------------------------
Fri Jan 27 02:12:42 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Jan 25 10:48:18 CET 2006 - olh@suse.de
- fix uninitialized variable, memset call and memcmp/memcpy bug
mdadm.bug144647-array.init.patch
mdadm.bug144647-update_super1-memcpy.patch
mdadm.bug144647-add_internal_bitmap0-memcpy.patch
-------------------------------------------------------------------
Wed Jan 11 13:49:54 CET 2006 - mjancar@suse.cz
- update ro 2.2
-------------------------------------------------------------------
Tue Dec 20 12:57:25 CET 2005 - ro@suse.de
- at least output errors if they occur (instead of ignoring)
-------------------------------------------------------------------
Wed Nov 30 17:19:24 CET 2005 - schwab@suse.de
- Fix broken formats.
-------------------------------------------------------------------
Tue Oct 25 09:53:57 CEST 2005 - aj@suse.de
- Build with -fno-strict-aliasing.
-------------------------------------------------------------------
Wed Oct 12 20:18:00 CEST 2005 - mjancar@suse.cz
- update to 2.1
-------------------------------------------------------------------
Thu Jul 28 20:28:32 CEST 2005 - anicka@suse.cz
- update to 1.12.0
-------------------------------------------------------------------
Wed Jun 15 13:16:42 CEST 2005 - meissner@suse.de
- use RPM_OPT_FLAGS correctly.
-------------------------------------------------------------------
Tue Apr 19 13:48:24 CEST 2005 - postadal@suse.de
- updated to version 1.11.0
- fixed for gcc 4.0
- removed obsoleted patch config-fix
-------------------------------------------------------------------
Wed Mar 30 13:24:23 CEST 2005 - postadal@suse.cz
- fixed parsing command line option '--config=partions' [#74603]
-------------------------------------------------------------------
Fri Feb 4 13:09:49 CET 2005 - postadal@suse.cz
- updated to version 1.9.0
-------------------------------------------------------------------
Thu Jan 13 17:24:55 CET 2005 - postadal@suse.cz
- updated to version 1.8.1
- extended comment in sysconfig.mdadm [#48567]
-------------------------------------------------------------------
Fri Aug 06 12:09:58 CEST 2004 - postadal@suse.cz
- updated to version 1.6.0
* added --auto= and --assume-clean options
* added "degraded" and "recovering" options to the "Status:" entry
-------------------------------------------------------------------
Tue Feb 10 13:45:52 CET 2004 - postadal@suse.cz
- updated to version 1.5.0
* new commands "mdassemble"
* support for raid6 as found in 2.6.2
* support partitioned md arrays with a different major number and
naming scheme
* added "SparesMissing" event when --monitor first sees an array and
it doesn't have the enough spare devices.
-------------------------------------------------------------------
Sun Jan 11 11:50:04 CET 2004 - adrian@suse.de
- add %defattr
-------------------------------------------------------------------
Mon Dec 1 10:53:02 CET 2003 - fehr@suse.de
- fix quoting problem in start script (#33392)
-------------------------------------------------------------------
Fri Aug 29 09:36:24 CEST 2003 - fehr@suse.de
- add PreReq for fillup
-------------------------------------------------------------------
Tue Aug 26 10:23:44 CEST 2003 - fehr@suse.de
- add %stop_on_removal and %restart_on_update
-------------------------------------------------------------------
Thu Aug 14 15:40:53 CEST 2003 - fehr@suse.de
- add missing activation metadata in sysconfig (#28901)
-------------------------------------------------------------------
Tue Jul 29 11:03:36 CEST 2003 - fehr@suse.de
- update to new version 1.3.0 of package
-------------------------------------------------------------------
Mon Apr 14 20:01:43 CEST 2003 - postadal@suse.cz
- fixed init script (added return value for unimplemented reload function)
-------------------------------------------------------------------
Mon Mar 31 17:37:03 CEST 2003 - postadal@suse.cz
- added buildroot, init script, sysconfig
- bzip2 sources and cleaned specfile
-------------------------------------------------------------------
Thu Mar 20 16:18:13 CET 2003 - fehr@suse.de
- update to version 1.2.0 of package
-------------------------------------------------------------------
Mon Mar 3 12:16:22 CET 2003 - fehr@suse.de
- update to version 1.1.0 of package
-------------------------------------------------------------------
Mon Dec 2 11:30:52 CET 2002 - fehr@suse.de
- Fix for new glibc/gcc
-------------------------------------------------------------------
Mon Sep 13 15:10:00 CEST 2002 - lmb@suse.de
- Fix for 64bit arch; ioctl returns long instead of int (#20339)
-------------------------------------------------------------------
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Fri Aug 23 11:16:51 MEST 2002 - lmb@suse.de
- Multipath arrays can now be build manually even without a superblock.
- One debugging chunk removed from patch.
-------------------------------------------------------------------
Tue Aug 13 14:43:02 MEST 2002 - lmb@suse.de
- Fix for the assembly of multipath arrays.
-------------------------------------------------------------------
Mon Aug 12 11:46:43 MEST 2002 - lmb@suse.de
- Added patch to support the enhanced multipath features.
-------------------------------------------------------------------
Mon Aug 5 16:05:19 CEST 2002 - fehr@suse.de
- make SuSE package from version 1.0.1 of mdadm
-------------------------------------------------------------------

255
mdadm.spec Normal file
View File

@ -0,0 +1,255 @@
#
# spec file for package mdadm (Version 2.5.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: mdadm
Version: 2.5.3
Release: 20
BuildRequires: opensp sgmltool
PreReq: %fillup_prereq %insserv_prereq
Obsoletes: raidtools
Autoreqprov: on
Group: System/Base
License: GNU General Public License (GPL)
URL: http://www.cse.unsw.edu.au/~neilb/source/mdadm/
Summary: Utility for Configuring MD Setup
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.bz2
Source1: Software-RAID.HOWTO.tar.bz2
Source2: sysconfig.mdadm
Source3: mdadmd
Source4: boot.md
Source5: mdrun
Source6: raidautorun.c
Patch: %{name}-%{version}-infoname.diff
%description
Mdadm is a program that can be used to control Linux md devices. It is
intended to provide all the functionality of the mdtools and raidtools
programs but with a very different interface.
Authors:
--------
Neil Brown <neilb@cse.unsw.edu.au>
%prep
%setup -q -a1
%patch
%build
%{suse_update_config -f}
make CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-error"
gcc $RPM_OPT_FLAGS %{S:6} -o raidautorun
cd Software-RAID.HOWTO
sgml2html Software-RAID.HOWTO.sgml
sgml2txt Software-RAID.HOWTO.sgml
%install
make install DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_var}/adm/fillup-templates
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/init.d}
install -d $RPM_BUILD_ROOT/lib/udev/devices
install -m 755 %{S:5} raidautorun $RPM_BUILD_ROOT/sbin/
install -m 755 %{S:4} %{S:3} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_var}/adm/fillup-templates/
ln -sf ../../etc/init.d/mdadmd $RPM_BUILD_ROOT/%{_sbindir}/rcmdadmd
%post
%{fillup_and_insserv -Y boot.md}
%postun
%restart_on_update mdadmd
%{insserv_cleanup}
%preun
%stop_on_removal mdadmd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%attr(0755,root,root) %config %{_sysconfdir}/init.d/*
%attr(640,root,disk) %dev(b,9,0) /lib/udev/devices/md0
%attr(640,root,disk) %dev(b,9,1) /lib/udev/devices/md1
%attr(640,root,disk) %dev(b,9,2) /lib/udev/devices/md2
%attr(640,root,disk) %dev(b,9,3) /lib/udev/devices/md3
%attr(640,root,disk) %dev(b,9,4) /lib/udev/devices/md4
%attr(640,root,disk) %dev(b,9,5) /lib/udev/devices/md5
%attr(640,root,disk) %dev(b,9,6) /lib/udev/devices/md6
%attr(640,root,disk) %dev(b,9,7) /lib/udev/devices/md7
%attr(640,root,disk) %dev(b,9,8) /lib/udev/devices/md8
%attr(640,root,disk) %dev(b,9,9) /lib/udev/devices/md9
%attr(640,root,disk) %dev(b,9,10) /lib/udev/devices/md10
%attr(640,root,disk) %dev(b,9,11) /lib/udev/devices/md11
%attr(640,root,disk) %dev(b,9,12) /lib/udev/devices/md12
%attr(640,root,disk) %dev(b,9,13) /lib/udev/devices/md13
%attr(640,root,disk) %dev(b,9,14) /lib/udev/devices/md14
%attr(640,root,disk) %dev(b,9,15) /lib/udev/devices/md15
%attr(640,root,disk) %dev(b,9,16) /lib/udev/devices/md16
%attr(640,root,disk) %dev(b,9,17) /lib/udev/devices/md17
%attr(640,root,disk) %dev(b,9,18) /lib/udev/devices/md18
%attr(640,root,disk) %dev(b,9,19) /lib/udev/devices/md19
%attr(640,root,disk) %dev(b,9,20) /lib/udev/devices/md20
%attr(640,root,disk) %dev(b,9,21) /lib/udev/devices/md21
%attr(640,root,disk) %dev(b,9,22) /lib/udev/devices/md22
%attr(640,root,disk) %dev(b,9,23) /lib/udev/devices/md23
%attr(640,root,disk) %dev(b,9,24) /lib/udev/devices/md24
%attr(640,root,disk) %dev(b,9,25) /lib/udev/devices/md25
%attr(640,root,disk) %dev(b,9,26) /lib/udev/devices/md26
%attr(640,root,disk) %dev(b,9,27) /lib/udev/devices/md27
%attr(640,root,disk) %dev(b,9,28) /lib/udev/devices/md28
%attr(640,root,disk) %dev(b,9,29) /lib/udev/devices/md29
%attr(640,root,disk) %dev(b,9,30) /lib/udev/devices/md30
%attr(640,root,disk) %dev(b,9,31) /lib/udev/devices/md31
%doc ANNOUNCE-2.0 ANNOUNCE-2.1 ANNOUNCE-2.2 COPYING ChangeLog README.initramfs TODO mdadm.conf-example mkinitramfs
%doc Software-RAID.HOWTO/Software-RAID.HOWTO*{.txt,.html}
%doc %{_mandir}/man?/*
/sbin/*
/lib/udev
%{_sbindir}/*
%{_var}/adm/fillup-templates/sysconfig.mdadm
%changelog -n mdadm
* Wed Jan 10 2007 - mmarek@suse.cz
- use raidautorun instead of mdrun to autodetect the raid arrays in
boot.md [#230733]
* Wed Nov 08 2006 - prusnak@suse.cz
- fixed subscript out of range [#212697]
* Wed Sep 20 2006 - mjancar@suse.cz
- update to 2.5.3
* lots bugfixes
* drop all patches (integrated upstream)
* Fri Jul 28 2006 - olh@suse.de
- remove dropped boot.ibmsis from boot.md
- boot.rootfsck should start before boot.md (#181972)
* Fri Jul 21 2006 - olh@suse.de
- remove boot.proc from Required-Start: in boot.md (#178753)
* Wed May 03 2006 - mjancar@suse.cz
- fix false SparesMissing error (#171326)
* Wed Apr 26 2006 - hare@suse.de
- Fix init script dependencies
- Implement MDADM_DEVICE_TIMEOUT to set a timeout for
udevsettle (#149979)
* Tue Apr 25 2006 - mjancar@suse.cz
- add static device nodes for udev (#168824)
* Wed Apr 19 2006 - mjancar@suse.cz
- set $BOOT_MD_USE_MDADM_CONFIG to "yes" by default (#155120)
* Fri Apr 07 2006 - mjancar@suse.cz
- detach mdadmd from tty in rcmdadmd (#160881)
* Mon Apr 03 2006 - mjancar@suse.cz
- fix garbled output with --detail (#160827)
- fix fix write-mostly with --add and --re-add (#162968)
* Fri Mar 24 2006 - mjancar@suse.cz
- add /sbin/raidautorun (#159460)
* Wed Mar 08 2006 - mjancar@suse.cz
- add $BOOT_MD_USE_MDADM_CONFIG sysconfig variable (#155120)
* Thu Feb 09 2006 - mjancar@suse.cz
- round free size to chunk size multiply on --create (#148562)
* Tue Feb 07 2006 - mjancar@suse.cz
- move boot.multipath to Should-Start instead of Required-Start
* Mon Feb 06 2006 - mjancar@suse.cz
- add "Obsoletes: raidtools"
- start boot.md after boot.multipath
- call mdadm without -a from mdrun, an argument is required in 2.2
* Mon Feb 06 2006 - mjancar@suse.de
- don't start mdadmd by default
* Sun Feb 05 2006 - mjancar@suse.cz
- include option for email to be sent on start (#142105)
- fix missing md autostart due to raidtools dropped (#148234)
* include mdrun script from Debian
* create boot.md initscipt
* Sun Feb 05 2006 - schwab@suse.de
- Fix memset parameters.
* Thu Feb 02 2006 - mjancar@suse.cz
- fix segfault on --assemble (#146514)
* Fri Jan 27 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 25 2006 - olh@suse.de
- fix uninitialized variable, memset call and memcmp/memcpy bug
mdadm.bug144647-array.init.patch
mdadm.bug144647-update_super1-memcpy.patch
mdadm.bug144647-add_internal_bitmap0-memcpy.patch
* Wed Jan 11 2006 - mjancar@suse.cz
- update ro 2.2
* Tue Dec 20 2005 - ro@suse.de
- at least output errors if they occur (instead of ignoring)
* Wed Nov 30 2005 - schwab@suse.de
- Fix broken formats.
* Tue Oct 25 2005 - aj@suse.de
- Build with -fno-strict-aliasing.
* Wed Oct 12 2005 - mjancar@suse.cz
- update to 2.1
* Thu Jul 28 2005 - anicka@suse.cz
- update to 1.12.0
* Wed Jun 15 2005 - meissner@suse.de
- use RPM_OPT_FLAGS correctly.
* Tue Apr 19 2005 - postadal@suse.de
- updated to version 1.11.0
- fixed for gcc 4.0
- removed obsoleted patch config-fix
* Wed Mar 30 2005 - postadal@suse.cz
- fixed parsing command line option '--config=partions' [#74603]
* Fri Feb 04 2005 - postadal@suse.cz
- updated to version 1.9.0
* Thu Jan 13 2005 - postadal@suse.cz
- updated to version 1.8.1
- extended comment in sysconfig.mdadm [#48567]
* Fri Aug 06 2004 - postadal@suse.cz
- updated to version 1.6.0
* added --auto= and --assume-clean options
* added "degraded" and "recovering" options to the "Status:" entry
* Tue Feb 10 2004 - postadal@suse.cz
- updated to version 1.5.0
* new commands "mdassemble"
* support for raid6 as found in 2.6.2
* support partitioned md arrays with a different major number and
naming scheme
* added "SparesMissing" event when --monitor first sees an array and
it doesn't have the enough spare devices.
* Sun Jan 11 2004 - adrian@suse.de
- add %%defattr
* Mon Dec 01 2003 - fehr@suse.de
- fix quoting problem in start script (#33392)
* Fri Aug 29 2003 - fehr@suse.de
- add PreReq for fillup
* Tue Aug 26 2003 - fehr@suse.de
- add %%stop_on_removal and %%restart_on_update
* Thu Aug 14 2003 - fehr@suse.de
- add missing activation metadata in sysconfig (#28901)
* Tue Jul 29 2003 - fehr@suse.de
- update to new version 1.3.0 of package
* Mon Apr 14 2003 - postadal@suse.cz
- fixed init script (added return value for unimplemented reload function)
* Mon Mar 31 2003 - postadal@suse.cz
- added buildroot, init script, sysconfig
- bzip2 sources and cleaned specfile
* Thu Mar 20 2003 - fehr@suse.de
- update to version 1.2.0 of package
* Mon Mar 03 2003 - fehr@suse.de
- update to version 1.1.0 of package
* Mon Dec 02 2002 - fehr@suse.de
- Fix for new glibc/gcc
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Fri Sep 13 2002 - lmb@suse.de
- Fix for 64bit arch; ioctl returns long instead of int (#20339)
* Fri Aug 23 2002 - lmb@suse.de
- Multipath arrays can now be build manually even without a superblock.
- One debugging chunk removed from patch.
* Tue Aug 13 2002 - lmb@suse.de
- Fix for the assembly of multipath arrays.
* Mon Aug 12 2002 - lmb@suse.de
- Added patch to support the enhanced multipath features.
* Mon Aug 05 2002 - fehr@suse.de
- make SuSE package from version 1.0.1 of mdadm

150
mdadmd Normal file
View File

@ -0,0 +1,150 @@
#! /bin/sh
# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Petr Ostadal, feedback to http://www.suse.de/feedback
#
# /etc/init.d/mdadmd
#
# and its symbolic link
#
# /usr/sbin/rcmdadmd
#
### BEGIN INIT INFO
# Provides: mdadmd
# Required-Start: $local_fs
# X-UnitedLinux-Should-Start: $time sendmail
# Required-Stop: $local_fs
# X-UnitedLinux-Should-Stop: $time sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: mdadmd daemon monitoring MD devices
# Description: Start mdadmd to allow monitoring MD devices aka
# Linux Software Raid. This is only meaningful for raid1, raid5
# or multipath arrays as only these have interesting state.
# raid0 or linear never have missing, spare, or failed drives,
# so there is nothing to monitor.
### END INIT INFO
mdadmd_BIN=/sbin/mdadm
test -x $mdadmd_BIN || exit 5
mdadmd_CONFIG=/etc/sysconfig/mdadm
test -r $mdadmd_CONFIG || exit 6
. $mdadmd_CONFIG
if [ x$MDADM_DELAY = x"" ]; then
MDADM_DELAY=60
fi
MDADM_DELAY="-d "$MDADM_DELAY;
if [ x$MDADM_MAIL != x"" ]; then
MDADM_MAIL="-m \"$MDADM_MAIL\""
fi
if [ x$MDADM_PROGRAM != x"" ]; then
MDADM_PROGRAM="-p \"$MDADM_PROGRAM\""
fi
if [ x$MDADM_SCAN = x"yes" ]; then
MDADM_SCAN="-s"
else
MDADM_SCAN=""
fi
if [ x$MDADM_SEND_MAIL_ON_START = x"yes" ]; then
MDADM_SEND_MAIL="-t"
else
MDADM_SEND_MAIL=""
fi
if [ x$MDADM_CONFIG != x"" ]; then
MDADM_CONFIG="-c \"$MDADM_CONFIG\""
fi
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting mdadmd "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
eval startproc -q -s $mdadmd_BIN -F $MDADM_RAIDDEVICES $MDADM_DELAY $MDADM_MAIL $MDADM_PROGRAM $MDADM_SCAN $MDADM_SEND_MAIL $MDADM_CONFIG
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down mdadmd "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
killproc -TERM $mdadmd_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Do a restart only if the service was active before.
## Note: try-restart is not (yet) part of LSB (as of 1.2)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
reload)
exit 3
;;
status)
echo -n "Checking for service mdadmd "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
checkproc $mdadmd_BIN
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart}"
exit 1
;;
esac
rc_exit

147
mdrun Normal file
View File

@ -0,0 +1,147 @@
#!/bin/sh
# mdrun, (c) Eduard Bloch <blade@debian.org> 2003
# Usage:
# Without arguments: autodetect all RAID partitions and activate MDs
# Arguments: [ DEVDIR ] NUMBER UUID [ <NUMBER UUID> ... ]
# a number of number/uuid pairs, where NUMBER is the one from /dev/md/*
# Argument: LIST
# lists all raids in the syntax needed for the pairs (see above)
# IMPORTANT: create /dev/fs directory if you have devfs support in the kernel
# but do not want to mount it over /dev. Usage of /dev/fs directory will keep
# mdrun away from /dev.
# If the first argument is a directory, it will be used as a writeable
# temporary directory for device nodes. mdrun needs mknod to create them
# on-the-fly
# Environment:
# MORERAIDVOLUMES (list of strings) : additional raid disks to scan,
# eg. loop devices
if ! test -e /proc/partitions ; then
echo "/proc not mounted!"
exit 1
fi
DEVDIR=/dev
if [ -d "$1" ] ; then
AUTOCREATE=true
DEVDIR="$1"
shift
fi
# For people that compile the kernel with devfs (means: different
# proc/partitions content), but without auto-mounting it
if ! uname -r | grep "^2.6" 1>/dev/null && [ -z "$AUTOCREATE" ] && grep " devfs" /proc/filesystems >/dev/null 2>&1 && ! grep "^devfs" /proc/mounts >/dev/null 2>&1 ; then
mkdir /dev/fs 2>/dev/null
# if we can do it - good, we will use it. Otherwise, use /dev even if it is ugly
# mount devfs for now to make the device names match, umount later
if [ -d /dev/fs ] ; then
DEVDIR=/dev/fs
fi
mount none $DEVDIR -tdevfs
UMNTDEVFS="umount $DEVDIR"
fi
# arr(array, index): return contents in array[index]; as with Bourne shell
# in general, there is no easy way to distinguish between index not
# existing and empty string assigned.
arr() { sa_i=`arr_index $2`; eval "echo \"\$$1_${sa_i}\""; unset sa_i; }
# seterr(array, index, value): assign the given value to array[index].
setarr() { sa_i=`arr_index $2`; eval "$1_${sa_i}=\"$3\""; unset sa_i; }
# arr_index(index): make sure the given index is valid for use.
arr_index() { echo $1 | sed -e 's/:/_/g' | sed 's;/;_;g'; }
BASE=$DEVDIR/md
export BASE
#devfs
test -d $BASE && BASE=$BASE/
next_free_md() {
for raidnr in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24; do
if ! mdadm -D $BASE$raidnr >/dev/null 2>&1 ; then
echo $BASE$raidnr
return 0
fi
done
return 1
}
listpairs() {
for NUMBER in `cat /proc/mdstat | grep "^md. : active" | sed -e 's/^md\(.\) :.*/\1/'`; do
echo $NUMBER
mdadm -D ${BASE}$NUMBER 2>/dev/null |grep UUID | sed 's/.*: \(.*\)/\1/'
done
}
if [ "$1" = LIST ] ; then
echo `listpairs`
$UMNTDEVFS
exit 0
fi
DEVDIRESC=$(echo $DEVDIR | sed -e 's!/!\\/!g')
if [ "$AUTOCREATE" ] ; then
CREATECMD=$(sed -e "s/.*major.*//; s/.*\ \([:0-9:]\+\)\ \+\ \([:0-9:]\+\)\ \+\ [:0-9:]\+\ \+\([:a-z0-9\/:]\+\).*/mknod \3 b \1 \2 ; / ; s/\//_/g" < /proc/partitions)
export CREATECMD
export DEVDIR
# and we need array nodes, of course
(
cd $DEVDIR ;
eval $CREATECMD ;
for x in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
mknod ${BASE}$x b 9 $x
done
)
PARTLIST=$(sed -e "s/.*major.*//; s/.*\ \([:0-9:]\+\)\ \+\ \([:0-9:]\+\)\ \+\ [:0-9:]\+\ \+\([:a-z0-9\/:]\+\).*/DEVDIR\3 /; s/\//_/g ; s/DEVDIR/$DEVDIRESC\//;" < /proc/partitions)
else
PARTLIST=$(sed -e "s/.*major.*//; s/^[:0-9 :]* \([:a-z:].[:a-z0-9\/:]*\).*/\1/; s/^\([:a-z:].*\)/$DEVDIRESC\/\1/g" < /proc/partitions)
fi
for SRC in $PARTLIST $MORERAIDVOLUMES ; do
SUM=$(mdadm -E $SRC 2>/dev/null | grep UUID | sed 's/.*: \(.*\)/\1/')
for x in $SUM; do
UUIDS="$UUIDS $SUM"
setarr MDS $SUM "`arr MDS $SUM` $SRC"
done
done
if [ "$#" -gt 1 ] ; then
NUMBER=${BASE}$1
MD=$2
shift ; shift
if [ "`arr MDS $MD`" != "started" ] ; then
mdadm -A $NUMBER -f `arr MDS $MD` && setarr MDS $MD "started"
# just to be sure
ln /dev/md/$NUMBER /dev/md$NUMBER 2>/dev/null
fi
fi
# and process the rest, if it exists
# do not touch active arrays
#dropactive() {
for NUMBER in `cat /proc/mdstat | grep "^md. : active" | sed -e 's/^md\(.\) :.*/\1/'`; do
setarr MDS `mdadm -D ${BASE}$NUMBER 2>/dev/null |grep UUID | sed 's/.*: \(.*\)/\1/'` "started"
done
#}
for MD in $UUIDS; do
if [ "`arr MDS $MD`" != "started" ] ; then
NUMBER=`next_free_md`
mdadm -A $NUMBER -f `arr MDS $MD` && setarr MDS $MD "started"
# just to be sure
ln /dev/md/$NUMBER /dev/md$NUMBER 2>/dev/null
fi
done
$UMNTDEVFS

16
raidautorun.c Normal file
View File

@ -0,0 +1,16 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/major.h>
#include <linux/raid/md_u.h>
int main(int argc, char *argv[])
{
int fd = open("/dev/md0", O_RDWR);
if (fd >= 0) {
ioctl(fd, RAID_AUTORUN, 0);
close(fd);
}
return (0);
}

0
ready Normal file
View File

69
sysconfig.mdadm Normal file
View File

@ -0,0 +1,69 @@
## Path: System/File systems/Mdadm
## Description: Additional options for the mdadm daemon (see man mdadm(8)).
## ServiceRestart: mdadm
##
## Type: integer
## Default: 60
#
# A delay in seconds between polling the md arrays.
#
MDADM_DELAY=60
## Type: string
## Default: ""
#
# A mail address (or comma-separated list of mail addresses) to send alerts to.
#
MDADM_MAIL="root@localhost"
## Type: string
## Default: ""
#
# A program to be run whenever an event is detected.
#
MDADM_PROGRAM=""
## Type: string
## Default: ""
#
# Monitoring MD devices.
#
MDADM_RAIDDEVICES=""
## Type: yesno
## Default: yes
#
# "yes" for scanning config file or /proc/mdstat for missing information.
#
MDADM_SCAN=yes
## Type: string
## Default: "/etc/mdadm.conf"
#
# The config file.
#
MDADM_CONFIG="/etc/mdadm.conf"
## Type: yesno
## Default: no
#
# "yes" for email to be sent on start
#
MDADM_SEND_MAIL_ON_START=no
## Type: yesno
## Default: no
#
# "yes" for mdadm.conf to be used for array assembly on boot
#
BOOT_MD_USE_MDADM_CONFIG=yes
## Type: integer
## Default: 60
#
# Timeout for udev device detection. This is the upper limit which the
# boot script will wait for udev to finish hotplug event processing.
# If not all devices are detected during boot this value should be
# increased. Setting this to '0' disables waiting for udev.
#
MDADM_DEVICE_TIMEOUT="60"