1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git synced 2026-09-20 01:26:06 +00:00
No description
  • C 87.8%
  • Roff 9.1%
  • Shell 2.5%
  • Makefile 0.6%
Find a file
Mateusz Kusiak 8f8adb9cd6 Examine: Add rsync offset for native
During rebuild, mdadm examine will display "Recovery Offset" entry if
recovery is active. Add displaying "Resync Offset" for 0.90 and 1.x so
the behavior is consistent. Useful for checking resync progress on
offline array.

Signed-off-by: Mateusz Kusiak <mateusz.kusiak@graidtech.com>
2026-08-25 08:22:49 +02:00
.github build(deps): bump actions/checkout from 6 to 7 2026-06-26 07:49:21 +02:00
clustermd_tests clustermd_tests: control speed limits on both nodes 2026-07-14 10:49:19 +02:00
documentation Fix 'meaing' typo in mdadm.conf-example 2025-10-02 09:25:06 +02:00
misc mdcheck: don't stop mdcheck_continue.timer 2026-03-06 13:49:12 +01:00
systemd Makefile: install mdcheck and make its path configurable 2025-11-19 16:05:20 +08:00
tests mdadm: remove POSIX check 2025-05-14 08:28:59 +02:00
.gitignore mdadm: Respect config file location in man 2022-04-04 21:12:54 -04:00
Assemble.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
bitmap.c Coverity fixes resources leaks 2024-12-16 10:10:45 +01:00
bitmap.h mdadm: add support for new lockless bitmap 2026-01-27 09:36:30 +01:00
Build.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
CHANGELOG.md Release mdadm-4.6 2026-03-16 22:57:09 +08:00
config.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
COPYING Update COPYING file. 2011-08-18 12:55:24 +10:00
coverity-gcc-hack.h gcc-8 coverity hack 2018-06-04 14:49:59 -04:00
crc32.c Add zlib license to crc32.c 2012-10-03 18:17:26 +10:00
crc32.h Add crc32 files. 2008-05-15 16:48:10 +10:00
crc32c.c add crc32c and use it for r5l checksum 2015-10-30 17:38:28 +11:00
Create.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
Detail.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
dlink.c Examine.c: Fix memory leaks in Examine() 2024-09-10 10:56:56 +02:00
dlink.h dlink.h: Fix checkpatch warnings for function args 2024-09-10 12:18:32 +02:00
drive_encryption.c imsm: fix incorrect SATA TCG error msg 2026-03-13 09:53:41 +01:00
drive_encryption.h imsm: print disk encryption information 2024-04-02 08:29:15 +02:00
Dump.c add checking of return status on fstat calls 2024-05-21 09:11:31 +02:00
Examine.c mdadm: use kernel raid headers 2025-04-28 09:55:30 +02:00
Grow.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
Incremental.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
Kill.c mdadm.h: Add mdstat.h 2026-07-22 07:52:55 +02:00
lib.c mdadm: use standard libc nftw 2025-05-08 23:30:38 +08:00
MAINTAINERS.md Update MAINTAINERS.md 2026-01-21 07:24:59 +01:00
Makefile Makefile: detect corosync and libdlm via pkg-config 2026-03-03 08:20:27 +01:00
Manage.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
managemon.c mdadm.h: Add mdstat.h 2026-07-22 07:52:55 +02:00
mapfile.c mapfile: add mapfile configuration struct 2026-08-11 08:33:37 +02:00
mapfile.h mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
maps.c Allow RAID0 to be created with v0.90 metadata #161 2025-04-10 11:35:36 +02:00
md.4 md.man: Remove refferences to not supported kernel 2024-11-05 13:36:43 +01:00
md5.h mdadm fix compilation for uClibc 2009-02-02 09:53:51 +11:00
md_common.h mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
md_p.h imsm: PPL support 2017-03-29 11:32:49 -04:00
md_u.h Remove last traces of HOT_ADD_DISK 2019-11-27 10:19:54 -05:00
mdadm.8.in imsm: Update VROC branding for new ownership 2026-06-25 11:02:17 +02:00
mdadm.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
mdadm.conf.5.in IMSM, config: configurable OROM scanning 2026-07-14 10:50:42 +02:00
mdadm.h mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
mdadm_status.h mdadm: Do not start reshape before switchroot 2025-01-13 10:24:49 +01:00
mdmon.8 Release mdadm-4.6 2026-03-16 22:57:09 +08:00
mdmon.c mdadm.h: Add mdstat.h 2026-07-22 07:52:55 +02:00
mdmon.h mdadm.h: Add mdstat.h 2026-07-22 07:52:55 +02:00
mdmonitor.c mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
mdopen.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
mdstat.c mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
mdstat.h mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
monitor.c sysfs: functions for writing md/<memb>/state 2024-12-16 10:11:31 +01:00
msg.c mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
msg.h Remove lots of unnecessary white space. 2013-06-19 12:31:45 +10:00
part.h Fix bus error when accessing MBR partition records 2016-10-19 12:38:02 -04:00
platform-intel.c IMSM, config: configurable OROM scanning 2026-07-14 10:50:42 +02:00
platform-intel.h mdadm: add attribute nonstring for signature 2025-05-08 23:30:38 +08:00
policy.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
probe_roms.c Replace error prone signal() with sigaction() 2022-04-04 11:13:02 -04:00
probe_roms.h probe_roms: allow to probe expansion ROMs using vendor and device id. 2011-03-10 11:41:46 +11:00
pwgr.c Improve compiling for static binaries. 2006-05-29 04:09:21 +00:00
Query.c mapfile: add mapfile.h 2026-08-11 08:33:37 +02:00
raid5extend.c Remove spaces/tabs from ends of lines. 2007-12-14 20:13:43 +11:00
raid6check.8 Update raid6check man page 2025-10-07 07:27:47 +02:00
raid6check.c raid6check.c, restripe.c: Use 64-bit off_t across both musl and glibc 2026-02-04 21:30:02 +08:00
ReadMe.c Release mdadm-4.6 2026-03-16 22:57:09 +08:00
README.md imsm: Update VROC branding for new ownership 2026-06-25 11:02:17 +02:00
restripe.c raid6check.c, restripe.c: Use 64-bit off_t across both musl and glibc 2026-02-04 21:30:02 +08:00
sha1.c Define alignof using _Alignof when using C11 or newer 2023-03-19 12:15:52 -04:00
sha1.h Remove lots of unnecessary white space. 2013-06-19 12:31:45 +10:00
super-ddf.c super-ddf: fix mppe OOB read in examine_vd 2026-08-24 12:09:17 +08:00
super-gpt.c mdadm: add xmalloc.h 2024-09-27 11:16:22 +02:00
super-intel.c fix IMSM zero-length allocation and out-of-bounds write 2026-08-24 10:24:52 +08:00
super-mbr.c mdadm: add xmalloc.h 2024-09-27 11:16:22 +02:00
super0.c Examine: Add rsync offset for native 2026-08-25 08:22:49 +02:00
super1.c Examine: Add rsync offset for native 2026-08-25 08:22:49 +02:00
swap_super.c mdadm: use lseek consistently 2025-07-09 11:40:08 -04:00
sysfs.c mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
test clustermd_tests: control speed limits on both nodes 2026-07-14 10:49:19 +02:00
udev-md-clustered-confirm-device.rules udev rules: introduce rules for cluster-md to confirm device 2017-08-02 09:30:51 -04:00
udev-md-raid-arrays.rules udev: Use LUKS label if present 2026-05-05 10:27:46 +02:00
udev-md-raid-assembly.rules Incremental: support devnode in IncrementalRemove. 2024-09-10 12:24:25 +02:00
udev-md-raid-creating.rules Fix typo in new udev rule. 2017-05-05 11:07:00 -04:00
udev-md-raid-safe-timeouts.rules udev: adapt rules to systemd v247 2022-03-31 11:41:09 -04:00
udev.c udev: Fix memleak 2025-10-14 07:25:44 +02:00
udev.h udev: Move udev_block() and udev_unblock() into udev.c 2023-11-21 11:12:06 -05:00
util.c mdadm: Add define for magic +9 in version string 2026-07-22 07:52:55 +02:00
uuid.c uuid.c: split uuid stuffs from util.c 2020-05-18 20:10:39 -04:00
xmalloc.c super-ddf: optimize DDF header search for widely used RAID controllers 2025-02-03 11:19:00 +01:00
xmalloc.h super-ddf: optimize DDF header search for widely used RAID controllers 2025-02-03 11:19:00 +01:00

