Commit Graph

166 Commits

Author SHA1 Message Date
NeilBrown
b3d3195538 Allow WRITEMOSTLY to be cleared on --readd using --readwrite.
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>
2008-10-25 18:20:49 +11:00
Neil Brown
866d136a2f Release 2.6.7 2008-06-06 16:07:11 +10:00
Neil Brown
df5a0b9295 Release 2.6.6 2008-05-19 12:07:54 +10:00
Neil Brown
2270232245 Release 2.6.5 2008-05-15 15:50:59 +10:00
Neil Brown
e509e779cd Get Changelog uptodate 2008-05-15 15:50:57 +10:00
Neil Brown
6fb79233b0 Allow creation of a RAID6 with a single missing device.
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.
2008-04-28 16:30:09 +10:00
Neil Brown
3cdfb6a712 Updates some URLs in the man page.
Particularly, add the wiki on osdl.org
2008-04-28 16:29:53 +10:00
Neil Brown
1486e43fec Print 'Events' more sensibly.
Instead of MSW.LSW, just print it as a 64bit number.
2008-04-28 16:29:45 +10:00
Neil Brown
7a3be72fc6 Fix problems with array.size overflowing on large arrays.
array.size is 32bits and counts K.  So for arrays with
more than 4Terrabytes, it can overflow.
The correct number can be read from sysfs, but there are still
a few places that use array.size and risk truncation.  What is worse.
they compare a number of kilobytes with a number of sectors !!

So use get_component_size() to read the sysfs information, and be
more consistent about units.
2008-04-28 16:29:37 +10:00
Neil Brown
2cdb64897d Fix for segfault when reading /proc/mdstat
Some kernel versions don't put a space between 'active' and '(auto-read-only)'
in /proc/mdstat.  This causes a parsing problem leaving 'level' set to
NULL which causes a crash.

