--- /dev/null
+Subject: ANNOUNCE: mdadm 2.6.6 - A tool for managing Soft RAID under Linux
+
+I am pleased to announce the availability of
+ mdadm version 2.6.6
+
+It is available at the usual places:
+ countrycode=xx.
+ http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
+and via git at
+ git://neil.brown.name/mdadm
+ http://neil.brown.name/git?p=mdadm
+
+mdadm is a tool for creating, managing and monitoring
+device arrays using the "md" driver in Linux, also
+known as Software RAID arrays.
+
+Release 2.6.6 fixes a compile problem in 2.6.5 and adds a small manpage update.
+
+Changelog Entries:
+ - "make everything" now make mdassemble.auto
+ - fix compile problem with mdassemble.auto
+ - Update FAQ URLs in man page again.
+
+Development of mdadm is sponsored by
+ SUSE Labs, Novell Inc.
+
+NeilBrown 19th May 2007
--- /dev/null
+Subject: ANNOUNCE: mdadm 2.6.7 - A tool for managing Soft RAID under Linux
+
+I am pleased to announce the availability of
+ mdadm version 2.6.7
+
+It is available at the usual places:
+ countrycode=xx.
+ http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
+and via git at
+ git://neil.brown.name/mdadm
+ http://neil.brown.name/git?p=mdadm
+
+mdadm is a tool for creating, managing and monitoring
+device arrays using the "md" driver in Linux, also
+known as Software RAID arrays.
+
+Release 2.6.7 fixes a few bugs in 2.6.5 which 2.6.6 didn't fix.
+
+Changelog Entries:
+ - Avoid NULL reference calling free_super and elsewhere.
+ - Remove stray semicolon (Causes compile error with gcc-2.95)
+ - Fix autoassemble for stack arrays.
+
+Development of mdadm is sponsored by
+ SUSE Labs, Novell Inc.
+
+NeilBrown 6th June 2008
tmpdev->used = 1;
loop:
- tst->ss->free_super(tst);
+ if (tst)
+ tst->ss->free_super(tst);
}
if (mdfd < 0) {
*/
mdu_array_info_t inf;
char *c;
- if (!st->sb) {
+ if (!st || !st->sb) {
return 2;
}
st->ss->getinfo_super(st, &info);
devcnt++;
}
- if (update && strcmp(update, "byteorder")==0)
- st->minor_version = 90;
-
if (devcnt == 0) {
fprintf(stderr, Name ": no devices found for %s\n",
mddev);
- st->ss->free_super(st);
+ if (st)
+ st->ss->free_super(st);
if (must_close) close(mdfd);
return 1;
}
+ if (update && strcmp(update, "byteorder")==0)
+ st->minor_version = 90;
+
st->ss->getinfo_super(st, &info);
clean = info.array.state & 1;
continue;
}
tst = dup_super(st);
- if (tst->ss->load_super(st,fd, NULL)) {
+ if (tst->ss->load_super(tst,fd, NULL)) {
close(fd);
fprintf(stderr, Name ": RAID superblock disappeared from %s - not updating.\n",
devices[chosen_drive].devname);
"start the array while not clean "
"- consider --force.\n");
- if (must_close) close(mdfd);
+ if (must_close) {
+ ioctl(mdfd, STOP_ARRAY, NULL);
+ close(mdfd);
+ }
return 1;
}
if (runstop == -1) {
fprintf(stderr, " (use --run to insist).\n");
}
}
- if (must_close) close(mdfd);
+ if (must_close) {
+ ioctl(mdfd, STOP_ARRAY, NULL);
+ close(mdfd);
+ }
return 1;
} else {
/* The "chosen_drive" is a good choice, and if necessary, the superblock has
+Changes Prior to 2.6.7 release
+ - Avoid NULL reference calling free_super and elsewhere.
+ - Remove stray semicolon (Causes compile error with gcc-2.95)
+ - Fix autoassemble for stack arrays.
+
+Changes Prior to 2.6.6 release
+ - "make everything" now make mdassemble.auto
+ - fix compile problem with mdassemble.auto
+ - Update FAQ URLs in man page again.
+
Changes Prior to 2.6.5 release
- Avoid segfault when parsing /proc/mdstat with auto-read-only
arrays.
ASSEMBLE_SRCS := mdassemble.c Assemble.c Manage.c config.c dlink.c util.c \
super0.c super1.c super-ddf.c super-intel.c sha1.c crc32.c sg_io.c
+ASSEMBLE_AUTO_SRCS := mdopen.c mdstat.c sysfs.c
ASSEMBLE_FLAGS:= $(CFLAGS) -DMDASSEMBLE
ifdef MDASSEMBLE_AUTO
-ASSEMBLE_SRCS += mdopen.c mdstat.c
+ASSEMBLE_SRCS += $(ASSEMBLE_AUTO_SRCS)
ASSEMBLE_FLAGS += -DMDASSEMBLE_AUTO
endif
all : mdadm mdmon mdadm.man md.man mdadm.conf.man
everything: all mdadm.static swap_super test_stripe \
- mdassemble mdassemble.static mdassemble.man \
+ mdassemble mdassemble.auto mdassemble.static mdassemble.man \
mdadm.Os mdadm.O2
# mdadm.uclibc and mdassemble.uclibc don't work on x86-64
# mdadm.tcc doesn't work..
rm -f $(OBJS)
$(CC) $(LDFLAGS) $(ASSEMBLE_FLAGS) -static -DHAVE_STDINT_H -o mdassemble.static $(ASSEMBLE_SRCS) $(STATICSRC)
+mdassemble.auto : $(ASSEMBLE_SRCS) mdadm.h $(ASSEMBLE_AUTO_SRCS)
+ rm -f mdassemble.static
+ $(MAKE) MDASSEMBLE_AUTO=1 mdassemble.static
+ mv mdassemble.static mdassemble.auto
+
mdassemble.uclibc : $(ASSEMBLE_SRCS) mdadm.h
rm -f $(OJS)
$(UCLIBC_GCC) $(ASSEMBLE_FLAGS) -DUCLIBC -DHAVE_STDINT_H -static -o mdassemble.uclibc $(ASSEMBLE_SRCS) $(STATICSRC)
rm -f mdadm mdmon $(OBJS) $(MON_OBJS) $(STATICOBJS) core *.man \
mdadm.tcc mdadm.uclibc mdadm.static *.orig *.porig *.rej *.alt \
mdadm.Os mdadm.O2 \
- mdassemble mdassemble.static mdassemble.uclibc mdassemble.klibc swap_super \
+ mdassemble mdassemble.static mdassemble.auto mdassemble.uclibc \
+ mdassemble.klibc swap_super \
init.cpio.gz mdadm.uclibc.static test_stripe
dist : clean
#include "mdadm.h"
-char Version[] = Name " - v2.6.5 - 15th May 2008\n";
+char Version[] = Name " - v2.6.7 - 6th June 2008\n";
/*
* File: ReadMe.c
ANNOUNCE-2.6.3
ANNOUNCE-2.6.4
ANNOUNCE-2.6.5
+ANNOUNCE-2.6.6
+ANNOUNCE-2.6.7
Assemble.c
bitmap.c
bitmap.h
tests/06sysfs
tests/06update-uuid
tests/06wrmostly
+tests/07autoassemble
tests/07autodetect
tests/07testreshape5
tests/check
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" See file COPYING in distribution for details.
-.TH MDADM 8 "" v2.6.5
+.TH MDADM 8 "" v2.6.7
.SH NAME
mdadm \- manage MD devices
.I aka
configuration file at all.
.SH SEE ALSO
-For further information on MD and the various levels of
+For further information on mdadm usage, MD and the various levels of
RAID, see:
-.IP
-.UR http://unthought.net/Software-RAID.HOWTO/
-http://unthought.net/Software\-RAID.HOWTO/
-.UE
.IP
.UR http://linux-raid.osdl.org/
http://linux\-raid.osdl.org/
.UE
+.PP
+(based upon Jakob \(/Ostergaard's Software\-RAID.HOWTO)
.\".PP
.\"for new releases of the RAID driver check out:
.\"
int acnt;
ident.autof = autof;
do {
+ mddev_dev_t devlist = conf_get_devs();
acnt = 0;
do {
rv2 = Assemble(ss, NULL, -1,
&ident,
- NULL, NULL,
+ devlist, NULL,
readonly, runstop, NULL, homehost, verbose-quiet, force);
if (rv2==0) {
cnt++;
if (cnt == 0 && rv == 0) {
fprintf(stderr, Name ": No arrays found in config file or automatically\n");
rv = 1;
- }
+ } else if (cnt)
+ rv = 0;
} else if (cnt == 0 && rv == 0) {
fprintf(stderr, Name ": No arrays found in config file\n");
rv = 1;
Summary: mdadm is used for controlling Linux md devices (aka RAID arrays)
Name: mdadm
-Version: 2.6.5
+Version: 2.6.7
Release: 1
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tgz
URL: http://neil.brown.name/blog/mdadm
.\" -*- nroff -*-
-.TH MDASSEMBLE 8 "" v2.6.5
+.TH MDASSEMBLE 8 "" v2.6.7
.SH NAME
mdassemble \- assemble MD devices
.I aka
st->sb = NULL;
if (strcmp(arg, "0") == 0 ||
strcmp(arg, "0.90") == 0 ||
- strcmp(arg, "0.91") == 0 ||
strcmp(arg, "default") == 0 ||
strcmp(arg, "") == 0 /* no metadata */
)
return st;
+ st->minor_version = 91; /* reshape in progress */
+ if (strcmp(arg, "0.91") == 0) /* For dup_super support */
+ return st;
+
st->minor_version = 9; /* flag for 'byte-swapped' */
if (strcmp(arg, "0.swap")==0 ||
strcmp(arg, "0.9") == 0) /* For dup_super support */
size=20000
# super0, round down to multiple of 64 and substract 64
mdsize0=19904
+# super00 is nested, subtract 128
+mdsize00=19840
# super1.0 round down to multiple of 2, subtract 8
mdsize1=19992
# subtract another 4 for bitmaps
--- /dev/null
+
+# create two raid1s, build a raid0 on top, then
+# tear it down and get auto-assemble to rebuild it.
+
+mdadm -CR $md1 -l1 -n2 $dev0 $dev1 --homehost=testing
+mdadm -CR $md2 -l1 -n2 $dev2 $dev3 --homehost=testing
+mdadm -CR $md0 -l0 -n2 $md1 $md2 --homehost=testing
+
+mdadm -Ss
+mdadm -As -c /dev/null --homehost=testing -vvv
+testdev $md1 1 $mdsize0 64
+testdev $md2 1 $mdsize0 64
+testdev $md0 2 $mdsize00 64
+mdadm -Ss
+
+mdadm --zero-superblock $dev0 $dev1 $dev2 $dev3
+## Now the raid0 uses one stacked and one not
+mdadm -CR $md1 -l1 -n2 $dev0 $dev1 --homehost=testing
+mdadm -CR $md0 -l0 -n2 $md1 $dev2 --homehost=testing
+mdadm -Ss
+mdadm -As -c /dev/null --homehost=testing -vvv
+testdev $md1 1 $mdsize0 64
+testdev $md0 1 $[mdsize0+mdsize00] 64