summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Updates some URLs in the man page.Neil Brown2008-04-282-4/+9
| | | | Particularly, add the wiki on osdl.org
* Print 'Events' more sensibly.Neil Brown2008-04-282-1/+5
| | | | Instead of MSW.LSW, just print it as a 64bit number.
* Fix problems with array.size overflowing on large arrays.Neil Brown2008-04-283-3/+14
| | | | | | | | | | | 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.
* Fix for segfault when reading /proc/mdstatNeil Brown2008-04-284-0/+19
| | | | | | | | | 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.
* Use sysfs info for metadata version info in Detail and elsewhere.Neil Brown2007-12-143-13/+38
|
* Replace sysarray with mdinfoNeil Brown2007-12-146-63/+61
| | | | | Sure, mdinfo is bigger, but having a uniform structure for lots of things will make life easier.
* Use 'mdinfo' instead of special 'sysdev' structure.Neil Brown2007-12-145-88/+86
| | | | | there is needless duplicatiion between mdinfo and sysdev, so discard the latter.
* Some tidy up of 'devices' in assemble.Neil Brown2007-12-141-56/+56
| | | | | use "mdinfo" in the devices list rather than just copying ad-hoc fields in.
* Don't record oldmajor/oldminor any more during assemble.Neil Brown2007-12-141-3/+0
| | | | We don't use the information at all (any longer).
* Find super from fd on an array.Neil Brown2007-12-145-21/+53
| | | | | 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-1414-325/+330
| | | | It is now in the 'supertype'
* Fix compare_super to take supertype instead of a superblock.Neil Brown2007-12-145-13/+19
| | | | | As this function takes 2 superblocks, the change is a bit more subtle, so is done separately.
* Add 'supertype' arg to almost all metadata methods.Neil Brown2007-12-1413-117/+128
| | | | The 'superblock' will be moved into this structure soon.
* Allow metadata handlers to free their own superblock.Neil Brown2007-12-1411-54/+64
| | | | | | As the metadata handler allocates the superblock, it should free it too. DDF will have a more complex 'superblock' which needs more complex freeing.
* Make sure sysfs_read never succeeds for a non-MD device.Neil Brown2007-12-141-1/+4
| | | | ... just in case.
* Remove spaces/tabs from ends of lines.Neil Brown2007-12-1423-125/+120
|
* A recent patch broke --create --level=faulty - fix it.Neil Brown2007-11-291-0/+1
| | | | Thanks to Martin Bene.
* Add metadata version information to "--detail --brief" output.Neil Brown2007-11-131-1/+4
|
* Release 2.6.4mdadm-2.6.4Neil Brown2007-10-198-5/+43
|
* 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.
* Add some extra consistency checks based on level.Neil Brown2007-10-172-6/+21
| | | | Also use LEVEL_LINEAR, LEVEL_MULTIPATH in place of -1 or -4 in a few places.
* Clarify the avail/used devices sizes with version1 superblock.Neil Brown2007-10-171-2/+2
| | | | | Not all of the device may be available. Of that, not all may be used (if devices are of different sizes).
* Make sure --auto=mdp is honoured properlyNeil Brown2007-10-171-0/+1
| | | | | This would only create partitioned devices if the device name was a 'standard' name. This this patch, any name will work.
* Fix restarting of a reshaping array.Neil Brown2007-10-161-0/+21
| | | | | | | | The last release broke the ability to assemble an array that was in the middle of a reshape. This patch adds code to test if the critical section needs to be restored or not so that - if we have failed to restore it, we know whether to fail or not.
* Also use &tst instead of st later on when loading v1 superblocksJérémy Bobbio2007-10-011-1/+1
|
* Fix segfault on assembly on amd64 with v1 superblocksmartin f. krafft2007-09-301-1/+1
| | | | | | | | Commit a40b4fe introduced a temporary supertype variable tst, instead of manipulating st directly. However, it was forgotton to pass &tst into the recursive load_super1 call, causing an infinite recursion. Signed-off-by: martin f. krafft <madduck@debian.org>
* Monitor.c s/MAXINT/INT_MAX/gmaximilian attems2007-09-271-6/+6
| | | | | | | include limits.h directly instead of values.h Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* mdopen.c don't shadow major() and minor()maximilian attems2007-09-271-32/+32
| | | | | | | s/(major|minor)/\1_num/ Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* Monitor.c include signal.h directlymaximilian attems2007-09-271-1/+1
| | | | | | | another small step for better klibc support, glibc compile tested. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* Add ANNOUNCE-2.6.1 to gitNeil Brown2007-09-241-0/+33
| | | | | Somehow this missed out of getting into .git even though it is in all tha tar-balls.
* Don't corrupt 'supertype' when speculatively calling load_super1Neil Brown2007-09-241-9/+10
| | | | | | | | When load_super1 is trying to see which sub-version of v1 superblock is present, failure will cause it to clear st->ss, which is not good. So use a temporary 'super_type' for the 'test if this version works' calls, then copy that into 'st' on success.
* config.c include dirent.h instead sys/dir.hmaximilian attems2007-09-241-1/+1
| | | | | | | | | | sys/dir.h is an old BSD'ism, include dirent directly. small step for better klibc support. compile tested against glibc. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* Create.c s/major/major_num/maximilian attems2007-09-241-4/+4
| | | | | | | 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>
* Add klibc support to mdadm.hmaximilian attems2007-09-241-1/+8
| | | | | | | | klibc still misses a lot functionality to let mdadm link against, this small step helps to get to the real trouble.. :) Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
* 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...
* Explain the read-balancing algorithm for RAID1 better in md.4Iustin Pop2007-09-115-0/+7
| | | | | | | | | | | From: Iustin Pop <iusty@k1024.org> There are many questions on the mailing list about the RAID1 read performance profile. This patch adds a new paragraph to the RAID1 section in md.4 that details what kind of speed-up one should expect from RAID1. Signed-off-by: Iustin Pop <iusty@k1024.org>
* Release 2.6.3mdadm-2.6.3Neil Brown2007-08-207-7/+52
|
* Update changelogNeil Brown2007-08-201-0/+9
|
* Report error when grow cannot be restarted.Neil Brown2007-08-202-3/+5
| | | | | | 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.
* Fix error message when adding a device that is too small.Neil Brown2007-08-202-6/+8
| | | | | We were multiplying MD_RESERVED_SECTORS by 1024 instead of 512, so lots of 'is it too small' checks were wrong.
* Fix problem with add a device to a 1.x array created with older mdadm.Neil Brown2007-08-206-0/+7
| | | | | | 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).
* Reject '--bitmap none' for build and create.Neil Brown2007-07-231-1/+7
| | | | | We don't want to create a file called 'none', and it isn't needed, so just reject it.
* "--export" segfaults with non-persistent super blocksTim Woods2007-07-231-1/+2
| | | | | | | From: Tim Woods <timwoods@uklinux.net> This patch fixes a NULL pointer dereference in Detail.c when running 'mdadm --detail --export' on a device with non-persistent super blocks.
* In the MISC MODE section in mdadm(8), the names of the options should beNeil Brown2007-07-231-8/+8
| | | | | | | | in bold. -- AYM 2007-01-14 diff -ur mdadm-2.6/mdadm.8 mdadm-2.6-man1/mdadm.8
* Substantial corrections to man pages.Scott Weikart2007-07-134-159/+156
| | | | | | From: "Scott Weikart" <Scott.W@Benetech.org> Thanks Scott!
* Typo in man page: Multipath has an L ...Neil Brown2007-07-111-1/+1
|
* Allow "--write-behind=" to be done in grow mode.Ian Dall2007-07-092-0/+4
| | | | | | | | | 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.
* Enhance raid4 support: --assemble and --monitor wasn't quite happy with it.Doug Ledford2007-07-093-8/+10
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix parsing of "-a" in various contexts.Doug Ledford2007-07-093-3/+8
| | | | | | | | | | | | From: Doug Ledford <dledford@redhat.com> This one fixes a bug where once manage mode is set, the -a short option is no longer parsed correctly (true of grow mode as well). This happens because when you switch the short opts to the bitmap_auto version, it specifies that the argument must follow a, yet the loop expects to get an undecorated option and parse it as the disk dev instead of trying to parse optarg. So, create a new short opt array that is used for manage and grow that doesn't list a as having an argument.
* Mark some files FD_CLOEXEC to protect sendmail from them.Doug Ledford2007-07-092-1/+6
| | | | | | | | | | | From: Doug Ledford <dledford@redhat.com> When running with SELinux enabled and using mdadm to monitor devices, attempts to send emails to an admin will be blocked because mdadm is holding open /proc/mdstat without setting the FD_CLOEXEC flag. As a result, sendmail has an open descriptor to /proc/mdstat after the popen() call, which SELinux decides isn't really any of sendmail's business and so sendmail gets denied.