]> git.ipfire.org Git - thirdparty/mdadm.git/log
thirdparty/mdadm.git
15 years agoRelease mdadm-2.6.9 mdadm-2.6.9
NeilBrown [Tue, 10 Mar 2009 05:38:37 +0000 (16:38 +1100)] 
Release mdadm-2.6.9

15 years agosuper1: make sure max_dev grows enough when adding a device to an array.
NeilBrown [Sun, 8 Mar 2009 22:59:39 +0000 (09:59 +1100)] 
super1: make sure max_dev grows enough when adding a device to an array.

There was a few kernel releases where the kernel would shrink max_dev
to be just enough to hold the current number of devices.
More recent kernels never shrink it.
However to be as compatible as possible, if we notice that
max_dev is too small to successfully add a device, increase it.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoMonitor: send --test message for arrays in /proc/mdstat that aren't in mdadm.conf
NeilBrown [Thu, 5 Feb 2009 06:06:03 +0000 (17:06 +1100)] 
Monitor: send --test message for arrays in /proc/mdstat that aren't in mdadm.conf

"mdadm --monitor --test --scan" currently only sends test messages for
arrays listed on the command line or in /etc/mdadm.conf.  With this
patch it also reports on any active arrays, which is more in line with
the description in the manpage.

Thanks to  Andrew Walrond <andrew@walrond.org> for reporting this error.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoFix possible crash if bitmap metadata is bad.
NeilBrown [Mon, 2 Feb 2009 00:06:38 +0000 (11:06 +1100)] 
Fix possible crash if bitmap metadata is bad.

We really should never divide by 0.

Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net>
for finding the problem.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoDocument 'max' option to --grow --size in --help output.
NeilBrown [Sun, 1 Feb 2009 23:58:08 +0000 (10:58 +1100)] 
Document 'max' option to --grow --size in --help output.

Suggestion from Christian Hudon <chrish@debian.org>

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoTypo in earlier patch : asprintf -> vasprintf
Dustin Kirkland [Sun, 1 Feb 2009 23:54:23 +0000 (10:54 +1100)] 
Typo in earlier patch : asprintf -> vasprintf

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoFix the used device size in mdadm -D output.
NeilBrown [Sun, 1 Feb 2009 23:03:20 +0000 (10:03 +1100)] 
Fix the used device size in mdadm -D output.

As get_component_size() returns the number of used sectors of a device
we need halve before pringing as K, and shift the value by 9, not 10,
before passing to human_size.

Thanks to Andre Noll <maan@systemlinux.org> for identifying problem
(and a slightly different version of this patch)

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomdadm fix compilation for uClibc
Bernhard Reutner-Fischer [Mon, 8 Dec 2008 16:00:59 +0000 (17:00 +0100)] 
mdadm fix compilation for uClibc

2008-12-08  Bernhard Reutner-Fischer  <rep.dot.nop@gmail.com>

* Makefile (dadm.uclibc): Remove misspelled and unneeded rule.
* md5.h: Include stdint.h for uClibc.
* mdadm.h: uClibc defines __UCLIBC__. If uClibc has LFS off
then use lseek instead of lseek64.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agoFail overtly when asprintf fails to allocate memory
Dustin Kirkland [Wed, 7 Jan 2009 22:25:33 +0000 (09:25 +1100)] 
Fail overtly when asprintf fails to allocate memory

.. rather that causing a less-obvious violation of segments.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoFree mdstat data structures properly.
NeilBrown [Wed, 7 Jan 2009 22:25:31 +0000 (09:25 +1100)] 
Free mdstat data structures properly.

In one case we called 'free' instead of 'mdstat_free'.
In others we didn't free at all.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomap: rebuild map if it doesn't exist.
NeilBrown [Thu, 18 Dec 2008 05:23:46 +0000 (16:23 +1100)] 
map: rebuild map if it doesn't exist.