So synthesise a space there if it is missing, and check for 'level' to
be NULL and don't de-ref if it is.
2008-04-28 16:29:12 +10:00
Neil Brown
6a0671608b Release 2.6.4 2007-10-19 14:13:04 +10:00
Neil Brown
e5bddffd35 Release 2.6.3 2007-08-20 14:22:15 +10:00
Neil Brown
e1584dd2c7 Update changelog 2007-08-20 14:14:46 +10:00
Neil Brown
2295250a73 Report error when grow cannot be restarted.
Make sure that if --assemble find an array in the critical region
of a reshape, and cannot find the critical data to restart the
reshape, it gives an error message.
2007-08-20 14:14:42 +10:00
Neil Brown
eb6dae9850 Fix error message when adding a device that is too small.
We were multiplying MD_RESERVED_SECTORS by 1024 instead of 512,
so lots of 'is it too small' checks were wrong.
2007-08-20 14:14:28 +10:00
Neil Brown
005debfc11 Fix problem with add a device to a 1.x array created with older mdadm.
When adding new disk to an array, don't reserve so much bitmap
space that the disk cannot store the required data. (Needed when
1.x array was created with older mdadm).
2007-08-20 14:14:25 +10:00
Ian Dall
7d19ad0de3 Allow "--write-behind=" to be done in grow mode.
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.
2007-07-09 11:29:04 +10:00
Neil Brown
fffdbe5ed0 Release 2.6.2 2007-05-21 14:25:53 +10:00
Neil Brown
a77be58672 Make return code for "--detail --test" more reliable.
Missing devices as well as failed devices cause an error.
2007-05-21 14:25:50 +10:00
Neil Brown
1f48664b8e Add --auto-detect for in-kernel autodetect.
This is equivalent to raidautorun that some distros provide.
2007-05-21 14:25:44 +10:00
Neil Brown
f752781f81 Fix --grow --add for linear arrays.
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.
2007-05-21 14:25:37 +10:00
Neil Brown
b80da66161 Support failing and removed of detached and faulty devices.
This if you unplug a device and udev removes the entry from /dev,
you can still remove the device.
2007-05-11 16:13:03 +10:00
Neil Brown
e003092c07 Release 2.6.1 2007-02-22 15:04:59 +11:00
Neil Brown
00be0b12d2 Fixed old documentation in --grow --help 2007-02-22 14:59:22 +11:00
Neil Brown
48327135d6 Teach restripe to calculate Q syndrome for raid6.
This allows mdadm to correctly restart a raid6 grow that
crashed during the critcal phase.
2007-02-22 14:59:19 +11:00
Neil Brown
ae491d1e2c Fix a warning about an uninitialised variable.
The case that doesn't initialise it is impossible,
so just return with an error..
2007-02-22 14:59:16 +11:00
Neil Brown
3e6944b2cc Fix a bug that was causing incorrect warning from --monitor. 2007-02-22 14:59:13 +11:00
Neil Brown
f8409e5478 Release 2.6 2006-12-21 17:24:38 +11:00
Neil Brown
8382f19bdc Add new mode: --incremental
--incremental allows arrays to be assembled one device at a time.
This is expected to be used with udev.
2006-12-21 17:10:52 +11:00
Neil Brown
3d3dd91e38 Support --uuid= with --create to choose your own UUID. 2006-12-14 17:33:10 +11:00
Neil Brown
ab5303d695 Don't hold md device open for so long in --monitor mode
map_dev can be slow and interferes with trying to stop the array.
2006-12-14 17:32:53 +11:00
Neil Brown
4a39c6f236 Check device is large enough before hot-add.
This improves quality of error message.
2006-12-14 17:32:49 +11:00
Neil Brown
c5a6f9a61d Change handling for "--assemble --force" when two drives disappeared at once.
If two drives in a raid5 disappear at the same time, then "-Af"
will add them both in rather than just one and forcing the array
to 'clean'.  This is slightly safer in some cases.
2006-12-14 17:31:41 +11:00
Neil Brown
bf4fb153a4 Fix and test --update=uuid
A number of odd bugs here, but now we have a regression test as well.
2006-12-14 17:31:29 +11:00
Neil Brown
b90c0e9a12 --wait or -W will wait for resync activity to finish on the given devices. 2006-12-14 17:31:22 +11:00
Neil Brown
e336254463 Change 'Device Size' to 'Used Dev Size'
because it only shows how much of each device is actually used, not
how big they are.
2006-12-14 17:31:19 +11:00
Neil Brown
758d3a8e7d Increase raid456 stripe cache size if needed to --grow the array.
The setting used unfortunately requires intimate knowledge of the
kernel, and it not reset when the reshape finishes.
2006-12-14 17:31:16 +11:00
Neil Brown
583315d9c5 Give useful message if raid4/5/6 cannot be started because it is not clean and is also degraded. 2006-12-14 17:31:13 +11:00
Neil Brown
7572344665 Default to --auto=yes
so the array devices with 'standard' names
get created automatically, as this is almost always what is wanted.
2006-12-14 17:31:10 +11:00
Neil Brown
bee8ec56f4 Support --update=devicesize for cases where the underlying device can change size. 2006-12-14 17:31:03 +11:00
Neil Brown
67a8c82d60 Make Assemble/Force work on raid6 with 2 missing devices.
Previously it onl worked when one missing device.
Also split the "force" update_super method into two and it
is really serving two functions.
2006-12-14 17:30:51 +11:00
Neil Brown
434b77559e --update=resync did exactly the wrong thing for version1 metadata. 2006-11-13 09:12:09 +11:00
Neil Brown
b7a708af6f Fixed UUID printing in "--detail --brief" for version1 metadata. 2006-11-09 16:28:27 +11:00
Neil Brown
60e1bc1a33 Fixed problems that could cause infinitel loop with auto assemble.
If an auto-assembly attempt failes because the array cannot be
opened or because the array has already been created, then we
get into an infinite loop.

Reported-by: Dan Pascu <dan@ag-projects.com>
Fixes-debian-bug: 396582
2006-11-09 09:38:50 +11:00
Goswin Brederlow
2790ffe38a Document that the default metadata version can be overridden in config file.
From: Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>

This is already mentioned in the config documentation, but not in the
place when the normal default is mentioned.

Fixes-debian-bug: 396914
2006-11-09 09:37:45 +11:00
Neil Brown
d87d0978e2 Strdup the bitmap file name found in the config file
Otherwise we quickly lose it...
2006-11-09 09:37:10 +11:00
Neil Brown
209b742f4d Release 2-5-5 2006-11-03 14:52:28 +11:00
Neil Brown
cbfbcb0b50 Improve error message when wrong --update option is given. 2006-10-23 08:56:27 +10:00
Neil Brown
702b557b1c Fix bugs related to raid10 and the new offset layout.
Need to mask of bits above the bottom 16 when calculating number of
copies.
2006-10-19 16:38:29 +10:00
Luca Berra
1cac4c1b55 Don't trigger and error on -As if all arrays are already started.
From: Luca Berra <bluca@comedia.it>

Put another way, if we find any active arrays, then assume things are
going as planned.
2006-10-16 15:27:48 +10:00