]> git.ipfire.org Git - thirdparty/mdadm.git/log
thirdparty/mdadm.git
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.

16 years agoFix restarting of a reshaping array.
Neil Brown [Tue, 16 Oct 2007 03:52:35 +0000 (13:52 +1000)] 
Fix restarting of a reshaping array.

The last release broke the ability to assemble an array that
was in the middle of a reshape.
This patch adds code to test if the critical section needs
to be restored or not so that - if we have failed to restore it,
we know whether to fail or not.

16 years agoAlso use &tst instead of st later on when loading v1 superblocks
Jérémy Bobbio [Mon, 1 Oct 2007 08:17:06 +0000 (09:17 +0100)] 
Also use &tst instead of st later on when loading v1 superblocks

16 years agoFix segfault on assembly on amd64 with v1 superblocks
martin f. krafft [Sun, 30 Sep 2007 12:22:56 +0000 (13:22 +0100)] 
Fix segfault on assembly on amd64 with v1 superblocks

Commit a40b4fe introduced a temporary supertype variable tst, instead of
manipulating st directly. However, it was forgotton to pass &tst into the
recursive load_super1 call, causing an infinite recursion.

Signed-off-by: martin f. krafft <madduck@debian.org>
16 years agoMonitor.c s/MAXINT/INT_MAX/g
maximilian attems [Wed, 26 Sep 2007 16:12:46 +0000 (18:12 +0200)] 
Monitor.c s/MAXINT/INT_MAX/g

include limits.h directly instead of values.h

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agomdopen.c don't shadow major() and minor()
maximilian attems [Wed, 26 Sep 2007 16:12:47 +0000 (18:12 +0200)] 
mdopen.c don't shadow major() and minor()

s/(major|minor)/\1_num/

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoMonitor.c include signal.h directly
maximilian attems [Wed, 26 Sep 2007 16:12:45 +0000 (18:12 +0200)] 
Monitor.c include signal.h directly

another small step for better klibc support, glibc compile tested.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoAdd ANNOUNCE-2.6.1 to git
Neil Brown [Mon, 24 Sep 2007 04:40:23 +0000 (14:40 +1000)] 
Add ANNOUNCE-2.6.1 to git

Somehow this missed out of getting into .git even though it is in all
tha tar-balls.

16 years agoDon't corrupt 'supertype' when speculatively calling load_super1
Neil Brown [Mon, 24 Sep 2007 04:26:44 +0000 (14:26 +1000)] 
Don't corrupt 'supertype' when speculatively calling load_super1

When load_super1 is trying to see which sub-version of v1 superblock
is present, failure will cause it to clear st->ss, which is not good.

So use a temporary 'super_type' for the 'test if this version works'
calls, then copy that into 'st' on success.

16 years agoconfig.c include dirent.h instead sys/dir.h
maximilian attems [Fri, 21 Sep 2007 17:32:18 +0000 (19:32 +0200)] 
config.c include dirent.h instead sys/dir.h

sys/dir.h is an old BSD'ism, include dirent directly.
small step for better klibc support.

compile tested against glibc.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoCreate.c s/major/major_num/
maximilian attems [Fri, 21 Sep 2007 17:32:19 +0000 (19:32 +0200)] 
Create.c s/major/major_num/

don't shadow the major() function by int major.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoAdd klibc support to mdadm.h
maximilian attems [Fri, 21 Sep 2007 17:32:17 +0000 (19:32 +0200)] 
Add klibc support to mdadm.h

klibc still misses a lot functionality to let mdadm link against,
this small step helps to get to the real trouble.. :)

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoMake "--write-mostly" effective when re-adding a device to an array.
Neil Brown [Mon, 24 Sep 2007 03:14:13 +0000 (13:14 +1000)] 
Make "--write-mostly" effective when re-adding a device to an array.

Fixes Debian Bug 442874

When we discover that we can 're-add' a drive, we forget to check the
write-mostly flag.
This highlights the fact that you cannot turn 'off' the write-mostly
flag at this point.  I wonder if that is a problem...

16 years agoExplain the read-balancing algorithm for RAID1 better in md.4
Iustin Pop [Tue, 11 Sep 2007 14:20:19 +0000 (16:20 +0200)] 
Explain the read-balancing algorithm for RAID1 better in md.4

