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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
Luca Berra [Mon, 16 Oct 2006 05:26:53 +0000 (15:26 +1000)]
Mdassemble improvements
From: Luca Berra <bluca@comedia.it>
- Fix a bug where mdassemble didn't close a filedescriptor and so couldn't assembele
stacked arrays.
- Allow mdassemble, when run a second time, to mark all arrays as writable.
This is useful if they are started read-only as is best at boot-time.
Neil Brown [Mon, 9 Oct 2006 21:06:24 +0000 (07:06 +1000)]
Improve the message when mdadm detects similar superblocks
If they are for a partition and a whole device (common case)
they old message doesn't really cover the situation. So add
the "overlap" option to the text.
Also detect whether the device list was in mdadm.conf and
act accordingly.