Commit Graph

133 Commits

Author SHA1 Message Date
NeilBrown ef799cdd69 Release mdadm-3.2.2
Stability release
2011-06-17 15:15:37 +10:00
NeilBrown 7e90264df5 Finally remove auto-home-host
This was #if-ed out for 3.0, but it really should go.
Gcc 4.6.0 complains that auto_update_home is set but not used
(which is true).

Reported-by: Tobias Powalowski <t.powa@gmx.de>
2011-04-27 09:58:49 +10:00
Mike Frysinger 237d87904e mdadm: add missing --syslog option to monitor help
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-11 14:54:18 +10:00
NeilBrown 32367cb558 split name/number maps into separate file.
This reduced some interdependencies between files.

Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-05 08:40:49 +10:00
NeilBrown 7b0bbd0f71 Release 3.2.1
Signed-off-by: NeilBrown <neilb@suse.de>
2011-03-28 13:30:29 +11:00
NeilBrown ca6529edf6 Merge branch 'master' into devel-3.2
Conflicts:
	Grow.c
	Manage.c
	managemon.c
	mdadm.8.in
	util.c
2011-03-10 17:37:04 +11:00
Albert Pauw 866f509fb9 FIX: ReadMe.c -Y option missing in short_options
Hi Neil,

I noticed that the -Y option, as in mdadm -D -Y /dev/md0, doesn't work
but used as --export it works.

So I made a little patch to fix it, but it is simply sticking a Y in the
list of short_options in ReadMe.c.

Signed-off-by: NeilBrown <neilb@suse.de>
2011-02-27 15:56:54 +11:00
NeilBrown a201e6803f Release mdadm-3.2 - developer only release
Signed-off-by: NeilBrown <neilb@suse.de>
2011-02-01 16:11:13 +11:00
Labun, Marcin 20b60dcd6c Dynamic hot-plug udev rules for policies
Neil,
Please consider this patch that once was discussed and I think agreed with in general direction. It was sent a while ago
but somehow did not merged into your devel3-2. This patch enables hot-plug of so called bare devices (as understand by domain policies rules in mdadm.conf).
Without this patch we do NOT serve hot-plug of bare devices at all.

Thanks,
Marcin Labun

Subject was: FW: Autorebuild, new dynamic udev rules for hot-plugs

>>From c0aecd4dd96691e8bfa6f2dc187261ec8bb2c5a2 Mon Sep 17 00:00:00 2001
From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Date: Thu, 23 Dec 2010 16:35:01 +0100
Subject: [PATCH] Dynamic hot-plug udev rules for policies
Cc: linux-raid@vger.kernel.org, Williams, Dan J <dan.j.williams@intel.com>, Ciechanowski, Ed <ed.ciechanowski@intel.com>

When introducing policies, new hot-plug rules were added to support
bare disks. Mdadm was started for each hot plugged block device
to determine if it could be used as spare or as a replacement member for
degraded array.
This patch introduces limitation of range of devices that are handled
by mdadm.
It limits them to the ones specified in domains associated with
the actions: spare-same-port, spare and spare-force.
In order to enable hot-plug for bare disks one must update udev rules
with command

        mdadm --activate-domains[=filename]

Above command writes udev rule configuration to stdout. If 'filename'
is given output is written to the file provided as parameter. It is up
to system administrator what should be done later. To make such rule
permanent (i.e. remain after reboot) rule should be writen to
/lib/udev/rules.d directory. Other cases will just need to write it to
/dev/.udev/rules.d directory where temporary rules lies. One should be
aware of the meaning of names/priorities of the udev rules.

After mdadm.conf is changed one is obliged to re-run
"mdadm --activate-domains" command in order to bring the system
configuration up to date.
All hot-plugged disks containing metadata are still handled by existing
rules.

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2011-01-27 12:48:04 +10:00
NeilBrown 87f26d14f7 Assemble: allow an array undergoing reshape to be started without backup file
Though not having the proper backup file can cause data corruption, it
is not enough to justify not being able to start the array at all.
So allow "--invalid-backup" to be specified which says "just continue
even if a backup cannot be restored".

Signed-off-by: NeilBrown <neilb@suse.de>
2010-12-01 11:47:32 +11:00
NeilBrown 1c7a808c4d Improve opt parsing, and distinguish long from short.
In several cases, two different long options map to the same short
option.  So e.g. you could give '--brief' and it would be interpreted
as '--bitmap'.  That isn't really good.

So for every shared short option, define an option number and return
that for the long option instead.  Then always check for both the
short and long options.

Also give some bugs like " mode == 'G'" which should be '== GROW'.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-11-25 18:58:45 +11:00
Dan Williams bc77ed535d block monitor: freeze spare assignment for external arrays
In order to support reshape and atomic removal of spares from containers
we need to prevent mdmon from activating spares.  In the reshape case we
additionally need to freeze sync_action while the reshape transaction is
initiated with the kernel and recorded in the metadata.