From: Iustin Pop <iusty@k1024.org>

There are many questions on the mailing list about the RAID1 read
performance profile. This patch adds a new paragraph to the RAID1
section in md.4 that details what kind of speed-up one should expect
from RAID1.

Signed-off-by: Iustin Pop <iusty@k1024.org>
16 years agoRelease 2.6.3 mdadm-2.6.3
Neil Brown [Mon, 20 Aug 2007 04:22:15 +0000 (14:22 +1000)] 
Release 2.6.3

16 years agoUpdate changelog
Neil Brown [Mon, 20 Aug 2007 04:14:46 +0000 (14:14 +1000)] 
Update changelog

16 years agoReport error when grow cannot be restarted.
Neil Brown [Mon, 20 Aug 2007 04:14:42 +0000 (14:14 +1000)] 
Report error when grow cannot be restarted.

Make sure that if --assemble find an array in the critical region
of a reshape, and cannot find the critical data to restart the
reshape, it gives an error message.

16 years agoFix error message when adding a device that is too small.
Neil Brown [Mon, 20 Aug 2007 04:14:28 +0000 (14:14 +1000)] 
Fix error message when adding a device that is too small.

We were multiplying MD_RESERVED_SECTORS by 1024 instead of 512,
so lots of 'is it too small' checks were wrong.

16 years agoFix problem with add a device to a 1.x array created with older mdadm.
Neil Brown [Mon, 20 Aug 2007 04:14:25 +0000 (14:14 +1000)] 
Fix problem with add a device to a 1.x array created with older mdadm.

When adding new disk to an array, don't reserve so much bitmap
space that the disk cannot store the required data. (Needed when
1.x array was created with older mdadm).

16 years agoReject '--bitmap none' for build and create.
Neil Brown [Mon, 23 Jul 2007 07:28:44 +0000 (17:28 +1000)] 
Reject '--bitmap none' for build and create.

We don't want to create a file called 'none', and it isn't needed,
so just reject it.

16 years ago"--export" segfaults with non-persistent super blocks
Tim Woods [Mon, 23 Jul 2007 07:15:52 +0000 (17:15 +1000)] 
"--export" segfaults with non-persistent super blocks

From: Tim Woods <timwoods@uklinux.net>

This patch fixes a NULL pointer dereference in Detail.c when running
'mdadm --detail --export' on a device with non-persistent super blocks.

16 years agoIn the MISC MODE section in mdadm(8), the names of the options should be
Neil Brown [Sun, 22 Jul 2007 23:32:01 +0000 (09:32 +1000)] 
In the MISC MODE section in mdadm(8), the names of the options should be
in bold.

  -- AYM 2007-01-14

diff -ur mdadm-2.6/mdadm.8 mdadm-2.6-man1/mdadm.8

16 years agoSubstantial corrections to man pages.
Scott Weikart [Fri, 13 Jul 2007 05:13:43 +0000 (15:13 +1000)] 
Substantial corrections to man pages.

From: "Scott Weikart" <Scott.W@Benetech.org>

Thanks Scott!

16 years agoTypo in man page: Multipath has an L ...
Neil Brown [Tue, 10 Jul 2007 23:08:49 +0000 (09:08 +1000)] 
Typo in man page: Multipath has an L ...

16 years agoAllow "--write-behind=" to be done in grow mode.
Ian Dall [Mon, 9 Jul 2007 01:29:04 +0000 (11:29 +1000)] 
Allow "--write-behind=" to be done in grow mode.

From: Ian Dall <ian@beware.dropbear.id.au>

I have a small patch to mdadm which allows the write-behind amount to be
set a array grow time (instead of currently only at grow or create
time). I have tested this fairly extensively on some arrays built out of
loop back devices, and once on a real live array.

16 years agoEnhance raid4 support: --assemble and --monitor wasn't quite happy with it.
Doug Ledford [Mon, 9 Jul 2007 00:00:02 +0000 (10:00 +1000)] 
Enhance raid4 support: --assemble and --monitor wasn't quite happy with it.

From: Doug Ledford <dledford@redhat.com>

This one actually does a couple things.  Mainly related to raid4, but
kinda touches other raid levels some.

