$ git log --pretty=format:'%h %s (%cs)%d'
3822896a github: disable self-runners (2025-10-29)
(HEAD -> master, main)
6fa6c4b9 mdadm/Assemble: alloc superblock in Assemble (2025-10-27)
d354d314 mdadm: Create array with sync del gendisk mode (2025-10-27)
868376e0 Update README.md (2025-10-27)
abb9a2b0 mdadm/sysfs: close fd before return (2025-10-21)
804a6a6b mdadm/Incremental: wait a while before removing a member (2025-10-21)
ca102481 mdadm: Fix memory leak issue in load_ddf_local() (2025-10-16)
b67f6f01 mdadm: Fix memory leak issue in Manage_stop() (2025-10-16)
7cb225b4 mdadm: Fix memory leak issue in check_raid() (2025-10-16)
c425cdc9 mdadm: modify the order of free_super_xxx() to avoid memory leak (2025-10-16)
...
$ git cat-file blob HEAD:README.md
**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](https://docs.kernel.org/admin-guide/md.html#superblock-formats):
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 and maintained by **Intel®** 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](https://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf)
**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](https://lore.kernel.org/linux-raid/).
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](https://lore.kernel.org/linux-raid/) first.
# How to Contribute
Effective immediately [Github](https://github.com/md-raid-utilities/mdadm) is the primary
location for **mdadm**. Please use pull requests to contribute.
It was originally hosted on [kernel.org](https://kernel.org/). You can access the old repository
[here](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git).
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](https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html)
documentation. Formatting, tags and commit message guidelines applies to **mdadm**.
[Checkpatch](https://docs.kernel.org/dev-tools/checkpatch.html) 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](MAINTAINERS.md).
# 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**.
# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
main github: disable self-runners (2025-10-29)
* master github: disable self-runners (2025-10-29)
mdadm-3.3.x Release mdadm-3.3.4 (2015-08-03)
cluster Reuse calc_bitmap_size to reduce code size (2015-06-17)
mdadm-3.2.x Release 3.2.6 - stability release (2012-10-25)
data_offset mdadm: Fix Segmentation fault. (2012-06-05)
r10-reshape super1: reserve at least 2 chunks for reshape headroom. (2012-05-09)
devel-3.3 Bad block log (2011-07-27)
devel-3.2 open_dev_excl: allow device to be read-only. (2011-03-24)
hotunplug Update udev rules for hotplug support. (2010-04-09)
...
# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
--format='%(refname:short) %(subject) (%(creatordate:short))'
mdadm-4.2 Release mdadm-4.2 (2021-12-30) tar.gz
mdadm-4.2-rc3 mdadm-4.2-rc3 (2021-11-03) tar.gz
mdadm-4.2-rc2 mdadm-4.2-rc2 (2021-08-02) tar.gz
mdadm-4.2-rc1 Release mdadm-4.2-rc1 (2021-04-14) tar.gz
mdadm-4.1 mdadm-4.1 (2018-10-01) tar.gz
mdadm-4.1-rc2 mdadm-4.1-rc2 (2018-08-03) tar.gz
mdadm-4.1-rc1 mdadm-4.1-rc1 (2018-03-26) tar.gz
mdadm-4.0 mdadm-4.0 (2017-01-09) tar.gz
mdadm-3.4 mdadm-3.4 - feature release (2016-01-28) tar.gz
mdadm-3.3.4 mdadm-3.3.4 - important bugfix release (2015-08-03) tar.gz
...
# associated public inboxes:
# (number on the left is used for dev purposes)
1824 linux-raid
113 lkml
31 linux-arm-kernel
30 qemu-devel
29 linux-devicetree
26 linux-block
24 netdev
24 u-boot
23 dm-devel
20 dpdk-dev
19 git
18 stable
18 dri-devel
16 linux-media
16 xen-devel
15 intel-gfx
14 linux-mm
14 linuxppc-dev
13 linux-mediatek
13 linux-fsdevel
12 openembedded-core
11 linux-wireless
11 linux-gpio
11 buildroot
10 bpf
10 alsa-devel
10 linux-scsi
10 kvm
9 linux-nfs
9 linux-btrfs
9 linux-ext4
9 amd-gfx
8 linux-xfs
8 linux-crypto
8 linux-acpi
8 netfilter-devel
8 linux-mips
8 linux-kselftest
8 linux-clk
8 linux-doc
8 linux-omap
8 linux-arch
8 linux-s390
8 openembedded-devel
7 linux-mtd
7 linux-riscv
7 linux-arm-msm
7 linux-pm
7 kvmarm
7 linux-rdma
7 linux-f2fs-devel
7 linux-mmc
7 ceph-devel
7 linux-rockchip
7 linux-sh
7 intel-xe
6 fstests
6 linux-rtc
6 linux-iio
6 linux-bluetooth
6 linux-ide
6 linux-perf-users
6 kernel-janitors
6 nvdimm
6 ltp
6 yocto-meta-arm
6 yocto-meta-virtualization
6 yocto-meta-arago
6 linux-um
6 igt-dev
5 linux-nvme
5 linux-cifs
5 linux-amlogic
5 linux-iommu
5 linux-hwmon
5 linux-input
5 linux-usb
5 linux-renesas-soc
5 linux-parisc
5 linux-pci
5 linux-watchdog
5 linux-m68k
5 linux-csky
5 cip-dev
5 linux-spi
5 linux-tegra
5 linux-kbuild
5 platform-driver-x86
5 openbmc
5 linux-fbdev
5 rust-for-linux
5 sparclinux
5 linux-patches
5 yocto-meta-ti
5 b4-sent
5 grub-devel
5 linux-hexagon
5 linux-sound
4 linux-samsung-soc
4 linux-snps-arc
4 selinux
4 dmaengine
4 linux-leds
4 linux-security-module
4 linux-modules
4 linux-serial
4 linux-trace-devel
4 backports
4 linux-i2c
4 linux-remoteproc
4 linux-bcache
4 linux-pwm
4 virtualization
4 linux-can
4 linux-hardening
4 linux-cxl
4 linux-staging
4 llvm
4 iwd
4 yocto
4 yocto-meta-freescale
4 bitbake-devel
4 openrisc
4 intel-wired-lan
4 kexec
4 loongarch
4 imx
4 linux-trace-kernel
4 qemu-riscv
4 linux-alpha
4 u-boot-amlogic
4 yocto-patches
4 barebox
3 linux-efi
3 linux-integrity
3 linux-edac
3 linux-erofs
3 linux-nvdimm
3 linux-rt-users
3 linux-hyperv
3 rcu
3 linux-i3c
3 util-linux
3 linux-man
3 linux-api
3 linux-sparse
3 linux-fpga
3 soc
3 nouveau
3 linux-sunxi
3 linux-coco
3 fio
3 yocto-toaster
3 yocto-docs
3 chrome-platform
3 xenomai
3 poky
3 linux-ia64
3 kdevops
3 reiserfs-devel
3 fuego
3 dtrace
3 linux-aspeed
2 cocci
2 live-patching
2 driverdev-devel
2 linux-sgx
2 workflows
2 linux-wpan
2 wireguard
2 io-uring
2 linux-unionfs
2 linux-firmware
2 lttng-dev
2 containers
2 phone-devel
2 dash
2 keyrings
2 target-devel
2 ocfs2-devel
2 linux-phy
2 mptcp
2 regressions
2 ntfs3
2 ofono
2 outreachy
2 damon
2 oe-kbuild-all
2 batman
2 virtio-comment
2 v9fs
2 ecryptfs
2 cluster-devel
2 cgroups
2 devicetree-compiler
2 kvm-ppc
2 linux-nilfs
2 lvs-devel
2 lvm-devel
2 perfbook
2 virtio-fs
1 linux-fscrypt
1 kernel-hardening
1 linux-next
1 kernelnewbies
1 selinux-refpolicy
1 keys
1 linux-spdx
1 ksummit-discuss
1 linux-kernel-mentees
1 tpmdd-devel
1 linux-audit
1 linux-dash
1 mm-commits
1 xdp-newbies
1 linux-sctp
1 lustre-devel
1 ath10k
1 ath11k
1 ksummit
1 b43-dev
1 linux-nfc
1 linux-bcachefs
1 ath9k-devel
1 linux-ppp
1 ell
1 ntb
1 asahi
1 ath12k
1 oe-linux-nfc
1 oe-chipsec
1 fsverity
1 virtio-dev
1 kbd
1 autofs
1 cpufreq
1 dccp
1 devicetree-spec
1 initramfs
1 hail-devel
1 kvm-ia64
1 linux-8086
1 kernel-testers
1 linux-btrace
1 linux-embedded
1 linux-hams
1 linux-hotplug
1 linux-laptop
1 trinity
1 linux-metag
1 linux-x25
1 netfilter
1 linux-oxnas
1 lm-sensors
1 acpica-devel
1 smatch
1 spdk
1 wireless-regdb
1 netfs
1 powertop
1 kvm-riscv
1 sophgo
git clone https://yhbt.net/lore/pub/scm/linux/kernel/git/mtkaczyk/mdadm-test.git