It is possible for some arrays to be created e.g. by initrd, and so
not get mentioned in /var/run/mdadm/map.
As "-I" depends on things being listed in 'map', we create it by
scanning all devices if it doesn't exist.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoAssemble: set stripe_cache_size properly when restarting a reshape.
NeilBrown [Thu, 18 Dec 2008 03:24:41 +0000 (14:24 +1100)] 
Assemble: set stripe_cache_size properly when restarting a reshape.

Reshape with large chunk size can require a large stripe_cache.
We make this work when starting the reshape but not when
restarting at assemble time.  So fix that.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoAssemble: don't assume array is 'clean' unless all devices think it is.
NeilBrown [Thu, 18 Dec 2008 03:11:59 +0000 (14:11 +1100)] 
Assemble: don't assume array is 'clean' unless all devices think it is.

This is only significant for --assemble --force where some old
devices might be included into the array.  If anything looks like
it isn't clean, the kernel will not allow a degraded array to be started.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoKill: Don't use O_EXCL when --force is used.
NeilBrown [Thu, 18 Dec 2008 03:04:45 +0000 (14:04 +1100)] 
Kill:  Don't use O_EXCL when --force is used.

We really want --zero-super --force to zero the superblock in
all situations.  So don't open with O_EXCL - trust the user.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoAllow --config in --incremental mode.
NeilBrown [Thu, 18 Sep 2008 05:05:46 +0000 (15:05 +1000)] 
Allow --config in --incremental mode.

15 years agoRelease 2.6.8 mdadm-2.6.8
NeilBrown [Fri, 28 Nov 2008 01:14:57 +0000 (12:14 +1100)] 
Release 2.6.8

15 years agoFix typo in mdadm.conf.5
NeilBrown [Fri, 28 Nov 2008 00:52:16 +0000 (11:52 +1100)] 
Fix typo in mdadm.conf.5

Debian Bug #506245

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agofix add_dev() handling of broken links
Dan Williams [Mon, 10 Nov 2008 16:30:07 +0000 (09:30 -0700)] 
fix add_dev() handling of broken links

Resolves issues like:
mdadm -Ss
mdadm: unable to open /dev/md/r1: No such file or directory

...where /dev/md/r1 points to a removed device.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoAssemble: allow --force to work even when event counts are 0.
NeilBrown [Thu, 27 Nov 2008 04:46:51 +0000 (15:46 +1100)] 
Assemble: allow --force to work even when event counts are 0.

If any superblocks in a confused array had an event count of 0,
"mdadm -Af" would not update the event counts to assemble the array.
I don't remember why that text is there, and it has caused at least
one situation to be difficult to recover from.  So remove the
test.  --force means --force!

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomapfile: fix bug in testing for /var/run/mdadm/
NeilBrown [Sun, 2 Nov 2008 20:19:37 +0000 (07:19 +1100)] 
mapfile:  fix bug in testing for /var/run/mdadm/

There was a bug.  If /var/run/mdadm/ did not exist as a directory,
the map file should have been created in /var/run/mdadm.map, but
due to bug it would never get created.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoIncremental: change precedence order for autof setting.
NeilBrown [Sun, 2 Nov 2008 19:39:02 +0000 (06:39 +1100)] 
Incremental:  change precedence order for autof setting.

It doesn't really make sense for the --auto setting to ever over-ride
the setting on an ARRAY line.  That could cause failure if the
ARRAY line has a 'standard' now.  So revert to the array line having
precedence over command line, then CREATE line last.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoAdjust major number testing to allow for extended minor number in 2.6.28
NeilBrown [Thu, 30 Oct 2008 05:37:29 +0000 (16:37 +1100)] 
Adjust major number testing to allow for extended minor number in 2.6.28

From 2.6.28, normal md device will be able to have partitions.  These
partitions will have a different major number.  Sometimes mdadm tests
the major number and so can get confused.
Change these tests to test against get_mdp_major().  mdp does not use
extended minor number and so this test will always be accurate.

Also use /sys/dev links to map major/minor to devnum in sysfs.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoIncremental: allow assembly of foreign array.
NeilBrown [Wed, 29 Oct 2008 22:48:18 +0000 (09:48 +1100)] 
Incremental:  allow assembly of foreign array.