When creating a raid4 array, treat it like a raid5 array in that we
create it in degraded mode by default and add the last disk as a spare.
Besides speeding things up, this has a second effect that it makes mdadm
more consistent.  In order to create a degraded raid5 array, you need
only passing missing as one of the devices.  For a degraded raid4 array,
prior to this patch, you must pass assume-clean or else it refuses to
create the array.  Even force won't make it work without assume-clean.
With the patch, raid4 behaves identical to raid5.

Separate from that, the monitor functionality completely ignores raid4
arrays.  That seems to stem from the code that checks to see if the
array is part of a long list of types.  It seems easier to check which
array types *aren't* redundant instead of listing the ones that are
redundant and missing some of them.  This makes the monitor service
actually watch raid4 arrays.

16 years agoFix parsing of "-a" in various contexts.
Doug Ledford [Sun, 8 Jul 2007 23:59:59 +0000 (09:59 +1000)] 
Fix parsing of "-a" in various contexts.

From: Doug Ledford <dledford@redhat.com>

This one fixes a bug where once manage mode is set, the -a short option
is no longer parsed correctly (true of grow mode as well).  This happens
because when you switch the short opts to the bitmap_auto version, it
specifies that the argument must follow a, yet the loop expects to get
an undecorated option and parse it as the disk dev instead of trying to
parse optarg.  So, create a new short opt array that is used for manage
and grow that doesn't list a as having an argument.

16 years agoMark some files FD_CLOEXEC to protect sendmail from them.
Doug Ledford [Sun, 8 Jul 2007 23:59:54 +0000 (09:59 +1000)] 
Mark some files FD_CLOEXEC to protect sendmail from them.

From: Doug Ledford <dledford@redhat.com>

When running with SELinux enabled and using mdadm to monitor devices,
attempts to send emails to an admin will be blocked because mdadm is
holding open /proc/mdstat without setting the FD_CLOEXEC flag.  As a
result, sendmail has an open descriptor to /proc/mdstat after the
popen() call, which SELinux decides isn't really any of sendmail's
business and so sendmail gets denied.

16 years agoImprove error message when trying to create an array that already exists.
Doug Ledford [Sun, 8 Jul 2007 23:59:50 +0000 (09:59 +1000)] 
Improve error message when trying to create an array that already exists.

From: Doug Ledford <dledford@redhat.com>

Simple bugfix.  If an array already exists and we are asked to create
this array, error out with an error message that makes sense to people
instead of an error that the SET_ARRAY_INFO ioctl had an invalid
argument.  Plus a typo correction.

16 years agoInterpret "--metadata=1" with --assemble to imply any version-1, not just 1.0
Doug Ledford [Sun, 8 Jul 2007 23:59:47 +0000 (09:59 +1000)] 
Interpret "--metadata=1" with --assemble to imply any version-1, not just 1.0

From: Doug Ledford <dledford@redhat.com>

OK, this one fixes an issue where people were doing manual array
creation and specifying superblock types other than 1.0 (aka, 1.1, 1.2)
and then using mdadm -Ebs to populate their mdadm.conf file.  The
general problem is that if you specify a superblock type in the ARRAY
line (or on the command line), then you must specify the superblock type
*exactly*, including the minor version.  Unfortunately, mdadm -Ebs
prints out all version 1 superblocks, regardless of minor version, as
just plain old 1.  This breaks the mdadm.conf file for anything other
than plain version 1 superblock devices.

So, since I thought it was basically backwards that the mdadm -E output
was lax on specifying the location of the superblock where as the mdadm
-A input was strict, I reversed that.  With this patch, the mdadm -E
output is now exact for any given superblock.  But, in addition, the
mdadm -A input is now lax for any superblock that doesn't specifically
list the minor version, aka version 1 now means version 1, not version
0.90, but any minor version.  So does default/large.

16 years agoFix spare migration and other problems with --monitor.
Neil Brown [Sun, 8 Jul 2007 23:59:42 +0000 (09:59 +1000)] 
Fix spare migration and other problems with --monitor.

2.6 broke --monitor in various ways, including spare migration
stopped working.  This fixes it.

16 years agoCompile with various -O flags for testing.
Neil Brown [Mon, 21 May 2007 23:46:36 +0000 (09:46 +1000)] 
Compile with various -O flags for testing.

"make everything" now compiles with -O2 and -Os to increase coverage
for compiler generated warnings.

