summaryrefslogtreecommitdiffstats
path: root/Assemble.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove partitions from components of an md arrayNeil Brown2006-10-131-0/+4
| | | | They do nothing but cause confusion.
* Improve the message when mdadm detects similar superblocksNeil Brown2006-10-101-3/+6
| | | | | | | | If they are for a partition and a whole device (common case) they old message doesn't really cover the situation. So add the "overlap" option to the text. Also detect whether the device list was in mdadm.conf and act accordingly.
* More consistent honoring of --configfileNeil Brown2006-06-261-2/+2
| | | | | Never use /etc/mdadm.conf if --config file is given (previously some code used one, some used the other).
* Fix a recently introduced bug, and make --assemble more resilient to it.Neil Brown2006-06-261-0/+4
| | | | | | | 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)
* Avoid misdetection of overlapping partitions...Neil Brown2006-06-021-0/+19
| | | | | | | | | | | | | | | | As version-0.90 superblock don't record the superblock offset, it is possible for overlapping partitions, or a partition that starts on a 64K boundary in the whole device to result in mis-detection - one partition or device might be detected where the other was intended. To avoid this awkward possibility, we reject assembly attempts which seem to have two devices that are different but have the same version-0.90 superblock. To avoid this problem altogether, switch to version-1 metadata. Signed-off-by: Neil Brown <neilb@suse.de>
* check return status of all write/fwrite functions as required by glibc 2.4Neil Brown2006-05-291-1/+3
| | | | | | | | | | | | 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>
* Release 2.5mdadm-2.5Neil Brown2006-05-261-2/+7
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Make sure everything compiles...Neil Brown2006-05-261-1/+4
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support --auto-update-homehostNeil Brown2006-05-261-3/+31
| | | | | | | | | This can be used to bootstrape homehost tagging. If no arrays are found that are tagged, we look for any array and tag it. Signed-off-by: Neil Brown <neilb@suse.de>
* Support auto-assembling of stacked devicesNeil Brown2006-05-261-1/+19
| | | | | | and assorted bugfixes. Signed-off-by: Neil Brown <neilb@suse.de>
* Initial implementation of auto-assemblyNeil Brown2006-05-261-8/+60
| | | | | | This basically works, but needs various improvements and some tests. Signed-off-by: Neil Brown <neilb@suse.de>
* Allow autoassembly to choose it's own name for the array.Neil Brown2006-05-231-19/+32
| | | | | | | | | 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>
* When assembly arrays using incomplete detail, prefer arrays built for this host.Neil Brown2006-05-231-5/+35
| | | | | | | | 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>
* Reorganise Assemble code somewhat.Neil Brown2006-05-231-7/+30
| | | | | | | | | | | We make sure all devices can are consistent before doing any --update This saves us from updating some but not all of an array, and then aborting. It also means we can backtrack on out decisions, which we might want to do later. Signed-off-by: Neil Brown <neilb@suse.de>
* Make sure name matching for array assembly understand the possibility of a ↵Neil Brown2006-05-231-1/+21
| | | | | | | | | homehost This "--assemble --name=foo" on host 'bar' will assemble an array named 'foo' or 'bar:foo'. Signed-off-by: Neil Brown <neilb@suse.de>
* Allow --update=name to update the name during assembly.Neil Brown2006-05-231-1/+1
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Make sure homehost is set correctly when --update=uuidNeil Brown2006-05-231-7/+12
| | | | 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>
* New flag --no-degradedNeil Brown2006-05-191-9/+12
| | | | | | | | | Use to avoid starting arrays if there are fewer devices available than last time the array was started. This is only needed with --scan, as with --scan, that behaviour is the default. Signed-off-by: Neil Brown <neilb@suse.de>
* When updating uuid, update the bitmap as well - external bitmapsNeil Brown2006-05-161-0/+4
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support 'bitmap=' in mdadm.conf for auto-assembling arrays with write-intent ↵Neil Brown2006-03-291-1/+15
| | | | | | bitmaps in separate files. Signed-off-by: Neil Brown <neilb@suse.de>
* Allow resize to backup to a file.Neil Brown2006-03-271-2/+2
| | | | | | | | | | To support resizing an array without a spare, mdadm now understands --backup-file= which should point to a file for storing a backup of critical data. This can be given to --grow which will create the file, or --assemble which will restore from the file if needed. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove ident arg from getinfo_super;Neil Brown2006-03-271-5/+4
| | | | | | Add a 'name' field to 'info' to compensate. Signed-off-by: Neil Brown <neilb@suse.de>
* Release 2.4-pre1Neil Brown2006-03-201-0/+2
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support restarting of a reshape on --assembleNeil Brown2006-03-201-1/+32
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Assorted fixes...Neil Brown2006-01-271-1/+3
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Support updating of uuid during --assemble.Neil Brown2005-12-051-2/+16
| | | | Signed-off-by: Neil Brown <neilb@suse.de>
* Allow event counters to be off by oneNeil Brown2005-12-051-1/+3
| | | | | | .. even without --force Signed-off-by: Neil Brown <neilb@suse.de>
* Improve option parsingNeil Brown2005-12-051-4/+1
| | | | | | | | stuff ====Do Not Remove==== Status: ok Signed-off-by: Neil Brown <neilb@suse.de>
* Allow scanning of devices listed in /proc/partitions independant of /devNeil Brown2005-12-051-5/+5
| | | | | | | If a device found in /proc/partitions isn't listed in /dev, then mknod a temporary name and open that. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix assembling of array with spares when verion-1 superblock is used.Neil Brown2005-09-121-0/+6
| | | | | | | 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>
* Fix assembling of raid10 in the face of missing devices.Neil Brown2005-09-121-5/+12
| | | | | | | We now check if enough devices are present properly, so --force can be used to good effect. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix but when assembling v1 arraysNeil Brown2005-08-151-10/+12
| | | | | | | Because raid_disk and disk.number are not longer in-sync, it needed some work. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add 'quite' option and tidy up some tests.Neil Brown2005-08-151-43/+50
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support nameing of version-1 arrays.Neil Brown2005-08-091-3/+11
| | | | | | | --name is recognised in --create and --assemble name= is recognised in config file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Support fixing of byte-swapped superblocks.Neil Brown2005-08-091-0/+3
| | | | | | | Good for moving between little-endian and big-endian. Still needs documentation. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Assorted Fixes for multiple bugs.Neil Brown2005-08-041-1/+1
| | | | | | | 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>
* Document this...Neil Brown2005-07-181-1/+12
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Make --zero-superblock work for version 1 superblocks.Neil Brown2005-06-071-3/+3
| | | | | | This requires passing the supertype to store_super Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Fix a test that will allow arrays with bitmaps to be assembled.Neil Brown2005-06-071-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Initial bitmap supportNeil Brown2005-06-071-0/+7
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* super1Neil Brown2005-05-031-19/+19
| | | | | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Fix raid5 creation with new code. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Add a 'super-switch' so that different format superblocks can be used.Neil Brown2005-05-031-15/+21
| | | | | | | | This includes: adding --metadata= option to choose metadata format adding metadata= word to config file. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Separate sueprblock handling into separate fileNeil Brown2005-05-031-153/+88
| | | | 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-5/+5
| | | | | | | 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>
* Correct error message printed when the 'chosen_drive' cannot be added.Neil Brown2005-04-041-1/+1
| | | | Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
* Change MAJOR() etc to major() etcNeil Brown2005-04-041-4/+4
| | | | | | | | | 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.7.0mdadm-1.7.0Neil Brown2004-08-111-0/+5
|
* mdadm-1.5.0mdadm-1.5.0Neil Brown2004-01-221-17/+18
|
* mdadm-1.4.0mdadm-1.4.0Neil Brown2003-10-281-0/+27
|