If a foreign (i.e. not known to be local) array is discovered
by --incremental assembly, we now assemble it.  However we ignore
any name information in the array so as not to potentially create
a name that conflict with a 'local' array.
Also, foreign arrays are always assembled 'read-auto' to avoid writing
anything until the array is actually used.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoIncremental: fix setting of 'autof' flag.
NeilBrown [Wed, 29 Oct 2008 22:34:06 +0000 (09:34 +1100)] 
Incremental:  fix setting of 'autof' flag.

When doing auto-assembly, the 'autof' flag from array lines
in mdadm.conf was being ignored.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoFix --incremental assembly of partitions arrays.
NeilBrown [Wed, 29 Oct 2008 22:34:04 +0000 (09:34 +1100)] 
Fix --incremental assembly of partitions arrays.

If incremental assembly finds an array mentioned in mdadm.conf,
with a 'standard partitioned' name like /dev/md_d0 or /dev/md/d0,
it will not create a partitioned array like it should.
This is because it mishandled the 'devnum' returned by
is_standard.
That is a devnum that does not have the partition-or-not encoded
into it.  So we need to check the actual return value of
is_standard and encode the partition-or-not info into the devnum.

Also fix a couple of comments.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoFix NULL pointer oops
Doug Ledford [Wed, 29 Oct 2008 19:05:36 +0000 (15:05 -0400)] 
Fix NULL pointer oops

RAID10 is the only raid level that uses the avail char array pointer
during the enough() operation, so it was the only one that saw this.
The code in incremental assumes unconditionally that count_active will
allocate the avail char array, that it might be used by enough, and that
it will need to be freed afterward.  Once you make count_active actually
do that, then the oops goes away.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoFix bad metadata formatting
Doug Ledford [Wed, 29 Oct 2008 19:05:35 +0000 (15:05 -0400)] 
Fix bad metadata formatting

Certain operations (Detail.c mainly) would print out the metadata of
an array in a format that the scan operation in super0.c and super1.c
would later reject as unknown when it was found in the mdadm.conf file.
Use a consistent format, but also modify the super0 and super1 match
methods to accept the other format without complaint.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoAllow WRITEMOSTLY to be cleared on --readd using --readwrite.
NeilBrown [Sat, 25 Oct 2008 07:20:49 +0000 (18:20 +1100)] 
Allow WRITEMOSTLY to be cleared on --readd using --readwrite.

Previously it was possible to set the WRITEMOSTLY flag when
adding a device to an array, but not to clear the flag when re-adding.
This is now possible with --readwrite.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoRemove .UR .UE macros from man page because the don't do what we want.
NeilBrown [Fri, 17 Oct 2008 00:52:38 +0000 (11:52 +1100)] 
Remove .UR .UE macros from man page because the don't do what we want.

.UR URL
text
.UE

is meant to create a hyperlink from the 'text' to the 'URL'.
But I wanted just to have the URL, so UR isn't really the right
tool - the URL gets displayed twice.

So just display the URL in bold and assume man2html etc can recognise
it and do the right thing.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoGrow: Fix linear-growth when devices are not all the same size.
NeilBrown [Wed, 15 Oct 2008 03:34:18 +0000 (14:34 +1100)] 
Grow: Fix linear-growth when devices are not all the same size.

If we add a device to a linear array which is a difference size
to the other devices in the array then, for v1.x metadata, we need to
make sure the size is correctly reflected in the superblock.

15 years agoImprove reporting of layout for raid10.
NeilBrown [Mon, 13 Oct 2008 05:15:18 +0000 (16:15 +1100)] 
Improve reporting of layout for raid10.

Showing e.g.

   near=1, far=2

for the 'far2' layout of raid10 is confusing even though there is a
sense in which is it correct.

Make it less confusing by only printing whichever number is not 1.
If both are 1, make that clear too (i.e. no redundancy).