16 years agoFix compile error in Detail.c
Neil Brown [Mon, 21 May 2007 23:46:29 +0000 (09:46 +1000)] 
Fix compile error in Detail.c

'avail' is undefined if '--export', so make sure we don't try to use
it.

16 years agoRelease 2.6.2 mdadm-2.6.2
Neil Brown [Mon, 21 May 2007 04:25:53 +0000 (14:25 +1000)] 
Release 2.6.2

16 years agoMake return code for "--detail --test" more reliable.
Neil Brown [Mon, 21 May 2007 04:25:50 +0000 (14:25 +1000)] 
Make return code for "--detail --test" more reliable.

Missing devices as well as failed devices cause an error.

16 years agoImprove error message for adding bitmap to a level that cannot support it.
Neil Brown [Mon, 21 May 2007 04:25:47 +0000 (14:25 +1000)] 
Improve error message for adding bitmap to a level that cannot support it.

Also give error on --build if no devices given.

16 years agoAdd --auto-detect for in-kernel autodetect.
Neil Brown [Mon, 21 May 2007 04:25:44 +0000 (14:25 +1000)] 
Add --auto-detect for in-kernel autodetect.

This is equivalent to raidautorun that some distros provide.

16 years agoUpdate tests and add linear-add
Neil Brown [Mon, 21 May 2007 04:25:40 +0000 (14:25 +1000)] 
Update tests and add linear-add

Update the testing scripts to allow for new space calculations
for space for bitmaps.
Add a test script for adding devices to linear arrays.

16 years agoFix --grow --add for linear arrays.
Neil Brown [Mon, 21 May 2007 04:25:37 +0000 (14:25 +1000)] 
Fix --grow --add for linear arrays.

The new superblock needs to have a new disk.number.  This is a bit of a hack...
Fix handling of negative bitmap offsets on 64bit hosts.

The bitmap offset is a signed 32bit number, so casting to (long)
isn't sufficient.  We must cast to (int32_t).
Fix various problems with --grow --add for linear.

The code to add a drive to a live linear array had never
been tested properly and so was buggy.  This tidies it up
and means that the new regression-test passes.

16 years agoFix handling of negative bitmap offsets on 64bit hosts.
Neil Brown [Mon, 21 May 2007 04:25:30 +0000 (14:25 +1000)] 
Fix handling of negative bitmap offsets on 64bit hosts.

The bitmap offset is a signed 32bit number, so casting to (long)
isn't sufficient.  We must cast to (int32_t).

16 years agoSupport failing and removed of detached and faulty devices.
Neil Brown [Fri, 11 May 2007 06:13:03 +0000 (16:13 +1000)] 
Support failing and removed of detached and faulty devices.

This if you unplug a device and udev removes the entry from /dev,
you can still remove the device.

16 years agoMinor typo in mdadm man page
David Huffman [Fri, 11 May 2007 06:12:54 +0000 (16:12 +1000)] 
Minor typo in mdadm man page

From: David Huffman <dhuffman@storix.com>

16 years agoAdd --export option to --detail to use key=value pairs.
Kay Sievers [Tue, 8 May 2007 07:17:33 +0000 (17:17 +1000)] 
Add --export option to --detail to use key=value pairs.

udev likes to get information about a device as key=value pairs so it
can create disk/by-id links etc.  So add --export flag which causes
the output of --detail to easily parsable.

From: Kay Sievers <kay.sievers@novell.com>

16 years agoFix up calculation of bitmap space when creating v1 metadata.
Neil Brown [Tue, 8 May 2007 07:15:33 +0000 (17:15 +1000)] 
Fix up calculation of bitmap space when creating v1 metadata.

We have the same calculation in multiple places with subtle differences.
So unite it all.

Also fix up and endian problem in --examine.

16 years agoSend help text to stdout rather than stderr.
Neil Brown [Tue, 8 May 2007 07:14:00 +0000 (17:14 +1000)] 
Send help text to stdout rather than stderr.

This helps with piping to a pager for example.

16 years agoTypo in mdadm.conf man page
Neil Brown [Tue, 8 May 2007 07:13:51 +0000 (17:13 +1000)] 
Typo in mdadm.conf man page

16 years agoHyphens and Other Manpage Typography, 4/4: literal ASCII hyphens.
Peter Samuelson [Tue, 8 May 2007 07:13:44 +0000 (17:13 +1000)] 
Hyphens and Other Manpage Typography, 4/4: literal ASCII hyphens.