mdadm is a utility used to create and manage software RAID devices implemented through Multiple devices driver (MD) in kernel. It supports following RAID metadata formats:

  • Linux native RAID:

    Known as native or native RAID. First and default metadata format. Metadata management is implemented in MD driver.

  • Matrix Storage Manager Support (no reference, metadata format documentation is proprietary).

    Known as IMSM. Metadata format developed byIntel®. Currently, maintained by Graid Technology Inc. as a part of VROC solution. There are some functional differences between native and imsm. The most important difference is that the metadata is managed from userspace.

    CAUTION: imsm is compatible with Intel RST, however it is not officially supported. You are using it on your own risk.

  • Common RAID DDF Specification Revision

    IMPORTANT: DDF is in maintenance only mode. There is no active development around it. Please do not use it in new solutions.

Questions and Support

This Github site is not right place to ask if your are looking for:

  • support from Linux Raid Community;
  • support with kernel issues;

This is the place where development of mdadm application is done. Please, do not use for looking for support. You should always ask on Mailing List.

Please use issues if you have confirmation that issue you are experiencing is related to mdadm components:

  • mdadm;
  • mdmon;
  • raid6check;
  • swap_super;
  • test_stripe;
  • systemd services ( see systemd/);
  • udev rules;
  • manual pages (including md.man)