15 years agoManage: allow adding device that is just large enough to v1.x array.
NeilBrown [Mon, 13 Oct 2008 05:15:16 +0000 (16:15 +1100)] 
Manage: allow adding device that is just large enough to v1.x array.

When adding a device to an array, we check that it is large enough.

Currently the check makes sure there is also room for a reasonably
sized bitmap.  But if the array doesn't have a bitmap, then this test
might be too restrictive.
So when adding, only insist there is enough space for the current
bitmap.
When Creating, still require room for the standard sized bitmap.

This resolved Debian Bug 500309

15 years agoCosmetic cleanup of some messages.
NeilBrown [Fri, 1 Aug 2008 06:48:08 +0000 (16:48 +1000)] 
Cosmetic cleanup of some messages.

e.g. --raid-disks is preferred over --raid-devices.

 Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net>

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agoClean up usage of open()
Doug Ledford [Thu, 24 Jul 2008 22:35:11 +0000 (18:35 -0400)] 
Clean up usage of open()
Fix on call that passed an invalid mode to open
Don't pass a third arg unless we also pass O_CREAT
Use symbolic args for 2nd and 3rd args

Signed-off-by: Doug Ledford <dledford@redhat.com>
15 years agoAdd support for distribution specific build extensions
Doug Ledford [Thu, 24 Jul 2008 16:34:34 +0000 (12:34 -0400)] 
Add support for distribution specific build extensions

Signed-off-by: Doug Ledford <dledford@redhat.com>
15 years agoFix confusing usage in md.4 man page.
Neil Brown [Tue, 8 Jul 2008 00:03:09 +0000 (10:03 +1000)] 
Fix confusing usage in md.4 man page.

"degraded write performance" could be confused with "write performance
when degraded".  It really means "reduced write performance", so say
that.

15 years agoDescribe the HOMEHOST entry in the mdadm.conf man page.
Neil Brown [Mon, 7 Jul 2008 01:30:26 +0000 (11:30 +1000)] 
Describe the HOMEHOST entry in the mdadm.conf man page.

15 years agoSome more cleanup of tests.
Neil Brown [Fri, 27 Jun 2008 06:11:40 +0000 (16:11 +1000)] 
Some more cleanup of tests.

Don't use '$mdadm', just 'mdadm'.
And --stop all arrays when finished.

15 years agoAdd test for stoping and restarting a raid5 reshape.
Neil Brown [Fri, 27 Jun 2008 06:07:52 +0000 (16:07 +1000)] 
Add test for stoping and restarting a raid5 reshape.

There was a kernel bug with stopping and restarting
raid5 recently.  So add a test to check for it.

15 years agoAdd "bitmap=" to "--detail --brief" output when relevant.
Neil Brown [Wed, 25 Jun 2008 23:33:37 +0000 (09:33 +1000)] 
Add "bitmap=" to "--detail --brief" output when relevant.

Thanks to "Jon Nelson" <jnelson-linux-raid@jamponi.net> for the suggestion.

Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoImprove error message when mdadm fails to stop an array.
Neil Brown [Wed, 25 Jun 2008 23:27:15 +0000 (09:27 +1000)] 
Improve error message when mdadm fails to stop an array.

Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoCouple more man page fixes
Neil Brown [Wed, 25 Jun 2008 23:25:08 +0000 (09:25 +1000)] 
Couple more man page fixes

Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoAdd text to man pages suggesting partition type to use for version 1.x metadata.
Pascal Charest [Wed, 25 Jun 2008 23:21:40 +0000 (09:21 +1000)] 
Add text to man pages suggesting partition type to use for version 1.x metadata.

Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoItalic/bold fixes in man pages.
Neil Brown [Wed, 25 Jun 2008 23:11:59 +0000 (09:11 +1000)] 
Italic/bold fixes in man pages.

Two places that should have been .B or .I were .M, which of
course is an error.
So fix these and that the opportunity to be more consistent
with highlighting of "mdadm".  Make it always italic except when
used as a literal example, then bold.

15 years agoFix bug in forced assemble.
Chris Webb [Thu, 19 Jun 2008 06:30:39 +0000 (16:30 +1000)] 
Fix bug in forced assemble.

