summaryrefslogtreecommitdiff
path: root/testing/mdadm
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-27 22:26:40 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-27 22:26:40 +0000
commit8784d3134c1d4b4c02d705259ae2ebd768c778fd (patch)
tree2d5e15ad1adac97b4a07a58b1618dda602cea3a0 /testing/mdadm
parent18d6577d511b9a1ac36eaae50060133a401e42a3 (diff)
Wed Apr 27 22:26:47 UTC 2011
Diffstat (limited to 'testing/mdadm')
-rw-r--r--testing/mdadm/PKGBUILD53
-rwxr-xr-xtesting/mdadm/mdadm38
-rw-r--r--testing/mdadm/mdadm.conf67
-rw-r--r--testing/mdadm/mdadm.install10
-rwxr-xr-xtesting/mdadm/mdadm_hook44
-rw-r--r--testing/mdadm/mdadm_install46
-rw-r--r--testing/mdadm/segfault-3.2.1.patch68
7 files changed, 0 insertions, 326 deletions
diff --git a/testing/mdadm/PKGBUILD b/testing/mdadm/PKGBUILD
deleted file mode 100644
index b9296a91f..000000000
--- a/testing/mdadm/PKGBUILD
+++ /dev/null
@@ -1,53 +0,0 @@
-# $Id: PKGBUILD 119650 2011-04-13 07:07:09Z tpowa $
-# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
-# Contributor: Judd Vinet <jvinet@zeroflux.org>
-pkgname=mdadm
-pkgver=3.2.1
-pkgrel=2
-pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
-arch=(i686 x86_64)
-license=('GPL')
-url="http://www.cse.unsw.edu.au/~neilb/source/mdadm/"
-groups=('base')
-conflicts=('mkinitcpio<0.5.99')
-depends=('glibc')
-backup=('etc/mdadm.conf')
-source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
- mdadm
- mdadm.conf
- mdadm_install
- mdadm_hook
- segfault-3.2.1.patch)
-install=mdadm.install
-replaces=('raidtools')
-
-build() {
- cd $srcdir/$pkgname-$pkgver
- patch -Np1 -i ../segfault-3.2.1.patch
- make CXFLAGS="$CFLAGS"
-}
-
-package() {
- cd $srcdir/$pkgname-$pkgver
- make INSTALL=/bin/install DESTDIR=$pkgdir install
- install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
- install -D -m755 ../mdadm $pkgdir/etc/rc.d/mdadm
- install -D -m644 ../mdadm_install $pkgdir/lib/initcpio/install/mdadm
- install -D -m644 ../mdadm_hook $pkgdir/lib/initcpio/hooks/mdadm
- # symlink for backward compatibility
- ln -sf /lib/initcpio/hooks/mdadm $pkgdir/lib/initcpio/hooks/raid
- # build static mdassemble for Arch's initramfs
- make MDASSEMBLE_AUTO=1 mdassemble
- install -D -m755 mdassemble $pkgdir/sbin/mdassemble
-}
-md5sums=('5af65c32193fe0aea1aac4c4d44ac383'
- '7bff0e506fb6017510c8ec4a01896952'
- '00cbed931db4f15b6ce49e3e7d433966'
- '865c3d39e5f5dae58388160b563981f1'
- '1a3eb63832cecd6550f5b0a21d58cfdb')
-md5sums=('d1e2549202bd79d9e99f1498d1109530'
- '7bff0e506fb6017510c8ec4a01896952'
- '00cbed931db4f15b6ce49e3e7d433966'
- '865c3d39e5f5dae58388160b563981f1'
- '1a3eb63832cecd6550f5b0a21d58cfdb'
- '2fd25605bd1836a33c689ac442cb73ed')
diff --git a/testing/mdadm/mdadm b/testing/mdadm/mdadm
deleted file mode 100755
index 918a62537..000000000
--- a/testing/mdadm/mdadm
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /sbin/mdadm`
-case "$1" in
- start)
- stat_busy "Starting mdadm RAID Monitor"
- if [ -z "$PID" ]; then
- /sbin/mdadm --monitor --scan -i /var/run/mdadm.pid -f
- fi
- if [ ! -z "$PID" -o $? -gt 0 ]; then
- stat_fail
- else
- mdadm --monitor --oneshot --scan
- add_daemon mdadm
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping mdadm RAID Monitor"
- [ ! -z "$PID" ] && kill $PID &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon mdadm
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
diff --git a/testing/mdadm/mdadm.conf b/testing/mdadm/mdadm.conf
deleted file mode 100644
index 57bd4c683..000000000
--- a/testing/mdadm/mdadm.conf
+++ /dev/null
@@ -1,67 +0,0 @@
-# mdadm configuration file
-#
-# mdadm will function properly without the use of a configuration file,
-# but this file is useful for keeping track of arrays and member disks.
-# In general, a mdadm.conf file is created, and updated, after arrays
-# are created. This is the opposite behavior of /etc/raidtab which is
-# created prior to array construction.
-#
-#
-# the config file takes two types of lines:
-#
-# DEVICE lines specify a list of devices of where to look for
-# potential member disks
-#
-# ARRAY lines specify information about how to identify arrays so
-# so that they can be activated
-#
-
-
-# You can have more than one device line and use wild cards. The first
-# example includes SCSI the first partition of SCSI disks /dev/sdb,
-# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
-# line looks for array slices on IDE disks.
-#
-#DEVICE /dev/sd[bcdjkl]1
-#DEVICE /dev/hda1 /dev/hdb1
-#
-# The designation "partitions" will scan all partitions found in
-# /proc/partitions
-DEVICE partitions
-
-
-# ARRAY lines specify an array to assemble and a method of identification.
-# Arrays can currently be identified by using a UUID, superblock minor number,
-# or a listing of devices.
-#
-# super-minor is usually the minor number of the metadevice
-# UUID is the Universally Unique Identifier for the array
-# Each can be obtained using
-#
-# mdadm -D <md>
-#
-# To capture the UUIDs for all your RAID arrays to this file, run these:
-# to get a list of running arrays:
-# # mdadm -D --scan >>/etc/mdadm.conf
-# to get a list from superblocks:
-# # mdadm -E --scan >>/etc/mdadm.conf
-#
-#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
-#ARRAY /dev/md1 super-minor=1
-#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
-#
-# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
-# will then move a spare between arrays in a spare-group if one array has a
-# failed drive but no spare
-#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
-#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
-#
-
-
-# When used in --follow (aka --monitor) mode, mdadm needs a
-# mail address and/or a program. To start mdadm's monitor mode, add
-# "mdadm" to your DAEMONS array in /etc/rc.conf
-#
-# If the lines are not found, mdadm will exit quietly
-#MAILADDR root@mydomain.tld
-#PROGRAM /usr/sbin/handle-mdadm-events
diff --git a/testing/mdadm/mdadm.install b/testing/mdadm/mdadm.install
deleted file mode 100644
index e8404c260..000000000
--- a/testing/mdadm/mdadm.install
+++ /dev/null
@@ -1,10 +0,0 @@
-# arg 1: the new package version
-# arg 2: the old package version
-
-post_upgrade() {
- if [ "$(vercmp $2 2.6.8-2)" -lt 0 -a "$(grep raid_partitions /etc/mkinitcpio.conf)" ]; then
- echo "Attention mdadm update:"
- echo "raid_partitions hook has been replaced by the more powerfull mdadm hook."
- echo "Please update your /etc/mkinitcpio.conf accordingly."
- fi
-}
diff --git a/testing/mdadm/mdadm_hook b/testing/mdadm/mdadm_hook
deleted file mode 100755
index 57799d3b8..000000000
--- a/testing/mdadm/mdadm_hook
+++ /dev/null
@@ -1,44 +0,0 @@
-# vim: set ft=sh:
-run_hook ()
-{
- input="$(cat /proc/cmdline)"
- mdconfig="/etc/mdadm.conf"
- # for partitionable raid, we need to load md_mod first!
- modprobe md_mod 2>/dev/null
- # If md is specified on commandline, create config file from those parameters.
- if [ "$(echo $input | grep "md=")" ]; then
- #Create initial mdadm.conf
- # scan all devices in /proc/partitions
- echo DEVICE partitions > $mdconfig
- for i in $input; do
- case $i in
- # raid
- md=[0-9]*,/*)
- device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=||g')"
- array="$(echo $i | cut -d, -f2-)"
- echo "ARRAY /dev/$device devices=$array" >> $mdconfig
- ;;
- # partitionable raid
- md=d[0-9]*,/*)
- device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=|_|g')"
- array="$(echo $i | cut -d, -f2-)"
- echo "ARRAY /dev/$device devices=$array" >> $mdconfig
- ;;
- # raid UUID
- md=[0-9]*,[0-9,a-z]*)
- device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=||g')"
- array="$(echo $i | cut -d, -f2-)"
- echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
- ;;
- # partitionable raid UUID
- md=d[0-9]*,[0-9,a-z]*)
- device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=|_|g')"
- array="$(echo $i | cut -d, -f2-)"
- echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
- ;;
- esac
- done
- fi
- # assemble everything
- [ -e $mdconfig ] && /sbin/mdassemble
-} \ No newline at end of file
diff --git a/testing/mdadm/mdadm_install b/testing/mdadm/mdadm_install
deleted file mode 100644
index b7a57ea4e..000000000
--- a/testing/mdadm/mdadm_install
+++ /dev/null
@@ -1,46 +0,0 @@
-# vim: set ft=sh:
-
-install ()
-{
- MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
- BINARIES=""
- FILES=""
- SCRIPT="mdadm"
- # check if a custom mdadm.conf exists
- if grep -q ^ARRAY /etc/mdadm.conf; then
- echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
- add_file "/etc/mdadm.conf"
- fi
- add_binary "/sbin/mdassemble"
- add_file "/lib/udev/rules.d/64-md-raid.rules"
-}
-
-help ()
-{
-cat<<HELPEOF
- This hook loads the necessary modules for any raid root device,
- and assembles the raid device when run.
-
- If arrays are defined in /etc/mdadm.conf, the file will be used instead
- of command line assembling.
-
- Command Line Setup:
- - for raid arrays with persistent superblocks:
- md=<md device no.>,dev0,dev1,...,devn
- md=<md device no.>,uuid
- - for partitionable raid arrays with persistent superblocks:
- md=d<md device no.>,dev0,dev1,...,devn
- md=d<md device no.>,uuid
-
- Parameters:
- - <md device no.> = the number of the md device:
- 0 means md0, 1 means md1, ...
- - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
- or 0900878d:f95f6057:c39a36e9:55efa60a
- Examples:
- - md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
- This will setup 2 md partitionable arrays.
- - md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
- This will setup 2 md arrays with persistent superblocks.
-HELPEOF
-}
diff --git a/testing/mdadm/segfault-3.2.1.patch b/testing/mdadm/segfault-3.2.1.patch
deleted file mode 100644
index 6042d86c2..000000000
--- a/testing/mdadm/segfault-3.2.1.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 4019ad07013a5d8618b867f724d1c4a13c5cb05d Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Tue, 12 Apr 2011 18:28:01 +1000
-Subject: [PATCH] Monitor: avoid NULL dereference with 0.90 metadata
-
-0.90 array do not report the metadata type in /proc/mdstat, so
-we cannot assume that mse->metadata_version is non-NULL.
-
-So add an appropriate check.
-
-This adds an additional check missed by commit
-eb28e119b03fd5149886ed516fa4bb006ad3602e.
-
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- Monitor.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/Monitor.c b/Monitor.c
-index a3ea724..55aebeb 100644
---- a/Monitor.c
-+++ b/Monitor.c
-@@ -577,7 +577,8 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
- info[i].major = info[i].minor = 0;
- }
-
-- if (strncmp(mse->metadata_version, "external:", 9) == 0 &&
-+ if (mse->metadata_version &&
-+ strncmp(mse->metadata_version, "external:", 9) == 0 &&
- is_subarray(mse->metadata_version+9))
- st->parent_dev =
- devname2devnum(mse->metadata_version+10);
---
-1.7.2.3
-
-From eb28e119b03fd5149886ed516fa4bb006ad3602e Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Tue, 5 Apr 2011 09:16:57 +1000
-Subject: [PATCH] Monitor: avoid NULL dereference with 0.90 metadata
-
-0.90 array do not report the metadata type in /proc/mdstat, so
-we cannot assume that mse->metadata_version is non-NULL.
-
-So add an appropriate check.
-
-Reported-by: Eugene <hdejin@yahoo.com>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- Monitor.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/Monitor.c b/Monitor.c
-index 291e465..337785d 100644
---- a/Monitor.c
-+++ b/Monitor.c
-@@ -688,7 +688,8 @@ static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
- st->devnum = mse->devnum;
- st->percent = -2;
- st->expected_spares = -1;
-- if (strncmp(mse->metadata_version, "external:", 9) == 0 &&
-+ if (mse->metadata_version &&
-+ strncmp(mse->metadata_version, "external:", 9) == 0 &&
- is_subarray(mse->metadata_version+9))
- st->parent_dev =
- devname2devnum(mse->metadata_version+10);
---
-1.7.2.3
-