| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Support creating arrays inside an active ddf container by
sending a metadata update over a pipe to mdmon.
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
For arrays that don't have redundancy (raid0, linear etc), the
clean/dirty distinction doesn't mean anything. So always
'assume clean' for these arrays.
|
|
|
|
|
|
| |
'container_member' isn't really a well defined concept.
Each metadata might enumerate members differently, so just
let each format /mdX/YYYY as appropriate.
|
|
|
|
|
|
|
| |
I want the metadata handler to have more control over the 'version',
particularly for arrays which are members of containers.
So discard st->text_version and instead use info->text_version
which getinfo_super can initialise.
|
|
|
|
|
|
| |
FIXME uses sill hardcoded path.
Need --assemble too.
|
|
|
|
|
| |
It it never used, and removing means there are several 'open's that can
go.
|
|
|
|
|
|
|
|
|
| |
From: Dan Williams <dan.j.williams@intel.com>
This should probably be made into a generic 'external' capability rather
than hardcoding 'ddf' and 'imsm'.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
| |
From: Neil Brown <neilb@suse.de>
|
| |
|
| |
|
|
|
|
|
|
| |
Create a BVD in a DDF
Do not actually assemble it yet...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a ddf array by naming the device /dev/ddf* or
specifying metadata 'ddf'.
If ddf is specified with no level, assume a container (indeed,
anything else would be wrong).
**Need to use text_Version to set external metadata...
More ddf support
Load a ddf container. Now
--examine /dev/ddf
works.
super-ddf: fix compile warning
From: Dan Williams <dan.j.williams@intel.com>
super-ddf.c:723: format %lu expects type long unsigned int, but argument 3 has type unsigned int
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
|
| |
Allow specifying metadata type when creating arrays etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Now that validate_geometry opens and checks the device,
we don't need to do it as much in top level Create.
We only need it to check for old array or filesystem info.
So only open the device at that place.
|
|
|
|
| |
These will be used for ddf.
|
|
|
|
|
|
|
|
| |
This did not work before as we couldn't mark it clean as there would
be some parity blocks out of sync, and raid6 will not assemble a
dirty degraded array.
So make such arrays doubly degraded (the last device becomes a spare)
and clean.
|
|
|
|
|
| |
there is needless duplicatiion between mdinfo and sysdev, so discard
the latter.
|
|
|
|
| |
It is now in the 'supertype'
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Thanks to Martin Bene.
|
|
|
|
| |
Also use LEVEL_LINEAR, LEVEL_MULTIPATH in place of -1 or -4 in a few places.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also give error on --build if no devices given.
|
| |
|
|
|
|
| |
Instead of opencoding the same thing everywhere.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Need to mask of bits above the bottom 16 when calculating number of
copies.
|
|
|
|
| |
They do nothing but cause confusion.
|
|
|
|
|
| |
/dev/md_d0 should have name 'd0' by default to
make /dev/md/d0.
|
|
|
|
| |
/dev/md_d0 now becomes '0', not '_d0'.
|
|
|
|
|
| |
Never use /etc/mdadm.conf if --config file is given (previously
some code used one, some used the other).
|
|
|
|
|
|
|
| |
CREATE metadata=1
in mdadm.conf will cause version-1 superblocks to be the default.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
When an array is created, if the homehost is know,
the superblock gets it, either in the uuid, (via sha1)
or in the name field.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
When creating a file bitmap, choose a default size that
results in fewer than 2^21 chunks. Without this kmalloc
failure in the kernel becomes likely.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Make sure old-version superblocks are not around to confuse anything
when a new array is created.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
clean up 'long long' usage for size of array, so that
with v-1 superblocks a raid1 larger than 2TB is possible.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|