From: Chris Webb <chris@arachsys.com>

We are loading into the already-loaded 'st' instead of the
newly create 'tst', which is clearly wrong.

15 years agoFix an error when assembling arrays that are in the middle of a reshape.
Neil Brown [Thu, 19 Jun 2008 06:30:36 +0000 (16:30 +1000)] 
Fix an error when assembling arrays that are in the middle of a reshape.

It is important that dup_super always returns an 'st' with the same
->ss and ->minor_version as the st that was passed.
This wasn't happening for 0.91 metadata (i.e. in the middle of a reshape).

15 years agoRelease 2.6.7 mdadm-2.6.7
Neil Brown [Fri, 6 Jun 2008 06:07:11 +0000 (16:07 +1000)] 
Release 2.6.7

15 years agoAvoid NULL reference calling free_super and elsewhere.
Neil Brown [Tue, 27 May 2008 07:23:16 +0000 (17:23 +1000)] 
Avoid NULL reference calling free_super and elsewhere.

Since we made free_super a superswitch call, we need to be careful
that st is non NULL before calling st->ss->free_super(st).
Also when updating byteorder there is a chance of a similar NULL
deref.

15 years agoRemove stray semicolon
Neil Brown [Tue, 27 May 2008 07:23:09 +0000 (17:23 +1000)] 
Remove stray semicolon

Causes compile error with gcc-2.95

15 years agoFix autoassemble for stack arrays.
Neil Brown [Tue, 20 May 2008 06:28:48 +0000 (16:28 +1000)] 
Fix autoassemble for stack arrays.

If you have stacked arrays, then
  mdadm -As --homehost=fred
should work but doesn't.  It gets into an infinite loop!

So write some tests, and fix the bugs.

15 years agoRelease 2.6.6 mdadm-2.6.6
Neil Brown [Mon, 19 May 2008 02:07:54 +0000 (12:07 +1000)] 
Release 2.6.6

15 years agoRemove outdated HOWTO link and credit Jakob's contribution.
David Greaves [Mon, 19 May 2008 02:07:50 +0000 (12:07 +1000)] 
Remove outdated HOWTO link and credit Jakob's contribution.

From: David Greaves <david@dgreaves.com>

Signed-off-by: David Greaves <david@dgreaves.com>
15 years agoInclude sysfs.c in mdassemble.auto
Neil Brown [Mon, 19 May 2008 02:07:47 +0000 (12:07 +1000)] 
Include sysfs.c in mdassemble.auto

and tidy up Makefile a bit.

15 years ago"make everything" now also makes mdassemble.auto
Neil Brown [Mon, 19 May 2008 02:07:43 +0000 (12:07 +1000)] 
"make everything" now also makes mdassemble.auto

This is
  make MDASSEMBLE_AUTO=1 mdassemble.static

so we now find compile bugs more easily.

15 years agoRelease 2.6.5 mdadm-2.6.5
Neil Brown [Thu, 15 May 2008 05:50:59 +0000 (15:50 +1000)] 
Release 2.6.5

15 years agoGet Changelog uptodate
Neil Brown [Thu, 15 May 2008 05:50:57 +0000 (15:50 +1000)] 
Get Changelog uptodate

15 years agoCompiple fixes for mdassemble and diet-libc
Neil Brown [Thu, 15 May 2008 05:50:56 +0000 (15:50 +1000)] 
Compiple fixes for mdassemble and diet-libc

15 years agoDon't try the auto-detect test when md_mod is a module
Neil Brown [Thu, 15 May 2008 05:50:50 +0000 (15:50 +1000)] 
Don't try the auto-detect test when md_mod is a module

....as this cannot work.

15 years agoFix support for --update=swapsuper
Neil Brown [Thu, 15 May 2008 05:50:48 +0000 (15:50 +1000)] 
Fix support for --update=swapsuper

The user of dup_super broke it.

