# mdadm 2.5.3
# ===========
# Slackware 10.0's 'mdadm' package includes version 1.6.0, 10.1's includes
# 1.8.0, and 10.2's includes 2.1
# If you have trouble getting it from the URL below, you can get it from
# here instead (but not as a .tar.bz2 and without a pgp sig)
cd
test -f installed/mdadm-2.5.3.tar.bz2 && mv installed/mdadm-2.5.3.tar.bz2 .
test ! -f mdadm-2.5.3.tar.bz2 &&
wget http://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-2.5.3.tar.bz2
# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "9ca780fbb2002e935ba5f7a21e50ab66 mdadm-2.5.3.tar.bz2" | md5sum -c
# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "a78b03508f75516c0f4d615b5870f2abc617e99e mdadm-2.5.3.tar.bz2" | \
sha1sum -c
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "mdadm-*" -exec rm -r {} \;
tar xjvf ~/mdadm-2.5.3.tar.bz2
cd mdadm-2.5.3
test $UID = 0 && chown -R root:root .
make
# Become root to clean up old files and to install it
su
test -x /sbin/removepkg && /sbin/removepkg mdadm
# If you'd like to create an mdadm package for Slackware with checkinstall,
# follow these instructions instead of running 'make install'
# If you did not create a package...
make install
# Make sure all files are owned by your non-root account
chown -R $USER .
# Install the example config file as /etc/mdadm.conf
# If you already have a config file and it's different than the example one,
# it'll be backed up as mdadm.conf.old
test -f /etc/mdadm.conf &&
( diff -q /etc/mdadm.conf ./mdadm.conf-example ||
mv -f /etc/mdadm.conf /etc/mdadm.conf.old )
test ! -f /etc/mdadm.conf &&
cp mdadm.conf-example /etc/mdadm.conf
## If you want to run mdadm in monitor mode, e-mailing root@foo.org (from
## root@foo.org), add something like this to your /etc/mdadm.conf:
# ARRAY /dev/md0 devices=/dev/hda3,/dev/hde3,/dev/hdg3
# MAILFROM root@foo.org
# MAILADDR root@foo.org
# Run mdadm like so (see 'man mdadm' for more options):
# (-F = monitor mode, -y = syslog, -f = daemon, -s = scan config file
# and/or /proc/mdstat, -i = pid file)
/sbin/mdadm -F -y -f -s -i /var/run/mdadm.pid