summaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAge
* 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>
* | Makefile: install udev file into $DESTDIRNeilBrown2008-11-07
| | | | | | | | | | | | Forgot the $DESTDIR in the install target :-( Signed-off-by: NeilBrown <neilb@suse.de>
* | config: add 'containers' as a DEVICE keywordDan Williams2008-11-04
| | | | | | | | | | | | | | Add anything that looks like a container in /proc/mdstat to the devlist Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* | Add udev rules file for mdadm.NeilBrown2008-11-04
| | | | | | | | This is based on the rules from openSUSE 11.1-rc3.
* | Makefile: Include bitmap.o in mdmonNeilBrown2008-10-27
| | | | | | | | | | | | | | A recent change causes mdmon to appear to need 'bitmap_sectors', which is in bitmap.o. Signed-off-by: NeilBrown <neilb@suse.de>
* | mdmon: wait after trying to killDan Williams2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | Now that mdmon handles sigterm if another monitor wants to take over it should wait until all managed arrays are clean. So make WaitClean() available to mdmon and teach try_kill_monitor() to wait on each subarray in the container. ...since we may be communicating with a dieing process, we need to block SIGPIPE earlier. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | trivial warn_unused_result squashingDan Williams2008-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made the mistake of recompiling the F9 mdadm rpm which has a patch to remove -Werror and add "-Wp,-D_FORTIFY_SOURCE -O2" which turns on lots of errors: config.c:568: warning: ignoring return value of asprintf Assemble.c:411: warning: ignoring return value of asprintf Assemble.c:413: warning: ignoring return value of asprintf super0.c:549: warning: ignoring return value of posix_memalign super0.c:742: warning: ignoring return value of posix_memalign super0.c:812: warning: ignoring return value of posix_memalign super1.c:692: warning: ignoring return value of posix_memalign super1.c:1039: warning: ignoring return value of posix_memalign super1.c:1155: warning: ignoring return value of posix_memalign super-ddf.c:508: warning: ignoring return value of posix_memalign super-ddf.c:645: warning: ignoring return value of posix_memalign super-ddf.c:696: warning: ignoring return value of posix_memalign super-ddf.c:715: warning: ignoring return value of posix_memalign super-ddf.c:1476: warning: ignoring return value of posix_memalign super-ddf.c:1603: warning: ignoring return value of posix_memalign super-ddf.c:1614: warning: ignoring return value of posix_memalign super-ddf.c:1842: warning: ignoring return value of posix_memalign super-ddf.c:2013: warning: ignoring return value of posix_memalign super-ddf.c:2140: warning: ignoring return value of write super-ddf.c:2143: warning: ignoring return value of write super-ddf.c:2147: warning: ignoring return value of write super-ddf.c:2150: warning: ignoring return value of write super-ddf.c:2162: warning: ignoring return value of write super-ddf.c:2169: warning: ignoring return value of write super-ddf.c:2172: warning: ignoring return value of write super-ddf.c:2176: warning: ignoring return value of write super-ddf.c:2181: warning: ignoring return value of write super-ddf.c:2686: warning: ignoring return value of posix_memalign super-ddf.c:2690: warning: ignoring return value of write super-ddf.c:3070: warning: ignoring return value of posix_memalign super-ddf.c:3254: warning: ignoring return value of posix_memalign bitmap.c:128: warning: ignoring return value of posix_memalign mdmon.c:94: warning: ignoring return value of write mdmon.c:221: warning: ignoring return value of pipe mdmon.c:327: warning: ignoring return value of write mdmon.c:330: warning: ignoring return value of chdir mdmon.c:335: warning: ignoring return value of dup monitor.c:415: warning: rv may be used uninitialized in this function ...some of these like the write() ones are not so trivial so save those fixes for the next patch. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Disable compilation with diet-libcNeilBrown2008-09-18
| | | | | | | | | | We need posix_memalign (or something similar) which diet-libc does not provide.
* | Makefile: Add mdmon header dependenciesDan Williams2008-09-15
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge branch 'master' into from-stableNeilBrown2008-08-07
|\| | | | | | | | | | | | | Conflicts: Create.c Manage.c
| * Add support for distribution specific build extensionsDoug Ledford2008-07-24
| | | | | | | | Signed-off-by: Doug Ledford <dledford@redhat.com>
* | install mdmon to the same location as mdadmJacek Danecki2008-07-21
| | | | | | | | Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge branch 'master' into devel-3.0Neil Brown2008-06-19
|\| | | | | | | | | | | Conflicts: Makefile
| * Include sysfs.c in mdassemble.autoNeil Brown2008-05-19
| | | | | | | | and tidy up Makefile a bit.
| * "make everything" now also makes mdassemble.autoNeil Brown2008-05-19
| | | | | | | | | | | | | | This is make MDASSEMBLE_AUTO=1 mdassemble.static so we now find compile bugs more easily.
* | start fleshing out socket code, ping monitor to see if it is aliveDan Williams2008-05-15
| | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Merge mdmonNeil Brown2008-05-15
| |
* | handle Manage_subdevs() for 'external' arraysDan Williams2008-05-15
| | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> 1/ Block attempts to add/remove devices from container members 2/ Forward add/remove requests to containers Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | imsm: initial Intel(R) Matrix Storage Manager supportDan Williams2008-05-15
| | | | | | | | | | | | | | | | | | | | From: Dan Williams <dan.j.williams@intel.com> The following now work: --examine --examine --brief Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Initial DDF support code.Dan Williams2008-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a ddf array by naming the device /dev/ddf* or specifying metadata 'ddf'. If ddf is specified with no level, assume a container (indeed, anything else would be wrong). **Need to use text_Version to set external metadata... More ddf support Load a ddf container. Now --examine /dev/ddf works. super-ddf: fix compile warning From: Dan Williams <dan.j.williams@intel.com> super-ddf.c:723: format %lu expects type long unsigned int, but argument 3 has type unsigned int Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* | Add crc32 files.Neil Brown2008-05-15
|/ | | | For ddf.
* Compile with various -O flags for testing.Neil Brown2007-05-22
| | | | | "make everything" now compiles with -O2 and -Os to increase coverage for compiler generated warnings.