15 years agoRecent change broken handling of metadata-less arrays.
Neil Brown [Thu, 15 May 2008 05:50:47 +0000 (15:50 +1000)] 
Recent change broken handling of metadata-less arrays.

In particular, failing a device would give a silly
error message.

15 years agoFix possible NULL dereference in super_by_fd
Neil Brown [Thu, 15 May 2008 05:50:45 +0000 (15:50 +1000)] 
Fix possible NULL dereference in super_by_fd

15 years agoAvoid possible null dereference in Assemble.
Neil Brown [Thu, 15 May 2008 05:50:42 +0000 (15:50 +1000)] 
Avoid possible null dereference in Assemble.

If the first device we look at has no superblock,
there is no 'st' to free, so don't free it.

15 years agoSet LOG_PID for syslog
Hans Lambermont [Mon, 12 May 2008 02:21:56 +0000 (12:21 +1000)] 
Set LOG_PID for syslog

From: Hans Lambermont <hans.lambermont@newtec.eu>

15 years agoadd --export option to --examine
Kay Sievers [Tue, 6 May 2008 00:02:38 +0000 (10:02 +1000)] 
add --export option to --examine

From: Kay Sievers <kay.sievers@vrfy.org>

Cc: David Zeuthen <david@fubar.dk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
15 years agoMake device-special files for partitions when using --incremental
Neil Brown [Mon, 5 May 2008 11:55:39 +0000 (21:55 +1000)] 
Make device-special files for partitions when using --incremental

15 years agolet '-a' be specified for Incremental mode
Dan Williams [Mon, 5 May 2008 11:55:37 +0000 (21:55 +1000)] 
let '-a' be specified for Incremental mode

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoUnify code into find_free_devnum.
Neil Brown [Mon, 5 May 2008 11:55:36 +0000 (21:55 +1000)] 
Unify code into find_free_devnum.

Two places have code to find a free md device number.  Make this
a subroutine.

15 years agofix load_super/free_super mismatch in util.c
Dan Williams [Mon, 5 May 2008 11:55:35 +0000 (21:55 +1000)] 
fix load_super/free_super mismatch in util.c

From: Dan Williams <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoSimplistig locking for --incremental.
Bill Nottingham [Mon, 5 May 2008 09:44:04 +0000 (19:44 +1000)] 
Simplistig locking for --incremental.

From: Bill Nottingham <notting@redhat.com>

mdadm --incremental doesn't really do any locking. If you get multiple
events in parallel for the same device (that has not yet started), they
will all go down the path to create the array. One will succeed, the
rest will have SET_ARRAY_INFO die with -EBUSY (md: array mdX already has disks!)
and will exit without adding the disk.

Original bug report is: https://bugzilla.redhat.com/show_bug.cgi?id=433932

This is solved by adding very very rudimentary locking. Incremental() now
opens the device with O_EXCL to ensure only one invocation is frobbing the
array at once. A simple loop just tries to open 5 times a second for 5
seconds. If the array stays locked that long, you probably have bigger
issues.

15 years agoCreate /dev/md if needed and it doesn't exist.
Bill Nottingham [Mon, 5 May 2008 09:44:01 +0000 (19:44 +1000)] 
Create /dev/md if needed and it doesn't exist.

From: Bill Nottingham <notting@redhat.com>

15 years agoFix RAID acronym in man page.
Neil Brown [Mon, 5 May 2008 09:43:58 +0000 (19:43 +1000)] 
Fix RAID acronym in man page.

The 'D' in 'RAID' stands for 'DISKS' even it md supports other 'devices'.

15 years agoAdd a .gitignore file.
Neil Brown [Tue, 29 Apr 2008 07:14:01 +0000 (17:14 +1000)] 
Add a .gitignore file.

15 years agoUse .\" instead of '''
Neil Brown [Tue, 29 Apr 2008 07:13:59 +0000 (17:13 +1000)] 
Use .\" instead of '''

Debian bug 477273

15 years agodiff -ru mdadm-2.6.4-orig/Query.c mdadm-2.6.4/Query.c
Neil Brown [Tue, 29 Apr 2008 07:13:55 +0000 (17:13 +1000)] 
diff -ru mdadm-2.6.4-orig/Query.c mdadm-2.6.4/Query.c

