]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm-0.7.2 mdadm-0.7.2
authorNeil Brown <neilb@suse.de>
Wed, 20 Mar 2002 22:39:50 +0000 (22:39 +0000)
committerNeil Brown <neilb@suse.de>
Wed, 20 Mar 2002 22:39:50 +0000 (22:39 +0000)
14 files changed:
Assemble.c
ChangeLog
Detail.c
Makefile
ReadMe.c
config.c
makedist
md.4
md.man
mdadm.8
mdadm.conf.5
mdadm.conf.man
mdadm.man [new file with mode: 0644]
mdadm.spec

index 53c09d61e110cdb468f0c69fba19e4fcb1b792f3..54bb8b01bb16a352b862e3962e70b6d387772cb5 100644 (file)
@@ -98,6 +98,7 @@ int Assemble(char *mddev, int mdfd,
        struct {
                char *devname;
                int major, minor;
+               int oldmajor, oldminor;
                long long events;
                time_t utime;
                int uptodate;
@@ -255,6 +256,8 @@ int Assemble(char *mddev, int mdfd,
                devices[devcnt].devname = devname;
                devices[devcnt].major = MAJOR(stb.st_rdev);
                devices[devcnt].minor = MINOR(stb.st_rdev);
+               devices[devcnt].oldmajor = super.this_disk.major;
+               devices[devcnt].oldminor = super.this_disk.minor;
                devices[devcnt].events = md_event(&super);
                devices[devcnt].utime = super.utime;
                devices[devcnt].raid_disk = super.this_disk.raid_disk;
@@ -379,28 +382,43 @@ int Assemble(char *mddev, int mdfd,
 
        for (i=0; i<MD_SB_DISKS; i++) {
                int j = best[i];
-               int active_sync = (1<<MD_DISK_ACTIVE) | (1<<MD_DISK_SYNC);
+               int desired_state;
+
+               if (i < super.raid_disks)
+                       desired_state = (1<<MD_DISK_ACTIVE) | (1<<MD_DISK_SYNC);
+               else
+                       desired_state = 0;
+
                if (j<0)
                        continue;
                if (!devices[j].uptodate)
                        continue;
-               if (devices[j].major != super.disks[j].major ||
-                   devices[j].minor != super.disks[j].minor) {
+#if 0
+This doesnt work yet 
+               if (devices[j].major != super.disks[i].major ||
+                   devices[j].minor != super.disks[i].minor) {
                        change |= 1;
-                       super.disks[j].major = devices[j].major;
-                       super.disks[j].minor = devices[j].minor;
+                       super.disks[i].major = devices[j].major;
+                       super.disks[i].minor = devices[j].minor;
+               }
+#endif 
+               if (devices[j].oldmajor != super.disks[i].major ||
+                   devices[j].oldminor != super.disks[i].minor) {
+                       change |= 2;
+                       super.disks[i].major = devices[i].oldmajor;
+                       super.disks[i].minor = devices[i].oldminor;
                }
                if (devices[j].uptodate &&
-                   (super.disks[i].state != active_sync)) {
+                   (super.disks[i].state != desired_state)) {
                        if (force) {
                                fprintf(stderr, Name ": "
                                        "clearing FAULTY flag for device %d in %s for %s\n",
                                        j, mddev, devices[j].devname);
-                               super.disks[i].state = active_sync;
+                               super.disks[i].state = desired_state;
                                change |= 2;
                        } else {
                                fprintf(stderr, Name ": "
-                                       "device %d in %s is marked faulty in superblock, but %s seems ok\n",
+                                       "device %d in %s has wrong state in superblock, but %s seems ok\n",
                                        i, mddev, devices[j].devname);
                        }
                }
index f9d2d4ad306c5fa0a1c2b88d15020a1735634987..ac837325576dbb43aa0b757347a58bf7685d3e51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,15 @@
-Changed Prior to 0.8 release
+Changes Prior to this release
+    -   mdadm.spec updates and ifdef BLKGETSIZE64 from  Luca Berra -- bluca@comedia.it
+    -   more mdadm.spec updates from  Gregory Leblanc <gleblanc@linuxweasel.com>
+    -   make directory for mdadm.conf configurable in Makefile
+    -   Finished mdadm.conf.5.  Removed details of conf file from
+       mdadm.8 leaving a reference to mdadm.conf.5.
+    -   Fix bug in Assemble.c, thanks to Junaid Rizvi <domdev@sat.net.pk>
+    -   Get --assemble --force to make sure old major/minor numbers are
+        consistant, as md.c worries about this :-(
+       
+       
+Changes Prior to 0.7.1 release
     -   update mdadm.spec
     -   use BLKGETSIZE64 if available for array size
     -   give human readable as GiB/MiB and GB and MB, with 2 decimal point precision
index 3fefc47afef0611d5b02fbdd76ae2a91f040ebcc..5082827021c38066a552af968d30142acb6bf3a1 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -83,9 +83,12 @@ int Detail(char *dev, int brief)
        else {
                long array_size;
                long long larray_size;
+#ifdef BLKGETSIZE64
                if (ioctl(fd, BLKGETSIZE64, &larray_size)==0)
                        ;
-               else if (ioctl(fd, BLKGETSIZE, &array_size)==0)
+               else
+#endif
+                       if (ioctl(fd, BLKGETSIZE, &array_size)==0)
                        larray_size = array_size<<9;
                else larray_size = 0;
 
index f38958b89a2b058e8b53acefa67e470fc73866ab..38e27d5c2cf5807527b0c27d2a018870d02f31fd 100644 (file)
--- a/Makefile
+++ b/Makefile
 #
 
 CC = gcc
-CFLAGS = -Wall,error,strict-prototypes -ggdb
+SYSCONFDIR = /etc
+CONFFILE = $(SYSCONFDIR)/mdadm.conf
+CFLAGS = -Wall,error,strict-prototypes -ggdb -DCONFFILE=\"$(CONFFILE)\"
+
+# If you want a static binary, you might uncomment these
+# LDFLAGS = -static
+# STRIP = -s
 
 INSTALL = /usr/bin/install
 DESTDIR = /.
@@ -40,7 +46,7 @@ OBJS =  mdadm.o config.o  ReadMe.o util.o Manage.o Assemble.o Build.o Create.o D
 all : mdadm mdadm.man md.man mdadm.conf.man
 
 mdadm : $(OBJS)
-       $(CC) -o mdadm $^
+       $(CC) $(LDFLAGS) -o mdadm $^
 
 mdadm.man : mdadm.8
        nroff -man mdadm.8 > mdadm.man
@@ -54,7 +60,7 @@ mdadm.conf.man : mdadm.conf.5
 $(OBJS) : mdadm.h
 
 install : mdadm mdadm.8
-       $(INSTALL) -m 755 mdadm $(DESTDIR)/$(BINDIR)
+       $(INSTALL) $(STRIP) -m 755 mdadm $(DESTDIR)/$(BINDIR)
        $(INSTALL) -m 644 mdadm.8 $(DESTDIR)/$(MANDIR)
 
 clean : 
index 12e6501e9b2ef668ab6844e4a40d2bec2161114c..2edc745baadcdb94987d7067d5a3230df26c69ae 100644 (file)
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -29,7 +29,7 @@
 
 #include "mdadm.h"
 
-char Version[] = Name " - v0.7.1 -  8 March 2002\n";
+char Version[] = Name " - v0.7.2 - 21 March 2002\n";
 /*
  * File: ReadMe.c
  *
index ea2f971ebce4469f6f777932da520cb5f1fbeb59..a0593e2098a373b7c0b2ad92d4198c212677f3b8 100644 (file)
--- a/config.c
+++ b/config.c
  *
  */
 
-char DefaultConfFile[] = "/etc/mdadm.conf";
+#ifndef CONFFILE
+#define CONFFILE "/etc/mdadm.conf"
+#endif
+char DefaultConfFile[] = CONFFILE;
 
 char *keywords[] = { "device", "array", NULL };
 
index 6ab4ca36836802a9988e3ad3432ba1f7cf5425b6..b6dc7d4ed6f2ab06ada72a22756abdd62f8d3173 100755 (executable)
--- a/makedist
+++ b/makedist
@@ -8,9 +8,9 @@ else echo $target is not a directory
 fi
 set `grep '^char Version' ReadMe.c `
 version=`echo $7 | sed 's/v//'`
-grep "^Version: $version$" mdadm.spec > /dev/null 2>&1 || 
+grep "^Version: *$version$" mdadm.spec > /dev/null 2>&1 || 
  {
-   echo mdadm.conf does not mention version $version.
+   echo mdadm.spec does not mention version $version.
    exit 1
  }
 echo version = $version
diff --git a/md.4 b/md.4
index 87f5a35df2c3f3d9e3f22f3f5609b5d5abc529b3..21ad2400deaf7432cdf125d07b7bad7a47da3f9d 100644 (file)
--- a/md.4
+++ b/md.4
@@ -16,7 +16,7 @@ Array of Independant Devices.
 .B md
 support RAID levels 1 (mirroring) 4 (striped array with parity device) and 5
 (striped array with distributed parity information.  If a single underlying
-device fails while using one of these level, they array will continue
+device fails while using one of these level, the array will continue
 to function.
 .PP
 .B md
@@ -24,36 +24,65 @@ also supports a number of pseudo RAID (non-redundant) configuations
 including RAID0 (striped array), LINEAR (catenated array) and
 MULTIPATH (a set of different interfaces to the same device).
 
-.SS RAID SUPER BLOCK
+.SS MD SUPER BLOCK
 With the exception of Legacy Arrays described below, each device that
 is incorportated into an MD array has a
 .I super block
 written towards the end of the device.  This superblock records
 information about the structure and state of the array so that the
-array an be reliably re-assembled after a shutdown.
+array can be reliably re-assembled after a shutdown.
 
 The superblock is 4K long and is written into a 64K aligned block that
-start at least 64K and less than 128K from the end of the device
+starts at least 64K and less than 128K from the end of the device
 (i.e. to get the address of the superblock round the size of the
 device down to a multiple of 64K and then subtract 64K).
-The available size of each device is the ammount of space before the
+The available size of each device is the amount of space before the
 super block, so between 64K and 128K is lost when a device in
 incorporated into an MD array.
 
 The superblock contains, among other things:
 .TP
 LEVEL
-The 
+The manner in which the devices are arranged into the array
+(linear, raid0, raid1, raid4, raid5, multipath).
 .TP
 UUID
 a 128 bit Universally Unique Identifier that identifies the array that
 this device is part of.
 
+.SS LEGACY ARRAYS
+Early versions of the
+.B md
+driver only supported Linear and Raid0 configurations and so
+did not use an MD superblock (as there is not state that needs to be
+recorded).  While it is strongly recommended that all newly created
+arrays utilise a superblock to help ensure that they are assembled
+properly, the
+.B md
+driver still supports legacy linear and raid0 md arrays that
+do not have a superblock.
+
 .SS LINEAR
+
+A linear array simply catenates the available space on each
+drive together to form one large virtual drive.
+
+One advantage of this arrangement over the more common RAID0
+arrangement is that the array may be reconfigured at a later time with
+an extra drive and so the array is made bigger without disturbing the
+data that is on the array.  However this cannot be done on a live
+array.
+
+
+
 .SS RAID0
+
+A RAID0 array (which has zero redundancy) is also known as a
+striped array.
 .SS RAID1
 .SS RAID4
 .SS RAID5
+.SS MUTIPATH
 .SS REBUILD/RESYNC
 .SH FILES
 .TP
diff --git a/md.man b/md.man
index 33b54712f7646b627429e6b431a168ccb5d63e8d..0e85f4cc7dc5e39087ca690522e5b545a1ec5d53 100644 (file)
--- a/md.man
+++ b/md.man
@@ -19,8 +19,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        m\bmd\bd support RAID levels 1 (mirroring) 4 (striped array with
        parity device) and 5 (striped array with distributed  par-
        ity  information.   If  a  single  underlying device fails
-       while using one of these level, they array  will  continue
-       to function.
+       while using one of these level, the array will continue to
+       function.
 
        m\bmd\bd  also  supports a number of pseudo RAID (non-redundant)
        configuations  including  RAID0  (striped  array),  LINEAR
@@ -28,36 +28,64 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        faces to the same device).
 
 
-   R\bRA\bAI\bID\bD S\bSU\bUP\bPE\bER\bR B\bBL\bLO\bOC\bCK\bK
+   M\bMD\bD S\bSU\bUP\bPE\bER\bR B\bBL\bLO\bOC\bCK\bK
        With the exception of Legacy Arrays described below,  each
        device  that is incorportated into an MD array has a _\bs_\bu_\bp_\be_\br
        _\bb_\bl_\bo_\bc_\bk  written  towards  the  end  of  the  device.   This
        superblock  records  information  about  the structure and
-       state of the array so that the array an  be  reliably  re-
+       state of the array so that the array can be  reliably  re-
        assembled after a shutdown.
 
        The  superblock  is  4K  long  and  is  written into a 64K
-       aligned block that start at least 64K and less  than  128K
+       aligned block that starts at least 64K and less than  128K
        from the end of the device (i.e. to get the address of the
        superblock round the size of the device down to a multiple
        of 64K and then subtract 64K).  The available size of each
-       device is the ammount of space before the super block,  so
+       device is the amount of space before the super  block,  so
        between 64K and 128K is lost when a device in incorporated
        into an MD array.
 
        The superblock contains, among other things:
 
-       LEVEL  The
+       LEVEL  The manner in which the devices are  arranged  into
+              the array (linear, raid0, raid1, raid4, raid5, mul-
+              tipath).
 
        UUID   a 128 bit Universally Unique Identifier that  iden-
               tifies the array that this device is part of.
 
 
+   L\bLE\bEG\bGA\bAC\bCY\bY A\bAR\bRR\bRA\bAY\bYS\bS
+       Early  versions of the m\bmd\bd driver only supported Linear and
+       Raid0 configurations and so did not use an  MD  superblock
+       (as  there is not state that needs to be recorded).  While
+       it is strongly recommended that all newly  created  arrays
+       utilise  a  superblock to help ensure that they are assem-
+       bled properly, the m\bmd\bd driver still supports legacy  linear
+       and raid0 md arrays that do not have a superblock.
+
+
    L\bLI\bIN\bNE\bEA\bAR\bR
+       A  linear  array  simply  catenates the available space on
+       each drive together to form one large virtual drive.
+
+       One advantage of this arrangement  over  the  more  common
+       RAID0 arrangement is that the array may be reconfigured at
+       a later time with an extra drive and so the array is  made
+       bigger  without  disturbing the data that is on the array.
+       However this cannot be done on a live array.
+
+
+
+
    R\bRA\bAI\bID\bD0\b0
+       A RAID0 array (which has zero redundancy) is also known as
+       a striped array.
+
    R\bRA\bAI\bID\bD1\b1
    R\bRA\bAI\bID\bD4\b4
    R\bRA\bAI\bID\bD5\b5
+   M\bMU\bUT\bTI\bIP\bPA\bAT\bTH\bH
    R\bRE\bEB\bBU\bUI\bIL\bLD\bD/\b/R\bRE\bES\bSY\bYN\bNC\bC
 F\bFI\bIL\bLE\bES\bS
        /\b/p\bpr\bro\boc\bc/\b/m\bmd\bds\bst\bta\bat\bt
diff --git a/mdadm.8 b/mdadm.8
index 63bb5879d55ed6ad6421d14402784a53e9aa9992..87cd006a24bba0ff4538896e6ad1f1a77665d339 100644 (file)
--- a/mdadm.8
+++ b/mdadm.8
@@ -36,7 +36,8 @@ Recent kernels (2002) also support a mode known as
 does not support MULTIPATH as yet.
 
 .B mdadm
-is a program that can be used to create and manage MD devices.  As
+is a program that can be used to create, manage, and monitor
+MD devices.  As
 such it provides a similar set of functionality to the
 .B raidtools
 packages.
@@ -479,69 +480,12 @@ This file is not currently used by
 
 .SS /etc/mdadm.conf
 
-The config file is line oriented with, as usual, blank lines and lines
-beginning with a hash (or pound sign or sharp or number sign,
-whichever you like to call it) ignored.
-Lines that start with a blank are treated as continuations of the
-previous line (I don't like trailing slashes).
+The config file lists which devices may be scanned to see if
+they contain MD super block, and gives identifying information
+(e.g. UUID) about known MD arrays.  See
+.BR mdadm.conf (5)
+for more details.
 
-Each line contains a sequence of space-separated words, the first of
-which identified the type of line. Keywords are case-insensitive, and
-the first work on a line can be abbreviated to 3 letters.
-
-There are two types of lines. ARRAY and DEVICE.
-
-The DEVICE lines usually come first. All remaining words on the line
-are treated as names of devices, possibly containing wild cards (see
-.IR glob (7)).
-These list all the devices that
-.B mdadm
-is allowed to scan
-when looking for devices with RAID superblocks.
-Each line can contain multiple device names, and there can be multiple
-DEVICE lines.  For example:
-.IP
-DEVICE /dev/hda* /dev/hdc*
-.br
-DEV    /dev/sd*
-.br
-DEVICE /dev/discs/disc*/disc
-.PP
-The ARRAY lines identify actual arrays.  The second word on the line
-should be the name of the device where the array is normally
-assembled, such as /dev/md1.
-Subsequent words identify the array. If multiple identities are given,
-then the array much match ALL identities to be considered a match.
-Each identity word has a tag, and equals sign, and some value.
-The options are:
-
-.TP
-.B uuid=
-The value should be a 128 bit uuid in hexadecimal, with punctuation
-interspersed if desired.  This must match the uuid stored in the
-superblock.
-.TP
-.B super-minor=
-The value is an integer which indicates the minor number that was
-stored in the superblock when the array was created. When an array is
-created as /dev/mdX, then the minor number X is stored.
-.TP
-.B devices=
-The value is a comma separated list of device names. Precisely these
-devices will be used to assemble the array.  Note that the devices
-listed there must also be listed on a DEVICE line.
-.TP
-.B level=
-The value is a raid level.  This is normally used to identify an
-array, but is supported so that the output of
-.B "mdadm --examine --scan"
-can be use directly in the configuration file.
-.TP
-.B disks=
-The value is the number of disks in a complete active array.  As with
-.B level=
-this is mainly for compatibility with the output of
-.BR "mdadm --examine --scan" .
 
 .SH TODO
 
index 59235bc0d5af77e15197078f981017c6729446f6..f8c0e34a0440232c763d23262a7b0a540ef962c2 100644 (file)
@@ -6,17 +6,17 @@ mdadm.conf \- configuration for management of Software Raid with mdadm
 .SH DESCRIPTION
 .PP
 .B mdadm
-is a tools for creating an managing RAID devices using the
+is a tool for creating, managing, and monitoring RAID devices using the
 .B md
 driver in Linux.
 .PP
 Some common tasks, such as assembling all arrays, can be simplified
-by describing the devices and array in this configuations file.
+by describing the devices and array in this configuation file.
 
 .SS SYNTAX
 The file should be seen as a collection of words separated by white
 space (space, tab, or newline).
-Any word that being with a hash sign (#) starts a comment and that
+Any word that beings with a hash sign (#) starts a comment and that
 word together with the remainder of the line are ignored.
 
 Any line that start with white space (space or tab) is treated as
@@ -45,10 +45,58 @@ and each device name can contain wild cards as defined by
 
 Also, there may be several device lines present in the file.
 
+For example:
+.IP
+DEVICE /dev/hda* /dev/hdc*
+.br
+DEV    /dev/sd*
+.br
+DEVICE /dev/discs/disc*/disc
+
 .TP
 .B ARRAY
+The ARRAY lines identify actual arrays.  The second word on the line
+should be the name of the device where the array is normally
+assembled, such as
+.BR  /dev/md1 .
+Subsequent words identify the array. If multiple identities are given,
+then the array must match ALL identities to be considered a match.
+Each identity word has a tag, and equals sign, and some value.
+The options are:
+
+.RS 4
+.TP
+.B uuid=
+The value should be a 128 bit uuid in hexadecimal, with punctuation
+interspersed if desired.  This must match the uuid stored in the
+superblock.
+.TP
+.B super-minor=
+The value is an integer which indicates the minor number that was
+stored in the superblock when the array was created. When an array is
+created as /dev/mdX, then the minor number X is stored.
+.TP
+.B devices=
+The value is a comma separated list of device names. Precisely these
+devices will be used to assemble the array.  Note that the devices
+listed there must also be listed on a DEVICE line.
+.TP
+.B level=
+The value is a raid level.  This is not normally used to
+identify an array, but is supported so that the output of
+
+.B "mdadm --examine --scan"
+
+can be use directly in the configuration file.
+.TP
+.B disks=
+The value is the number of disks in a complete active array.  As with
+.B level=
+this is mainly for compatibility with the output of
 
+.BR "mdadm --examine --scan" .
+.RE
 .SH SEE ALSO
-mdadm (8),
-md (4).
+.BR mdadm (8),
+.BR md (4).
 
index 6e30e2107f0fe5ae0be9a58df38eba2e6f6a4744..37d7585561788eaf310b67799de82ddc4e1779e2 100644 (file)
@@ -10,18 +10,18 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        /etc/mdadm.conf
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       m\bmd\bda\bad\bdm\bm is a tools for creating  an  managing  RAID  devices
-       using the m\bmd\bd driver in Linux.
+       m\bmd\bda\bad\bdm\bm is a tool for  creating,  managing,  and  monitoring
+       RAID devices using the m\bmd\bd driver in Linux.
 
        Some  common  tasks, such as assembling all arrays, can be
        simplified by describing the devices  and  array  in  this
-       configuations file.
+       configuation file.
 
 
    S\bSY\bYN\bNT\bTA\bAX\bX
        The file should be seen as a collection of words separated
        by white space (space, tab, or newline).   Any  word  that
-       being  with a hash sign (#) starts a comment and that word
+       beings with a hash sign (#) starts a comment and that word
        together with the remainder of the line are ignored.
 
        Any line that start with white space  (space  or  tab)  is
@@ -47,11 +47,58 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
               Also,  there may be several device lines present in
               the file.
 
+              For example:
 
-       A\bAR\bRR\bRA\bAY\bY
+              DEVICE /dev/hda* /dev/hdc*
+              DEV    /dev/sd*
+              DEVICE /dev/discs/disc*/disc
+
+
+       A\bAR\bRR\bRA\bAY\bY  The ARRAY lines identify actual arrays.  The second
+              word  on  the line should be the name of the device
+              where the array  is  normally  assembled,  such  as
+              /\b/d\bde\bev\bv/\b/m\bmd\bd1\b1.   Subsequent words identify the array. If
+              multiple identities are given, then the array  must
+              match  ALL  identities  to  be  considered a match.
+              Each identity word has a tag, and equals sign,  and
+              some value.  The options are:
+
+
+           u\buu\bui\bid\bd=\b=  The value should be a 128 bit uuid in hexadeci-
+                  mal, with punctuation interspersed if  desired.
+                  This   must   match  the  uuid  stored  in  the
+                  superblock.
+
+           s\bsu\bup\bpe\ber\br-\b-m\bmi\bin\bno\bor\br=\b=
+                  The value is an  integer  which  indicates  the
+                  minor  number that was stored in the superblock
+                  when the array was created. When  an  array  is
+                  created as /dev/mdX, then the minor number X is
+                  stored.
+
+           d\bde\bev\bvi\bic\bce\bes\bs=\b=
+                  The value is a comma separated list  of  device
+                  names.  Precisely these devices will be used to
+                  assemble the  array.   Note  that  the  devices
+                  listed  there  must  also be listed on a DEVICE
+                  line.
+
+           l\ble\bev\bve\bel\bl=\b= The value is a raid level.  This  is  not  nor-
+                  mally  used  to  identify an array, but is sup-
+                  ported so that the output of
+
+                  m\bmd\bda\bad\bdm\bm -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be -\b--\b-s\bsc\bca\ban\bn
+
+                  can be use directly in the configuration  file.
+
+           d\bdi\bis\bsk\bks\bs=\b= The  value is the number of disks in a complete
+                  active array.  As with l\ble\bev\bve\bel\bl=\b=  this  is  mainly
+                  for compatibility with the output of
+
+                  m\bmd\bda\bad\bdm\bm -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be -\b--\b-s\bsc\bca\ban\bn.
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
-       mdadm (8), md (4).
+       m\bmd\bda\bad\bdm\bm(8), m\bmd\bd(4).
 
 
 
diff --git a/mdadm.man b/mdadm.man
new file mode 100644 (file)
index 0000000..6c7895d
--- /dev/null
+++ b/mdadm.man
@@ -0,0 +1,423 @@
+mdadm(8)                                                 mdadm(8)
+
+
+
+N\bNA\bAM\bME\bE
+       mdadm - manage MD devices _\ba_\bk_\ba Linux Software Raid.
+
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+       m\bmd\bda\bad\bdm\bm _\b[_\bm_\bo_\bd_\be_\b] _\b<_\br_\ba_\bi_\bd_\bd_\be_\bv_\bi_\bc_\be_\b> _\b[_\bo_\bp_\bt_\bi_\bo_\bn_\bs_\b] _\b<_\bs_\bu_\bb_\bd_\be_\bv_\bi_\bc_\be_\bs_\b>
+
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       RAID  devices are virtual devices created from two or more
+       real block devices. This allows  multiple  devices  (typi-
+       cally  disk  drives or partitions there-of) to be combined
+       into a single  device  to  hold  (for  example)  a  single
+       filesystem.   Some  RAID levels included redundancy and so
+       can survive some degree of device failure.
+
+       Linux Software RAID devices are implemented through the md
+       (Multiple Devices) device driver.
+
+       Currently, Linux supports L\bLI\bIN\bNE\bEA\bAR\bR md devices, R\bRA\bAI\bID\bD0\b0 (strip-
+       ing), R\bRA\bAI\bID\bD1\b1 (mirroring), R\bRA\bAI\bID\bD4\b4 and R\bRA\bAI\bID\bD5\b5.\b.
+
+       Recent kernels (2002) also support a mode known as  M\bMU\bUL\bLT\bTI\bI-\b-
+       P\bPA\bAT\bTH\bH.  m\bmd\bda\bad\bdm\bm does not support MULTIPATH as yet.
+
+       m\bmd\bda\bad\bdm\bm is a program that can be used to create, manage, and
+       monitor MD devices.  As such it provides a similar set  of
+       functionality  to the r\bra\bai\bid\bdt\bto\boo\bol\bls\bs packages.  The key differ-
+       ences between m\bmd\bda\bad\bdm\bm and r\bra\bai\bid\bdt\bto\boo\bol\bls\bs are:
+
+       +\bo   m\bmd\bda\bad\bdm\bm is a single program and not a collection of pro-
+           grams.
+
+       +\bo   m\bmd\bda\bad\bdm\bm  can perform (almost) all of its functions with-
+           out having a configuration  file.   Also  mdadm  helps
+           with management of the configuration file.
+
+       +\bo   m\bmd\bda\bad\bdm\bm   can  provide  information  about  your  arrays
+           (through Detail and Examine) that r\bra\bai\bid\bdt\bto\boo\bol\bls\bs cannot.
+
+       +\bo   r\bra\bai\bid\bdt\bto\boo\bol\bls\bs can manage  MULTIPATH  devices  which  m\bmd\bda\bad\bdm\bm
+           cannot yet manage.
+
+
+M\bMO\bOD\bDE\bES\bS
+       mdadm has 7 major modes of operation:
+
+       A\bAs\bss\bse\bem\bmb\bbl\ble\be
+              Assemble  the  parts  of a previously created array
+              into an active array. Components can be  explicitly
+              given  or  can  be searched for.  m\bmd\bda\bad\bdm\bm checks that
+              the components do form a bona fide array, and  can,
+              on  request, fiddle superblock information so as to
+              assemble a faulty array.
+
+
+       B\bBu\bui\bil\bld\bd  Build   a   legacy   array    without    per-device
+              superblocks.
+
+
+       C\bCr\bre\bea\bat\bte\be Create a new array with per-device superblocks.
+
+
+       D\bDe\bet\bta\bai\bil\bl Display  the details of a given md device.  Details
+              include the RAID  level,  the  number  of  devices,
+              which ones are faulty (if any), and the array UUID.
+
+
+       E\bEx\bxa\bam\bmi\bin\bne\be
+              Examine a device to see if it  is  part  of  an  md
+              array,  and  print  out  the details of that array.
+              This mode can also be used to examine a large  num-
+              ber  of  devices  and to print out a summary of the
+              arrays  found  in  a  format   suitable   for   the
+              m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf configuration file.
+
+
+       F\bFo\bol\bll\blo\bow\bw o\bor\br M\bMo\bon\bni\bit\bto\bor\br
+              Monitor one or more md devices and act on any state
+              changes.
+
+
+       M\bMa\ban\bna\bag\bge\be This  is  for  odd  bits  an  pieces  like  hotadd,
+              hotremove, setfaulty, stop, readonly, readwrite.
+
+
+O\bOP\bPT\bTI\bIO\bON\bNS\bS
+       Available options are:
+
+
+       -\b-A\bA, -\b--\b-a\bas\bss\bse\bem\bmb\bbl\ble\be
+              Assemble an existing array.
+
+
+       -\b-B\bB, -\b--\b-b\bbu\bui\bil\bld\bd
+              Build a legacy array without superblocks.
+
+
+       -\b-C\bC, -\b--\b-c\bcr\bre\bea\bat\bte\be
+              Create a new array.
+
+
+       -\b-D\bD, -\b--\b-d\bde\bet\bta\bai\bil\bl
+              Print detail of one or more md devices.
+
+
+       -\b-E\bE, -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be
+              Print content of md superblock on device(s).
+
+
+       -\b-F\bF, -\b--\b-f\bfo\bol\bll\blo\bow\bw, -\b--\b-m\bmo\bon\bni\bit\bto\bor\br
+              Select M\bMo\bon\bni\bit\bto\bor\br mode.
+
+
+       -\b-h\bh, -\b--\b-h\bhe\bel\blp\bp
+              Display  help  message or, after above option, mode
+              specific help message.
+
+
+       -\b-V\bV, -\b--\b-v\bve\ber\brs\bsi\bio\bon\bn
+              Print version information for mdadm.
+
+
+       -\b-v\bv, -\b--\b-v\bve\ber\brb\bbo\bos\bse\be
+              Be more verbose about what is happening.
+
+
+       -\b-b\bb, -\b--\b-b\bbr\bri\bie\bef\bf
+              Be less verbose.  This is used  with  -\b--\b-d\bde\bet\bta\bai\bil\bl  and
+              -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be.
+
+
+F\bFo\bor\br c\bcr\bre\bea\bat\bte\be o\bor\br b\bbu\bui\bil\bld\bd:\b:
+       -\b-c\bc, -\b--\b-c\bch\bhu\bun\bnk\bk=\b=
+              Specify  chunk  size  of kibibytes.  The default is
+              64.
+
+
+       -\b--\b-r\bro\bou\bun\bnd\bdi\bin\bng\bg=\b=
+              Specify rounding factor for linear  array  (==chunk
+              size)
+
+
+       -\b-l\bl, -\b--\b-l\ble\bev\bve\bel\bl=\b=
+              Set  raid  level.   Options  are: linear, raid0, 0,
+              stripe, raid1,  1,  mirror,  raid5,  4,  raid5,  5.
+              Obviously  some  of these are synonymous.  Only the
+              first 4 are valid when Building.
+
+
+       -\b-p\bp, -\b--\b-p\bpa\bar\bri\bit\bty\by=\b=
+              Set   raid5   parity   algorithm.   Options    are:
+              {left,right}-{,a}symmetric,  la,  ra,  ls, rs.  The
+              default is left-symmetric.
+
+
+       -\b--\b-l\bla\bay\byo\bou\but\bt=\b=
+              same as --parity
+
+
+       -\b-n\bn, -\b--\b-r\bra\bai\bid\bd-\b-d\bdi\bis\bsk\bks\bs=\b=
+              number of active devices in array.
+
+
+       -\b-x\bx, -\b--\b-s\bsp\bpa\bar\bre\be-\b-d\bdi\bis\bsk\bks\bs=\b=
+              number of spare (eXtra)  disks  in  initial  array.
+              Spares can be added and removed later.
+
+
+       -\b-z\bz, -\b--\b-s\bsi\biz\bze\be=\b=
+              Amount  (in  Kibibytes)  of  space to use from each
+              drive in RAID1/4/5.  This must be a multiple of the
+              chunk  size, and must leave about 128Kb of space at
+              the end of the drive for the RAID  superblock.   If
+              this  is  not specified (as it normally is not) the
+              smallest drive (or partition) sets the size, though
+              if  there is a variance among the drives of greater
+              than 1%, a warning is issued.
+
+
+F\bFo\bor\br a\bas\bss\bse\bem\bmb\bbl\ble\be:\b:
+       -\b-u\bu, -\b--\b-u\buu\bui\bid\bd=\b=
+              uuid of array to assemble. Devices which don't have
+              this uuid are excluded
+
+
+       -\b-m\bm, -\b--\b-s\bsu\bup\bpe\ber\br-\b-m\bmi\bin\bno\bor\br=\b=
+              Minor  number of device that array was created for.
+              Devices which don't  have  this  minor  number  are
+              excluded.  If you create an array as /dev/md1, then
+              all superblock will contain  the  minor  number  1,
+              even if the array is later assembled as /dev/md2.
+
+
+       -\b-c\bc, -\b--\b-c\bco\bon\bnf\bfi\big\bg=\b=
+              config file.  Default is /\b/e\bet\btc\bc/\b/m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf.
+
+
+       -\b-s\bs, -\b--\b-s\bsc\bca\ban\bn
+              scan config file for missing information
+
+
+       -\b-f\bf, -\b--\b-f\bfo\bor\brc\bce\be
+              Assemble  the array even if some superblocks appear
+              out-of-date
+
+
+       -\b-R\bR, -\b--\b-r\bru\bun\bn
+              Attempt to start the array  even  if  fewer  drives
+              were  given  than are needed for a full array. Nor-
+              mally if not all drives are found and -\b--\b-s\bsc\bca\ban\bn is not
+              used,  then  the  array  will  be assembled but not
+              started.  With -\b--\b-r\bru\bun\bn an attempt  will  be  made  to
+              start it anyway.
+
+
+G\bGe\ben\bne\ber\bra\bal\bl m\bma\ban\bna\bag\bge\bem\bme\ben\bnt\bt
+       -\b-a\ba, -\b--\b-a\bad\bdd\bd
+              hotadd listed devices.
+
+
+       -\b-r\br, -\b--\b-r\bre\bem\bmo\bov\bve\be
+              remove  listed  devices.   The  must not be active.
+              i.e. they should be failed or spare devices.
+
+
+       -\b-f\bf, -\b--\b-f\bfa\bai\bil\bl
+              mark listed devices as faulty.
+
+
+       -\b--\b-s\bse\bet\bt-\b-f\bfa\bau\bul\blt\bty\by
+              same as --fail.
+
+
+       -\b-R\bR, -\b--\b-r\bru\bun\bn
+              start a partially built array.
+
+
+       -\b-S\bS, -\b--\b-s\bst\bto\bop\bp
+              deactivate array, releasing all resources.
+
+
+       -\b-o\bo, -\b--\b-r\bre\bea\bad\bdo\bon\bnl\bly\by
+              mark array as readonly.
+
+
+       -\b-w\bw, -\b--\b-r\bre\bea\bad\bdw\bwr\bri\bit\bte\be
+              mark array as readwrite.
+
+
+
+A\bAS\bSS\bSE\bEM\bMB\bBL\bLY\bY M\bMO\bOD\bDE\bE
+       Usage: m\bmd\bda\bad\bdm\bm -\b--\b-a\bas\bss\bse\bem\bmb\bbl\ble\be _\bd_\be_\bv_\bi_\bc_\be _\bo_\bp_\bt_\bi_\bo_\bn_\bs_\b._\b._\b.
+
+       Usage: m\bmd\bda\bad\bdm\bm -\b--\b-a\bas\bss\bse\bem\bmb\bbl\ble\be -\b--\b-s\bsc\bca\ban\bn _\bo_\bp_\bt_\bi_\bo_\bn_\bs_\b._\b._\b.
+
+
+       This usage assembles one or more  raid  arrays  from  pre-
+       existing  components.  For each array, mdadm needs to know
+       the md device, the identity of the array, and a number  of
+       sub devices. These can be found in a number of ways.
+
+       The  md  device  is either given before -\b--\b-s\bsc\bca\ban\bn or is found
+       from the config file. In  the  latter  case,  multiple  md
+       devices can be started with a single mdadm command.
+
+       The identity can be given with the -\b--\b-u\buu\bui\bid\bd option, with the
+       -\b--\b-s\bsu\bup\bpe\ber\br-\b-m\bmi\bin\bno\bor\br option, can be found in in the config  file,
+       or  will be taken from the super block on the first subde-
+       vice listed on the command line.
+
+       Devices can be given on the  -\b--\b-a\bas\bss\bse\bem\bmb\bbl\ble\be  command  line  or
+       from  the  config  file.  Only  devices  which  have an md
+       superblock which contains the right identity will be  con-
+       sidered for any device.
+
+       The  config  file  is  only  used if explicitly named with
+       -\b--\b-c\bco\bon\bnf\bfi\big\bg or requested with -\b--\b-s\bsc\bca\ban\bn.\b.   In  the  later  case,
+       /\b/e\bet\btc\bc/\b/m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf is used.
+
+       If  -\b--\b-s\bsc\bca\ban\bn is not given, then the config file will only be
+       used to find the identity of md arrays.
+
+       Normally the array will be started after it is  assembled.
+       However  is  -\b--\b-s\bsc\bca\ban\bn  is  not given and insufficient drives
+       were lists to start a complete (non-degraded) array,  then
+       the  array is not started (to guard against usage errors).
+       To insist that the array be started in this case  (as  may
+       work for RAID1 or RAID5), give the -\b--\b-r\bru\bun\bn flag.
+
+
+
+B\bBU\bUI\bIL\bLD\bD M\bMO\bOD\bDE\bE
+       Usage:  m\bmd\bda\bad\bdm\bm  -\b--\b-b\bbu\bui\bil\bld\bd  _\bd_\be_\bv_\bi_\bc_\be -\b--\b-c\bch\bhu\bun\bnk\bk=\b=_\bX -\b--\b-l\ble\bev\bve\bel\bl=\b=_\bY -\b--\b-r\bra\bai\bid\bd-\b-
+                   d\bdi\bis\bsk\bks\bs=\b=_\bZ _\bd_\be_\bv_\bi_\bc_\be_\bs
+
+
+       This usage is similar to -\b--\b-c\bcr\bre\bea\bat\bte\be.  The difference is that
+       it creates a legacy array without a superblock. With these
+       arrays there is no difference between  initially  creating
+       the  array  and  subsequently assembling the array, except
+       that hopefully there is useful data there  in  the  second
+       case.
+
+       The  level  may  only  be 0, raid0, or linear. All devices
+       must be listed and the array will  be  started  once  com-
+       plete.
+
+
+C\bCR\bRE\bEA\bAT\bTE\bE M\bMO\bOD\bDE\bE
+       Usage: m\bmd\bda\bad\bdm\bm -\b--\b-c\bcr\bre\bea\bat\bte\be _\bd_\be_\bv_\bi_\bc_\be -\b--\b-c\bch\bhu\bun\bnk\bk=\b=_\bX -\b--\b-l\ble\bev\bve\bel\bl=\b=_\bY
+                   -\b--\b-r\bra\bai\bid\bd-\b-d\bdi\bis\bsk\bks\bs=\b=_\bZ _\bd_\be_\bv_\bi_\bc_\be_\bs
+
+
+       This  usage will initialise a new md array, associate some
+       devices with it, and activate the array.
+
+       As devices are added, they are checked to see if they con-
+       tain  raid superblocks or filesystems. They are also check
+       to see if the variance in device size exceeds 1%.
+
+       If any discrepancy is found, the array will not  automati-
+       cally  be run, though the presence of a -\b--\b-r\bru\bun\bn can override
+       this caution.
+
+
+       The General Management options that are valid with  --cre-
+       ate are:
+
+       -\b--\b-r\bru\bun\bn  insist  of  running  the array even if some devices
+              look like they might be in use.
+
+
+       -\b--\b-r\bre\bea\bad\bdo\bon\bnl\bly\by
+              start the array readonly - not supported yet.
+
+
+D\bDE\bET\bTA\bAI\bIL\bL M\bMO\bOD\bDE\bE
+       Usage: m\bmd\bda\bad\bdm\bm -\b--\b-d\bde\bet\bta\bai\bil\bl [-\b--\b-b\bbr\bri\bie\bef\bf] _\bd_\be_\bv_\bi_\bc_\be _\b._\b._\b.
+
+
+       This usage sill print out the details of the  given  array
+       including a list of component devices.  To determine names
+       for the devices, m\bmd\bda\bad\bdm\bm searches /\b/d\bde\bev\bv for device files with
+       the right major and minor numbers.
+
+       With  -\b--\b-b\bbr\bri\bie\bef\bf  m\bmd\bda\bad\bdm\bm  prints a single line that identifies
+       the level, number of disks, and UUID of the  array.   This
+       line is suitable for inclusion in /\b/e\bet\btc\bc/\b/m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf.
+
+
+E\bEX\bXA\bAM\bMI\bIN\bNE\bE M\bMO\bOD\bDE\bE
+       Usage: m\bmd\bda\bad\bdm\bm -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be [-\b--\b-s\bsc\bca\ban\bn] [-\b--\b-b\bbr\bri\bie\bef\bf] _\bd_\be_\bv_\bi_\bc_\be _\b._\b._\b.
+
+       This  usage will examine some block devices to see if that
+       have a valid RAID superblock on them.  The information  in
+       each valid raid superblock will be printed.
+
+       If  -\b--\b-s\bsc\bca\ban\bn  is  used, the no devices should be listed, and
+       the complete set of devices identified in  the  configura-
+       tion  file  are  checked.  -\b--\b-s\bsc\bca\ban\bn implies -\b--\b-b\bbr\bri\bie\bef\bf but this
+       implication can be countered by specifying -\b--\b-v\bve\ber\brb\bbo\bos\bse\be.
+
+       With -\b--\b-b\bbr\bri\bie\bef\bf m\bmd\bda\bad\bdm\bm will output an  config  file  entry  of
+       each  distinct array that was found.  This entry will list
+       the UUID, the raid level, and a  list  of  the  individual
+       devices  on  which  a superblock for that array was found.
+       This output will by syntactically suitable  for  inclusion
+       in the configuration file, but should N\bNO\bOT\bT be used blindly.
+       Often the array description that you want in the  configu-
+       ration file is much less specific than that given by m\bmd\bda\bad\bdm\bm
+       -\b-B\bBs\bs.  For example, you normally do not want  to  list  the
+       devices, particularly if they are SCSI devices.
+
+
+
+F\bFI\bIL\bLE\bES\bS
+   /\b/p\bpr\bro\boc\bc/\b/m\bmd\bds\bst\bta\bat\bt
+       If  you're  using the /\b/p\bpr\bro\boc\bc filesystem, /\b/p\bpr\bro\boc\bc/\b/m\bmd\bds\bst\bta\bat\bt gives
+       you informations about md devices status.   This  file  is
+       not currently used by m\bmd\bda\bad\bdm\bm.
+
+
+   /\b/e\bet\btc\bc/\b/m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf
+       The  config file lists which devices may be scanned to see
+       if they contain MD  super  block,  and  gives  identifying
+       information  (e.g.  UUID)  about  known  MD  arrays.   See
+       m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf(5) for more details.
+
+
+
+T\bTO\bOD\bDO\bO
+       Finish and document Follow mode.
+
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+       For information on the various levels of RAID, check out:
+
+
+              http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/
+
+       for new releases of the RAID driver check out:
+
+
+              ftp://ftp.kernel.org/pub/linux/kernel/peo-
+              ple/mingo/raid-patches
+
+       or
+
+              http://www.cse.unsw.edu.au/~neilb/patches/linux-
+              stable/
+
+       m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf(5), m\bmd\bd(4).
+
+       _\br_\ba_\bi_\bd_\bt_\ba_\bb(5), _\br_\ba_\bi_\bd_\b0_\br_\bu_\bn(8), _\br_\ba_\bi_\bd_\bs_\bt_\bo_\bp(8), _\bm_\bk_\br_\ba_\bi_\bd(8)
+
+
+
+                                                         mdadm(8)
index 5cf33d87b1b1856b09d27a273d21f3c118b7699c..2999c915905d9ee83ec01f576e12df93cbb580e9 100644 (file)
@@ -1,28 +1,23 @@
-Summary: mdadm is used for controlling Linux md devices (aka RAID arrays)
-Name: mdadm
-Version: 0.7.1
-Release: 1
-Source: http://www.cse.unsw.edu.au/~neilb/source/mdadm/mdadm-%{version}.tgz
-URL: http://www.cse.unsw.edu.au/~neilb/source/mdadm/
-Copyright: GPL
-Group: Utilities/System
-BuildRoot: /var/tmp/%{name}-root
-Packager: Danilo Godec <danci@agenda.si>
+Summary:     mdadm is used for controlling Linux md devices (aka RAID arrays)
+Name:        mdadm
+Version:     0.7.2
+Release:     1
+Source:      http://www.cse.unsw.edu.au/~neilb/source/mdadm/mdadm-%{version}.tgz
+URL:         http://www.cse.unsw.edu.au/~neilb/source/mdadm/
+License:     GPL
+Group:       Utilities/System
+BuildRoot:   ${_tmppath}/%{name}-root
+Packager:    Danilo Godec <danci@agenda.si> (et.al.)
+Obsoletes:   mdctl
 
 %description 
-mdadm is a single program that can be used to control Linux md devices. It
-is intended to provide all the functionality of the mdtools and raidtools
-but with a very different interface.
-
-mdadm can perform all functions without a configuration file. There is the
-option of using a configuration file, but not in the same way that raidtools
-uses one.
-
-raidtools uses a configuration file to describe how to create a RAID array,
-and also uses this file partially to start a previously created RAID array. 
-Further, raidtools requires the configuration file for such things as
-stopping a raid array, which needs to know nothing about the array.
-
+mdadm is a program that can be used to create, manage, and monitor
+Linux MD (Software RAID) devices.
+As such is provides similar functionality to the raidtools packages.
+The particular differences to raidtools is that mdadm is a single
+program, and it can perform (almost) all functions without a
+configuration file (that a config file can be used to help with
+some common tasks).
 
 %prep
 %setup -q
@@ -32,14 +27,14 @@ stopping a raid array, which needs to know nothing about the array.
 # people who install RPMs (especially given that the default RPM options
 # will strip the binary) are not going to be running gdb against the
 # program.
-make CFLAGS="$RPM_OPT_FLAGS"
+make CFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}"
 
 %install
 #rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/sbin
-install -m755 mdadm $RPM_BUILD_ROOT/sbin/
-mkdir -p $RPM_BUILD_ROOT/etc
-install -m644 mdadm.conf-example $RPM_BUILD_ROOT/etc/mdadm.conf
+mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
+install -m755 mdadm $RPM_BUILD_ROOT/%{_sbindir}
+mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}
+install -m644 mdadm.conf-example $RPM_BUILD_ROOT/%{_sysconfdir}/mdadm.conf
 mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man4
 mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man5
 mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
@@ -52,17 +47,31 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-%doc TODO ChangeLog mdadm.man mdadm.conf-example
-/sbin/mdadm
-/etc/mdadm.conf
+%doc TODO ChangeLog mdadm.man mdadm.conf-example COPYING
+%{_sbindir}/mdadm
+%config(noreplace,missingok)/%{_sysconfdir}/mdadm.conf
 %{_mandir}/man*/md*
 
 %changelog
+* Fri Mar 15 2002  <gleblanc@localhost.localdomain>
+- beautification
+- made mdadm.conf non-replaceable config
+- renamed Copyright to License in the header
+- added missing license file
+- used macros for file paths
+
+* Fri Mar 15 2002 Luca Berra <bluca@comedia.it>
+- Added Obsoletes: mdctl
+- missingok for configfile
+
 * Wed Mar 12 2002 NeilBrown <neilb@cse.unsw.edu.au>
 - Add md.4 and mdadm.conf.5 man pages
+
 * Fri Mar 08 2002              Chris Siebenmann <cks@cquest.utoronto.ca>
 - builds properly as non-root.
+
 * Fri Mar 08 2002 Derek Vadala <derek@cynicism.com>
 - updated for 0.7, fixed /usr/share/doc and added manpage
+
 * Tue Aug 07 2001 Danilo Godec <danci@agenda.si>
 - initial RPM build