When reshaping a raid0 array we need to freeze the array *before* it is
transitioned to a redundant raid level.  Since sync_action does not exist
at this point we extend the '-' prefix of a subarray string to flag
mdmon not to activate spares.

Mdadm needs to be reasonably certain that the version of mdmon in the
system honors this 'freeze' indication.  If mdmon is not already active
then we assume the version that gets started is the same as the mdadm
version.  Otherwise, we check the version of mdmon as returned by the
extended ping_monitor() operation.  This is to catch cases where mdadm
is upgraded in the filesystem, but mdmon started in the initramfs is
from a previous release.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-11-23 15:00:54 +11:00
Anna Czarnowska edde9560fa mdadm: added --no-sharing option for Monitor mode
--no-sharing option disables moving spares between arrays/containers.
Without the option spares are moved if needed according to config rules.
We only allow one process moving spares started with --scan option.
If there is such process running and another instance of Monitor
is starting without --scan, then we issue a warning but allow it
to continue.

Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-11-22 20:58:06 +11:00
Przemyslaw Czarnowski 950bc34477 added --path <path_id> to give the information on the 'path-id' of removed device
<path-id> allows to identify the port to which given device is plugged
in.  In case of hot-removal, udev can pass this information for future
use (eg. write this name as 'cookie' allowing to detect the fact of
reinserting device to the same port).

--path <path-id> parameter has been added to device removal handle
(and char *path has been added to IncrementalRemove() to pass this
value) in order to pass path-id to this handler.

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-11-22 20:58:06 +11:00
NeilBrown 972ee7253a Release mdadm-3.1.4
bugfix/stability.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-08-31 17:21:13 +10:00
NeilBrown 850a31783a Release mdadm-3.1.3
Signed-off-by: NeilBrown <neilb@suse.de>
2010-08-06 16:55:23 +10:00
NeilBrown 1538aca5cb Merge branch 'master' of git://github.com/djbw/mdadm 2010-07-06 14:46:47 +10:00
NeilBrown 29ba480497 Add -fail support to --incremental
This can be used for hot-unplug.  When a device has been remove,
udev can call
   mdadm --incremental --fail sda

and mdadm will find the array holding sda and remove sda from
the array.

Based on code from  Doug Ledford <dledford@redhat.com>

Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-30 16:55:17 +10:00
NeilBrown 7e6140e6c6 Correct documentation for --rebuild-map
In some places it is referred to as "--rebuild", and while
that works due to getopt allowing prefixes, it could appear
confusing (rebuild means other things too) and being explicit
is some safeguard if we want to add e.g. --rebuild-foo later.

Reported-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-30 16:52:54 +10:00
Dan Williams aa534678ba Rename subarray v2
Allow the name of the array stored in the metadata to be updated.  In
some cases the metadata format may not be able to support this rename
without modifying the UUID.  In these cases the request will be blocked.
Otherwise we allow the rename to take place, even for active arrays.
This assumes that the user understands the difference between the kernel
node name, the device node symlink name, and the metadata specific name.

Anticipating further need to modify subarrays in-place, introduce the
->update_subarray() superswitch method.  A future potential use
case is setting storage pool (spare-group) identifiers.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-06-22 16:30:59 -07:00
Dan Williams 33414a0182 Kill subarray v2
Support for deleting a subarray out of a container.  When all subarrays
are deleted the component devices are converted back into spares, a
--zero-superblock is still needed to kill the remaining metadata at this
point.  This operation is blocked when the subarray is active and may
also be blocked by the metadata handler when deleting the subarray might
change the uuid of other active subarrays.  For example, with imsm,
deleting subarray 'n' may change the uuid of subarrays with indexes > n.

Deleting a subarray needs to be a container wide event to ensure
disks that record the modified subarray list perceive other disks that
did not receive this change as out of date.

Notes:
The st->subarray parsing in super-intel.c and super-ddf.c is updated to
be more strict now that we are reading user supplied subarray values.

Offline container modification shares actions that mdmon typically
handles so promote is_container_member() and version_to_superswitch()
(formerly find_metadata_methods()) to generic utility functions for the
cases where mdadm performs the operation.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2010-06-15 17:55:41 -07:00
NeilBrown a31c140f13 Release mdadm-3.1.2 2010-03-10 15:58:46 +11:00
Luca Berra c3e1a50fcb mdadm-3.1.1 segfaults when mdadm -G -Z is used.
Signed-off-by: Luca Berra <bluca@vodka.it>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-02-01 09:12:31 +11:00
NeilBrown 0c8675cbed Correctly parse -N command line option.
'N' wasn't listed in the sort options, so you
had to use --name :-)