15 years agoFix possible bug with bitmap space allocation with v1.0 metadata
Neil Brown [Tue, 29 Apr 2008 07:13:53 +0000 (17:13 +1000)] 
Fix possible bug with bitmap space allocation with v1.0 metadata

When adding a device to an array, make sure we don't reserve
so much space for the bitmap that there isn't room for the data.

15 years agoSmall improvements to --incremental for arrays that are in the middle of reshape
Neil Brown [Mon, 28 Apr 2008 06:30:31 +0000 (16:30 +1000)] 
Small improvements to --incremental for arrays that are in the middle of reshape

There is still a problem:  If array is partially assembled and started
read-only, the last device doesn't get added properly.  Probably a kernel
problem.

15 years agoAllow creation of a RAID6 with a single missing device.
Neil Brown [Mon, 28 Apr 2008 06:30:09 +0000 (16:30 +1000)] 
Allow creation of a RAID6 with a single missing device.

This did not work before as we couldn't mark it clean as there would
be some parity blocks out of sync, and raid6 will not assemble a
dirty degraded array.
So make such arrays doubly degraded (the last device becomes a spare)
and clean.

15 years agoUpdates some URLs in the man page.
Neil Brown [Mon, 28 Apr 2008 06:29:53 +0000 (16:29 +1000)] 
Updates some URLs in the man page.

Particularly, add the wiki on osdl.org

15 years agoPrint 'Events' more sensibly.
Neil Brown [Mon, 28 Apr 2008 06:29:45 +0000 (16:29 +1000)] 
Print 'Events' more sensibly.

Instead of MSW.LSW, just print it as a 64bit number.

15 years agoFix problems with array.size overflowing on large arrays.
Neil Brown [Mon, 28 Apr 2008 06:29:37 +0000 (16:29 +1000)] 
Fix problems with array.size overflowing on large arrays.

array.size is 32bits and counts K.  So for arrays with
more than 4Terrabytes, it can overflow.
The correct number can be read from sysfs, but there are still
a few places that use array.size and risk truncation.  What is worse.
they compare a number of kilobytes with a number of sectors !!

So use get_component_size() to read the sysfs information, and be
more consistent about units.

15 years agoFix for segfault when reading /proc/mdstat
Neil Brown [Mon, 28 Apr 2008 06:29:12 +0000 (16:29 +1000)] 
Fix for segfault when reading /proc/mdstat

Some kernel versions don't put a space between 'active' and '(auto-read-only)'
in /proc/mdstat.  This causes a parsing problem leaving 'level' set to
NULL which causes a crash.

So synthesise a space there if it is missing, and check for 'level' to
be NULL and don't de-ref if it is.

16 years agoUse sysfs info for metadata version info in Detail and elsewhere.
Neil Brown [Fri, 14 Dec 2007 09:15:21 +0000 (20:15 +1100)] 
Use sysfs info for metadata version info in Detail and elsewhere.

16 years agoReplace sysarray with mdinfo
Neil Brown [Fri, 14 Dec 2007 09:14:59 +0000 (20:14 +1100)] 
Replace sysarray with mdinfo

Sure, mdinfo is bigger, but having a uniform structure for lots of things
will make life easier.

16 years agoUse 'mdinfo' instead of special 'sysdev' structure.
Neil Brown [Fri, 14 Dec 2007 09:14:57 +0000 (20:14 +1100)] 
Use 'mdinfo' instead of special 'sysdev' structure.

there is needless duplicatiion between mdinfo and sysdev, so discard
the latter.

16 years agoSome tidy up of 'devices' in assemble.
Neil Brown [Fri, 14 Dec 2007 09:14:53 +0000 (20:14 +1100)] 
Some tidy up of 'devices' in assemble.

use "mdinfo" in the devices list rather than just copying
ad-hoc fields in.