From: Peter Samuelson <peter@p12n.org>

nroff formats "-" as the very short hyphen used for hyphenated terms
and for splitting a word across two lines.  When you want a literal
ASCII "-", like for typing on a command line, you're supposed to use
"\-" instead.

Yeah, it sounds pedantic, but it actually makes a difference.  With
modern Unicode-capable terminals, "man" actually renders these with
different characters, so if you try to search for "--create" in your
favorite pager, you won't find it unless the nroff source says
"\-\-create".  This discrepancy doesn't generally show up with
non-Unicode terminals.

Signed-Off-By: Peter Samuelson <peter@p12n.org>
16 years agoHyphens and Other Manpage Typography, 3/4: bold options.
Peter Samuelson [Tue, 8 May 2007 07:13:36 +0000 (17:13 +1000)] 
Hyphens and Other Manpage Typography, 3/4: bold options.

From: Peter Samuelson <peter@p12n.org>

Option names and example command lines seem to be boldface most of the
time, fix up the few that weren't.

Signed-Off-By: Peter Samuelson <peter@p12n.org>
16 years agoHyphens and Other Manpage Typography, 2/4: proper nroff "em dash".
Peter Samuelson [Tue, 8 May 2007 07:13:25 +0000 (17:13 +1000)] 
Hyphens and Other Manpage Typography, 2/4: proper nroff "em dash".

From: Peter Samuelson <peter@p12n.org>

