| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
- When --kill-superblock is used with --metadata, find every
different superblock if there are several and kill them all.
- When creating a new array, kill off any old metadata. The code
to do this was already present but has become broken over time.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
->validate_geometry is called to validate overall parameters,
and to validate each individual device.
If it ever fails, it needs to report the reason, as common code
cannot possible know.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
A small bitmap-chunksize hurts performance without helping
resync speed much - particularly on internal bitmaps.
So set the default to at least 64Meg.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
1.1 is more flexible in a number of ways and is safer.
0.90 is still fully supported.
1.0 should possibly be used for RAID1 arrays that you
want to boot off, depending on your boot loader.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
Other metadata formats already did not worry about whether 'sync' was
missing or not. super0 needs that now, but only for 0.91 metadata
that is undergoing reshape.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: NeilBrown <neilb@suse.de>
|
|\
| |
| |
| |
| | |
Conflicts:
mdadm.8
|
| |
| |
| |
| |
| |
| |
| |
| | |
If homehost is not set - typically during early boot,
and assemble of v0.90 metadata arrays will crash.
Reported-by: Paweł Sikora <pluto@agmk.net>
Signed-off-by: NeilBrown <neilb@suse.de>
|
| |
| |
| |
| |
| |
| | |
Also removed 'paper' addresses.
Signed-off-by: NeilBrown <neilb@suse.de>
|
| | |
|
|/
|
|
|
|
| |
Somehow this was missing before...
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because ---examine --brief, or --detail --brief are
often used to create mdadm.conf, and because people don't want to
have to update their mdadm.conf unnecessarily, we don't want to
include information that might change.
And now that level changing is supported, that is almost everything
but UUID.
So move some more fields into the "Only print with --verbose" class.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
.. because some devices (dasd) have 4096 byte sector size.
As the superblock is 4096 bytes and the bitmap is in a
60K region, this is safe from any possible corruption.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|\
| |
| |
| | |
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm into devel-3.0
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
That way it is the same a *freesize, and generally less confusing.
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
|
|
| |
Prepare add_to_super to validate disks against the platform capabilities
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Incremental.c
super0.c
super1.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
Manage.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Made the mistake of recompiling the F9 mdadm rpm which has a patch to
remove -Werror and add "-Wp,-D_FORTIFY_SOURCE -O2" which turns on lots
of errors:
config.c:568: warning: ignoring return value of asprintf
Assemble.c:411: warning: ignoring return value of asprintf
Assemble.c:413: warning: ignoring return value of asprintf
super0.c:549: warning: ignoring return value of posix_memalign
super0.c:742: warning: ignoring return value of posix_memalign
super0.c:812: warning: ignoring return value of posix_memalign
super1.c:692: warning: ignoring return value of posix_memalign
super1.c:1039: warning: ignoring return value of posix_memalign
super1.c:1155: warning: ignoring return value of posix_memalign
super-ddf.c:508: warning: ignoring return value of posix_memalign
super-ddf.c:645: warning: ignoring return value of posix_memalign
super-ddf.c:696: warning: ignoring return value of posix_memalign
super-ddf.c:715: warning: ignoring return value of posix_memalign
super-ddf.c:1476: warning: ignoring return value of posix_memalign
super-ddf.c:1603: warning: ignoring return value of posix_memalign
super-ddf.c:1614: warning: ignoring return value of posix_memalign
super-ddf.c:1842: warning: ignoring return value of posix_memalign
super-ddf.c:2013: warning: ignoring return value of posix_memalign
super-ddf.c:2140: warning: ignoring return value of write
super-ddf.c:2143: warning: ignoring return value of write
super-ddf.c:2147: warning: ignoring return value of write
super-ddf.c:2150: warning: ignoring return value of write
super-ddf.c:2162: warning: ignoring return value of write
super-ddf.c:2169: warning: ignoring return value of write
super-ddf.c:2172: warning: ignoring return value of write
super-ddf.c:2176: warning: ignoring return value of write
super-ddf.c:2181: warning: ignoring return value of write
super-ddf.c:2686: warning: ignoring return value of posix_memalign
super-ddf.c:2690: warning: ignoring return value of write
super-ddf.c:3070: warning: ignoring return value of posix_memalign
super-ddf.c:3254: warning: ignoring return value of posix_memalign
bitmap.c:128: warning: ignoring return value of posix_memalign
mdmon.c:94: warning: ignoring return value of write
mdmon.c:221: warning: ignoring return value of pipe
mdmon.c:327: warning: ignoring return value of write
mdmon.c:330: warning: ignoring return value of chdir
mdmon.c:335: warning: ignoring return value of dup
monitor.c:415: warning: rv may be used uninitialized in this function
...some of these like the write() ones are not so trivial so save those
fixes for the next patch.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| |
| | |
As we need to be able to extract a UUID from any superblock
for matching, use that as the MD_UUID as it will probably be
used for array matching too.
|
| |
| |
| |
| | |
--detail sometimes generates leading zero which are just noise.
|
| |
| |
| |
| | |
Now 'make everything' works again.
|
| |
| |
| |
| | |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
| |
| |
| |
| |
| | |
That way it can be silent when we are just trying to figure out
which metadata to use, and noisy when detecting a real problem.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Using buffered IO risks non-atomic updates to parts of the
device that we don't actually want to write to. This isn't in
general safe.
So switch to O_DIRECT for all that IO and make sure we have
properly aligned buffers.
|
| |
| |
| |
| | |
So only 'super0' is externally visible.
|
| |
| |
| |
| | |
Use 'info pointer is NULL' instead.
|
| |
| |
| |
| |
| | |
Getting close to a sensible description of what some of the
superswitch methods are supposed to do!
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When loading the metadata for a subarray (super_by_fd), we set
->subarray to be the name read from md/metadata_version so that
getinfo_super can return info about the correct array.
With this we can differentiate between a container and
an array within the container by looking at ->subarray[0].
|
| |
| |
| |
| | |
It isn't generally meaningful.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using write_init_super to add a spare to an active array is quite
different to how it is used when creating an array.
It mostly works, but if we are adding two devices to an array,
then when we add the second, there are still traces of the first
which confuse write_init_super.
So get write_init_super to ignore those traces. Longer term, we
probably want to do this differently as for DDF, hot-adding to
an active array will have to be quite different - it will want to
write to all metadata, possibly via mdmon.
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
Makefile
|
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
These will be used for ddf.
|
|
|
|
| |
The user of dup_super broke it.
|
|
|
|
|
| |
In particular, failing a device would give a silly
error message.
|
|
|
|
|
|
|
| |
From: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Zeuthen <david@fubar.dk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Instead of MSW.LSW, just print it as a 64bit number.
|
|
|
|
| |
It is now in the 'supertype'
|
|
|
|
|
| |
As this function takes 2 superblocks, the change is a bit more subtle,
so is done separately.
|
|
|
|
| |
The 'superblock' will be moved into this structure soon.
|
|
|
|
|
|
| |
As the metadata handler allocates the superblock, it should free it
too. DDF will have a more complex 'superblock' which needs more complex
freeing.
|
| |
|