/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_u.h"
#include "md_p.h"
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#define REGISTER_DEV _IO (MD_MAJOR, 1)
#define START_MD _IO (MD_MAJOR, 2)
+Changes Prior to 0.7 release
+
+ - Fix makefile to install binary at /sbin and not /sbin/sbin
+ Also install man page.
+ - Add --zero-superblock based on --destroywithextremeprejudice
+ from Dale Stephenson <steph@snapserver.com>
+ - change name to mdadm. It is palandromic, and much nicer to pronouce.
+
Changes Prior to 0.6 release
- - Remove the limit on the number of device names that can be
+ - Remove the limit on the number of device names that can be
given on the command line.
- Fix bug in --assemble --force where it would only update a
single superblock.
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_u.h"
#include "md_p.h"
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_p.h"
#include "md_u.h"
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "dlink.h"
#if ! defined(__BIG_ENDIAN) && ! defined(__LITTLE_ENDIAN)
*
* utime, state etc
*
- * If (brief) gather devices for same array and just print a mdctl.conf line including devices=
+ * If (brief) gather devices for same array and just print a mdadm.conf line including devices=
* if devlist==NULL, use conf_get_devs(
*/
int fd;
--- /dev/null
+/*
+ * mdadm - manage Linux "md" devices aka RAID arrays.
+ *
+ * Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Neil Brown
+ * Email: <neilb@cse.unsw.edu.au>
+ * Paper: Neil Brown
+ * School of Computer Science and Engineering
+ * The University of New South Wales
+ * Sydney, 2052
+ * Australia
+ *
+ * Added by Dale Stephenson
+ * steph@snapserver.com
+ */
+
+#include "mdadm.h"
+#include "md_u.h"
+#include "md_p.h"
+
+int Kill(char *dev, int force)
+{
+ /*
+ * Nothing fancy about Kill. It just zeroes out a superblock
+ * Definitely not safe.
+ */
+
+ mdp_super_t super;
+ int fd, rv = 0;
+
+ fd = open(dev, O_RDWR);
+ if (fd < 0) {
+ fprintf(stderr, Name ": Couldn't open %s for write - not zeroing\n",
+ dev);
+ return 1;
+ }
+ rv = load_super(fd, &super);
+ if (force && rv >= 5)
+ rv = 0; /* ignore bad data in superblock */
+ switch(rv) {
+ case 1:
+ fprintf(stderr, Name ": cannot file device size for %s: %s\n",
+ dev, strerror(errno));
+ break;
+ case 2:
+ fprintf(stderr, Name ": %s is too small for md.\n", dev);
+ break;
+ case 3:
+ case 4:
+ fprintf(stderr, Name ": cannot access superblock on %s.\n", dev);
+ break;
+ case 5:
+ case 6:
+ fprintf(stderr, Name ": %s does not appear to have an MD superblock.\n", dev);
+ break;
+ }
+ if (!rv) {
+ memset(&super, 0, sizeof(super));
+ if (store_super(fd, &super)) {
+ fprintf(stderr, Name ": Could not zero superblock on %s\n",
+ dev);
+ rv = 1;
+ }
+ }
+ close(fd);
+ return rv;
+}
#
-# mdctl - manage Linux "md" devices aka RAID arrays.
+# mdadm - manage Linux "md" devices aka RAID arrays.
#
# Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
#
CFLAGS = -Wall,error,strict-prototypes -ggdb
INSTALL = /usr/bin/install
-DESTDIR = /sbin
+DESTDIR = /.
+BINDIR = /sbin
+MANDIR = /usr/share/man/man8
-OBJS = mdctl.o config.o ReadMe.o util.o Manage.o Assemble.o Build.o Create.o Detail.o Examine.o Monitor.o dlink.o
+OBJS = mdadm.o config.o ReadMe.o util.o Manage.o Assemble.o Build.o Create.o Detail.o Examine.o Monitor.o dlink.o Kill.o
-all : mdctl mdctl.man
+all : mdadm mdadm.man
-mdctl : $(OBJS)
- $(CC) -o mdctl $^
+mdadm : $(OBJS)
+ $(CC) -o mdadm $^
-mdctl.man : mdctl.8
- nroff -man mdctl.8 > mdctl.man
+mdadm.man : mdadm.8
+ nroff -man mdadm.8 > mdadm.man
-$(OBJS) : mdctl.h
+$(OBJS) : mdadm.h
-install : mdctl
- $(INSTALL) -m 755 mdctl $(DESTDIR)/sbin
+install : mdadm mdadm.8
+ $(INSTALL) -m 755 mdadm $(DESTDIR)/$(BINDIR)
+ $(INSTALL) -m 644 mdadm.8 $(DESTDIR)/$(MANDIR)
clean :
- rm -f mdctl $(OBJS) core mdctl.man
+ rm -f mdadm $(OBJS) core mdadm.man
dist : clean
./makedist
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_u.h"
#include "md_p.h"
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_p.h"
#include "md_u.h"
#include <sys/signal.h>
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
-char Version[] = Name " - v0.6 - 7 March 2002\n";
+char Version[] = Name " - v0.7 - 8 March 2002\n";
/*
* File: ReadMe.c
*
* This file contains general comments about the implementation
- * and the various usage messages that can be displayed by mdctl
+ * and the various usage messages that can be displayed by mdadm
*
- * mdctl is a single program that can be used to control Linux md devices.
+ * 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.
- * mdctl can perform all functions without a configuration file.
+ * 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
* file for such things as stopping a raid array which needs to know
* nothing about the array.
*
- * The configuration file that can be used by mdctl lists two
+ * The configuration file that can be used by mdadm lists two
* different things:
* 1/ a mapping from uuid to md device to identify which arrays are
* expect and what names (numbers) they should be given
*/
/*
- * mdctl has 4 major modes of operation:
+ * mdadm has 4 major modes of operation:
* 1/ Create
* This mode is used to create a new array with a superbock
* It can progress in several step create-add-add-run
* 2/ Assemble
* This mode is used to assemble the parts of a previously created
* array into an active array. Components can be explicitly given
- * or can be searched for. mdctl (optionally) check that the components
+ * or can be searched for. mdadm (optionally) check that the components
* do form a bonafide array, and can, on request, fiddle superblock
* version numbers so as to assemble a faulty array.
* 3/ Build
{"detail", 0, 0, 'D'},
{"examine", 0, 0, 'E'},
{"follow", 0, 0, 'F'},
+ {"grow", 0, 0, 'G'}, /* not yet implemented */
+ {"zero-superblock", 0, 0, 'H'},
/* synonyms */
{"monitor", 0, 0, 'F'},
};
char Usage[] =
-"Usage: mdctl --help\n"
+"Usage: mdadm --help\n"
" for help\n"
;
char Help[] =
-"Usage: mdctl --create device options...\n"
-" mdctl --assemble device options...\n"
-" mdctl --build device options...\n"
-" mdctl --detail device\n"
-" mdctl --examine device\n"
-" mdctl --follow options...\n"
-" mdctl device options...\n"
-" mdctl is used for controlling Linux md devices (aka RAID arrays)\n"
+"Usage: mdadm --create device options...\n"
+" mdadm --assemble device options...\n"
+" mdadm --build device options...\n"
+" mdadm --detail device\n"
+" mdadm --examine device\n"
+" mdadm --follow options...\n"
+" mdadm device options...\n"
+" mdadm is used for controlling Linux md devices (aka RAID arrays)\n"
" For detail help on major modes use, e.g.\n"
-" mdctl --assemble --help\n"
+" mdadm --assemble --help\n"
"\n"
"Any parameter that does not start with '-' is treated as a device name\n"
"The first such name is normally the name of an md device. Subsequent\n"
"\n"
" --help -h : This help message or, after above option,\n"
" mode specific help message\n"
-" --version -V : Print version information for mdctl\n"
+" --version -V : Print version information for mdadm\n"
" --verbose -v : Be more verbose about what is happening\n"
"\n"
" For create or build:\n"
" --stop -S : deactive array, releasing all resources\n"
" --readonly -o : mark array as readonly\n"
" --readwrite -w : mark array as readwrite\n"
+" --zero-superblock : erase the MD superblock from a device.\n"
;
char Help_create[] =
-"Usage: mdctl --create device -chunk=X --level=Y --raid-disks=Z devices\n"
+"Usage: mdadm --create device -chunk=X --level=Y --raid-disks=Z devices\n"
"\n"
" This usage will initialise a new md array and possibly associate some\n"
" devices with it. If enough devices are given to complete the array,\n"
;
char Help_build[] =
-"Usage: mdctl --build device -chunk=X --level=Y --raid-disks=Z devices\n"
+"Usage: mdadm --build device -chunk=X --level=Y --raid-disks=Z devices\n"
"\n"
" This usage is similar to --create. The difference is that it creates\n"
" a legacy array with a superblock. With these arrays there is no\n"
;
char Help_assemble[] =
-"Usage: mdctl --assemble device options...\n"
-" mdctl --assemble --scan options...\n"
+"Usage: mdadm --assemble device options...\n"
+" mdadm --assemble --scan options...\n"
"\n"
"This usage assembles one or more raid arrays from pre-existing\n"
"components.\n"
-"For each array, mdctl needs to know the md device, the identify of\n"
+"For each array, mdadm needs to know the md device, the identify of\n"
"the array, and a number of sub devices. These can be found in a number\n"
"of ways.\n"
"\n"
\f
+Assemble.c,22
+int Assemble(\7f34,1176
+\f
+Build.c,100
+#define REGISTER_DEV \7f32,1140
+#define START_MD \7f33,1181
+#define STOP_MD \7f34,1222
+int Build(\7f36,1264
+\f
+COPYING,99
+program will \7fwill\ 152,2561
+program proprietary.\7fproprietary\ 153,2632
+PROGRAM PROVE \7fPROVE\ 1267,14397
+\f
+ChangeLog,294
+ - When --assemble --force,\7f13,443
+ - When marking drives as not-failed in the superblock,\7f16,627
+ are passed as unsigned lock,\7f23,1044
+ - If HOT_ADD_DISK failes for -a,\7f24,1100
+ if we cannot read from the array,\7f25,1166
+ and mdctl.conf compatible description with uuid=\7f31,1443
+\f
+Create.c,20
+int Create(\7f34,1176
+\f
+Detail.c,20
+int Detail(\7f34,1176
+\f
+Examine.c,21
+int Examine(\7f38,1285
+\f
+Kill.c,18
+int Kill(\7f37,1237
+\f
+Makefile,12
+CC \7f30,1091
+\f
+Manage.c,161
+#define REGISTER_DEV \7f34,1176
+#define START_MD \7f35,1217
+#define STOP_MD \7f36,1258
+int Manage_ro(\7f38,1300
+int Manage_runstop(\7f75,2154
+int Manage_subdevs(\7f118,3161
+\f
+Monitor.c,49
+int Monitor(\7f37,1283
+static void alert(\7f175,4727
+\f
+ReadMe.c,266
+char Version[\7f32,1140
+char short_options[\7f81,3226
+struct option long_options[\7f82,3290
+char Usage[\7f140,4885
+char Help[\7f145,4942
+char Help_create[\7f218,8393
+char Help_build[\7f245,9615
+char Help_assemble[\7f258,10155
+mapping_t r5layout[\7f317,13101
+mapping_t pers[\7f331,13317
+\f
+TODO,590
+* write proc.c to parse /proc/mdstat file,\7f5,65
+ Build list of arrays: name,\7f6,140
+* --detail --scan to read mdctl.conf,\7f8,189
+* --detail --scan to read mdctl.conf, and then iterate over these,\7f8,189
+- set md_minor,\7f34,933
+- for create raid5,\7f35,976
+ all working,\7f36,1019
+ one missing,\7f37,1050
+ one missing, one spare,\7f37,1050
+- when RUN_ARRAY,\7f40,1152
+- get --detail to extract extra stuff from superblock,\7f42,1206
+- when --assemble --scan,\7f48,1368
+- when --assemble --scan, if an underlying device is an md device,\7f48,1368
+ARRAY lines in config file to have super_minor=\7f62,1797
+\f
+config.c,479
+char DefaultConfFile[\7f68,2401
+char *keywords[\7f70,2446
+int match_keyword(\7f77,2645
+char *conf_word(\7f97,3153
+char *conf_line(\7f163,4744
+void free_line(\7f184,5046
+struct conf_dev \7fconf_dev\ 1195,5188
+} *cdevlist \7f198,5249
+int devline(\7f202,5272
+mddev_ident_t mddevlist \7f220,5595
+mddev_ident_t *mddevlp \7f221,5627
+void arrayline(\7f223,5665
+int loaded \7f303,7978
+void load_conffile(\7f305,7995
+mddev_ident_t conf_get_ident(\7f338,8486
+mddev_dev_t conf_get_devs(\7f348,8688
+int match_oneof(\7f383,9316
+\f
+dlink.c,177
+void *dl_head(\7f11,180
+void dl_free(\7f20,289
+void dl_init(\7f26,363
+void dl_insert(\7f32,430
+void dl_add(\7f40,598
+void dl_del(\7f48,763
+char *dl_strndup(\7f57,969
+char *dl_strdup(\7f73,1176
+\f
dlink.h,193
struct __dl_head\7f__dl_head\ 15,100
#define dl_alloc(\7fdl_alloc\ 111,187
#define dl_next(\7fdl_next\ 115,391
#define dl_prev(\7fdl_prev\ 116,461
\f
+makedist,127
+target=\7f3,11
+( cd .. ; ln -s mdctl mdctl-$version \7f19,352
+( cd .. ; ln -s mdctl mdctl-$version ; tar czhvf - --exclude=\7f19,352
+\f
md_p.h,1316
#define _MD_P_H\7f16,582
#define MD_RESERVED_BYTES \7f44,1414
#define MD_SB_CLEAN \7f96,3390
#define MD_SB_ERRORS \7f97,3413
typedef struct mdp_superblock_s \7fmdp_superblock_s\ 199,3438
-} mdp_super_t;\7fmdp_super_t\ 1164,5820
-static inline __u64 md_event(\7f166,5836
+} mdp_super_t;\7fmdp_super_t\ 1164,5835
+static inline __u64 md_event(\7f166,5851
\f
md_u.h,1118
#define _MD_U_H\7f16,590
typedef struct mdu_param_s\7fmdu_param_s\ 1108,2878
} mdu_param_t;\7fmdu_param_t\ 1113,3014
\f
-mdctl.h,826
-#define __USE_LARGEFILE64\7f30,1115
-#define MD_MAJOR \7f47,1491
-#define Name \7f52,1531
-extern char short_options[\7f54,1553
-extern struct option long_options[\7f55,1582
-extern char Version[\7f56,1619
-extern char Version[], Usage[\7f56,1619
-extern char Version[], Usage[], Help[\7f56,1619
-extern char Version[], Usage[], Help[], Help_create[\7f56,1619
-extern char Version[], Usage[], Help[], Help_create[], Help_build[\7f56,1619
-extern char Version[], Usage[], Help[], Help_create[], Help_build[], Help_assemble[\7f56,1619
-typedef struct mddev_ident_s \7fmddev_ident_s\ 168,2055
-} *mddev_ident_t;\7fmddev_ident_t\ 180,2292
-typedef struct mddev_dev_s \7fmddev_dev_s\ 183,2359
-} *mddev_dev_t;\7fmddev_dev_t\ 186,2431
-typedef struct mapping \7fmapping\ 188,2448
-} mapping_t;\7fmapping_t\ 191,2496
-extern mapping_t r5layout[\7f95,2606
-extern mapping_t r5layout[], pers[\7f95,2606
-\f
-Assemble.c,22
-int Assemble(\7f34,1171
-\f
-Build.c,100
-#define REGISTER_DEV \7f32,1135
-#define START_MD \7f33,1176
-#define STOP_MD \7f34,1217
-int Build(\7f36,1259
+mdctl.8,252
+real block devices. This allows multiple devices \7f14,241
+{left,right}-{,a}symmetric,\7f185,4006
+{left,right}-{,a}symmetric, la,\7f185,4006
+{left,right}-{,a}symmetric, la, ra,\7f185,4006
+{left,right}-{,a}symmetric, la, ra, ls,\7f185,4006
+.BR --layout=\7f188,4087
\f
-Create.c,20
-int Create(\7f34,1171
-\f
-Detail.c,20
-int Detail(\7f34,1171
-\f
-Examine.c,21
-int Examine(\7f37,1261
-\f
-Manage.c,161
-#define REGISTER_DEV \7f34,1171
-#define START_MD \7f35,1212
-#define STOP_MD \7f36,1253
-int Manage_ro(\7f38,1295
-int Manage_runstop(\7f75,2149
-int Manage_subdevs(\7f118,3161
-\f
-ReadMe.c,265
-char Version[\7f32,1135
-char short_options[\7f81,3222
-struct option long_options[\7f82,3280
-char Usage[\7f123,4484
-char Help[\7f128,4541
-char Help_create[\7f185,7233
-char Help_build[\7f212,8453
-char Help_assemble[\7f225,8993
-mapping_t r5layout[\7f284,11939
-mapping_t pers[\7f298,12155
-\f
-config.c,479
-char DefaultConfFile[\7f68,2396
-char *keywords[\7f70,2441
-int match_keyword(\7f77,2640
-char *conf_word(\7f97,3148
-char *conf_line(\7f163,4739
-void free_line(\7f184,5041
-struct conf_dev \7fconf_dev\ 1195,5183
-} *cdevlist \7f198,5244
-int devline(\7f202,5267
-mddev_ident_t mddevlist \7f220,5590
-mddev_ident_t *mddevlp \7f221,5622
-void arrayline(\7f223,5660
-int loaded \7f289,7453
-void load_conffile(\7f291,7470
-mddev_ident_t conf_get_ident(\7f324,7961
-mddev_dev_t conf_get_devs(\7f334,8163
-int match_oneof(\7f369,8791
+mdctl.c,64
+int open_mddev(\7f33,1158
+int main(\7f50,1477
+#define O(\7fO\ 1177,4288
\f
-dlink.c,177
-void *dl_head(\7f11,180
-void dl_free(\7f20,289
-void dl_init(\7f26,363
-void dl_insert(\7f32,430
-void dl_add(\7f40,598
-void dl_del(\7f48,763
-char *dl_strndup(\7f57,969
-char *dl_strdup(\7f73,1176
+mdctl.h,855
+#define __USE_LARGEFILE64\7f30,1120
+#define MD_MAJOR \7f47,1496
+#define Name \7f52,1536
+extern char short_options[\7f54,1558
+extern struct option long_options[\7f55,1587
+extern char Version[\7f56,1624
+extern char Version[], Usage[\7f56,1624
+extern char Version[], Usage[], Help[\7f56,1624
+extern char Version[], Usage[], Help[], Help_create[\7f56,1624
+extern char Version[], Usage[], Help[], Help_create[], Help_build[\7f56,1624
+extern char Version[], Usage[], Help[], Help_create[], Help_build[], Help_assemble[\7f56,1624
+typedef struct mddev_ident_s \7fmddev_ident_s\ 168,2060
+} *mddev_ident_t;\7fmddev_ident_t\ 183,2389
+typedef struct mddev_dev_s \7fmddev_dev_s\ 186,2456
+} *mddev_dev_t;\7fmddev_dev_t\ 192,2644
+typedef struct mapping \7fmapping\ 194,2661
+} mapping_t;\7fmapping_t\ 197,2709
+#define Sendmail \7f100,2740
+extern mapping_t r5layout[\7f105,2884
+extern mapping_t r5layout[], pers[\7f105,2884
\f
-mdctl.c,64
-int open_mddev(\7f33,1153
-int main(\7f50,1472
-#define O(\7fO\ 1149,3610
+mdctl.spec,235
+Summary: mdctl is used for controlling Linux md devices \7f1,0
+option of using a configuration file,\7f18,630
+raidtools uses a configuration file to describe how to create a RAID array,\7f21,718
+Further,\7f23,871
+stopping a raid array,\7f24,941
\f
raid5extend.c,39
int phys2log(\7f2,1
raid5_extend(\7f46,902
\f
-util.c,573
-int parse_uuid(\7f40,1354
-int md_get_version(\7f82,2117
-int get_linux_version(\7f101,2476
-int enough(\7f113,2673
-int same_uuid(\7f129,2923
-void uuid_from_super(\7f139,3052
-int compare_super(\7f153,3329
-int load_super(\7f187,4292
-int store_super(\7f227,4950
-int check_ext2(\7f253,5321
-int check_reiser(\7f284,6084
-int check_raid(\7f308,6640
-int ask(\7f324,7003
-char *map_num(\7f344,7368
-int map_name(\7f354,7503
-struct devmap \7fdevmap\ 1369,7832
-} *devlist \7f373,7911
-int devlist_ready \7f374,7930
-#define __USE_XOPEN_EXTENDED\7f376,7954
-int add_dev(\7f380,8003
-char *map_dev(\7f396,8370
-int calc_sb_csum(\7f412,8645
+util.c,600
+int parse_uuid(\7f40,1359
+int md_get_version(\7f82,2122
+int get_linux_version(\7f101,2481
+int enough(\7f113,2678
+int same_uuid(\7f129,2928
+void uuid_from_super(\7f139,3057
+int compare_super(\7f153,3334
+int load_super(\7f187,4297
+int store_super(\7f227,4955
+int check_ext2(\7f253,5326
+int check_reiser(\7f284,6089
+int check_raid(\7f308,6645
+int ask(\7f324,7008
+char *map_num(\7f344,7373
+int map_name(\7f354,7508
+struct devmap \7fdevmap\ 1369,7837
+} *devlist \7f373,7916
+int devlist_ready \7f374,7935
+#define __USE_XOPEN_EXTENDED\7f376,7959
+int add_dev(\7f380,8008
+char *map_dev(\7f396,8375
+int calc_sb_csum(\7f412,8650
+char *human_size(\7f428,9046
* write proc.c to parse /proc/mdstat file, and maybe /proc/partitions too.
Build list of arrays: name, rebuild-percent
-* --detail --scan to read mdctl.conf, and then iterate over these,
+* --detail --scan to read mdadm.conf, and then iterate over these,
but assume --brief. --verbose can override
check each subdevice to see if it is in conf_get_devs.
Warn if not.
spare added
------------------------------------
-- --examine --scan scans all drives and build an mdctl.conf file DONE
+- --examine --scan scans all drives and build an mdadm.conf file DONE
- check superblock checksum in examine DONE
- report "chunk" or "rounding" depending on raid level DONE
then try to assemble that device first.
-- mdctl -S /dev/md0 /dev/md1 gives internal error FIXED
+- mdadm -S /dev/md0 /dev/md1 gives internal error FIXED
-- mdctl --detail --scan print summary of what it can find?
+- mdadm --detail --scan print summary of what it can find?
---------
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "dlink.h"
#include <glob.h>
#include <fnmatch.h>
*
*/
-char DefaultConfFile[] = "/etc/mdctl.conf";
+char DefaultConfFile[] = "/etc/mdadm.conf";
char *keywords[] = { "device", "array", NULL };
#!/bin/sh
-target=${1-~/public_html/source/mdctl}
+target=${1-~/public_html/source/mdadm}
if [ -d $target ]
then :
else echo $target is not a directory
set `grep '^char Version' ReadMe.c `
version=`echo $7 | sed 's/v//'`
echo version = $version
-base=mdctl-$version.tgz
+base=mdadm-$version.tgz
if [ -f $target/$base ]
then
echo $target/$base exists.
exit 1
fi
trap "rm $target/$base; exit" 1 2 3
-( cd .. ; ln -s mdctl mdctl-$version ; tar czhvf - --exclude='*,v' --exclude='*.o' --exclude mdctl --exclude=RCS mdctl-$version ; rm mdctl-$version ) > $target/$base
+( cd .. ; ln -s mdadm mdadm-$version ; tar czhvf - --exclude='*,v' --exclude='*.o' --exclude mdadm --exclude=RCS mdadm-$version ; rm mdadm-$version ) > $target/$base
chmod a+r $target/$base
ls -l $target/$base
.\" -*- nroff -*-
-.TH mdctl 8
+.TH mdadm 8
.SH NAME
-mdctl \- manage MD devices
+mdadm \- manage MD devices
.I aka
Linux Software Raid.
.SH SYNOPSIS
-.BI mdctl " [mode] <raiddevice> [options] <subdevices>"
+.BI mdadm " [mode] <raiddevice> [options] <subdevices>"
.SH DESCRIPTION
RAID devices are virtual devices created from two or more
Recent kernels (2002) also support a mode known as
.BR MULTIPATH .
-.B mdctl
+.B mdadm
does not support MULTIPATH as yet.
-.B mdctl
+.B mdadm
is a program that can be used to create and manage MD devices. As
such it provides a similar set of functionality to the
.B raidtools
packages.
The key differences between
-.B mdctl
+.B mdadm
and
.B raidtools
are:
.IP \(bu 4
-.B mdctl
+.B mdadm
is a single program and not a collection of programs.
.IP \(bu 4
-.B mdctl
+.B mdadm
can perform (almost) all of its functions without having a
-configuration file. Also mdctl helps with management of the configuration
+configuration file. Also mdadm helps with management of the configuration
file.
.IP \(bu 4
-.B mdctl
+.B mdadm
can provide information about your arrays (through Detail and Examine)
that
.B raidtools
.IP \(bu 4
.B raidtools
can manage MULTIPATH devices which
-.B mdctl
+.B mdadm
cannot yet manage.
.SH MODES
-mdctl has 7 major modes of operation:
+mdadm has 7 major modes of operation:
.TP
.B Assemble
Assemble the parts of a previously created
array into an active array. Components can be explicitly given
or can be searched for.
-.B mdctl
+.B mdadm
checks that the components
do form a bona fide array, and can, on request, fiddle superblock
information so as to assemble a faulty array.
the details of that array.
This mode can also be used to examine a large number of devices and to
print out a summary of the arrays found in a format suitable for the
-.B mdctl.conf
+.B mdadm.conf
configuration file.
.TP
.TP
.BR -V ", " --version
-Print version information for mdctl.
+Print version information for mdadm.
.TP
.BR -v ", " --verbose
.TP
.BR -c ", " --config=
config file. Default is
-.BR /etc/mdctl.conf .
+.BR /etc/mdadm.conf .
.TP
.BR -s ", " --scan
.HP 12
Usage:
-.B mdctl --assemble
+.B mdadm --assemble
.I device options...
.HP 12
Usage:
-.B mdctl --assemble --scan
+.B mdadm --assemble --scan
.I options...
.PP
This usage assembles one or more raid arrays from pre-existing components.
-For each array, mdctl needs to know the md device, the identity of the
+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 --scan
or is found from the config file. In the latter case, multiple md devices
-can be started with a single mdctl command.
+can be started with a single mdadm command.
The identity can be given with the
.B --uuid
or requested with
.B --scan.
In the later case,
-.B /etc/mdctl.conf
+.B /etc/mdadm.conf
is used.
If
.HP 12
Usage:
-.B mdctl --build
+.B mdadm --build
.I device
.BI --chunk= X
.BI --level= Y
.HP 12
Usage:
-.B mdctl --create
+.B mdadm --create
.I device
.BI --chunk= X
.BI --level= Y
.SH DETAIL MODE
.HP 12
Usage:
-.B mdctl --detail
+.B mdadm --detail
.RB [ --brief ]
.I device ...
.PP
This usage sill print out the details of the given array including a
list of component devices. To determine names for the devices,
-.B mdctl
+.B mdadm
searches
.B /dev
for device files with the right major and minor numbers.
With
.B --brief
-.B mdctl
+.B mdadm
prints a single line that identifies the level, number of disks, and
UUID of the array. This line is suitable for inclusion in
-.BR /etc/mdctl.conf .
+.BR /etc/mdadm.conf .
.SH EXAMINE MODE
.HP 12
Usage:
-.B mdctl --examine
+.B mdadm --examine
.RB [ --scan ]
.RB [ --brief ]
.I device ...
With
.B --brief
-.B mdctl
+.B mdadm
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.
.B NOT
be used blindly. Often the array description that you want in the
configuration file is much less specific than that given by
-.BR "mdctl -Bs" .
+.BR "mdadm -Bs" .
For example, you normally do not want to list the devices,
particularly if they are SCSI devices.
.B /proc/mdstat
gives you informations about md devices status.
This file is not currently used by
-.BR mdctl .
+.BR mdadm .
-.SS /etc/mdctl.conf
+.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,
are treated as names of devices, possibly containing wild cards (see
.IR glob (7)).
These list all the devices that
-.B mdctl
+.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
.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 "mdctl --examine --scan"
+.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 "mdctl --examine --scan" .
+.BR "mdadm --examine --scan" .
.SH TODO
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_p.h"
int open_mddev(char *dev)
case 'D':
case 'E':
case 'F':
+ case 'H':
/* setting mode - only once */
if (mode) {
fprintf(stderr, Name ": --%s/-%c not allowed, mode already set to %s\n",
}
continue;
case O('C','f'): /* force honouring of device list */
+ case O('A','f'): /* force assembly */
+ case O('H','f'): /* force zero */
force=1;
continue;
/* now for the Assemble options */
- case O('A','f'): /* force assembly */
- force = 1;
- continue;
case O('A','u'): /* uuid of array */
if (ident.uuid_set) {
fprintf(stderr, Name ": uuid cannot be set twice. "
case 'F': /* Follow */
rv= Monitor(devlist, mailaddr, program,
delay?delay:60, configfile);
+ break;
+ case 'H': /* Zero superblock */
+ for (dv=devlist ; dv; dv=dv->next)
+ rv |= Kill(dv->devname, force);
+ break;
}
exit(rv);
}
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
#include "md_u.h"
-#define Name "mdctl"
+#define Name "mdadm"
extern char short_options[];
extern struct option long_options[];
int period,
char *config);
+extern int Kill(char *dev, int force);
+
extern int md_get_version(int fd);
extern int get_linux_version();
extern int parse_uuid(char *str, int uuid[4]);
-mdctl(8) mdctl(8)
+mdadm(8) mdadm(8)
N\bNA\bAM\bME\bE
- mdctl - manage MD devices _\ba_\bk_\ba Linux Software Raid.
+ mdadm - manage MD devices _\ba_\bk_\ba Linux Software Raid.
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
- m\bmd\bdc\bct\btl\bl _\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>
+ 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
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\bdc\bct\btl\bl does not support MULTIPATH as yet.
+ P\bPA\bAT\bTH\bH. m\bmd\bda\bad\bdm\bm does not support MULTIPATH as yet.
- m\bmd\bdc\bct\btl\bl is a program that can be used to create and manage
+ m\bmd\bda\bad\bdm\bm is a program that can be used to create and manage
MD devices. As such it provides a similar set of func-
tionality to the r\bra\bai\bid\bdt\bto\boo\bol\bls\bs packages. The key differences
- between m\bmd\bdc\bct\btl\bl and r\bra\bai\bid\bdt\bto\boo\bol\bls\bs are:
+ between m\bmd\bda\bad\bdm\bm and r\bra\bai\bid\bdt\bto\boo\bol\bls\bs are:
- +\bo m\bmd\bdc\bct\btl\bl is a single program and not a collection of pro-
+ +\bo m\bmd\bda\bad\bdm\bm is a single program and not a collection of pro-
grams.
- +\bo m\bmd\bdc\bct\btl\bl can perform (almost) all of its functions with-
- out having a configuration file. Also mdctl helps
+ +\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\bdc\bct\btl\bl can provide information about your arrays
+ +\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\bdc\bct\btl\bl
+ +\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
- mdctl has 7 major modes of operation:
+ 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\bdc\bct\btl\bl checks that
+ 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.
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\bdc\bct\btl\bl.\b.c\bco\bon\bnf\bf configuration file.
+ 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
-\b-V\bV, -\b--\b-v\bve\ber\brs\bsi\bio\bon\bn
- Print version information for mdctl.
+ Print version information for mdadm.
-\b-v\bv, -\b--\b-v\bve\ber\brb\bbo\bos\bse\be
-\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\bdc\bct\btl\bl.\b.c\bco\bon\bnf\bf.
+ 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
A\bAS\bSS\bSE\bEM\bMB\bBL\bLY\bY M\bMO\bOD\bDE\bE
- Usage: m\bmd\bdc\bct\btl\bl -\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 _\bd_\be_\bv_\bi_\bc_\be _\bo_\bp_\bt_\bi_\bo_\bn_\bs_\b._\b._\b.
- Usage: m\bmd\bdc\bct\btl\bl -\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.
+ 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, mdctl needs to know
+ 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 mdctl command.
+ 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,
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\bdc\bct\btl\bl.\b.c\bco\bon\bnf\bf is used.
+ /\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.
B\bBU\bUI\bIL\bLD\bD M\bMO\bOD\bDE\bE
- Usage: m\bmd\bdc\bct\btl\bl -\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-
+ 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
C\bCR\bRE\bEA\bAT\bTE\bE M\bMO\bOD\bDE\bE
- Usage: m\bmd\bdc\bct\btl\bl -\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
+ 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
D\bDE\bET\bTA\bAI\bIL\bL M\bMO\bOD\bDE\bE
- Usage: m\bmd\bdc\bct\btl\bl -\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.
+ 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\bdc\bct\btl\bl searches /\b/d\bde\bev\bv for device files with
+ 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\bdc\bct\btl\bl prints a single line that identifies
+ 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\bdc\bct\btl\bl.\b.c\bco\bon\bnf\bf.
+ 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\bdc\bct\btl\bl -\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.
+ 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
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\bdc\bct\btl\bl will output an config file entry of
+ 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\bdc\bct\btl\bl
+ 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.
/\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\bdc\bct\btl\bl.
+ not currently used by m\bmd\bda\bad\bdm\bm.
- /\b/e\bet\btc\bc/\b/m\bmd\bdc\bct\btl\bl.\b.c\bco\bon\bnf\bf
+ /\b/e\bet\btc\bc/\b/m\bmd\bda\bad\bdm\bm.\b.c\bco\bon\bnf\bf
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)
The DEVICE lines usually come first. All remaining words
on the line are treated as names of devices, possibly con-
taining wild cards (see _\bg_\bl_\bo_\bb(7)). These list all the
- devices that m\bmd\bdc\bct\btl\bl is allowed to scan when looking for
+ devices that m\bmd\bda\bad\bdm\bm is allowed to scan when looking for
devices with RAID superblocks. Each line can contain mul-
tiple device names, and there can be multiple DEVICE
lines. For example:
l\ble\bev\bve\bel\bl=\b= The value is a raid level. This is normally used
to identify an array, but is supported so that the
- output of m\bmd\bdc\bct\btl\bl -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be -\b--\b-s\bsc\bca\ban\bn can be use
+ 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\bdc\bct\btl\bl -\b--\b-e\bex\bxa\bam\bmi\bin\bne\be
+ 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.
- mdctl(8)
+ mdadm(8)
-Summary: mdctl is used for controlling Linux md devices (aka RAID arrays)
-Name: mdctl
+Summary: mdadm is used for controlling Linux md devices (aka RAID arrays)
+Name: mdadm
Version: 0.5
Release: 1
-Source0: http://www.cse.unsw.edu.au/~neilb/source/mdctl/mdctl-%{version}.tgz
-URL: http://www.cse.unsw.edu.au/~neilb/source/mdctl/
+Source0: 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>
%description
-mdctl is a single program that can be used to control Linux md devices. It
+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.
-mdctl can perform all functions without a configuration file. There is the
+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.
%prep
-%setup -q -n mdctl
+%setup -q -n mdadm
%build
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/sbin
-install -m755 mdctl $RPM_BUILD_ROOT/sbin/
+install -m755 mdadm $RPM_BUILD_ROOT/sbin/
%clean
rm -rf $RPM_BUILD_ROOT
/*
- * mdctl - manage Linux "md" devices aka RAID arrays.
+ * mdadm - manage Linux "md" devices aka RAID arrays.
*
* Copyright (C) 2001-2002 Neil Brown <neilb@cse.unsw.edu.au>
*
* Australia
*/
-#include "mdctl.h"
+#include "mdadm.h"
#include "md_p.h"
#include <sys/utsname.h>