\(em renders as "--" in ASCII, and a nice em dash (i.e., a dash the
width of the letter "m") in more capable formats like PostScript.

Signed-Off-By: Peter Samuelson <peter@p12n.org>
16 years agoHyphens and Other Manpage Typography, 1/4:
Peter Samuelson [Tue, 8 May 2007 07:13:03 +0000 (17:13 +1000)] 
Hyphens and Other Manpage Typography, 1/4:

From: Peter Samuelson <peter@p12n.org>

 do not hyphenate terms:
  "override", "therein", "overwrite", "superblock format".

Signed-Off-By: Peter Samuelson <peter@p12n.org>
16 years agoMinor manpage fixes
Neil Brown [Tue, 8 May 2007 07:12:50 +0000 (17:12 +1000)] 
Minor manpage fixes

16 years agoRemove bogus add_dev definition.
Neil Brown [Tue, 8 May 2007 07:12:33 +0000 (17:12 +1000)] 
Remove bogus add_dev definition.

If nether ftw nor nftw are available, add_dev gets defined twice.
Fix that...

17 years agoRelease 2.6.1 mdadm-2.6.1
Neil Brown [Thu, 22 Feb 2007 04:04:59 +0000 (15:04 +1100)] 
Release 2.6.1

17 years agoDon't include uclibc as part of 'everything'
Neil Brown [Thu, 22 Feb 2007 03:59:31 +0000 (14:59 +1100)] 
Don't include uclibc as part of 'everything'

As I cannot compile in on x86-64.
Also, small dietlibc fix

17 years agoA couple of casts needed in printf statements.
Neil Brown [Thu, 22 Feb 2007 03:59:25 +0000 (14:59 +1100)] 
A couple of casts needed in printf statements.

17 years agoFixed old documentation in --grow --help
Neil Brown [Thu, 22 Feb 2007 03:59:22 +0000 (14:59 +1100)] 
Fixed old documentation in --grow --help

17 years agoTeach restripe to calculate Q syndrome for raid6.
Neil Brown [Thu, 22 Feb 2007 03:59:19 +0000 (14:59 +1100)] 
Teach restripe to calculate Q syndrome for raid6.

This allows mdadm to correctly restart a raid6 grow that
crashed during the critcal phase.

17 years agoFix a warning about an uninitialised variable.
Neil Brown [Thu, 22 Feb 2007 03:59:16 +0000 (14:59 +1100)] 
Fix a warning about an uninitialised variable.

The case that doesn't initialise it is impossible,
so just return with an error..

17 years agoFix a bug that was causing incorrect warning from --monitor.
Neil Brown [Thu, 22 Feb 2007 03:59:13 +0000 (14:59 +1100)] 
Fix a bug that was causing incorrect warning from --monitor.

17 years agoRelease 2.6 mdadm-2.6
Neil Brown [Thu, 21 Dec 2006 06:24:38 +0000 (17:24 +1100)] 
Release 2.6

17 years agoAdd new mode: --incremental
Neil Brown [Thu, 21 Dec 2006 06:10:52 +0000 (17:10 +1100)] 
Add new mode: --incremental

--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.

17 years agoCentralise code for copying uuid
Neil Brown [Thu, 14 Dec 2006 06:33:14 +0000 (17:33 +1100)] 
Centralise code for copying uuid

Rather than opencoding the byteswap all the time.

17 years agoSupport --uuid= with --create to choose your own UUID.
Neil Brown [Thu, 14 Dec 2006 06:33:10 +0000 (17:33 +1100)] 
Support --uuid= with --create to choose your own UUID.

17 years agoFix bug where v1 superblock might appear active when they should be clean.
Neil Brown [Thu, 14 Dec 2006 06:32:59 +0000 (17:32 +1100)] 
Fix bug where v1 superblock might appear active when they should be clean.

Only happens on kernel with 32 bit sector_t.

17 years agoCentral calls to ioctl BLKGETSIZE
Neil Brown [Thu, 14 Dec 2006 06:32:57 +0000 (17:32 +1100)] 
Central calls to ioctl BLKGETSIZE

Instead of opencoding the same thing everywhere.

17 years agoDon't hold md device open for so long in --monitor mode
Neil Brown [Thu, 14 Dec 2006 06:32:53 +0000 (17:32 +1100)] 
Don't hold md device open for so long in --monitor mode

map_dev can be slow and interferes with trying to stop the array.

17 years agoCheck device is large enough before hot-add.
Neil Brown [Thu, 14 Dec 2006 06:32:49 +0000 (17:32 +1100)] 
Check device is large enough before hot-add.

This improves quality of error message.

17 years agoChange handling for "--assemble --force" when two drives disappeared at once.
Neil Brown [Thu, 14 Dec 2006 06:31:41 +0000 (17:31 +1100)] 
Change handling for "--assemble --force" when two drives disappeared at once.

If two drives in a raid5 disappear at the same time, then "-Af"
will add them both in rather than just one and forcing the array
to 'clean'.  This is slightly safer in some cases.

17 years agoFix and test --update=uuid
Neil Brown [Thu, 14 Dec 2006 06:31:29 +0000 (17:31 +1100)] 
Fix and test --update=uuid

A number of odd bugs here, but now we have a regression test as well.

17 years agoWhen resync finished, report the mismatch count if there is one.
Neil Brown [Thu, 14 Dec 2006 06:31:25 +0000 (17:31 +1100)] 
When resync finished, report the mismatch count if there is one.

This doesn't get mailed out, but will appear in syslog...
Maybe it should be mailed if it was a 'check' or 'repair' pass...

17 years ago--wait or -W will wait for resync activity to finish on the given devices.
Neil Brown [Thu, 14 Dec 2006 06:31:22 +0000 (17:31 +1100)] 
--wait or -W will wait for resync activity to finish on the given devices.

17 years agoChange 'Device Size' to 'Used Dev Size'
Neil Brown [Thu, 14 Dec 2006 06:31:19 +0000 (17:31 +1100)] 
Change 'Device Size' to 'Used Dev Size'

because it only shows how much of each device is actually used, not
how big they are.

17 years agoIncrease raid456 stripe cache size if needed to --grow the array.
Neil Brown [Thu, 14 Dec 2006 06:31:16 +0000 (17:31 +1100)] 
Increase raid456 stripe cache size if needed to --grow the array.

The setting used unfortunately requires intimate knowledge of the
kernel, and it not reset when the reshape finishes.

17 years agoGive useful message if raid4/5/6 cannot be started because it is not clean and is...
Neil Brown [Thu, 14 Dec 2006 06:31:13 +0000 (17:31 +1100)] 
Give useful message if raid4/5/6 cannot be started because it is not clean and is also degraded.

17 years agoDefault to --auto=yes
Neil Brown [Thu, 14 Dec 2006 06:31:10 +0000 (17:31 +1100)] 
Default to --auto=yes

so the array devices with 'standard' names
get created automatically, as this is almost always what is wanted.

17 years agoFix a misleading comment.
Neil Brown [Thu, 14 Dec 2006 06:31:08 +0000 (17:31 +1100)] 
Fix a misleading comment.

17 years agoSupport --update=devicesize for cases where the underlying device can change size.
Neil Brown [Thu, 14 Dec 2006 06:31:03 +0000 (17:31 +1100)] 
Support --update=devicesize for cases where the underlying device can change size.

17 years agoImprove allocation and use of space for bitmaps in version1 metadata
Neil Brown [Thu, 14 Dec 2006 06:31:00 +0000 (17:31 +1100)] 
Improve allocation and use of space for bitmaps in version1 metadata

Depending on the size of the array we reserve space for up to 128K
of bitmap, and we use it where possible.
When hot-adding to a version 1.0 we can still only use the 3K at the
end though - need a sysfs interface to improve that.

If a small chunksize is requested on Create, we don't auto-enlarge
the reserved space - this still needs to be fixed.

17 years agoActually support --syslog
Neil Brown [Thu, 14 Dec 2006 06:30:56 +0000 (17:30 +1100)] 
Actually support --syslog

Fixes-debian-bug: 402457 (part)

All the code is there, and it works for '-y', but for some reason,
"syslog" was missing from the long_options.

17 years agoRemove some unused interfaces to the metadata handlers.
Neil Brown [Thu, 14 Dec 2006 06:30:53 +0000 (17:30 +1100)] 
Remove some unused interfaces to the metadata handlers.

This stuff has never been used (at least as far as git history can
see).  I wonder why it was there...

17 years agoMake Assemble/Force work on raid6 with 2 missing devices.
Neil Brown [Thu, 14 Dec 2006 06:30:51 +0000 (17:30 +1100)] 
Make Assemble/Force work on raid6 with 2 missing devices.

Previously it onl worked when one missing device.
Also split the "force" update_super method into two and it
is really serving two functions.

17 years ago--update=resync did exactly the wrong thing for version1 metadata.
Neil Brown [Sun, 12 Nov 2006 22:12:09 +0000 (09:12 +1100)] 
--update=resync did exactly the wrong thing for version1 metadata.

17 years agoFixed UUID printing in "--detail --brief" for version1 metadata.
Neil Brown [Thu, 9 Nov 2006 05:28:27 +0000 (16:28 +1100)] 
Fixed UUID printing in "--detail --brief" for version1 metadata.

17 years agoRelease 2.5.6 mdadm-2.5.6
Neil Brown [Wed, 8 Nov 2006 23:00:32 +0000 (10:00 +1100)] 
Release 2.5.6

17 years agoFixed problems that could cause infinitel loop with auto assemble.
Neil Brown [Wed, 8 Nov 2006 22:38:50 +0000 (09:38 +1100)] 
Fixed problems that could cause infinitel loop with auto assemble.

If an auto-assembly attempt failes because the array cannot be
opened or because the array has already been created, then we
get into an infinite loop.

Reported-by: Dan Pascu <dan@ag-projects.com>
Fixes-debian-bug: 396582

17 years agoDocument that the default metadata version can be overridden in config file.
Goswin Brederlow [Wed, 8 Nov 2006 22:37:45 +0000 (09:37 +1100)] 
Document that the default metadata version can be overridden in config file.

From: Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>

This is already mentioned in the config documentation, but not in the
place when the normal default is mentioned.

Fixes-debian-bug: 396914

17 years agoStrdup the bitmap file name found in the config file
Neil Brown [Wed, 8 Nov 2006 22:37:10 +0000 (09:37 +1100)] 
Strdup the bitmap file name found in the config file

Otherwise we quickly lose it...

17 years agoRelease 2-5-5 mdadm-2.5.5
Neil Brown [Fri, 3 Nov 2006 03:52:28 +0000 (14:52 +1100)] 
Release 2-5-5

17 years agoSupport --examine --brief --verbose properly
Neil Brown [Mon, 23 Oct 2006 05:51:26 +0000 (15:51 +1000)] 
Support --examine --brief --verbose properly

Similar to -Esv, this combination should print out the
'devices=' line in the otherwise --breif output.

17 years agoCheck error return on a couple of syscalls.
Michael Labuschke [Mon, 23 Oct 2006 04:56:35 +0000 (14:56 +1000)] 
Check error return on a couple of syscalls.

From: "Michael Labuschke" <michael@labuschke.de>