For example:

  • mdadm issues (e.g segfaults, memory leaks, crashes, bad communication with MD driver);
  • feature requests for mdadm;
  • suggestions or minor fixes requested (e.g. better error messages);

Generally, if you are not sure it is better to ask on Mailing List first.

How to Contribute

Effective immediately Github is the primary location for mdadm. Please use pull requests to contribute.

It was originally hosted on kernel.org. You can access the old repository here.

While this is the preferred contribution method, mailing list submissions are still welcome and will be handled as has always been the case for mdadm. Please add "mdadm:" to the subject to allow automation to create Github Pull Request and run checks.

NOTE: Maintainers may ask you to send RFC to mailing list if the proposed code requires consultation with kernel developers.

Kernel coding style is used. Please familiarize with general kernel submitting patches documentation. Formatting, tags and commit message guidelines applies to mdadm.

Checkpatch script is run on every patch in pull request so be sure that your commits are not generating issues. There are some excludes, so the best is to follow github checkpatch action result.

Pull Request are closed by Rebase and Merge option, so it requires to keep every commit meaningful. Kernel style requires that. The review changes must be pushed with push --force to the chosen branch, then Pull Request will be automatically updated.

Maintainers of mdadm repository on kernel.org

See Maintainers File.

Minimal supported kernel version

We do not support kernel versions below v3.10. Please be aware that maintainers may remove workarounds and fixes for legacy issues.

Dependencies

The following packages are required for compilation:

RHEL SLES Debian/Ubuntu
pkgconf pkg-config pkg-config
gcc gcc gcc
make make make
libudev-devel libudev-devel libudev-dev

Compiling mdadm

Run make command to compile mdadm.

Specifying more jobs e.g. make -j4 can decrease compilation time significantly.

Various values can be specified for the CXFLAGS variable to customize the build process:

  • Run make CXFLAGS=-ggdb to include gdb debugging information.
  • Run make CXFLAGS=-DDEBUG to enable additional debug information through dprintf statements and call traces.
  • Run make CXFLAGS=-DNO_LIBUDEV to compile without libudev.

To build with more than one option specified in CXFLAGS, separate each option with a space, e.g. make CXFLAGS="-ggdb -DDEBUG".

Additionally, the EXTRAVERSION variable can be set to build with user-friendly version label, useful when customizing mdadm builds or labeling some instance in between major releases, e.g. make EXTRAVERSION="custom-label".

Installing mdadm

Before installing mdadm, it is advised to uninstall vendor-provided packages (mdadm.deb, mdadm.rpm etc.) in order to avoid configuration issues.

Run make install command to install mdadm. This command invokes the following targets:

  • install-bin
  • install-man
  • install-udev

After installing mdadm, consider rebuilding initramfs to ensure the changes take effect.

List of installation targets:

  • Run make install-bin to install the mdadm and mdmon binary files.
  • Run make install-systemd to install the systemd services.
  • Run make install-udev to install the udev rules.
  • Run make install-man to install the manual pages (mdadm.8, md.4, mdadm.conf.5, mdmon.8).

The following targets are deprecated and should not be used:

  • install-static

License

It is released under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.