summaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAge
* "make test" should build "raid6check"NeilBrown2013-06-27
| | | | | | As there are selftests for raid6check. Signed-off-by: NeilBrown <neilb@suse.de>
* Makefile/version: use version/date from .git if possible.NeilBrown2013-06-25
| | | | | | | | If being built from a git tree, use the version and date information from the top commit rather than the hard-coded values. Signed-off-by: NeilBrown <neilb@suse.de>
* Make: CXFLAGS should be conditionally assigned.NeilBrown2013-06-24
| | | | | | | | | | As the Makefile encourages users to set CXFLAGS for extra flags, we should only conditionally set it. That way it can be over-ridden in the environment as well as on the command line. Suggested-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de> Signed-off-by: NeilBrown <neilb@suse.de>
* Remove lots of unnecessary white space.NeilBrown2013-06-19
| | | | | | | Now that I am using white-space mode in Emacs I can see all of this, and I don't like it :-) Signed-off-by: NeilBrown <neilb@suse.de>
* Makefile: add "-O3" to WARN_UNUSED options.NeilBrown2013-06-19
| | | | | | | | This finds more errors Also remove some trailing spaces. Signed-off-by: NeilBrown <neilb@suse.de>
* Add --dump / --restore functionality.NeilBrown2013-05-16
| | | | | | | | This allows the metadata on a device to be saved and later restored. This can be useful before experimenting on an array that is misbehaving. Suggested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* udev: Fix order of execution of the md rulesThomas Bächler2013-02-11
| | | | | | | | | | | Right now, the rules that run blkid on raid arrays are executed after the assembly rules. This means incremental assembly will always fail when raid arrays are again physical components of raid arrays. Instead of simply reversing the order, split the rules up into two files, one dealing with array properties and one dealing with assembly. Signed-off-by: NeilBrown <neilb@suse.de>
* Add support for launching mdmon via systemctl instead of fork/execJes Sorensen2013-02-05
| | | | | | | | | | If launching mdmon via systemctl fails, we fall back to the old method of fork/exec. This allows for having mdmon launched via systemctl which avoids problems with it getting killed by systemd due to it ending up in the parent's cgroup (udev). Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Makefile: remove "sh" from instructions for running 'test'.NeilBrown2012-11-20
| | | | | | | | 'test' is really a bash script more than an 'sh' script, so don't say "run 'sh ./test'", just say "run './test'". Reported-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: NeilBrown <neilb@suse.de>
* Move xmalloc et al into their own fileRobert Buchholz2012-09-10
| | | | | | | | This avoid code duplication for utilities that do not link to util.c and everything that comes with it, such as test_restripe and raid6check Signed-off-by: NeilBrown <neilb@suse.de>
* query udev dir via pkg-configSamuli Suominen2012-08-14
| | | | | | | | | | Since udev is moving its internal dir around, query it via pkg-config rather than hardcoding the old path. This should work with new/old versions. Signed-off-by: Samuli Suominen <ssuominen@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: NeilBrown <neilb@suse.de>
* mdassemble: split dietlibc logic into dedicated targetMike Frysinger2012-08-13
| | | | | | | This lets people run `make mdassemble` and get a sane build by default. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: NeilBrown <neilb@suse.de>
* fix handling of CPPFLAGSMike Frysinger2012-08-13
| | | | | | | | | The current Makefile ends up ignoring the system CPPFLAGS settings, so make sure we append the variable. Also, the old metadata logic has a typo with the flag name. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: NeilBrown <neilb@suse.de>
* Adjust to new standard of /runNeilBrown2012-05-03
| | | | | | | | Now that /run seems to be a good standard, make that the default for storing various run-time files, rather than /var/run or /dev/.mdadm. Signed-off-by: NeilBrown <neilb@suse.de>
* RAID-6 check standalone man pagePiergiorgio Sartor2011-08-09
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm/mdmon: use CFLAGS when linkingMike Frysinger2011-04-11
| | | | | | | | | | People often put flags that control ABI options into CFLAGS (like -mcpu) and don't duplicate them in LDFLAGS because most build systems nowadays (like autotools) use both when linking. So make that work with mdadm's custom build system too. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: NeilBrown <neilb@suse.de>
* move .man targets from "all" to "man" - and "everything"Mike Frysinger2011-04-11
| | | | | | | | These .man files are never installed, nor generally used, so don't force people who generally want to build/install mdadm to build them up. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: NeilBrown <neilb@suse.de>
* RAID-6 check standalone md devicePiergiorgio Sartor2011-04-05
| | | | | | | | | | | | | | | | | | | | | Allow RAID-6 check to be passed only the MD device, start and length. The three parameters are mandatory. All necessary information is collected using the "sysfs_read()" call. Furthermore, if "length" is "0", then the check is performed until the end of the array. Some checks are done, for example if the md device is really a RAID-6. Nevertheless I guess it is not bullet proof... Next patch will include the "suspend" action. My idea is to do it "per stripe", please let me know if you've some better options. Signed-off-by: NeilBrown <neilb@suse.de>
* Split some of util.c into a new lib.cNeilBrown2011-04-05
| | | | | | | | | Some of util.c is dependent on lots of other code, some of it is stand-alone. Move some of the stand-alone stuff into a new lib.c so it can be used by smaller utilities. Signed-off-by: NeilBrown <neilb@suse.de>
* split name/number maps into separate file.NeilBrown2011-04-05
| | | | | | This reduced some interdependencies between files. Signed-off-by: NeilBrown <neilb@suse.de>
* RAID-6 check standalonePiergiorgio Sartor2011-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Neil, please find attached a patch, to mdadm-3.2 base, including a standalone versione of the raid-6 check. This is basically a re-working (and hopefully improvement) of the already implemented check in "restripe.c". I splitted the check function into "collect" and "stats", so that the second one could be easily replaced. The API is also simplified. The command line option are reduced, since we only level is raid-6, but the ":offset" option is included. The output reports the block/stripe rotation, P/Q errors and the possible HDD (or unknown). BTW, the patch applies also to the already patched "restripe.c", including the last ":offset" patch (which is not yet in git). Other item is that due to "sysfs.c" linking (see below) the "Makefile" needed some changes, I hope this is not a problem. Next steps (TODO list you like) would be: 1) Add the "sysfs.c" code in order to retrieve the HDDs info from the MD device. It is already linked, together with the whole (mdadm) universe, since it seems it cannot leave alone. I'll need some advice or hint on how to do use it. I checked "sysfs.c", but before I dig deep into it maybe better to have some advice (maybe just one function call will do it). 2) Add the suspend lo/hi control. Fellow John Robinson was suggesting to look into "Grow.c", which I did, but I guess the same story as 1) is valid: better to have some hint on where to look before wasting time. 3) Add a repair option (future). This should have different levels, like "all", "disk", "stripe". That is, fix everything (more or less like "repair"), fix only if a disk is clearly having problems, fix each stripe which has clearly a problem (but maybe different stripes may belong to different HDDs). So, for the point 1) and 2) would be nice to have some more detail on where to look what. Point 3) we will discuss later. Thanks, please consider for inclusion, bye, pg Signed-off-by: NeilBrown <neilb@suse.de>
* extension of IncrementalRemove to store location (path-id) of removed devicePrzemyslaw Czarnowski2010-11-22
| | | | | | | | | | | | | | | | If the disk is taken out from its port this port information is lost. Only udev rule can provide us with this information, and then we have to store it somehow. This patch adds writing 'cookie' file in /dev/.mdadm/failed-slots directory in form of file named with value of f<path-id> containing the metadata type and uuid of the array (or container) that the device was a member of. The uuid is in exactly the same format as in the mapfile. FAILED_SLOTS_DIR constant has been added to hold the location of cookie files. Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Add gpt pseudo-metadataNeilBrown2010-09-06
| | | | | | This allows mdadm to work with gpt metadata to a limited extent. Signed-off-by: NeilBrown <neilb@suse.de>
* Add mbr pseudo metadata handler.NeilBrown2010-09-06
| | | | | | | | | | | | To support incorpating a new bare device into a collection of arrays - one partition each - mdadm needs a modest understanding of partition tables. The main needs to be able to recognise a partition table on one device and copy it onto another. This will be done using pseudo metadata types 'mbr' and 'gpt'. Signed-off-by: NeilBrown <neilb@suse.de>
* Add policy framework.NeilBrown2010-09-06
| | | | | | | | | | | | | | | | | | Policy can be stated as lines in mdadm.conf like: POLICY type=disk path=pci-0000:00:1f.2-* action=ignore domain=onboard This defines two distinct policies which apply to any disk (but not partition) device reached through the pci device 0000:00:1f.2. The policies are "action=ignore" which means certain actions will ignore the device, and "domain=onboard" which means all such devices as treated as being united under the name 'onboard'. This patch just adds data structures and code to read and manipulate them. Future patches will actually use them. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix compile error on non-x86 systems.NeilBrown2010-09-03
| | | | | | | -z is not an option for 'gcc', it is an option for the loader!! Reported-by: Debian build system Signed-off-by: NeilBrown <neilb@suse.de>
* Don't link mdadm with pthreadsNeilBrown2010-08-06
| | | | | | | Only mdmon needs pthreads, so link accordingly. Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: martin f krafft <madduck@madduck.net>
* Release mdadm-3.1.3NeilBrown2010-08-06
| | | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Compile with -Wextra by defaultNeilBrown2010-08-05
| | | | | | This produced lots of warning, some of which pointed to actual bugs. Signed-off-by: NeilBrown <neilb@suse.de>
* Switch from /lib/init/rw to /dev for early-boot files.NeilBrown2010-07-28
| | | | | | | | | It turns out that /lib/init/rw doesn't exist in early boot like I thought. So give up on that idea and just use /dev/.mdadm/ for files that must persist from early-boot to regular boot. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix all the confusion over directories once and for all.Doug Ledford2010-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have 3 directory definitions: mdmon directory for its pid and sock files (compile time define, not changable at run time), mdmonitor directory which is for the mdadm monitor mode pid file (can only be passed in via command line at the time mdadm is invoked in monitor mode), and the directory for the mdadm incremental assembly map file (compile time define, not changable at run time). Only the mdadm map file still hunts multiple locations, and the number of locations has been reduced to /var/run and the compile time specified location. Re-use of similar sounding defines that actually didn't denote their actual usage at compile time made it more difficult for a person to know what affect changing the compile time defines would have on the resulting programs. This patch renames the various defines to clearly identify which item the define affects. It also reduces the number of various directories which will be searched for these files as this has lead to confusion in mdadm and mdmon in terms of which files should take precedence when files exist in multiple locations, etc. It's best if the person compiling the program intentionally and with planning selects the right directories to be used for the various purposes. Which directory is right depends on which items you are talking about and what boot loader your system uses and what initramfs generation program your system uses. Because of the inter-dependency of all these items it would typically be up to the distribution that mdadm is being integrated into to select the correct values for these defines. Signed-off-by: Doug Ledford <dledford@redhat.com>
* mdmon: satisfy glibc tls abi requirements with pthreadsDan Williams2010-07-06
| | | | | | | | | | | | | Setting up a proper tls descriptor is required to conform to the abi [1]. Until it can be implemented in mdmon use pthreads instead of clone(2) to let glibc handle the details. The old behaviour can be had by un-defining USE_PTHREADS. Note, the "O2" builds need LDFLAGS now to pick up the '-pthread' option. [1]: http://people.redhat.com/drepper/tls.pdf Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* mdmon: prevent allocations due to late bindingDan Williams2010-07-01
| | | | | | | | | | | | | | | | Current versions of glibc do not provide a useable interface to clone(2) as it inflicts hidden dependencies on setting up a glibc specific tls descriptor. The dynamic linker trips this dependency and causes mdmon to intermittently fail to load. Resolving all dynamic linking prior to starting the monitor thread appears to mitigate the issue but there is no guarantee that another tls dependency will bite us later. However, while the debate continues with the glibc maintainers it seems prudent to keep this change. It ensures that we do not get into a situation where the monitor thread needs to make a late allocation to resolve a symbol. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* Compile-time switch to enable 0.9 metadata as defaultmartin f. krafft2010-05-31
| | | | | | | | | | | | | | | | | | | | | | This commit introduces DEFAULT_OLD_METADATA as a preprocessor definition. If defined, it causes mdadm to assume metadata version 0.9 as default. If not defined, version 1.x (currently 1.2) is used as default. The man page mdadm.8 is also modified to reflect the chosen default. The selftests will not work if the old default is chosen. This patch was requested by Debian so they could distribute a current mdadm together with boot loaders that only understand 0.90 metadata for md-raid. Preferred usage is simply make DEFAULT_OLD_METADATA=yes Signed-off-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
* Fixup default definitions of VAR_RUN and ALT_RUNDan Williams2010-04-15
| | | | | | | | | I suspect commit c132678b wanted VAR_RUN and ALT_RUN to be suffixed by '/mdadm' to match the defaults in mdadm.h. Cc: Luca Berra <bluca@comedia.it> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* mapfile: if we putting the mapfile in a custom location via ALT_RUN, allowDoug Ledford2010-03-24
| | | | | | a custom filename too. Signed-off-by: Doug Ledford <dledford@redhat.com>
* Release mdadm-3.1.2NeilBrown2010-03-10
|
* allow redefinition of VAR_RUNLuca Berra2010-03-03
| | | | | | | having mdmon socket under var is painful at shutdown time Signed-off-by: Luca Berra <bluca@comedia.it> Signed-off-by: NeilBrown <neilb@suse.de>
* Add _FORTIFY_SOURCE to mdadm.O2 build.NeilBrown2010-03-03
| | | | | | | | | | When building mdadm.O2, set _FORTIFY_SOURCE to get more warnings, and also build mdmon.O2 to find warnings in that code too. Then fix the warnings. Suggested-by: Luca Berra <bluca@comedia.it> Signed-off-by: NeilBrown <neilb@suse.de>
* mdmon: allow pid to be stored in different directory.NeilBrown2010-02-04
| | | | | | | | /var/run probably doesn't persist from early boot. So if necessary, store in in /lib/init/rw or somewhere else that does persist. Signed-off-by: NeilBrown <neilb@suse.de>
* Move WaitClean from Monitor.c to sysfs.cNeilBrown2009-06-02
| | | | | | That way mdmon doesn't need to include Monitor.o Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm.8: Man page updatesNeilBrown2009-06-02
| | | | General review and update of mdadm.8
* Merge branch 'master' into devel-3.0NeilBrown2009-05-11
|\ | | | | | | | | | | | | | | Conflicts: Build.c mdadm.c mdadm.h super1.c
| * Makefile: use $(CC) more consistently.NeilBrown2009-04-29
| | | | | | | | | | Explicitly calling 'gcc' in some rules makes it hard to test with other compilers.
* | Makefile: build 'mdmon' for 'test'NeilBrown2009-04-01
| | | | | | | | | | | | Else make test might not prepare everything for running tests.
* | Merge branch 'master' in devel-3.0NeilBrown2009-03-10
|\|
| * Release mdadm-2.6.9NeilBrown2009-03-10
| |
* | Merge branch 'master' into devel-3.0NeilBrown2009-02-02
|\|
| * mdadm fix compilation for uClibcBernhard Reutner-Fischer2009-02-02
| | | | | | | | | | | | | | | | | | | | | | 2008-12-08 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> * Makefile (dadm.uclibc): Remove misspelled and unneeded rule. * md5.h: Include stdint.h for uClibc. * mdadm.h: uClibc defines __UCLIBC__. If uClibc has LFS off then use lseek instead of lseek64. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | imsm: validate arrays being created against firmware capabilitiesDan Williams2008-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These checks are only enabled when platform support for imsm is found, i.e. ahci driver is loaded and talking to an Intel(R) controller, and the option rom header is located. They can be turned off by setting the environment variable IMSM_NO_PLATFORM to 1. Signed-off-by: Dan Williams <dan.j.williams@intel.com>