| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
|
| |
We were multiplying MD_RESERVED_SECTORS by 1024 instead of 512,
so lots of 'is it too small' checks were wrong.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
|
| |
|
|
|
|
| |
Instead of opencoding the same thing everywhere.
|
|
|
|
|
| |
because it only shows how much of each device is actually used, not
how big they are.
|
|
|
|
| |
and is also degraded.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This stuff has never been used (at least as far as git history can
see). I wonder why it was there...
|
|
|
|
|
|
| |
Previously it onl worked when one missing device.
Also split the "force" update_super method into two and it
is really serving two functions.
|
|
|
|
| |
Currently it doesn't for raid6 and raid10
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is much better for this sort of thing to be predictable
rather than depending on what devices exist, especially as
these days entries in /dev/ often don't pre-exist.
So make it always
/dev/mdX
for version0 superblocks.
Version1 are always /dev/md/NAME
|
|
|
|
|
|
|
| |
Make -assemble a bit more resilient to finding strange
information in superblocks.
Don't claim newly added spares are InSync!! (don't know why that
code was ever in there)
|
|
|
|
|
|
|
|
| |
Apparently there are license issues with openssl, so
just use sha1.c always. This means we can get rid of
SHA1.c
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Luca Berra <bluca@vodka.it>
glibc 2.4 is pedantic on ignoring return values from fprintf, fwrite and
write, so now we check the rval and actually do something with it.
in the Grow.c case i only print a warning, since i don't think we can do
anything in case we fail invalidating those superblocks (is should never
happen, but then...)
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
| |
Instead of depending (too much) on what is in /dev,
we make names based on the content of the superblock.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
| |
This cannot be used yet, but it is working towards auto-assembly.
When auto-assembling an array, we make a name in /dev/md/
giving a number (from the peferred minor) or name (from set-name).
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
| |
i.e. if assembling with --name or --super-minor, then if we find two
different arrays with the same apparent identity, and one was built
for 'this' host, then prefer that one instead of giving up in disgust.
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>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Otherwise when you "--update==uuid" an array with an internal
bitmap, it will break, badly.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
| |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
Requires 2.6.18.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For 'force' and 'assemble', update_super must return true
if anything was changed.
Also fix a bug with wonly handling in super0.
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./super0.c | 18 ++++++++++++++----
./super1.c | 7 +++++++
2 files changed, 21 insertions(+), 4 deletions(-)
diff ./super0.c~current~ ./super0.c
|
|
|
|
|
|
|
| |
Whenever we need a device file to open, if one cannot be found in /dev,
create a temporary one.
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
|
|
|
| |
Add a 'name' field to 'info' to compensate.
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>
|