summaryrefslogtreecommitdiffstats
path: root/Manage.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow WRITEMOSTLY to be cleared on --readd using --readwrite.NeilBrown2008-10-251-3/+5
| | | | | | | | 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>
* Manage: allow adding device that is just large enough to v1.x array.NeilBrown2008-10-131-8/+9
| | | | | | | | | | | | | When adding a device to an array, we check that it is large enough. Currently the check makes sure there is also room for a reasonably sized bitmap. But if the array doesn't have a bitmap, then this test might be too restrictive. So when adding, only insist there is enough space for the current bitmap. When Creating, still require room for the standard sized bitmap. This resolved Debian Bug 500309
* Improve error message when mdadm fails to stop an array.Neil Brown2008-06-261-1/+6
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Fix problems with array.size overflowing on large arrays.Neil Brown2008-04-281-2/+11
| | | | | | | | | | | 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.
* Find super from fd on an array.Neil Brown2007-12-141-4/+2
| | | | | We used to use the major/minor numbers, but that isn't sufficient any more, so pass the fd, and possibly check 'text' version.
* Drop the superblock arg from all metadata methods.Neil Brown2007-12-141-24/+30
| | | | It is now in the 'supertype'
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-141-4/+4
| | | | The 'superblock' will be moved into this structure soon.
* Remove spaces/tabs from ends of lines.Neil Brown2007-12-141-6/+6
|
* Remove partitions from a device before adding it to an array.Neil Brown2007-10-191-1/+1
| | | | | The 'remove_partitions' call is in the wrong place and applying to the wrong file.
* Make "--write-mostly" effective when re-adding a device to an array.Neil Brown2007-09-241-3/+5
| | | | | | | | | Fixes Debian Bug 442874 When we discover that we can 're-add' a drive, we forget to check the write-mostly flag. This highlights the fact that you cannot turn 'off' the write-mostly flag at this point. I wonder if that is a problem...
* Add --auto-detect for in-kernel autodetect.Neil Brown2007-05-211-0/+13
| | | | This is equivalent to raidautorun that some distros provide.
* Support failing and removed of detached and faulty devices.Neil Brown2007-05-111-17/+91
| | | | | This if you unplug a device and udev removes the entry from /dev, you can still remove the device.
* Add new mode: --incrementalNeil Brown2006-12-211-0/+14
| | | | | --incremental allows arrays to be assembled one device at a time. This is expected to be used with udev.
* Central calls to ioctl BLKGETSIZENeil Brown2006-12-141-12/+1
| | | | Instead of opencoding the same thing everywhere.
* Check device is large enough before hot-add.Neil Brown2006-12-141-1/+35
| | | | This improves quality of error message.
* Mdassemble improvementsLuca Berra2006-10-161-0/+3
| | | | | | | | | From: Luca Berra <bluca@comedia.it> - Fix a bug where mdassemble didn't close a filedescriptor and so couldn't assembele stacked arrays. - Allow mdassemble, when run a second time, to mark all arrays as writable. This is useful if they are started read-only as is best at boot-time.
* Remove partitions from components of an md arrayNeil Brown2006-10-131-0/+1
| | | | They do nothing but cause confusion.
* Work around bug in --add handling for version-1 superblocksNeil Brown2006-06-261-3/+14
| | | | | | | | | In 2.6.17 (and prior), the dev_number is ignored when a device is added to an active array. Rather the first free number is used. So we work around this by making sure we use the first free number for dev_number. Description...
* Get --stop to honour --quietNeil Brown2006-06-021-1/+3
| | | | | | | And as a side effect, if --quiet isn't given, stopped devices are reported. Signed-off-by: Neil Brown <neilb@suse.de>
* Just updaqte copyright dates and email addressNeil Brown2006-05-191-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* fix write mostly for add and re-addNeil Brown2006-04-031-0/+2
| | | | | | | | | The following patch makes it possible to tag a device as write-mostly on --add and --re-add with a non-persistent superblock array. Previously, this was not working. Signed-Off-By: Paul Clements <paul.clements@steeleye.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Create missing /dev files where needed.Neil Brown2006-03-281-2/+2
| | | | | | | 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>
* Remove ident arg from getinfo_super;Neil Brown2006-03-271-2/+1
| | | | | | Add a 'name' field to 'info' to compensate. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix assembling of array with spares when verion-1 superblock is used.Neil Brown2005-09-121-1/+1
| | | | | | | As spared don't have a position in the raid array with verion-1 superblocks, we need to handle them a bit differently. Signed-off-by: Neil Brown <neilb@suse.de>
* Passes all tests, nearly ready for release.Neil Brown2005-08-261-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support internal bitmaps with format-1 superblocks.Neil Brown2005-08-251-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Assorted fixesNeil Brown2005-08-161-37/+107
| | | | | | | | | Support "--build"ing arrays with bitmaps. hot-removal of bitmaps --re-add of drives recently removed. assorted extra tests Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add 'quite' option and tidy up some tests.Neil Brown2005-08-151-7/+11
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add write-behind supportNeil Brown2005-08-091-0/+2
| | | | | | | | Currently this includes --write-behind to set level of write-behind supported --write-mostly to flag devices as write-mostly. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Assorted Fixes for multiple bugs.Neil Brown2005-08-041-5/+6
| | | | | | | Assemble would crash, or just not work. A few other problem found by a new test-suite. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Make hot-add work with v 1.0.1 superblocksNeil Brown2005-07-291-5/+2
| | | | | | Just some carelessness Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Make sure we try hard enough to find a component device..Neil Brown2005-07-061-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Retry --stop --scan until all stoppable devices have been stoppedNeil Brown2005-06-141-5/+6
| | | | | | This is needed to reliably stop stacked arrays Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support --grow --bitmap=internalNeil Brown2005-06-071-0/+4
| | | | | | | Adding a filebased bitmap is not yet supported, and this code is still under development. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Use ADD_NEW_DISK to hot-add to non-version-0 arraysNeil Brown2005-06-071-21/+50
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Fix embarassing bug in 1.10.0 which broke --addNeil Brown2005-04-111-3/+4
| | | | | | Use a different variable to old result of open Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Use O_EXCL when opening component devices to be assembled into an arrayNeil Brown2005-04-041-0/+8
| | | | | | | In 2.6, this will fail if the device is already in use, so we can detect this error more easily. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Change MAJOR() etc to major() etcNeil Brown2005-04-041-2/+2
| | | | | | | | | This allows for larger device number if glibc supports it (requires 2.3.3). Also fail before creating larger device number if glibc support isn't present. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* mdadm-1.8.0mdadm-1.8.0Neil Brown2004-11-011-0/+17
|
* mdadm-1.6.0mdadm-1.6.0Neil Brown2004-06-041-0/+21
|
* mdadm-1.3.0mdadm-1.3.0Neil Brown2003-07-281-0/+1
|
* mdadm-0.8.2mdadm-0.8.2Neil Brown2002-04-111-2/+2
|
* mdadm-0.8.1mdadm-0.8.1Neil Brown2002-04-051-3/+3
|
* mdadm-0.8mdadm-0.8Neil Brown2002-04-041-2/+1
|
* mdadm-0.7mdadm-0.7Neil Brown2002-03-081-2/+2
|
* mdctl-0.6mdctl-0.6Neil Brown2002-03-061-19/+31
|
* mdctl-0.5mdctl-0.5Neil Brown2001-08-231-1/+1
|
* mdctl-v0.4mdctl-v0.4Neil Brown2001-07-261-3/+16
|
* mdctl-v0.3mdctl-v0.3Neil Brown2001-06-141-1/+159
|
* mdctl-v0.2mdctl-v0.2Neil Brown2001-06-081-0/+43