16 years agoDon't record oldmajor/oldminor any more during assemble.
Neil Brown [Fri, 14 Dec 2007 09:14:44 +0000 (20:14 +1100)] 
Don't record oldmajor/oldminor any more during assemble.

We don't use the information at all (any longer).

16 years agoFind super from fd on an array.
Neil Brown [Fri, 14 Dec 2007 09:14:38 +0000 (20:14 +1100)] 
Find super from fd on an array.

We used to use the major/minor numbers, but that isn't sufficient
any more, so pass the fd, and possibly check 'text' version.

16 years agoDrop the superblock arg from all metadata methods.
Neil Brown [Fri, 14 Dec 2007 09:14:33 +0000 (20:14 +1100)] 
Drop the superblock arg from all metadata methods.

It is now in the 'supertype'

16 years agoFix compare_super to take supertype instead of a superblock.
Neil Brown [Fri, 14 Dec 2007 09:14:27 +0000 (20:14 +1100)] 
Fix compare_super to take supertype instead of a superblock.

As this function takes 2 superblocks, the change is a bit more subtle,
so is done separately.

16 years agoAdd 'supertype' arg to almost all metadata methods.
Neil Brown [Fri, 14 Dec 2007 09:14:16 +0000 (20:14 +1100)] 
Add 'supertype' arg to almost all metadata methods.

The 'superblock' will be moved into this structure soon.

16 years agoAllow metadata handlers to free their own superblock.
Neil Brown [Fri, 14 Dec 2007 09:14:00 +0000 (20:14 +1100)] 
Allow metadata handlers to free their own superblock.

As the metadata handler allocates the superblock, it should free it
too.  DDF will have a more complex 'superblock' which needs more complex
freeing.

16 years agoMake sure sysfs_read never succeeds for a non-MD device.
Neil Brown [Fri, 14 Dec 2007 09:13:51 +0000 (20:13 +1100)] 
Make sure sysfs_read never succeeds for a non-MD device.

... just in case.

16 years agoRemove spaces/tabs from ends of lines.
Neil Brown [Fri, 14 Dec 2007 09:13:43 +0000 (20:13 +1100)] 
Remove spaces/tabs from ends of lines.

16 years agoA recent patch broke --create --level=faulty - fix it.
Neil Brown [Thu, 29 Nov 2007 03:40:01 +0000 (14:40 +1100)] 
A recent patch broke --create --level=faulty - fix it.

Thanks to Martin Bene.

16 years agoAdd metadata version information to "--detail --brief" output.
Neil Brown [Mon, 12 Nov 2007 22:55:29 +0000 (09:55 +1100)] 
Add metadata version information to "--detail --brief" output.

16 years agoRelease 2.6.4 mdadm-2.6.4
Neil Brown [Fri, 19 Oct 2007 04:13:04 +0000 (14:13 +1000)] 
Release 2.6.4

16 years agoRemove partitions from a device before adding it to an array.
Neil Brown [Fri, 19 Oct 2007 04:03:17 +0000 (14:03 +1000)] 
Remove partitions from a device before adding it to an array.

The 'remove_partitions' call is in the wrong place and applying
to the wrong file.

16 years agoAdd some extra consistency checks based on level.
Neil Brown [Wed, 17 Oct 2007 03:08:12 +0000 (13:08 +1000)] 
Add some extra consistency checks based on level.

Also use LEVEL_LINEAR, LEVEL_MULTIPATH in place of -1 or -4 in a few places.

16 years agoClarify the avail/used devices sizes with version1 superblock.
Neil Brown [Wed, 17 Oct 2007 00:28:38 +0000 (10:28 +1000)] 
Clarify the avail/used devices sizes with version1 superblock.

Not all of the device may be available.  Of that, not all may be used
(if devices are of different sizes).

16 years agoMake sure --auto=mdp is honoured properly
Neil Brown [Wed, 17 Oct 2007 00:00:55 +0000 (10:00 +1000)] 
Make sure --auto=mdp is honoured properly

This would only create partitioned devices if the device name was a
'standard' name.  This this patch, any name will work.