| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Try to treat members of containers much like other arrays for
assembly.
We still look through the list of devices for a match (it will be
the container), then find the relevant 'info' and try to assemble
the array.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
| |
The default for 'homehost' is now '<system>' rather than
unspecified.
|
|
|
|
|
|
|
|
|
|
| |
i.e. in mdadm.conf you can have a line like
ARRAY uuid=whatever
and it will use auto-name-generation to give a name to the array at
assemble-time. The is different from blind auto-assembly in that the
array will be treated as 'local'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We will shortly be feeding more information into the process of
creating array devices, so delay the creation. Still open them
early if the device already exists.
This involves making sure the autof flag is in the right place
so that it can be found at creation time.
Also, Assemble, Build, and Create now always close 'mdfd'.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When
mdadm --assemble /dev/whatever
is given, mdadm will treat it as though '--scan' were given, even
though it wasn't.
In this case, the code opens /dev/whatever twice, which is pointless.
We already know /dev/whatever is open at this point, so remove the
'open' and the tests, and make sure it is always closed afterwards.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Some cases we aren't interested in creating the mddev, just opening
it. Make those more explicit.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
This reflect that fact that more often than not it is creating things
in /dev, and allows for a new open_mddev which does just that.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Now that we are using these values, we need to initialise them
properly.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
Create.c
Manage.c
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
Create.c
Manage.c
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an array is being managed by mdmon, then just
write "inactive" to stop it, and let mdmon do the
final "clear". This makes sure mdmon has a chance
to read the final state and update the metadata properly.
After writing "inactive" with use "ping_monitor" to synchronise
with mdadm, then STOP the array just in case it is still running,
else we will get into an infinite loop in "mdadm -Ss".
Signed-off-by: Neil Brown <neilb@suse.de>
|
| |
| |
| |
| |
| |
| |
| | |
1/ close a race where multiple arrays disappear at once
and monitor isn't woken up to find out that the last one
has gone.
2/ "mdadm -Ss" needs to pause briefly for mdmon to exit.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
Makefile
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current model for creating arrays involves writing
a superblock to each device in the array.
With containers (as with DDF), that model doesn't work.
Every device in the container may need to be updated
for an array made from just some the devices in a container.
So instead of calling write_init_super for each device,
we call it once for the array and have it iterate over
all the devices in the array.
To help with this, ->add_to_super now passes in an 'fd' and name for
the device. These get saved for use by write_init_super. So
add_to_super takes ownership of the fd, and write_init_super will
close it.
This information is stored in the new 'info' field of supertype.
As part of this, write_init_super now removes any old traces of raid
metadata rather than doing this in common code.
|
|
|
|
| |
From: Hans Lambermont <hans.lambermont@newtec.eu>
|
|
|
|
|
|
|
| |
From: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Zeuthen <david@fubar.dk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
|
|
|
|
| |
From: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
|
|
|
|
|
| |
We don't want to create a file called 'none', and it isn't needed,
so just reject it.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also give error on --build if no devices given.
|
|
|
|
| |
This is equivalent to raidautorun that some distros provide.
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
This helps with piping to a pager for example.
|
|
|
|
|
| |
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
|
| |
|
| |
|
|
|
|
| |
size.
|
|
|
|
|
| |
Similar to -Esv, this combination should print out the
'devices=' line in the otherwise --breif output.
|
| |
|
|
|
|
|
|
|
| |
From: Luca Berra <bluca@comedia.it>
Put another way, if we find any active arrays, then assume things are
going as planned.
|
| |
|
|
|
|
|
| |
Recent change broke assembling of degraded arrays, making
it require --run. This fixes that.
|
|
|
|
|
| |
Never use /etc/mdadm.conf if --config file is given (previously
some code used one, some used the other).
|
|
|
|
|
|
|
| |
And as a side effect, if --quiet isn't given, stopped devices are
reported.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
... as that's just silly!
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
This can be used to bootstrape homehost tagging.
If no arrays are found that are tagged, we look for any array
and tag it.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
and assorted bugfixes.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
This basically works, but needs various improvements and some tests.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|