Resolved-Debian-Bug: 564004
Signed-off-by: NeilBrown <neilb@suse.de>
2010-01-28 16:55:28 +11:00
NeilBrown 40bc78f5cd Release mdadm-3.1.1
bugfix over 3.1, but changes to some significant defaults.
2009-11-19 16:10:58 +11:00
NeilBrown 7f0066ba71 Release 3.1
New functionality in --grow.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-10-22 14:07:05 +11:00
NeilBrown d6d5656bd5 Merge branch 'master' into devel-3.1 2009-10-22 13:57:54 +11:00
NeilBrown d28c1a7383 Release 3.0.3
Signed-off-by: NeilBrown <neilb@suse.de>
2009-10-22 12:05:22 +11:00
NeilBrown 4a997737a1 Merge branch 'master' into devel-3.1 2009-10-22 11:13:13 +11:00
Zdenek Behan 9a36a9b713 Monitor: add option to specify rebuild increments
ie. the percent increments after which RebuildNN event is generated

This is particulary useful when using --program option, rather than
(only) syslog for alerts.

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
2009-10-19 13:13:58 +11:00
NeilBrown ca4f89a3b7 Merge branch 'master' into devel-3.1
Conflicts:
	mdadm.8
2009-10-01 16:58:40 +10:00
NeilBrown 58ad57f684 Release mdadm-3.0.2
Just one bugfix.
2009-09-25 18:19:07 +10:00
NeilBrown d8419fe9e9 Release mdadm-3.0.1
Just bugfixes.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-09-25 17:08:19 +10:00
NeilBrown 84e11361aa Grow: support --array-size changes
With 2.6.30 it is possible to tell the md driver to clip an array to a
size smaller than the real size of the array.  This option gives
access to that feature.  The size change does not persist
across restarts.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-07-13 15:00:02 +10:00
NeilBrown 6e92d480f7 Release mdadm-3.0
- remove lot of old 'ANNOUNCE' files
 - trim changelog
 - update version numbers

Signed-off-by: NeilBrown <neilb@suse.de>
2009-06-02 15:37:56 +10:00
NeilBrown e736b62389 Update copyright dates and remove references to @cse.unsw.edu.au
Also removed 'paper' addresses.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-06-02 14:35:45 +10:00
NeilBrown e0fe762a63 mdadm.8: Man page updates
General review and update of mdadm.8
2009-06-02 14:06:05 +10:00
NeilBrown 222a7bfd2e Release mdadm-3.0-rc1 2009-05-11 16:33:29 +10:00
NeilBrown 257c1dc27e man pages: note that --auto is largely deprecated and irrelevant.
Signed-off-by: NeilBrown <neilb@suse.de>
2009-05-11 15:47:10 +10:00
NeilBrown b9d77223eb Release mdadm-3.0-devel3 2009-03-10 16:59:57 +11:00
NeilBrown b640a252ee Support new raid6 layouts needed for DDF
DDF raid6 layouts are subtly different from the standard 'md' layouts.
From 2.6.30 the kernel knows about these.
Teach mdadm about them, and also allow 'ddf' to set an appropriate default.

Signed-off-by: NeilBrown <neilb@suse.de>
2009-03-09 11:16:53 +11:00
NeilBrown 6c40598f59 Merge branch 'master' into devel-3.0 2009-02-02 11:09:09 +11:00
NeilBrown 0083584d5e Document 'max' option to --grow --size in --help output.
Suggestion from Christian Hudon <chrish@debian.org>

Signed-off-by: NeilBrown <neilb@suse.de>
2009-02-02 10:58:08 +11:00
Dan Williams 4cce406959 introduce --detail-platform to display platform raid capabilities
Metadata formats like imsm work in concert with platform firmware and
hardware, so provide a way for mdadm to display this info to the user.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-12-08 16:59:18 -07:00
NeilBrown ca01c83be5 Release 2.6.8 2008-11-28 12:14:57 +11:00
NeilBrown 1679bef2ee Release 3.0-devel2
Signed-off-by: NeilBrown <neilb@suse.de>
2008-11-05 17:14:06 +11:00
NeilBrown c04d54461f Updates version numbers for 3.0-devel1 release. 2008-09-18 17:27:49 +10:00
Dan Williams 1770662bca 'mdadm --wait-clean' wait for array to be marked clean
For use in distro shutdown scripts with a RAID root file system.
Returns immediately if the array is 'readonly', or not an externally
managed array.  It is up to the distro's scripts to make sure no new
writes hit the device after this returns 'true'.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-09-15 20:58:42 -07:00
NeilBrown 37ea3936a6 Merge branch 'master' into from-stable
Conflicts:

	Create.c
	Manage.c
2008-08-07 14:12:25 +10:00
NeilBrown e5669f4004 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>
2008-08-01 16:48:08 +10:00