summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ANNOUNCE-3.098
-rw-r--r--ANNOUNCE-3.0.122
-rw-r--r--ANNOUNCE-3.0.221
-rw-r--r--ANNOUNCE-3.0.329
-rw-r--r--ANNOUNCE-3.133
-rw-r--r--ANNOUNCE-3.1.139
-rw-r--r--ANNOUNCE-3.1.246
-rw-r--r--ANNOUNCE-3.1.346
-rw-r--r--ANNOUNCE-3.1.437
-rw-r--r--ANNOUNCE-3.1.542
-rw-r--r--ANNOUNCE-3.277
-rw-r--r--ANNOUNCE-3.2.175
-rw-r--r--ANNOUNCE-3.2.236
-rw-r--r--ANNOUNCE-3.2.324
-rw-r--r--ANNOUNCE-3.2.4144
-rw-r--r--ANNOUNCE-3.2.531
-rw-r--r--ANNOUNCE-3.2.657
-rw-r--r--ANNOUNCE-3.363
-rw-r--r--ANNOUNCE-3.3.123
-rw-r--r--ANNOUNCE-3.3.216
-rw-r--r--ANNOUNCE-3.3.318
-rw-r--r--ANNOUNCE-3.3.437
-rw-r--r--ANNOUNCE-3.424
-rw-r--r--ANNOUNCE-4.022
-rw-r--r--ANNOUNCE-4.116
-rw-r--r--ANNOUNCE-4.219
-rw-r--r--Assemble.c2
-rw-r--r--Build.c6
-rw-r--r--CHANGELOG.md368
-rw-r--r--ChangeLog306
-rw-r--r--Create.c58
-rw-r--r--Detail.c57
-rw-r--r--Grow.c32
-rw-r--r--Incremental.c78
-rw-r--r--MAINTAINERS.md44
-rw-r--r--Makefile4
-rw-r--r--Manage.c195
-rw-r--r--Monitor.c66
-rw-r--r--README.initramfs122
-rw-r--r--README.md83
-rw-r--r--TODO213
-rw-r--r--config.c25
-rw-r--r--debian/changelog2454
-rw-r--r--debian/control45
-rw-r--r--debian/copyright32
-rw-r--r--debian/local/apport/source_mdadm.py60
-rwxr-xr-xdebian/local/bin/checkarray221
-rwxr-xr-xdebian/local/bin/mkconf104
-rw-r--r--debian/local/doc/FAQ669
-rw-r--r--debian/local/doc/README.checkarray33
-rw-r--r--debian/local/doc/README.recipes168
-rwxr-xr-xdebian/local/initramfs-tools/local-block/mdadm61
-rwxr-xr-xdebian/local/initramfs-tools/local-bottom/mdadm3
-rwxr-xr-xdebian/local/reportbug/script219
-rw-r--r--debian/mdadm-udeb.install2
-rw-r--r--debian/mdadm.TODO29
-rw-r--r--debian/mdadm.config61
-rw-r--r--debian/mdadm.docs2
-rw-r--r--debian/mdadm.examples2
-rw-r--r--debian/mdadm.initramfs-hook117
-rw-r--r--debian/mdadm.install7
-rw-r--r--debian/mdadm.lintian-overrides5
-rw-r--r--debian/mdadm.logcheck.ignore.server23
-rw-r--r--debian/mdadm.logcheck.violations3
-rw-r--r--debian/mdadm.maintscript4
-rw-r--r--debian/mdadm.manpages1
-rw-r--r--debian/mdadm.mdadm-shutdown.service22
-rw-r--r--debian/mdadm.modprobe8
-rwxr-xr-xdebian/mdadm.postinst111
-rwxr-xr-xdebian/mdadm.postrm23
-rw-r--r--debian/mdadm.templates55
-rw-r--r--debian/not-installed3
-rw-r--r--debian/patches/debian/0001-fix-manpages.patch163
-rw-r--r--debian/patches/debian/0002-mdmonitor-service-simplify.patch17
-rw-r--r--debian/patches/debian/0003-host-name-in-default-mailfrom.patch17
-rw-r--r--debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch23
-rw-r--r--debian/patches/debian/0005-sha1-includes.patch40
-rw-r--r--debian/patches/debian/0006-readlink-path.patch23
-rw-r--r--debian/patches/debian/0007-no-Werror.patch18
-rw-r--r--debian/patches/debian/0008-test-installed.patch30
-rw-r--r--debian/patches/debian/0009-randomize-timers.patch55
-rw-r--r--debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch17
-rw-r--r--debian/patches/debian/0011-mdcheck-fix-empty-spaces-in-timer-unit-files.patch34
-rw-r--r--debian/patches/series11
-rw-r--r--debian/po/POTFILES.in1
-rw-r--r--debian/po/ca.po218
-rw-r--r--debian/po/cs.po258
-rw-r--r--debian/po/da.po211
-rw-r--r--debian/po/de.po140
-rw-r--r--debian/po/es.po226
-rw-r--r--debian/po/eu.po214
-rw-r--r--debian/po/fi.po215
-rw-r--r--debian/po/fr.po225
-rw-r--r--debian/po/gl.po214
-rw-r--r--debian/po/it.po215
-rw-r--r--debian/po/ja.po260
-rw-r--r--debian/po/nl.po141
-rw-r--r--debian/po/pt.po218
-rw-r--r--debian/po/pt_BR.po313
-rw-r--r--debian/po/ro.po146
-rw-r--r--debian/po/ru.po219
-rw-r--r--debian/po/sk.po212
-rw-r--r--debian/po/sv.po135
-rw-r--r--debian/po/templates.pot115
-rw-r--r--debian/po/vi.po215
-rwxr-xr-xdebian/rules43
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control6
-rwxr-xr-xdebian/tests/test-installed3
-rw-r--r--debian/upstream/metadata7
-rw-r--r--debian/watch4
-rw-r--r--documentation/external-reshape-design.txt (renamed from external-reshape-design.txt)0
-rw-r--r--documentation/mdadm.conf-example (renamed from mdadm.conf-example)0
-rw-r--r--documentation/mdmon-design.txt (renamed from mdmon-design.txt)0
-rw-r--r--drive_encryption.c724
-rw-r--r--drive_encryption.h37
-rwxr-xr-xinventory284
-rwxr-xr-xmakedist96
-rw-r--r--mdadm.8.in21
-rw-r--r--mdadm.conf.5.in16
-rw-r--r--mdadm.h104
-rw-r--r--mdadm.spec47
-rw-r--r--mdmon.c21
-rw-r--r--mkinitramfs55
-rw-r--r--monitor.c65
-rw-r--r--platform-intel.h1
-rw-r--r--policy.c110
-rw-r--r--super-ddf.c11
-rw-r--r--super-intel.c403
-rw-r--r--super0.c2
-rw-r--r--super1.c16
-rw-r--r--sysfs.c58
-rwxr-xr-xtest27
-rw-r--r--tests/func.sh1
-rw-r--r--udev.c3
-rw-r--r--util.c144
136 files changed, 11420 insertions, 2750 deletions
diff --git a/ANNOUNCE-3.0 b/ANNOUNCE-3.0
deleted file mode 100644
index f2d4f84..0000000
--- a/ANNOUNCE-3.0
+++ /dev/null
@@ -1,98 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.0 - A tool for managing Soft RAID under Linux
-
-I am pleased to (finally) announce the availability of
- mdadm version 3.0
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-
-This is a major new version and as such should be treated with some
-caution. However it has seen substantial testing and is considerred
-to be ready for wide use.
-
-
-The significant change which justifies the new major version number is
-that mdadm can now handle metadata updates entirely in userspace.
-This allows mdadm to support metadata formats that the kernel knows
-nothing about.
-
-Currently two such metadata formats are supported:
- - DDF - The SNIA standard format
- - Intel Matrix - The metadata used by recent Intel ICH controlers.
-
-Also the approach to device names has changed significantly.
-
-If udev is installed on the system, mdadm will not create any devices
-in /dev. Rather it allows udev to manage those devices. For this to work
-as expected, the included udev rules file should be installed.
-
-If udev is not installed, mdadm will still create devices and symlinks
-as required, and will also remove them when the array is stopped.
-
-mdadm now requires all devices which do not have a standard name (mdX
-or md_dX) to live in the directory /dev/md/. Names in this directory
-will always be created as symlinks back to the standard name in /dev.
-
-The man pages contain some information about the new externally managed
-metadata. However see below for a more condensed overview.
-
-Externally managed metadata introduces the concept of a 'container'.
-A container is a collection of (normally) physical devices which have
-a common set of metadata. A container is assembled as an md array, but
-is left 'inactive'.
-
-A container can contain one or more data arrays. These are composed from
-slices (partitions?) of various devices in the container.
-
-For example, a 5 devices DDF set can container a RAID1 using the first
-half of two devices, a RAID0 using the first half of the remain 3 devices,
-and a RAID5 over thte second half of all 5 devices.
-
-A container can be created with
-
- mdadm --create /dev/md0 -e ddf -n5 /dev/sd[abcde]
-
-or "-e imsm" to use the Intel Matrix Storage Manager.
-
-An array can be created within a container either by giving the
-container name and the only member:
-
- mdadm -C /dev/md1 --level raid1 -n 2 /dev/md0
-
-or by listing the component devices
-
- mdadm -C /dev/md2 --level raid0 -n 3 /dev/sd[cde]
-
-To assemble a container, it is easiest just to pass each device in turn to
-mdadm -I
-
- for i in /dev/sd[abcde]
- do mdadm -I $i
- done
-
-This will assemble the container and the components.
-
-Alternately the container can be assembled explicitly
-
- mdadm -A /dev/md0 /dev/sd[abcde]
-
-Then the components can all be assembled with
-
- mdadm -I /dev/md0
-
-For each container, mdadm will start a program called "mdmon" which will
-monitor the array and effect any metadata updates needed. The array is
-initially assembled readonly. It is up to "mdmon" to mark the metadata
-as 'dirty' and which the array to 'read-write'.
-
-The version 0.90 and 1.x metadata formats supported by previous
-versions for mdadm are still supported and the kernel still performs
-the same updates it use to. The new 'mdmon' approach is only used for
-newly introduced metadata types.
-
-NeilBrown 2nd June 2009
diff --git a/ANNOUNCE-3.0.1 b/ANNOUNCE-3.0.1
deleted file mode 100644
index 91b4428..0000000
--- a/ANNOUNCE-3.0.1
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.0.1 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.0.1
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-
-This contains only minor bug fixes over 3.0. If you are using
-3.0, you could consider upgrading.
-
-The brief change log is:
- - Fix various segfaults
- - Fixed for --examine with containers
- - Lots of other little fixes.
-
-NeilBrown 25th September 2009
diff --git a/ANNOUNCE-3.0.2 b/ANNOUNCE-3.0.2
deleted file mode 100644
index 93643d1..0000000
--- a/ANNOUNCE-3.0.2
+++ /dev/null
@@ -1,21 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.0.2 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.0.2
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-
-This just contains one bugfix over 3.0.1 - I was obviously a bit hasty
-in releasing that one.
-
-The brief change log is:
- - Fix crash when hosthost is not set, as often happens in
- early boot.
-
-NeilBrown 25th September 2009
diff --git a/ANNOUNCE-3.0.3 b/ANNOUNCE-3.0.3
deleted file mode 100644
index d6117a1..0000000
--- a/ANNOUNCE-3.0.3
+++ /dev/null
@@ -1,29 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.0.3 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.0.3
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-
-This contains a collection of bug fixes and minor enhancements over
-3.0.1.
-
-The brief change log is:
- - Improvements for creating arrays giving just a name, like 'foo',
- rather than the full '/dev/md/foo'.
- - Improvements for assembling member arrays of containers.
- - Improvements to test suite
- - Add option to change increment for RebuildNN messages reported
- by "mdadm --monitor"
- - Improvements to mdmon 'hand-over' from initrd to final root.
- - Handle merging of devices that have left an IMSM array and are
- being re-incorporated.
- - Add missing space in "--detail --brief" output.
-
-NeilBrown 22nd October 2009
diff --git a/ANNOUNCE-3.1 b/ANNOUNCE-3.1
deleted file mode 100644
index 343b85d..0000000
--- a/ANNOUNCE-3.1
+++ /dev/null
@@ -1,33 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.1 - A tool for managing Soft RAID under Linux
-
-Hot on the heals of 3.0.3 I am pleased to announce the availability of
- mdadm version 3.1
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-
-It contains significant feature enhancements over 3.0.x
-
-The brief change log is:
- - Support --grow to change the layout of RAID4/5/6
- - Support --grow to change the chunksize of raid 4/5/6
- - Support --grow to change level from RAID1 -> RAID5 -> RAID6 and
- back.
- - Support --grow to reduce the number of devices in RAID4/5/6.
- - Support restart of these grow options which assembling an array
- which is partially grown.
- - Assorted tests of this code, and of different RAID6 layouts.
-
-Note that a 2.6.31 or later is needed to have access to these.
-Reducing devices in a RAID4/5/6 requires 2.6.32.
-Changing RAID5 to RAID1 requires 2.6.33.
-
-You should only upgrade if you need to use, or which to test, these
-features.
-
-NeilBrown 22nd October 2009
diff --git a/ANNOUNCE-3.1.1 b/ANNOUNCE-3.1.1
deleted file mode 100644
index 9e480dc..0000000
--- a/ANNOUNCE-3.1.1
+++ /dev/null
@@ -1,39 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.1.1 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.1.1
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-This is a bugfix release over 3.1, which was withdrawn due to serious
-bugs. So it might be best to ignore 3.1 and say that this is a significant
-feature release over 3.0.x
-
-Significant changes are:
- - RAID level conversion between RAID1, RAID5, and RAID6 are
- possible were the kernel supports it (2.6.32 at least)
- - online chunksize and layout changing for RAID5 and RAID6
- where the kernel supports it.
- - reduce the number of devices in a RAID4/5/6 array.
-
- - The default metadata is not v1.1. This metadata is stored at the
- start of the device so is safer in many ways but could interfere with
- boot loaded. The old default (0.90) is still available and fully
- supported.
-
- - The default chunksize is now 512K rather than 64K. This seems more
- appropriate for modern devices.
-
- - The default bitmap chunksize for internal bitmaps is now at least
- 64Meg as fine grained bitmaps tend to impact performance more for
- little extra gain.
-
-This release is believed to be stable and you should feel free to
-upgrade to 3.1.1.
-
-NeilBrown 19th November 2009
diff --git a/ANNOUNCE-3.1.2 b/ANNOUNCE-3.1.2
deleted file mode 100644
index 321b8be..0000000
--- a/ANNOUNCE-3.1.2
+++ /dev/null
@@ -1,46 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.1.2 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.1.2
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-This is a bugfix/stability release over 3.1.1.
-
-Significant changes are:
- - The default metadata has change again (sorry about that).
- It is now v1.2 and will hopefully stay that way. It turned
- out there with boot-block issues with v1.1 which make it
- unsuitable for a default, though in many cases it is still
- suitable to use.
- - Stopping a container is not permitted when members are still
- active
- - Add 'homehost' to the valid words for the "AUTO" config file
- line. When followed by "-all", this causes mdadm to
- auto-assemble any array belonging to this host, but not
- auto-assemble anything else.
- - Fix some bugs with "--grow --chunksize=" for changing chunksize.
- - VAR_RUN can be easily changed at compile time just like ALT_RUN.
- This gives distros more flexability in how to manage the
- pid and sock files that mdmon needs.
- - Various mdmon fixes
- - Alway make bitmap 4K-aligned if at all possible.
- - If mdadm.conf lists arrays which have inter-dependencies,
- the previously had to be listed in the "right" order. Now
- any order should work.
- - Fix --force assembly of v1.x arrays which are in the process
- of recovering.
- - Add section on 'scrubbing' to 'md' man page.
- - Various command-line-option parsing improvements.
- - ... and lots of other bug fixes.
-
-
-This release is believed to be stable and you should feel free to
-upgrade to 3.1.2
-
-NeilBrown 10th March 2010
diff --git a/ANNOUNCE-3.1.3 b/ANNOUNCE-3.1.3
deleted file mode 100644
index 95b2b6c..0000000
--- a/ANNOUNCE-3.1.3
+++ /dev/null
@@ -1,46 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.1.3 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.1.3
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-This is a bugfix/stability release over 3.1.2
-
-Significant changes are:
- - mapfile now lives in a fixed location which default to
- /dev/.mdadm/map but can be changed at compile time. This
- location is choses and most distros provide it during early
- boot and preserve it through. As long a /dev exists and is
- writable, /dev/.mdadm will be created.
- Other files file communication with mdmon live here too.
- This fixes a bug reported by Debian and Gentoo users where
- udev would spin in early-boot.
- - IMSM and DDF metadata will not be recognised on partitions
- as they should only be used on whole-disks.
- - Various overflows causes by 2G drives have been addressed.
- - A subarray of an IMSM contain can now be killed with
- --kill-subarray. Also subarrays can be renamed with
- --update-subarray
- - -If (or --incremental --fail) can be used from udev to
- fail and remove from all arrays a device which has been
- unplugged from the system. i.e. hot-unplug-support.
- - "mdadm /dev/mdX --re-add missing" will look for any device
- that looks like it should be a member of /dev/mdX but isn't
- and will automatically --re-add it
- - Now compile with -Wextra to get extra warnings.
- - Lots of minor bug fixes, documentation improvements, etcc
-
-This release is believed to be stable and you should feel free to
-upgrade to 3.1.3
-
-It is expected that the next release will be 3.2 with a number of new
-features. 3.1.4 will only happen if important bugs show up before 3.2
-is stable.
-
-NeilBrown 6th August 2010
diff --git a/ANNOUNCE-3.1.4 b/ANNOUNCE-3.1.4
deleted file mode 100644
index c157a36..0000000
--- a/ANNOUNCE-3.1.4
+++ /dev/null
@@ -1,37 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.1.4 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.1.4
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-This is a bugfix/stability release over 3.1.3.
-3.1.3 had a couple of embarrasing regressions and a couple of other
-issues surfaces which had easy fixes so I decided to make a 3.1.4
-release after all.
-
-Two fixes related to configs that aren't using udev:
- - Don't remove md devices which 'standard' names on --stop
- - Allow dev_open to work on read-only /dev
-And fixed regressions:
- - Allow --incremental to add spares to an array
- - Accept --no-degraded as a deprecated option rather than
- throwing an error
- - Return correct success status when --incrmental assembling
- a container which does not yet have enough devices.
- - Don't link mdadm with pthreads, only mdmon needs it.
- - Fix compiler warning due to bad use of snprintf
- - Fix spare migration
-
-This release is believed to be stable and you should feel free to
-upgrade to 3.1.4
-
-It is expected that the next release will be 3.2 with a number of new
-features.
-
-NeilBrown 31st August 2010
diff --git a/ANNOUNCE-3.1.5 b/ANNOUNCE-3.1.5
deleted file mode 100644
index baa1f92..0000000
--- a/ANNOUNCE-3.1.5
+++ /dev/null
@@ -1,42 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.1.5 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.1.5
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git?p=mdadm
-
-This is a bugfix/stability release over 3.1.4. It contains all the
-important bugfixes found while working on 3.2 and 3.2.1. It will be
-the last 3.1.x release - 3.2.1 is expected to be released in a few days.
-
-Changes include:
- - Fixes for v1.x metadata on big-endian machines.
- - man page improvements
- - Improve '--detail --export' when run on partitions of an md array.
- - Fix regression with removing 'failed' or 'detached' devices.
- - Fixes for "--assemble --force" in various unusual cases.
- - Allow '-Y' to mean --export. This was documented but not implemented.
- - Various fixed for handling 'ddf' metadata. This is now more reliable
- but could benefit from more interoperability testing.
- - Correctly list subarrays of a container in "--detail" output.
- - Improve checks on whether the requested number of devices is supported
- by the metadata - both for --create and --grow.
- - Don't remove partitions from a device that is being included in an
- array until we are fully committed to including it.
- - Allow "--assemble --update=no-bitmap" so an array with a corrupt
- bitmap can still be assembled.
- - Don't allow --add to succeed if it looks like a "--re-add" is probably
- wanted, but cannot succeed. This avoids inadvertently turning
- devices into spares when an array is failed.
-
-This release is believed to be stable and you should feel free to
-upgrade to 3.1.5
-
-
-NeilBrown 23rd March 2011
-
diff --git a/ANNOUNCE-3.2 b/ANNOUNCE-3.2
deleted file mode 100644
index 9e282bc..0000000
--- a/ANNOUNCE-3.2
+++ /dev/null
@@ -1,77 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.2 - A tool for managing Soft RAID under Linux (DEVEL ONLY)
-
-I am pleased to announce the availability of
- mdadm version 3.2
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm devel-3.2
- http://neil.brown.name/git?p=mdadm
-
-This is a "Developers only" release. Please don't consider using it
-or making it available to others without reading the following.
-
-
-By far the most significant change in this release related to the
-management of reshaping arrays. This code has been substantially
-re-written so that it can work with 'externally managed metadata' -
-Intel's IMSM in particular. We now support level migration and
-OnLine Capacity Expansion on these arrays.
-
-However, while the code largely works it has not been tested
-exhaustively so there are likely to be problems. As the reshape code
-for native metadata arrays was changed as part of this rewrite these
-problems could also result in regressions for reshape of native
-metadata.
-
-It is partly to encourage greater testing that this release is being
-made. Any reports of problem - particular reproducible recipes for
-triggering the problems - will be gratefully received.
-
-It is hopped that a "3.2.1" release will be available in early March
-which will be a bugfix release over this and can be considered
-suitable for general use.
-
-Other changes of note:
-
- - Policy framework.
- Various policy statements can be made in the mdadm.conf to guide
- the behaviour of mdadm, particular with regards to how new devices
- are treated by "mdadm -I".
- Depending on the 'action' associated with a device (identified by
- its 'path') such need devices can be automatically re-added to and
- existing array that they previously fell out off, or automatically
- added as a spare if they appear to contain no data.
-
- - mdadm now has a limited understanding of partition tables. This
- allows the policy framework to make decisions about partitioned
- devices as well.
-
- - --incremental --remove can be told what --path the device was on,
- and this info will be recorded so that another device appearing at
- the same physical location can be preferentially added to the same
- array (provides the spare-same-slot action policy applied to the
- path).
-
- - A new flags "--invalid-backup" flag is available in --assemble
- mode. This can be used to re-assemble an array which was stopping
- in the middle of a reshape, and for which the 'backup file' is no
- longer available or is corrupted. The array may have some
- corruption in it at the point where reshape was up to, but at least
- the rest of the array will become available.
-
-
- - Various internal restructuring - more is needed.
-
-
-Any feed back and bug reports are always welcomed at:
- linux-raid@vger.kernel.org
-
-And please: don't use this in production - particularly not the
---grow functionality.
-
-NeilBrown 1st February 2011
-
-
diff --git a/ANNOUNCE-3.2.1 b/ANNOUNCE-3.2.1
deleted file mode 100644
index 0e7826c..0000000
--- a/ANNOUNCE-3.2.1
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-I am pleased to announce the availability of
- mdadm version 3.2.1
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git/mdadm
-
-Many of the changes in this release are of internal interest only,
-restructuring and refactoring code and so forth.
-
-Most of the bugs found and fixed during development for 3.2.1 have been
-back-ported for the recently-release 3.1.5 so this release primarily
-provides a few new features over 3.1.5.
-
-They include:
- - policy framework
- Policy can be expressed for moving spare devices between arrays, and
- for how to handle hot-plugged devices. This policy can be different
- for devices plugged in to different controllers etc.
- This, for example, allows a configuration where when a device is plugged
- in it is immediately included in an md array as a hot spare and
- possibly starts recovery immediately if an array is degraded.
-
- - some understanding of mbr and gpt paritition tables
- This is primarly to support the new hot-plug support. If a
- device is plugged in and policy suggests it should have a partition table,
- the partition table will be copied from a suitably similar device, and
- then the partitions will hot-plug and can then be added to md arrays.
-
- - "--incremental --remove" can remember where a device was removed from
- so if a device gets plugged back in the same place, special policy applies
- to it, allowing it to be included in an array even if a general hotplug
- will not be included.
-
- - enhanced reshape options, including growing a RAID0 by converting to RAID4,
- restriping, and converting back. Also convertions between RAID0 and
- RAID10 and between RAID1 and RAID10 are possible (with a suitably recent
- kernel).
-
- - spare migration for IMSM arrays.
- Spare migration can now work across 'containers' using non-native metadata
- and specifically Intel's IMSM arrays support spare migrations.
-
- - OLCE and level migration for Intel IMSM arrays.
- OnLine Capacity Expansion and level migration (e.g. RAID0 -> RAID5) is
- supported for Intel Matrix Storage Manager arrays.
- This support is currently 'experimental' for technical reasons. It can
- be enabled with "export MDADM_EXPERIMENTAL=1"
-
- - avoid including wayward devices
- If you split a RAID1, mount the two halves as two separate degraded RAID1s,
- and then later bring the two back together, it is possible that the md
- metadata won't properly show that one must over-ride the other.
- mdadm now does extra checking to detect this possibilty and avoid
- potentially corrupting data.
-
- - remove any possible confusion between similar options.
- e.g. --brief and --bitmap were mapped to 'b' and mdadm wouldn't
- notice if one was used where the other was expected.
-
- - allow K,M,G suffixes on chunk sizes
-
-
-While mdadm-3.2.1 is considered to be reasonably stable, you should
-only use it if you want to try out the new features, or if you
-generally like to be on the bleeding edge. If the new features are not
-important to you, then 3.1.5 is probably the appropriate version to be using
-until 3.2.2 comes out.
-
-NeilBrown 28th March 2011
diff --git a/ANNOUNCE-3.2.2 b/ANNOUNCE-3.2.2
deleted file mode 100644
index b70d18b..0000000
--- a/ANNOUNCE-3.2.2
+++ /dev/null
@@ -1,36 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.2.2 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.2.2
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git/mdadm
-
-This release is largely a stablising release for the 3.2 series.
-Many of the changes just fix bugs introduces in 3.2 or 3.2.1.
-
-There are some new features. They are:
- - reshaping IMSM (Intel metadata) arrays is no longer 'experimental',
- it should work properly and be largely compatible with IMSM drivers in
- other platforms.
- - --assume-clean can be used with --grow --size to avoid resyncing the
- new part of the array. This is only support with very new kernels.
- - RAID0 arrays can have chunksize which is not a power of 2. This has been
- supported in the kernel for a while but is only now supprted by
- mdadm.
-
- - A new tool 'raid6check' is available which can check a RAID6 array,
- or part of it, and report which device is most inconsistent with the
- others if any stripe is inconsistent. This is still under development
- and does not have a man page yet. If anyone tries it out and has any
- questions or experience to report, they would be most welcome on
- linux-raid@vger.kernel.org.
-
-Future releases in the 3.2 series will only be made if bugfixes are needed.
-The next release to add features is expected to be 3.3.
-
-NeilBrown 17th June 2011
diff --git a/ANNOUNCE-3.2.3 b/ANNOUNCE-3.2.3
deleted file mode 100644
index 8a8dba4..0000000
--- a/ANNOUNCE-3.2.3
+++ /dev/null
@@ -1,24 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.2.3 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.2.3
-
-It is available at the usual places:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://neil.brown.name/mdadm
- http://neil.brown.name/git/mdadm
-
-This release is largely a bugfix release for the 3.2 series with many
-minor fixes with little or no impact.
-
-The largest single area of change is support for reshape of Intel
-IMSM arrays (OnLine Capacity Explansion and Level Migtration).
-Among other fixes, this now has a better chance of surviving if a
-device fails during reshape.
-
-Upgrading is recommended - particularly if you use mdadm for IMSM
-arrays - but not essential.
-
-NeilBrown 23rd December 2011
diff --git a/ANNOUNCE-3.2.4 b/ANNOUNCE-3.2.4
deleted file mode 100644
index e321678..0000000
--- a/ANNOUNCE-3.2.4
+++ /dev/null
@@ -1,144 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.2.4 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.2.4
-
-It is available at the usual places, now including github:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://neil.brown.name/git/mdadm
-
-This release is largely a bugfix release for the 3.2 series with many
-minor fixes with little or no impact.
-
-"--oneline" log of changes is below. Some notable ones are:
-
- - --offroot argument to improve interactions between mdmon and initrd
- - --prefer argument to select which /dev names to display in some
- circumstances.
- - relax restructions on when "--add" will be allowed
- - Fix bug with adding write-intent-bitmap to active array
- - Now defaults to "/run/mdadm" for storing run-time files.
-
-Upgrading is encouraged.
-
-The next mdadm release is expected to be 3.3 with a number of new
-features.
-
-NeilBrown 9th May 2012
-
-77b3ac8 monitor: make return from read_and_act more symbolic.
-68226a8 monitor: ensure we retry soon when 'remove' fails.
-8453f8d fix: Monitor sometimes crashes
-90fa1a2 Work around gcc-4.7's strict aliasing checks
-0c4304c fix: container creation with --incremental used.
-5d1c7cd FIX: External metadata sometimes is not updated
-3c20f98 FIX: mdmon check in reshape_container() can cause a problem
-59ab9f5 FIX: Typo error in fprint command
-9587c37 imsm: load_super_imsm_all function refactoring
-ec50f7b imsm: load_imsm_super_all supports loading metadata from the device list
-ca9de18 imsm: validate the number of imsm volumes per controller
-30602f5 imsm: display fd in error trace when when store_imsm_mpb failes
-eb155f6 mdmon: Use getopt_long() to parse command line options
-08ca2ad Add --offroot argument to mdadm
-da82751 Add --offroot argument to mdmon
-a0963a8 Spawn mdmon with --offroot if mdadm was launched with --offroot
-f878b24 imsm: fix, the second array need to have the whole available space on devices
-d597705 getinfo_super1: Use MaxSector in place of sb->size
-6ef8905 super1: make aread/awrite always use an aligned buffer.
-de5a472 Remove avail_disks arg from 'enough'.
-da8fe5a Assemble: fix --force assemble during reshape.
-b10c663 config: fix handing of 'homehost' in AUTO line.
-92d49ec FIX: NULL pointer to strdup() can be passed
-d2bde6d imsm: FIX: No new missing disks are allowed during general migration
-111e9fd FIX: Array is not run when expansion disks are added
-bf5cf7c imsm: FIX: imsm_get_allowed_degradation() doesn't count degradation for raid1
-50927b1 Fix: Sometimes mdmon throws core dump during reshape
-78340e2 Flush mdmon before next reshape step during container operation
-e174219 imsm: FIX: Chunk size migration problem
-f93346e FIX: use md position to reshape restart
-6a75c8c imsm: FIX: use md position to reshape restart
-51d83f5 imsm: FIX: Clear migration record when migration switches to next volume.
-e1dd332 FIX: restart reshape when reshape process is stopped just between 2 reshapes
-1ca90aa FIX: Do not try to (continue) reshape using inactive array
-9f1b0f0 config: conf_match should ignore devname when not set.
-d669228 Use posix_memalign() for memory used to write bitmaps
-178950e FIX: Changes in '0' case for reshape position verification
-9200d41 avoid double-free upon "old buggy kernel" sysfs_read failure
-4011421 Print error message if failing to write super for 1.x metadata
-0011874 Use MDMON_DIR for pid files created in Monitor.c
-56d1885 Assemble: don't use O_EXCL until we have checked device content.
-b720636 Assemble: support assembling of a RAID0 being reshaped.
-c69ffac Manage: allow --re-add to failed array.
-52f07f5 Reset bad flag on map update
-911cead super1: support superblocks up to 4K.
-ad6db3c Create: reduce the verbosity of 'default_layout'.
-b2bfdfa super1.c don't keep recalculating bitmap pointer
-4122675 Define and use SUPER1_SIZE for allocations
-1afa930 init_super1() memset full buffer allocated for superblock
-2de0b8a match_metadata_desc1(): Use calloc instead of malloc+memset
-3c0bcd4 Use 4K buffer alignment for superblock allocations
-308340a Use struct align_fd to cache fd's block size for aligned reads/writes
-65ed615 match_metadata_desc0(): Use calloc instead of malloc+memset
-de89706 Generalize ROUND_UP() macro and introduce matching ROUND_UP_PTR()
-0a2f189 super1.c: use ROUND_UP/ROUND_UP_PTR
-654a381 super-intel.c: Use ROUND_UP() instead of manually coding it
-42d5dfd __write_init_super_ddf(): Use posix_memalign() instead of static aligned buffer
-d4633e0 Examine: fix array size calculation for RAID10.
-e62b778 Assemble: improve verbose logging when including old devices.
-0073a6e Remove possible crash during RAID6 -> RAID5 reshape.
-69fe207 Incremental: fix adding devices with --incremental
-bcbb311 Manage: replace 'return 1' with 'goto abort'.
-9f58469 Manage: freeze recovery while adding multiple devices.
-ae6c05a Create: round off size for RAID1 arrays.
-5ca3a90 Grow: print useful error when converting RAID1->RAID5 will fail.
-c07d640 Fix tests/05r1-re-add-nosupper
-2d762ad Fix the new ROUND_UP macro.
-fd324b0 sysfs: fixed sysfs_freeze_array array to work properly with Manage_subdevs.
-5551b11 imsm: avoid overflows for disks over 1TB
-97f81ee clear hi bits if not used after loading metadata from disk
-e03640b simplify calculating array_blocks
-29cd082 show 2TB volumes/disks support in --detail-platform
-2cc699a check volume size in validate_geometry_imsm_orom
-9126b9a check that no disk over 2TB is used to create container when no support
-027c374 imsm: set 2tb disk attribute for spare
-3556c2f Fix typo: wan -> want
-15632a9 parse_size: distinguish between 0 and error.
-fbdef49 Bitmap_offset is a signed number
-508a7f1 super1: leave more space in front of data by default.
-40110b9 Fix two typos in fprintf messages
-342460c mdadm man page: fix typo
-0e7f69a imsm: display maximum volumes per controller and array
-36fd8cc imsm: FIX: Update function imsm_num_data_members() for Raid1/10
-7abc987 imsm: FIX: Add volume size expand support to imsm_analyze_change()
-f3871fd imsm: Add new metadata update for volume size expansion
-54397ed imsm: Execute size change for external metatdata
-016e00f FIX: Support metadata changes rollback
-fbf3d20 imsm: FIX: Support metadata changes rollback
-44f6f18 FIX: Extend size of raid0 array
-7e7e9a4 FIX: Respect metadata size limitations
-65a9798 FIX: Detect error and rollback metadata
-13bcac9 imsm: Add function imsm_get_free_size()
-b130333 imsm: Support setting max size for size change operation
-c41e00b imsm: FIX: Component size alignment check
-58d26a2 FIX: Size change is possible as standalone change only
-4aecb54 FIX: Assembled second array is in read only state during reshape
-ae2416e FIX: resolve make everything compilation error
-480f356 Raid limit of 1024 when scanning for devices.
-c2ecf5f Add --prefer option for --detail and --monitor
-0a99975 Relax restrictions on when --add is permitted.
-7ce0570 imsm: fix: rebuild does not continue after reboot
-b51702b fix: correct extending size of raid0 array
-34a1395 Fix sign extension of bitmap_offset in super1.c
-012a864 Introduce sysfs_set_num_signed() and use it to set bitmap/offset
-5d7b407 imsm: fix: thunderdome may drop 2tb attribute
-5ffdc2d Update test for "is udev active".
-96fd06e Adjust to new standard of /run
-974e039 test: don't worry too much about array size.
-b0a658f Grow: failing the set the per-device size is not an error.
-36614e9 super-intel.c: Don't try to close negative fd
-562aa10 super-intel.c: Fix resource leak from opendir()
-
diff --git a/ANNOUNCE-3.2.5 b/ANNOUNCE-3.2.5
deleted file mode 100644
index 396da12..0000000
--- a/ANNOUNCE-3.2.5
+++ /dev/null
@@ -1,31 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.2.5 - A tool for managing Soft RAID under Linux
-
-I am somewhat disappointed to have to announce the availability of
- mdadm version 3.2.5
-
-It is available at the usual places, now including github:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://neil.brown.name/git/mdadm
-
-This release primarily fixes a serious regression in 3.2.4.
-This regression does *not* cause any risk to data. It simply
-means that adding a device with "--add" would sometime fail
-when it should not.
-
-The fix also includes a couple of minor fixes such as making
-the "--layout=preserve" option to "--grow" work again.
-
-A reminder that the default location for runtime files is now
-"/run/mdadm". If you compile this for a distro that does not
-have "/run", you will need to compile with an alternate setting for
-MAP_DIR. e.g.
- make MAP_DIR=/var/run/mdadm
-or
- make MAP_DIR=/dev/.mdadm
-
-NeilBrown 18th May 2012
-
diff --git a/ANNOUNCE-3.2.6 b/ANNOUNCE-3.2.6
deleted file mode 100644
index f5cfd49..0000000
--- a/ANNOUNCE-3.2.6
+++ /dev/null
@@ -1,57 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.2.6 - A tool for managing Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.2.6
-
-It is available at the usual places, now including github:
- countrycode=xx.
- http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://neil.brown.name/git/mdadm
-
-This is a stablity release which adds a number of bugfixs to 3.2.5.
-There are no real stand-out fixes, just lots of little bits and pieces.
-
-Below is the "git log --oneline --reverse" list of changes since
-3.2.5.
-
-NeilBrown 25th October 2012
-
-b7e05d2 udev-rules: prevent systemd from mount devices before they are ready.
-0d478e2 mdadm: Fix Segmentation fault.
-42f0ca1 imsm: fix: correct checking volume's degradation
-fcf2195 Monitor: fix inconsistencies in values for ->percent
-5f862fb Monitor: Report NewArray when an array the disappeared, reappears.
-6f51b1c Monitor: fix reporting for Fail vs FailSpare etc.
-68ad53b mdmon: fix arg parsing.
-517f135 Assemble: don't leak memory with fdlist.
-090900c udev-rules: prevent systemd from mount devices before they are ready.
-446e000 sha1.h: remove ansidecl.h header inclusion
-ec894f5 Manage: zero metadata before adding to 'external' array.
-3a84db5 ddf: allow a non-spare to be used to recovery a missing device.
-c5d61ca ddf: hack to fix container recognition.
-23084aa mdmon: fix arg processing for -a
-c4e96a3 mdmon: allow --takeover when original was started with --offroot
-80841df find_free_devnum: avoid auto-using names in /etc/mdadm.conf
-c5c56d6 mapfile: fix mapfile rebuild for containers
-aec89f6 fix segfaults in Detail()
-2117ad1 Fix 'enough' function for RAID10.
-0bc300d Use --offroot flag when assembling md arrays via --incrmental
-ac78f24 Grow: make warning about old metadata more explicit.
-14026ab Replace sha1.h with slightly older version.
-6f6809f Add zlib license to crc32.c
-5267ba0 Handles spaces in array names better.
-c51f288 imsm: allow --assume-clean to work.
-acf7076 Grow: allow --grow --continue to work for native metadata.
-335d2a6 Grow: fix a couple of typos with --assume-clean usage
-9ff1427 Fix open_container
-3713633 mdadm: super0: do not override uuid with homehost
-31bff58 Trivial bugfix and spelling fixes.
-e1e539f Detail: don't report a faulty device as 'spare' or 'rebuilding'.
-22a6461 super0: allow creation of array on 2TB+ devices.
-a5d47a2 Create new md devices consistently
-eb48676 Monitor: don't complain about non-monitorable arrays in mdadm.conf
-ecdf2d7 Query: don't be confused by partition tables.
-f7b75c1 Query: allow member of non-0.90 arrays to be better reported.
diff --git a/ANNOUNCE-3.3 b/ANNOUNCE-3.3
deleted file mode 100644
index f770aa1..0000000
--- a/ANNOUNCE-3.3
+++ /dev/null
@@ -1,63 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.3 - A tools for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.3
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://git.neil.brown.name/git/mdadm
-
-This is a major new release so don't be too surprised if there are a
-few issues. If I hear about them they will be fixed in 3.3.1.
-git log reports nearly 500 changes since 3.2.6 so I won't list them
-all.
-
-Some highlights are:
-
-- Some array reshapes can proceed without needing backup file.
- This is done by changing the 'data_offset' so we never need to write
- any data back over where it was before. If there is no "head space"
- or "tail space" to allow data_offset to change, the old mechanism
- with a backup file can still be used.
-- RAID10 arrays can be reshaped to change the number of devices,
- change the chunk size, or change the layout between 'near'
- and 'offset'.
- This will always change data_offset, and will fail if there is no
- room for data_offset to be moved.
-- "--assemble --update=metadata" can convert a 0.90 array to a 1.0 array.
-- bad-block-logs are supported (but not heavily tested yet)
-- "--assemble --update=revert-reshape" can be used to undo a reshape
- that has just been started but isn't really wanted. This is very
- new and while it passes basic tests it cannot be guaranteed.
-- improved locking between --incremental and --assemble
-- uses systemd to run "mdmon" if systemd is configured to do that.
-- kernel names of md devices can be non-numeric. e.g. "md_home" rather than
- "md0". This will probably confuse lots of other tools, so you need to
- echo CREATE names=yes >> /etc/mdadm.conf
- or the feature will not be used. (you also need a reasonably new kernel).
-- "--stop" can be given a kernel name instead of a device name. i.e
- mdadm --stop md4
- will work even if /dev/md4 doesn't exist.
-- "--detail --export" has some information about the devices in the array
-- --dump and --restore can be used to backup and restore the metadata on an
- array.
-- Hot-replace is supported with
- mdadm /dev/mdX --replace /dev/foo
- and
- mdadm /dev/mdX --replace /dev/foo --with /dev/bar
-- Config file can be a directory in which case all "*.conf" files are
- read in lexical order.
- Default is to read /etc/mdadm.conf and then /etc/mdadm.conf.d
- Thus
- echo CREATE name=yes > /etc/mdadm.conf.d/names.conf
- will also enable the use of named md devices.
-
-- Lots of improvements to DDF support including adding support for
- RAID10 (thanks Martin Wilck).
-
-and lots of bugfixes and other little changes.
-
-NeilBrown 3rd September 2013
diff --git a/ANNOUNCE-3.3.1 b/ANNOUNCE-3.3.1
deleted file mode 100644
index 7d5e666..0000000
--- a/ANNOUNCE-3.3.1
+++ /dev/null
@@ -1,23 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.3.1 - A tool for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.3.1
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://git.neil.brown.name/git/mdadm.git
-
-The main changes are:
- - lots of work on "DDF" support. Hopefully it will be more stable
- now. Bug reports are always welcome.
- - improved interactions with 'systemd'. Where possible, background
- tasks are run from systemd (if it is present) rather then forking
- disassociationg from the session. This is important because udev
- doesn't really let you disassociate.
-
-though there are a number of other little bug fixes too.
-
-NeilBrown 5th June 2014
diff --git a/ANNOUNCE-3.3.2 b/ANNOUNCE-3.3.2
deleted file mode 100644
index 6b54961..0000000
--- a/ANNOUNCE-3.3.2
+++ /dev/null
@@ -1,16 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.3.2 - A tool for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.3.2
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://git.neil.brown.name/git/mdadm.git
-
-Changes since 3.3.1 are mostly little bugfixes and some man-page
-updates.
-
-NeilBrown 21st August 2014
diff --git a/ANNOUNCE-3.3.3 b/ANNOUNCE-3.3.3
deleted file mode 100644
index ac1b217..0000000
--- a/ANNOUNCE-3.3.3
+++ /dev/null
@@ -1,18 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.3.3 - A tool for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.3.3
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://git.neil.brown.name/git/mdadm.git
-
-The 100 changes since 3.3.3 are mostly little bugfixes and some improvements
-to the selftests.
-raid6check now handle all RAID6 layouts including DDF correctly.
-See git log for the rest.
-
-NeilBrown 24th July 2015
diff --git a/ANNOUNCE-3.3.4 b/ANNOUNCE-3.3.4
deleted file mode 100644
index 52b9456..0000000
--- a/ANNOUNCE-3.3.4
+++ /dev/null
@@ -1,37 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.3.4 - A tool for managing md Soft RAID under Linux
-
-I am somewhat disappointed to have to announce the availability of
- mdadm version 3.3.4
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://git.neil.brown.name/git/mdadm.git
-
-In mdadm-3.3 a change was made to how IMSM (Intel Matrix Storage
-Manager) metadata was handled. Previously an IMSM array would only
-be assembled if it was attached to an IMSM controller.
-
-In 3.3 this was relaxed as there are circumstances where the
-controller is not properly detected. Unfortunately this has negative
-consequences which have only just come to light.
-
-If you have an IMSM RAID1 configured and then disable RAID in the
-BIOS, the metadata will remain on the devices. If you then install
-some other OS on one device and then install Linux on the other, Linux
-might eventually start noticing the IMSM metadata (depending a bit on whether
-mdadm is included in the initramfs) and might start up the RAID1. This could
-copy one device over the other, thus trashing one of the installations.
-
-Not good.
-
-So with this release IMSM arrays will only be assembled if attached to
-an IMSM controller, or if "--force" is given to --assemble, or if the
-environment variable IMSM_NO_PLATFORM is set (used primarily for
-testing).
-
-I strongly recommend upgrading to 3.3.4 if you are using 3.3 or later.
-
-NeilBrown 3rd August 2015.
diff --git a/ANNOUNCE-3.4 b/ANNOUNCE-3.4
deleted file mode 100644
index 2689732..0000000
--- a/ANNOUNCE-3.4
+++ /dev/null
@@ -1,24 +0,0 @@
-Subject: ANNOUNCE: mdadm 3.4 - A tool for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 3.4
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://github.com/neilbrown/mdadm
- git://neil.brown.name/mdadm
- http://git.neil.brown.name/git/mdadm
-
-The new second-level version number reflects significant new
-functionality, particular support for journalled RAID5/6 and clustered
-RAID1. This new support is probably still buggy. Please report bugs.
-
-There are also a number of fixes for Intel's IMSM metadata support,
-and an assortment of minor bug fixes.
-
-I plan for this to be the last release of mdadm that I provide as I am
-retiring from MD and mdadm maintenance. Jes Sorensen has volunteered
-to oversee mdadm for the next while. Thanks Jes!
-
-NeilBrown 28th January 2016
diff --git a/ANNOUNCE-4.0 b/ANNOUNCE-4.0
deleted file mode 100644
index f79c540..0000000
--- a/ANNOUNCE-4.0
+++ /dev/null
@@ -1,22 +0,0 @@
-Subject: ANNOUNCE: mdadm 4.0 - A tool for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 4.0
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
- http://git.kernel.org/cgit/utils/mdadm/
-
-The update in major version number primarily indicates this is a
-release by it's new maintainer. In addition it contains a large number
-of fixes in particular for IMSM RAID and clustered RAID support. In
-addition this release includes support for IMSM 4k sector drives,
-failfast and better documentation for journaled RAID.
-
-This is my first release of mdadm. Please thank Neil Brown for his
-previous work as maintainer and blame me for all the bugs I caused
-since taking over.
-
-Jes Sorensen, 2017-01-09
diff --git a/ANNOUNCE-4.1 b/ANNOUNCE-4.1
deleted file mode 100644
index a273b9a..0000000
--- a/ANNOUNCE-4.1
+++ /dev/null
@@ -1,16 +0,0 @@
-Subject: ANNOUNCE: mdadm 4.1 - A tool for managing md Soft RAID under Linux
-
-I am pleased to announce the availability of
- mdadm version 4.1
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
- http://git.kernel.org/cgit/utils/mdadm/
-
-The update constitutes more than one year of enhancements and bug fixes
-including for IMSM RAID, Partial Parity Log, clustered RAID support,
-improved testing, and gcc-8 support.
-
-Jes Sorensen, 2018-10-01
diff --git a/ANNOUNCE-4.2 b/ANNOUNCE-4.2
deleted file mode 100644
index 8b22d09..0000000
--- a/ANNOUNCE-4.2
+++ /dev/null
@@ -1,19 +0,0 @@
-Subject: ANNOUNCE: mdadm 4.2 - A tool for managing md Soft RAID under Linux
-
-I am pleased to finally announce the availability of mdadm-4.2.
-get 4.2 out the door soon.
-
-It is available at the usual places:
- http://www.kernel.org/pub/linux/utils/raid/mdadm/
-and via git at
- git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
- http://git.kernel.org/cgit/utils/mdadm/
-
-The release includes more than two years of development and bugfixes,
-so it is difficult to remember everything. Highlights include
-enhancements and bug fixes including for IMSM RAID, Partial Parity
-Log, clustered RAID support, improved testing, and gcc-9 support.
-
-Thank you everyone who contributed to this release!
-
-Jes Sorensen, 2021-12-30
diff --git a/Assemble.c b/Assemble.c
index 9d04205..f6c5b99 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1988,7 +1988,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
* and ignoring special character on the first place.
*/
if (strcmp(sra->text_version + 1, content->text_version + 1) != 0) {
- if (sysfs_set_array(content, 9003) != 0) {
+ if (sysfs_set_array(content) != 0) {
sysfs_free(sra);
return 1;
}
diff --git a/Build.c b/Build.c
index 1fbf859..1be90e4 100644
--- a/Build.c
+++ b/Build.c
@@ -156,12 +156,6 @@ int Build(struct mddev_ident *ident, struct mddev_dev *devlist, struct shape *s,
bitmap_fd = open(s->bitmap_file, O_RDWR);
if (bitmap_fd < 0) {
int major = BITMAP_MAJOR_HI;
-#if 0
- if (s->bitmap_chunk == UnSet) {
- pr_err("%s cannot be opened.\n", s->bitmap_file);
- goto abort;
- }
-#endif
bitmapsize = s->size >> 9; /* FIXME wrong for RAID10 */
if (CreateBitmap(s->bitmap_file, 1, NULL,
s->bitmap_chunk, c->delay,
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..c1997ba
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,368 @@
+# Release [mdadm-4.3](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-4.3)
+
+Features:
+- **IMSM_NO_PLATFORM** boot parameter support from Neil Brown.
+- **--write-zeros** option support by Logan Gunthorpe.
+- **IMSM** monetization by VMD register from Mateusz Grzonka.
+- RST SATA under VMD support from Kevin Friedberg.
+- Strong name rules from Mariusz Tkaczyk.
+
+Fixes:
+- Unify failed raid behavior from Coly Li.
+- Rework of **--update** options from Mateusz Kusiak.
+- **mdmon-initrd** service from Neil Brown.
+- **IMSM** expand functionality rework from Mariusz Tkaczyk.
+- Mdmonitor improvements from Mateusz Grzonka.
+- Failed state verification from Mateusz Kusiak and Kinga Tanska.
+
+# Release [mdadm-4.2](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-4.2)
+
+The release includes more than two years of development and bugfixes, so it is difficult to
+remember everything. Highlights include enhancements and bug fixes including for **IMSM** RAID,
+Partial Parity Log, clustered RAID support, improved testing, and gcc-9 support.
+
+# Release [mdadm-4.1](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-4.1)
+
+The update constitutes more than one year of enhancements and bug fixes including for **IMSM**
+RAID, Partial Parity Log, clustered RAID support, improved testing, and gcc-8 support.
+
+# Release [mdadm-4.0](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-4.0)
+
+The update in major version number primarily indicates this is a release by it's new maintainer.
+In addition it contains a large number of fixes in particular for IMSM RAID and clustered RAID
+support. In addition, this release includes support for IMSM 4k sector drives, failfast and better
+documentation for journaled RAID.
+
+This is my first release of mdadm. Please thank Neil Brown for his previous work as maintainer and
+blame me for all the bugs I caused since taking over.
+
+# Release [mdadm-3.4](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.4)
+
+- Support for journalled RAID5/6 and clustered RAID1. This new support is probably still buggy.
+ Please report bugs.
+
+- There are also a number of fixes for **IMSM** support and an assortment of minor bug fixes.
+
+- I plan for this to be the last release of mdadm that I provide as I am retiring from MD and mdadm
+ maintenance. Jes Sorensen has volunteered to oversee mdadm for the next while. Thanks Jes!
+
+# Release [mdadm-3.3.4](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.3.4)
+
+**I strongly recommend upgrading to 3.3.4 if you are using 3.3 or later with IMSM.**
+
+- **IMSM** metadata assemble fixes.
+
+ In mdadm-3.3 a change was made to how **IMSM** metadata was handled. Previously an **IMSM** array
+ would only be assembled if it was attached to an **IMSM** controller. In 3.3 this was relaxed as
+ there are circumstances where the controller is not properly detected. Unfortunately, this has
+ negative consequences which have only just come to light.
+
+ If you have an IMSM RAID1 configured and then disable RAID in the BIOS, the metadata will remain
+ on the devices. If you then install some other OS on one device and then install Linux on the
+ other, Linux might eventually start noticing the IMSM metadata (depending a bit on whether
+ mdadm is included in the initramfs) and might start up the RAID1. This could copy one device over
+ the other, thus trashing one of the installations.
+
+ So, with this release IMSM arrays will only be assembled if attached to an **IMSM** controller,
+ or if **--force** is given to **--assemble**, or if the environment variable
+ **IMSM_NO_PLATFORM=1** is set (used primarily for testing).
+
+# Release [mdadm-3.3.3](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.3.3)
+
+- The 100 changes since 3.3.3 are mostly little bugfixes and some improvements to the self-tests.
+- raid6check now handle all RAID6 layouts including **DDF** correctly. See git log for the rest.
+
+# Release [mdadm-3.3.2](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.3.2)
+
+- Little bugfixes and some man-page updates.
+
+# Release [mdadm-3.3.1](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.3.1)
+
+- lots of work on **DDF** support.
+- Improved interactions with **systemd**. Where possible, background tasks are run from systemd
+ rather than forking.
+- Number of other little bug fixes too.
+
+# Release [mdadm-3.3](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.3)
+
+- Some array reshapes can proceed without needing backup file. This is done by changing the
+ data_offset* so we never need to write any data back over where it was before. If there is no
+ 'head space' or 'tail space' to allow *data_offset* to change, the old mechanism with a backup
+ file can still be used.
+
+- RAID10 arrays can be reshaped to change the number of devices, change the chunk size, or change
+ the layout between *near* and *offset*.
+ This will always change *data_offset*, and will fail if there is no room for *data_offset* to be
+ moved.
+
+- **--assemble --update=metadata** can convert a **0.90** array to a **1.0** array.
+
+- **bad-block-logs** are supported (but not heavily tested yet).
+
+- **--assemble --update=revert-reshape** can be used to undo a reshape that has just been started
+ but isn't really wanted. This is very new and while it passes basic tests it cannot be
+ guaranteed.
+
+- improved locking between **--incremental** and **--assemble**.
+
+- uses systemd to run **mdmon** if systemd is configured to do that.
+- kernel names of md devices can be non-numeric. e.g. "md_home" rather than
+ "md0". This will probably confuse lots of other tools, so you need to
+ **echo CREATE names=yes >> /etc/mdadm.conf** or the feature will not be used (you also need a
+ reasonably new kernel).
+
+- **--stop** can be given a kernel name instead of a device name. i.e. **mdadm --stop md4** will
+ work even if /dev/md4 doesn't exist.
+
+- **--detail --export** has some information about the devices in the array.
+- **--dump** and **--restore** can be used to backup and restore the metadata on an array.
+- Hot-replace is supported with **mdadm /dev/mdX --replace /dev/foo** and
+ **mdadm /dev/mdX --replace /dev/foo --with /dev/bar**.
+
+- Config file can be a directory in which case all "*.conf" files are read in lexical order.
+ Default is to read **/etc/mdadm.conf** and then **/etc/mdadm.conf.d**. Thus
+ **echo CREATE name=yes > /etc/mdadm.conf.d/names.conf** will also enable the use of named md
+ devices.
+
+- Lots of improvements to **DDF** support including adding support for RAID10 (thanks Martin Wilck).
+
+# Release [mdadm-3.2.6](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2.6)
+
+- There are no real stand-out fixes, just lots of little bits and pieces.
+
+# Release [mdadm-3.2.5](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2.5)
+
+- This release primarily fixes a serious regression in 3.2.4. This regression does *not* cause
+ any risk to data. It simply means that adding a device with **--add** would sometime fail
+ when it should not.
+- The fix also includes a couple of minor fixes such as making the **--layout=preserve** option to
+ **--grow** work again.
+
+# Release [mdadm-3.2.4](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2.4)
+
+ - **--offroot** argument to improve interactions between mdmon and initrd.
+ - **--prefer** argument to select which */dev* names to display in some circumstances.
+ - relax restrictions on when **--add** will be allowed.
+ - Fix bug with adding write-intent-bitmap to active array.
+ - Now defaults to */run/mdadm* for storing run-time files.
+
+# Release [mdadm-3.2.3](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2.3)
+
+- The largest single area of change is support for reshape of Intel IMSM arrays (OnLine Capacity
+ Expansion and Level Migration).
+- Among other fixes, this now has a better chance of surviving if a device fails during reshape.
+
+# Release [mdadm-3.2.2](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2.2)
+
+- reshaping IMSM (Intel metadata) arrays is no longer 'experimental', it should work properly and be
+ largely compatible with IMSM drivers in other platforms.
+- **--assume-clean** can be used with **--grow --size** to avoid resyncing the new part of the
+ array. This is only support with very new kernels.
+- RAID0 arrays can have chunksize which is not a power of 2. This has been supported in the kernel
+ for a while but is only now supported by mdadm.
+
+- A new tool **raid6check** is available, which can check a RAID6 array, or part of it and report
+ which device is most inconsistent with the others if any stripe is inconsistent. This is still
+ under development and does not have a man page yet. If anyone tries it out and has any questions
+ or experience to report, they would be most welcome on linux-raid@vger.kernel.org.
+
+# Release [mdadm-3.2.1](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2.1)
+
+- Policy framework
+
+ Policy can be expressed for moving spare devices between arrays, and for how to handle hot-plugged
+ devices. This policy can be different for devices plugged in to different controllers etc. This,
+ for example, allows a configuration where when a device is plugged in it is immediately included
+ in an md array as a hot spare and possibly starts recovery immediately if an array is degraded.
+
+- Some understanding of mbr and gpt paritition tables. This is primarily to support the new
+ hot-plug support. If a device is plugged in and policy suggests it should have a partition table,
+ the partition table will be copied from a suitably similar device, and then the partitions will
+ hot-plug and can then be added to md arrays.
+
+- **--incremental --remove** can remember where a device was removed from so if a device gets
+ plugged back in the same place, special policy applies to it, allowing it to be included in an
+ array even if a general hotplug will not be included.
+
+- Enhanced reshape options, including growing a RAID0 by converting to RAID4, restriping, and
+ converting back. Also convertions between RAID0 and RAID10 and between RAID1 and RAID10 are
+ possible (with a suitably recent kernel).
+
+- Spare migration for IMSM arrays. Spare migration can now work across 'containers' using
+ non-native metadata and specifically Intel's IMSM arrays support spare migrations.
+
+- OLCE and level migration for Intel IMSM arrays. OnLine Capacity Expansion and level migration
+ (e.g. RAID0 -> RAID5) is supported for Intel Matrix Storage Manager arrays. This support is
+ currently *experimental* for technical reasons. It can be enabled with
+ **export MDADM_EXPERIMENTAL=1**.
+
+- avoid including wayward devices.
+
+ If you split a RAID1, mount the two halves as two separate degraded RAID1s, and then later bring
+ the two back together, it is possible that the md metadata won't properly show that one must
+ over-ride the other. Mdadm now does extra checking to detect this possibility and avoid
+ potentially corrupting data.
+
+- Remove any possible confusion between similar options. e.g. **--brief** and **--bitmap** were
+ mapped to 'b' and mdadm wouldn't notice if one was used where the other was expected.
+
+- Allow K,M,G suffixes on chunk sizes.
+
+# Release [mdadm-3.2](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.2)
+
+- By far the most significant change in this release related to the management of reshaping arrays.
+ This code has been substantially re-written so that it can work with **externally managed
+ metadata** -Intel's IMSM in particular. We now support level migration and OnLine Capacity
+ Expansion on these arrays.
+
+- Various policy statements can be made in the *mdadm.conf* to guide the behavior of mdadm,
+ particular with regards to how new devices are treated by **--incremental**. Depending on the
+ *action* associated with a device (identified by its *path*) such need devices can be
+ automatically re-added to and existing array that they previously fell out off, or automatically
+ added as a spare if they appear to contain no data.
+
+- mdadm now has a limited understanding of partition tables. This allows the policy framework to
+ make decisions about partitioned devices as well.
+
+- **--incremental --remove** can be told what **--path** the device was on, and this info will be
+ recorded so that another device appearing at the same physical location can be preferentially
+ added to the same array (provides the spare-same-slot action policy applied to the path).
+
+- A new flags **--invalid-backup** flag is available in **--assemble** mode. This can be used to
+ re-assemble an array which was stopping in the middle of a reshape, and for which the
+ *backup file* is no longer available or is corrupted. The array may have some corruption in it
+ at the point where reshape was up to, but at least the rest of the array will become available.
+
+- Policy framework.
+- Various internal restructuring - more is needed.
+
+# Release [mdadm-3.1.5](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.1.5)
+
+- Fixes for **v1.x** metadata on big-endian machines.
+- man page improvements.
+- Improve **--detail --export** when run on partitions of an md array.
+- Fix regression with removing *failed* or *detached* devices.
+- Fixes for **--assemble --force** in various unusual cases.
+- Allow **-Y** to mean **--export**. This was documented but not implemented.
+- Various fixes for handling **ddf** metadata. This is now more reliable but could benefit from
+ more interoperability testing.
+- Correctly list subarrays of a container in **--detail** output.
+- Improve checks on whether the requested number of devices is supported by the metadata, both for
+ **--create** and **--grow**.
+- Don't remove partitions from a device that is being included in an array until we are fully
+ committed to including it.
+- Allow **--assemble --update=no-bitmap** so an array with a corrupt bitmap can still be assembled.
+- Don't allow **--add** to succeed if it looks like a **--re-add** is probably wanted, but cannot
+ succeed. This avoids inadvertently turning devices into spares when an array is failed.
+
+# Release [mdadm-3.1.4](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.1.4)
+
+Two fixes related to configs that aren't using udev:
+- Don't remove md devices which 'standard' names on **--stop**.
+- Allow dev_open to work on read-only */dev*.
+
+And fixed regressions:
+- Allow **--incremental** to add spares to an array.
+- Accept **--no-degraded** as a deprecated option rather than throwing an error.
+- Return correct success status when **--incremental** assembling a container which does not yet
+ have enough devices.
+- Don't link mdadm with pthreads, only mdmon needs it.
+- Fix compiler warning due to bad use of snprintf.
+
+# Release [mdadm-3.1.3](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.1.3)
+
+- mapfile now lives in a fixed location which default to */dev/.mdadm/map*, but can be changed at
+ compile time. This location is chosen and most distros provide it during early boot and preserve
+ it through. As long a */dev* exists and is writable, */dev/.mdadm* will be created. Other files
+ communication with mdmon live here too. This fixes a bug reported by Debian and Gentoo users where
+ udev would spin in early-boot.
+
+- IMSM and DDF metadata will not be recognized on partitions as they should only be used on
+ whole-disks.
+
+- Various overflows causes by 2G drives have been addressed.
+
+- A subarray of an IMSM contain can now be killed with **--kill-subarray**. Also, subarrays can be
+ renamed with **--update-subarray --update=name**.
+
+- **-If** (or **--incremental --fail**) can be used from udev to fail and remove from all arrays
+ a device which has been unplugged from the system i.e. hot-unplug-support.
+
+- **/dev/mdX --re-add missing** will look for any device that looks like it should be a member of
+ */dev/mdX* but isn't and will automatically **--re-add** it.
+
+- Now compile with *-Wextra* to get extra warnings.
+- Lots of minor bug fixes, documentation improvements, etc.
+
+# Release [mdadm-3.1.2](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.1.2)
+
+- The default metadata has change again (sorry about that). It is now **v1.2** and will hopefully
+ stay that way. It turned out there with boot-block issues with **v1.1** which make it unsuitable
+ for a default, though in many cases it is still suitable to use.
+
+- Add *homehost* to the valid words for the **AUTO** config file line. When followed by *-all*,
+ this causes mdadm to auto-assemble any array belonging to this host, but not auto-assemble
+ anything else.
+
+- VAR_RUN can be easily changed at compile time just like ALT_RUN. This gives distros more
+ flexibility in how to manage the pid and sock files that mdmon needs.
+
+- If mdadm.conf lists arrays which have inter-dependencies, the previously had to be listed in the
+ "right" order. Now, any order should work.
+
+- Fix some bugs with **--grow --chunksize=**.
+- Stopping a container is not permitted when members are still active.
+- Various mdmon fixes.
+- Alway make bitmap 4K-aligned if at all possible.
+- Fix **--force** assembly of **v1.x** arrays which are in the process of recovering.
+- Add section on 'scrubbing' to 'md' man page.
+- Various command-line-option parsing improvements.
+- ... and lots of other bug fixes.
+
+# Release [mdadm-3.1.1](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.1.1)
+
+- Multiple fixes for new **--grow** levels including fixes for serious data corruption
+ problems.
+- Change default metadata to **v1.1**.
+- Change default chunk size to 512K.
+- Change default bitmap chunk size to 64MB.
+- When **--re-add** is used, don't fall back to **--add** as this can destroy data.
+
+# Release [mdadm-3.1](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.1)
+
+- Support **--grow** to change the layout of RAID 4/5/6.
+- Support **--grow** to change the chunk size of RAID 4/5/6.
+- Support **--grow** to change level from RAID1 -> RAID5 -> RAID6 and back.
+- Support **--grow** to reduce the number of devices in RAID 4/5/6.
+- Support restart of these grow options which assembling an array which is partially grown.
+- Assorted tests of this code, and of different RAID6 layouts.
+
+# Release [mdadm-3.0.3](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.0.3)
+
+- Improvements for creating arrays giving just a name, like *foo*, rather than the full
+ */dev/md/foo*.
+- Improvements for assembling member arrays of containers.
+- Improvements to test suite.
+- Add option to change increment for *RebuildNN* messages reported by **--monitor**.
+- Improvements to **mdmon** hand-over from initrd to final root.
+- Handle merging of devices that have left an IMSM array and are being re-incorporated.
+- Add missing space in **--detail --brief** output.
+
+# Release [mdadm-3.0.2](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.0.2)
+
+- Fix crash when **homehost** is not set, as often happens in early boot.
+
+# Release [mdadm-3.0.1](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.0.1)
+
+- Fix various segfaults.
+- Fixed for **--examine** with containers.
+- Lots of other little fixes.
+
+# Release [mdadm-3.0](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/log/?h=mdadm-3.0)
+
+- Support for **externally managed metadata**, specifically DDF and IMSM.
+- Depend on udev to create entries in */dev*, rather than creating them ourselves.
+- Remove **--auto-update-home-hosts**.
+- New config file line **auto**.
+- New *ignore* and *any* options for **homehost**.
+- Numerous bug fixes and minor enhancements.
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index a3bf700..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,306 +0,0 @@
-Please see git logs for detailed change log.
-This file just contains highlight.
-
-Changes Prior to release 3.3
-- Some array reshapes can proceed without needing backup file.
- This is done by changing the 'data_offset' so we never need to write
- any data back over where it was before. If there is no "head space"
- or "tail space" to allow data_offset to change, the old mechanism
- with a backup file can still be used.
-- RAID10 arrays can be reshaped to change the number of devices,
- change the chunk size, or change the layout between 'near'
- and 'offset'.
- This will always change data_offset, and will fail if there is no
- room for data_offset to be moved.
-- "--assemble --update=metadata" can convert a 0.90 array to a 1.0 array.
-- bad-block-logs are supported (but not heavily tested yet)
-- "--assemble --update=revert-reshape" can be used to undo a reshape
- that has just been started but isn't really wanted. This is very
- new and while it passes basic tests it cannot be guaranteed.
-- improved locking between --incremental and --assemble
-- uses systemd to run "mdmon" if systemd is configured to do that.
-- kernel names of md devices can be non-numeric. e.g. "md_home" rather than
- "md0". This will probably confuse lots of other tools, so you need to
- echo CREATE names=yes >> /etc/mdadm.conf
- or the feature will not be used. (you also need a reasonably new kernel).
-- "--stop" can be given a kernel name instead of a device name. i.e
- mdadm --stop md4
- will work even if /dev/md4 doesn't exist.
-- "--detail --export" has some information about the devices in the array
-- --dump and --restore can be used to backup and restore the metadata on an
- array.
-- Hot-replace is supported with
- mdadm /dev/mdX --replace /dev/foo
- and
- mdadm /dev/mdX --replace /dev/foo --with /dev/bar
-- Config file can be a directory in which case all "*.conf" files are
- read in lexical order.
- Default is to read /etc/mdadm.conf and then /etc/mdadm.conf.d
- Thus
- echo CREATE name=yes > /etc/mdadm.conf.d/names.conf
- will also enable the use of named md devices.
-
-- Lots of improvements to DDF support including adding support for
- RAID10 (thanks Martin Wilck).
-
-Changes Prior to release 3.2.6
- - There are no real stand-out fixes, just lots of little bits and pieces.
-
-Changes Prior to release 3.2.5
- - This release primarily fixes a serious regression in 3.2.4.
- This regression does *not* cause any risk to data. It simply
- means that adding a device with "--add" would sometime fail
- when it should not.
-
- - The fix also includes a couple of minor fixes such as making
- the "--layout=preserve" option to "--grow" work again.
-
-
-Changes Prior to release 3.2.4
-"--oneline" log of changes is below. Some notable ones are:
-
- - --offroot argument to improve interactions between mdmon and initrd
- - --prefer argument to select which /dev names to display in some
- circumstances.
- - relax restructions on when "--add" will be allowed
- - Fix bug with adding write-intent-bitmap to active array
- - Now defaults to "/run/mdadm" for storing run-time files.
-
-Changes Prior to release 3.2.3
- - The largest single area of change is support for reshape of Intel
- IMSM arrays (OnLine Capacity Explansion and Level Migration).
- - Among other fixes, this now has a better chance of surviving if a
- device fails during reshape.
-
-Changes Prior to release 3.2.2
- - reshaping IMSM (Intel metadata) arrays is no longer 'experimental',
- it should work properly and be largely compatible with IMSM drivers in
- other platforms.
- - --assume-clean can be used with --grow --size to avoid resyncing the
- new part of the array. This is only support with very new kernels.
- - RAID0 arrays can have chunksize which is not a power of 2. This has been
- supported in the kernel for a while but is only now supprted by
- mdadm.
-
- - A new tool 'raid6check' is available which can check a RAID6 array,
- or part of it, and report which device is most inconsistent with the
- others if any stripe is inconsistent. This is still under development
- and does not have a man page yet. If anyone tries it out and has any
- questions or experience to report, they would be most welcome on
- linux-raid@vger.kernel.org.
-
-Changes Prior to release 3.2.1
- - policy framework
- Policy can be expressed for moving spare devices between arrays, and
- for how to handle hot-plugged devices. This policy can be different
- for devices plugged in to different controllers etc.
- This, for example, allows a configuration where when a device is plugged
- in it is immediately included in an md array as a hot spare and
- possibly starts recovery immediately if an array is degraded.
-
- - some understanding of mbr and gpt paritition tables
- This is primarly to support the new hot-plug support. If a
- device is plugged in and policy suggests it should have a partition table,
- the partition table will be copied from a suitably similar device, and
- then the partitions will hot-plug and can then be added to md arrays.
-
- - "--incremental --remove" can remember where a device was removed from
- so if a device gets plugged back in the same place, special policy applies
- to it, allowing it to be included in an array even if a general hotplug
- will not be included.
-
- - enhanced reshape options, including growing a RAID0 by converting to RAID4,
- restriping, and converting back. Also convertions between RAID0 and
- RAID10 and between RAID1 and RAID10 are possible (with a suitably recent
- kernel).
-
- - spare migration for IMSM arrays.
- Spare migration can now work across 'containers' using non-native metadata
- and specifically Intel's IMSM arrays support spare migrations.
-
- - OLCE and level migration for Intel IMSM arrays.
- OnLine Capacity Expansion and level migration (e.g. RAID0 -> RAID5) is
- supported for Intel Matrix Storage Manager arrays.
- This support is currently 'experimental' for technical reasons. It can
- be enabled with "export MDADM_EXPERIMENTAL=1"
-
- - avoid including wayward devices
- If you split a RAID1, mount the two halves as two separate degraded RAID1s,
- and then later bring the two back together, it is possible that the md
- metadata won't properly show that one must over-ride the other.
- mdadm now does extra checking to detect this possibilty and avoid
- potentially corrupting data.
-
- - remove any possible confusion between similar options.
- e.g. --brief and --bitmap were mapped to 'b' and mdadm wouldn't
- notice if one was used where the other was expected.
-
- - allow K,M,G suffixes on chunk sizes
-
-Changes Prior to release 3.2
- - By far the most significant change in this release related to the
- management of reshaping arrays. This code has been substantially
- re-written so that it can work with 'externally managed metadata' -
- Intel's IMSM in particular. We now support level migration and
- OnLine Capacity Expansion on these arrays.
- - Policy framework.
- Various policy statements can be made in the mdadm.conf to guide
- the behaviour of mdadm, particular with regards to how new devices
- are treated by "mdadm -I".
- Depending on the 'action' associated with a device (identified by
- its 'path') such need devices can be automatically re-added to and
- existing array that they previously fell out off, or automatically
- added as a spare if they appear to contain no data.
-
- - mdadm now has a limited understanding of partition tables. This
- allows the policy framework to make decisions about partitioned
- devices as well.
-
- - --incremental --remove can be told what --path the device was on,
- and this info will be recorded so that another device appearing at
- the same physical location can be preferentially added to the same
- array (provides the spare-same-slot action policy applied to the
- path).
-
- - A new flags "--invalid-backup" flag is available in --assemble
- mode. This can be used to re-assemble an array which was stopping
- in the middle of a reshape, and for which the 'backup file' is no
- longer available or is corrupted. The array may have some
- corruption in it at the point where reshape was up to, but at least
- the rest of the array will become available.
-
-
- - Various internal restructuring - more is needed.
-
-Changes Prior to release 3.1.5
- - Fixes for v1.x metadata on big-endian machines.
- - man page improvements
- - Improve '--detail --export' when run on partitions of an md array.
- - Fix regression with removing 'failed' or 'detached' devices.
- - Fixes for "--assemble --force" in various unusual cases.
- - Allow '-Y' to mean --export. This was documented but not implemented.
- - Various fixed for handling 'ddf' metadata. This is now more reliable
- but could benefit from more interoperability testing.
- - Correctly list subarrays of a container in "--detail" output.
- - Improve checks on whether the requested number of devices is supported
- by the metadata - both for --create and --grow.
- - Don't remove partitions from a device that is being included in an
- array until we are fully committed to including it.
- - Allow "--assemble --update=no-bitmap" so an array with a corrupt
- bitmap can still be assembled.
- - Don't allow --add to succeed if it looks like a "--re-add" is probably
- wanted, but cannot succeed. This avoids inadvertently turning
- devices into spares when an array is failed.
-
-Changes Prior to release 3.1.4
- Two fixes related to configs that aren't using udev:
- - Don't remove md devices which 'standard' names on --stop
- - Allow dev_open to work on read-only /dev
- And fixed regressions:
- - Allow --incremental to add spares to an array
- - Accept --no-degraded as a deprecated option rather than
- throwing an error
- - Return correct success status when --incrmental assembling
- a container which does not yet have enough devices.
- - Don't link mdadm with pthreads, only mdmon needs it.
- - Fix compiler warning due to bad use of snprintf
-
-Changes Prior to release 3.1.3
- - mapfile now lives in a fixed location which default to
- /dev/.mdadm/map but can be changed at compile time. This
- location is choses and most distros provide it during early
- boot and preserve it through. As long a /dev exists and is
- writable, /dev/.mdadm will be created.
- Other files file communication with mdmon live here too.
- This fixes a bug reported by Debian and Gentoo users where
- udev would spin in early-boot.
- - IMSM and DDF metadata will not be recognised on partitions
- as they should only be used on whole-disks.
- - Various overflows causes by 2G drives have been addressed.
- - A subarray of an IMSM contain can now be killed with
- --kill-subarray. Also subarrays can be renamed with
- --update-subarray
- - -If (or --incremental --fail) can be used from udev to
- fail and remove from all arrays a device which has been
- unplugged from the system. i.e. hot-unplug-support.
- - "mdadm /dev/mdX --re-add missing" will look for any device
- that looks like it should be a member of /dev/mdX but isn't
- and will automatically --re-add it
- - Now compile with -Wextra to get extra warnings.
- - Lots of minor bug fixes, documentation improvements, etcc
-
-Changes Prior to release 3.1.2
- - The default metadata has change again (sorry about that).
- It is now v1.2 and will hopefully stay that way. It turned
- out there with boot-block issues with v1.1 which make it
- unsuitable for a default, though in many cases it is still
- suitable to use.
- - Stopping a container is not permitted when members are still
- active
- - Add 'homehost' to the valid words for the "AUTO" config file
- line. When followed by "-all", this causes mdadm to
- auto-assemble any array belonging to this host, but not
- auto-assemble anything else.
- - Fix some bugs with "--grow --chunksize=" for changing chunksize.
- - VAR_RUN can be easily changed at compile time just like ALT_RUN.
- This gives distros more flexability in how to manage the
- pid and sock files that mdmon needs.
- - Various mdmon fixes
- - Alway make bitmap 4K-aligned if at all possible.
- - If mdadm.conf lists arrays which have inter-dependencies,
- the previously had to be listed in the "right" order. Now
- any order should work.
- - Fix --force assembly of v1.x arrays which are in the process
- of recovering.
- - Add section on 'scrubbing' to 'md' man page.
- - Various command-line-option parsing improvements.
- - ... and lots of other bug fixes.
-
-Changes Prior to release 3.1.1
- - Multiple fixes for new --grow levels including fixes for
- serious data corruption problems.
- - Change default metadata to v1.1
- - Change default chunk size to 512K
- - Change default bitmap chunk size to 64Meg
- - When --re-add is used, don't fall back to
- --add if --re-add fails as this can destroy data.
-
-Changes Prior to release 3.1
- - Support --grow to change the layout of RAID4/5/6
- - Support --grow to change the chunksize of raid 4/5/6
- - Support --grow to change level from RAID1 -> RAID5 -> RAID6 and
- back.
- - Support --grow to reduce the number of devices in RAID4/5/6.
- - Support restart of these grow options which assembling an array
- which is partially grown.
- - Assorted tests of this code, and of different RAID6 layouts.
-
-Changes Prior to release 3.0.3
- - Improvements for creating arrays giving just a name, like 'foo',
- rather than the full '/dev/md/foo'.
- - Improvements for assembling member arrays of containers.
- - Improvements to test suite
- - Add option to change increment for RebuildNN messages reported
- by "mdadm --monitor"
- - Improvements to mdmon 'hand-over' from initrd to final root.
- - Handle merging of devices that have left an IMSM array and are
- being re-incorporated.
- - Add missing space in "--detail --brief" output.
-
-Changes Prior to release 3.0.2
- - Fix crash when hosthost is not set, as often happens in
- early boot.
-
-Changes Prior to release 3.0.1
- - Fix various segfaults
- - Fixed for --examine with containers
- - Lots of other little fixes.
-
-Changes Prior to release 3.0
- - Support for externally managed metadata, specifically DDF and IMSM.
- - Depend on udev to create entries in /dev, rather than creating them
- ourselves.
- - remove --auto-update-home-hosts
- - new config file line "auto"
- - new "<ignore>" and "any" options for "homehost"
- - numerous bug fixes and minor enhancements.
diff --git a/Create.c b/Create.c
index 8082f54..d94253b 100644
--- a/Create.c
+++ b/Create.c
@@ -32,6 +32,10 @@
#include <sys/signalfd.h>
#include <sys/wait.h>
+#ifndef FALLOC_FL_ZERO_RANGE
+#define FALLOC_FL_ZERO_RANGE 16
+#endif
+
static int round_size_and_verify(unsigned long long *size, int chunk)
{
if (*size == 0)
@@ -279,8 +283,10 @@ static int add_disk_to_super(int mdfd, struct shape *s, struct context *c,
dv->devname);
return 1;
}
- if (!fstat_is_blkdev(fd, dv->devname, &rdev))
+ if (!fstat_is_blkdev(fd, dv->devname, &rdev)) {
+ close(fd);
return 1;
+ }
info->disk.major = major(rdev);
info->disk.minor = minor(rdev);
}
@@ -289,6 +295,7 @@ static int add_disk_to_super(int mdfd, struct shape *s, struct context *c,
if (st->ss->add_to_super(st, &info->disk, fd, dv->devname,
dv->data_offset)) {
ioctl(mdfd, STOP_ARRAY, NULL);
+ close(fd);
return 1;
}
st->ss->getinfo_super(st, info, NULL);
@@ -297,6 +304,7 @@ static int add_disk_to_super(int mdfd, struct shape *s, struct context *c,
*zero_pid = write_zeroes_fork(fd, s, st, dv);
if (*zero_pid <= 0) {
ioctl(mdfd, STOP_ARRAY, NULL);
+ close(fd);
return 1;
}
}
@@ -493,6 +501,7 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
*/
int mdfd;
unsigned long long minsize = 0, maxsize = 0;
+ dev_policy_t *custom_pols = NULL;
char *mindisc = NULL;
char *maxdisc = NULL;
char *name = ident->name;
@@ -584,6 +593,9 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
first_missing = subdevs * 2;
second_missing = subdevs * 2;
insert_point = subdevs * 2;
+
+ if (mddev_test_and_add_drive_policies(st, &custom_pols, fd, 1))
+ exit(1);
}
}
if (fd >= 0)
@@ -735,7 +747,7 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
close(dfd);
exit(2);
}
- close(dfd);
+
info.array.working_disks++;
if (dnum < s->raiddisks && dv->disposition != 'j')
info.array.active_disks++;
@@ -808,6 +820,11 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
}
}
+ if (drive_test_and_add_policies(st, &custom_pols, dfd, 1))
+ exit(1);
+
+ close(dfd);
+
if (dv->disposition == 'j')
goto skip_size_check; /* skip write journal for size check */
@@ -882,6 +899,7 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
close(fd);
}
}
+
if (missing_disks == dnum && !have_container) {
pr_err("Subdevs can't be all missing\n");
return 1;
@@ -1136,26 +1154,30 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
goto abort_locked;
}
- if (did_default && c->verbose >= 0) {
+ if (did_default) {
if (is_subarray(info.text_version)) {
- char devnm[32];
- char *ep;
+ char devnm[MD_NAME_MAX];
struct mdinfo *mdi;
- strncpy(devnm, info.text_version+1, 32);
- devnm[31] = 0;
- ep = strchr(devnm, '/');
- if (ep)
- *ep = 0;
+ sysfs_get_container_devnm(&info, devnm);
+
+ mdi = sysfs_read(-1, devnm, GET_VERSION | GET_DEVS);
+ if (!mdi) {
+ pr_err("Cannot open sysfs for container %s\n", devnm);
+ goto abort_locked;
+ }
+
+ if (sysfs_test_and_add_drive_policies(st, &custom_pols, mdi, 1))
+ goto abort_locked;
- mdi = sysfs_read(-1, devnm, GET_VERSION);
+ if (c->verbose >= 0)
+ pr_info("Creating array inside %s container /dev/%s\n",
+ mdi->text_version, devnm);
- pr_info("Creating array inside %s container %s\n",
- mdi?mdi->text_version:"managed", devnm);
sysfs_free(mdi);
- } else
- pr_info("Defaulting to version %s metadata\n",
- info.text_version);
+ } else if (c->verbose >= 0) {
+ pr_info("Defaulting to version %s metadata\n", info.text_version);
+ }
}
map_update(&map, fd2devnm(mdfd), info.text_version,
@@ -1325,6 +1347,8 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
udev_unblock();
close(mdfd);
sysfs_uevent(&info, "change");
+ dev_policy_free(custom_pols);
+
return 0;
abort:
@@ -1336,5 +1360,7 @@ int Create(struct supertype *st, struct mddev_ident *ident, int subdevs,
if (mdfd >= 0)
close(mdfd);
+
+ dev_policy_free(custom_pols);
return 1;
}
diff --git a/Detail.c b/Detail.c
index aaa3dd6..55a086d 100644
--- a/Detail.c
+++ b/Detail.c
@@ -49,6 +49,30 @@ static int add_device(const char *dev, char ***p_devices,
return n_devices + 1;
}
+/**
+ * detail_fname_from_uuid() - generate uuid string with special super1 handling.
+ * @mp: map entry to parse.
+ * @buf: buf to write.
+ *
+ * Hack to workaround an issue with super1 superblocks. It swapuuid set in order for assembly
+ * to work, but can't have it set if we want this printout to match all the other uuid printouts
+ * in super1.c, so we force swapuuid to 1 to make our printout match the rest of super1.
+ *
+ * Always convert uuid if host is big endian.
+ */
+char *detail_fname_from_uuid(struct map_ent *mp, char *buf)
+{
+#if __BYTE_ORDER == BIG_ENDIAN
+ bool swap = true;
+#else
+ bool swap = false;
+#endif
+ if (strncmp(mp->metadata, "1.", 2) == 0)
+ swap = true;
+
+ return __fname_from_uuid(mp->uuid, swap, buf, ':');
+}
+
int Detail(char *dev, struct context *c)
{
/*
@@ -226,6 +250,9 @@ int Detail(char *dev, struct context *c)
str = map_num(pers, array.level);
if (c->export) {
+ char nbuf[64];
+ struct map_ent *mp = NULL, *map = NULL;
+
if (array.raid_disks) {
if (str)
printf("MD_LEVEL=%s\n", str);
@@ -247,32 +274,22 @@ int Detail(char *dev, struct context *c)
array.minor_version);
}
- if (st && st->sb && info) {
- char nbuf[64];
- struct map_ent *mp, *map = NULL;
-
- fname_from_uuid(st, info, nbuf, ':');
- printf("MD_UUID=%s\n", nbuf + 5);
+ if (info)
mp = map_by_uuid(&map, info->uuid);
+ if (!mp)
+ mp = map_by_devnm(&map, fd2devnm(fd));
- if (mp && mp->path && strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0)
+ if (mp) {
+ detail_fname_from_uuid(mp, nbuf);
+ printf("MD_UUID=%s\n", nbuf + 5);
+ if (mp->path && strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0)
printf("MD_DEVNAME=%s\n", mp->path + DEV_MD_DIR_LEN);
+ }
+ map_free(map);
+ if (st && st->sb) {
if (st->ss->export_detail_super)
st->ss->export_detail_super(st);
- map_free(map);
- } else {
- struct map_ent *mp, *map = NULL;
- char nbuf[64];
- mp = map_by_devnm(&map, fd2devnm(fd));
- if (mp) {
- __fname_from_uuid(mp->uuid, 0, nbuf, ':');
- printf("MD_UUID=%s\n", nbuf+5);
- }
- if (mp && mp->path && strncmp(mp->path, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0)
- printf("MD_DEVNAME=%s\n", mp->path + DEV_MD_DIR_LEN);
-
- map_free(map);
}
if (!c->no_devices && sra) {
struct mdinfo *mdi;
diff --git a/Grow.c b/Grow.c
index f95dae8..074f199 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2085,9 +2085,10 @@ int Grow_reshape(char *devname, int fd,
if (!mdmon_running(st->container_devnm))
start_mdmon(st->container_devnm);
ping_monitor(container);
- if (mdmon_running(st->container_devnm) &&
- st->update_tail == NULL)
- st->update_tail = &st->updates;
+ if (mdmon_running(st->container_devnm) == false) {
+ pr_err("No mdmon found. Grow cannot continue.\n");
+ goto release;
+ }
}
if (s->size == MAX_SIZE)
@@ -2097,11 +2098,7 @@ int Grow_reshape(char *devname, int fd,
/* got truncated to 32bit, write to
* component_size instead
*/
- if (sra)
- rv = sysfs_set_num(sra, NULL,
- "component_size", s->size);
- else
- rv = -1;
+ rv = sysfs_set_num(sra, NULL, "component_size", s->size);
} else {
rv = md_set_array_info(fd, &array);
@@ -3048,6 +3045,8 @@ static int reshape_array(char *container, int fd, char *devname,
dprintf("Cannot get array information.\n");
goto release;
}
+ if (st->update_tail == NULL)
+ st->update_tail = &st->updates;
if (array.level == 0 && info->component_size == 0) {
get_dev_size(fd, NULL, &array_size);
info->component_size = array_size / array.raid_disks;
@@ -4414,19 +4413,8 @@ static void validate(int afd, int bfd, unsigned long long offset)
lseek64(afd, __le64_to_cpu(bsb2.arraystart)*512, 0);
if ((unsigned long long)read(afd, abuf, len) != len)
fail("read first from array failed");
- if (memcmp(bbuf, abuf, len) != 0) {
-#if 0
- int i;
- printf("offset=%llu len=%llu\n",
- (unsigned long long)__le64_to_cpu(bsb2.arraystart)*512, len);
- for (i=0; i<len; i++)
- if (bbuf[i] != abuf[i]) {
- printf("first diff byte %d\n", i);
- break;
- }
-#endif
+ if (memcmp(bbuf, abuf, len) != 0)
fail("data1 compare failed");
- }
}
if (bsb2.length2) {
unsigned long long len = __le64_to_cpu(bsb2.length2)*512;
@@ -5152,9 +5140,7 @@ int Grow_continue_command(char *devname, int fd,
start_mdmon(container);
ping_monitor(container);
- if (mdmon_running(container))
- st->update_tail = &st->updates;
- else {
+ if (mdmon_running(container) == false) {
pr_err("No mdmon found. Grow cannot continue.\n");
ret_val = 1;
goto Grow_continue_command_exit;
diff --git a/Incremental.c b/Incremental.c
index 30c07c0..83db071 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -833,6 +833,54 @@ container_members_max_degradation(struct map_ent *map, struct map_ent *me)
return max_degraded;
}
+/**
+ * incremental_external_test_spare_criteria() - helper to test spare criteria.
+ * @st: supertype, must be not NULL, it is duplicated here.
+ * @container_devnm: devnm of the container.
+ * @disk_fd: file descriptor of device to tested.
+ * @verbose: verbose flag.
+ *
+ * The function is used on new drive verification path to check if it can be added to external
+ * container. To test spare criteria, metadata must be loaded. It duplicates super to not mess in
+ * original one.
+ * Function is executed if superblock supports get_spare_criteria(), otherwise success is returned.
+ */
+mdadm_status_t incremental_external_test_spare_criteria(struct supertype *st, char *container_devnm,
+ int disk_fd, int verbose)
+{
+ mdadm_status_t rv = MDADM_STATUS_ERROR;
+ char container_devname[PATH_MAX];
+ struct spare_criteria sc = {0};
+ struct supertype *dup;
+
+ if (!st->ss->get_spare_criteria)
+ return MDADM_STATUS_SUCCESS;
+
+ dup = dup_super(st);
+ snprintf(container_devname, PATH_MAX, "/dev/%s", container_devnm);
+
+ if (dup->ss->get_spare_criteria(dup, container_devname, &sc) != 0) {
+ if (verbose > 1)
+ pr_err("Failed to get spare criteria for %s\n", container_devname);
+ goto out;
+ }
+
+ if (!disk_fd_matches_criteria(dup, disk_fd, &sc)) {
+ if (verbose > 1)
+ pr_err("Disk does not match spare criteria for %s\n", container_devname);
+ goto out;
+ }
+
+ rv = MDADM_STATUS_SUCCESS;
+
+out:
+ dev_policy_free(sc.pols);
+ dup->ss->free_super(dup);
+ free(dup);
+
+ return rv;
+}
+
static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
struct map_ent *target, int bare,
struct supertype *st, int verbose)
@@ -873,8 +921,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
struct supertype *st2;
struct domainlist *dl = NULL;
struct mdinfo *sra;
- unsigned long long devsize, freesize = 0;
- struct spare_criteria sc = {0, 0};
+ unsigned long long freesize = 0;
if (is_subarray(mp->metadata))
continue;
@@ -925,34 +972,19 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
if (sra->array.failed_disks == -1)
sra->array.failed_disks = container_members_max_degradation(map, mp);
- get_dev_size(dfd, NULL, &devsize);
if (sra->component_size == 0) {
- /* true for containers, here we must read superblock
- * to obtain minimum spare size */
- struct supertype *st3 = dup_super(st2);
- int mdfd = open_dev(mp->devnm);
- if (mdfd < 0) {
- free(st3);
+ /* true for containers */
+ if (incremental_external_test_spare_criteria(st2, mp->devnm, dfd, verbose))
goto next;
- }
- if (st3->ss->load_container &&
- !st3->ss->load_container(st3, mdfd, mp->path)) {
- if (st3->ss->get_spare_criteria)
- st3->ss->get_spare_criteria(st3, &sc);
- st3->ss->free_super(st3);
- }
- free(st3);
- close(mdfd);
}
- if ((sra->component_size > 0 &&
- st2->ss->validate_geometry(st2, sra->array.level, sra->array.layout,
+
+ if (sra->component_size > 0 &&
+ st2->ss->validate_geometry(st2, sra->array.level, sra->array.layout,
sra->array.raid_disks, &sra->array.chunk_size,
sra->component_size,
sra->devs ? sra->devs->data_offset : INVALID_SECTORS,
devname, &freesize, sra->consistency_policy,
- 0) &&
- freesize < sra->component_size) ||
- (sra->component_size == 0 && devsize < sc.min_size)) {
+ 0) && freesize < sra->component_size) {
if (verbose > 1)
pr_err("not adding %s to %s as it is too small\n",
devname, mp->path);
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
new file mode 100644
index 0000000..9c79ba8
--- /dev/null
+++ b/MAINTAINERS.md
@@ -0,0 +1,44 @@
+# Maintainer tools
+
+Useful tools used in daily routines:
+- [checkpatch](https://docs.kernel.org/dev-tools/checkpatch.html)
+- [kup](https://korg.docs.kernel.org/kup.html)
+- [Auto-publishing](https://korg.docs.kernel.org/kup.html#auto-publishing-with-git-archive-signer)
+- [b4](https://b4.docs.kernel.org/en/latest/)
+
+# Checklist before applying patch
+
+We don't have CI testing yet, so all those steps must be performed manually:
+- Style check with [checkpatch](https://docs.kernel.org/dev-tools/checkpatch.html):
+
+ This is the current code style follows. We are not strict to all rules. It must be run
+ by **checkpatch --no-tree**, see README.md.
+
+- [Commit style](https://www.kernel.org/doc/html/v4.10/process/submitting-patches.html):
+
+ It doesn't need to be followed as strictly as is in kernel but changes should be logically
+ separated. Submitter should care at least to mention "It is used in next patches" if unused
+ externs/files are added in patch. We love: *Reported-by:*, *Suggested-by:*, *Fixes:* tags.
+
+- Compilation, ideally on various gcc versions.
+- Mdadm test suite execution.
+- Consider requesting new tests from submitter, especially for new functionalities.
+- Ensure that maintainer *sign-off* is added, before pushing.
+
+# Making a release
+
+Assuming that maintainer is certain that release is safe, following steps must be done:
+
+- Update versions strings in release commit, please refer to previous releases for examples.
+
+- Create GPG signed tag and push it to repo. Use same format as was used previously, prefixed by
+ **mdadm-**, e.g. **mdadm-3.1.2**, **mdadm-4.1**.
+
+- [Auto-publishing](https://korg.docs.kernel.org/kup.html#auto-publishing-with-git-archive-signer):
+
+ Adopt script to our release tag model. When ready, push signed note to repository. If it is done
+ correctly, then *(sig)* is added to the package automatically generated by kernel.org automation.
+ There is no need to upload archive manually.
+
+- Update CHANGELOG.md.
+- Write "ANNOUNCE" mail to linux-raid@kernel.org to notify community.
diff --git a/Makefile b/Makefile
index cbdba49..7c221a8 100644
--- a/Makefile
+++ b/Makefile
@@ -170,7 +170,7 @@ OBJS = mdadm.o config.o policy.o mdstat.o ReadMe.o uuid.o util.o maps.o lib.o u
mdopen.o super0.o super1.o super-ddf.o super-intel.o bitmap.o \
super-mbr.o super-gpt.o \
restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o msg.o xmalloc.o \
- platform-intel.o probe_roms.o crc32c.o
+ platform-intel.o probe_roms.o crc32c.o drive_encryption.o
CHECK_OBJS = restripe.o uuid.o sysfs.o maps.o lib.o xmalloc.o dlink.o
@@ -183,7 +183,7 @@ MON_OBJS = mdmon.o monitor.o managemon.o uuid.o util.o maps.o mdstat.o sysfs.o c
Kill.o sg_io.o dlink.o ReadMe.o super-intel.o \
super-mbr.o super-gpt.o \
super-ddf.o sha1.o crc32.o msg.o bitmap.o xmalloc.o \
- platform-intel.o probe_roms.o crc32c.o
+ platform-intel.o probe_roms.o crc32c.o drive_encryption.o
MON_SRCS = $(patsubst %.o,%.c,$(MON_OBJS))
diff --git a/Manage.c b/Manage.c
index 30302ac..96e5ee5 100644
--- a/Manage.c
+++ b/Manage.c
@@ -178,7 +178,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
struct map_ent *map = NULL;
struct mdinfo *mdi;
char devnm[32];
- char container[32];
+ char container[MD_NAME_MAX] = {0};
int err;
int count;
char buf[SYSFS_MAX_BUF_SIZE];
@@ -192,15 +192,9 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
* to stop is probably a bad idea.
*/
mdi = sysfs_read(fd, NULL, GET_LEVEL|GET_COMPONENT|GET_VERSION);
- if (mdi && is_subarray(mdi->text_version)) {
- char *sl;
- strncpy(container, mdi->text_version+1, sizeof(container));
- container[sizeof(container)-1] = 0;
- sl = strchr(container, '/');
- if (sl)
- *sl = 0;
- } else
- container[0] = 0;
+ if (mdi && is_subarray(mdi->text_version))
+ sysfs_get_container_devnm(mdi, container);
+
close(fd);
count = 5;
while (((fd = ((devname[0] == '/')
@@ -695,6 +689,99 @@ skip_re_add:
return 0;
}
+/**
+ * manage_add_external() - Add disk to external container.
+ * @st: external supertype pointer, must not be NULL, superblock is released here.
+ * @fd: container file descriptor, must not have O_EXCL mode.
+ * @disk_fd: device to add file descriptor.
+ * @disk_name: name of the device to add.
+ * @disc: disk info.
+ *
+ * Superblock is released here because any open fd with O_EXCL will block sysfs_add_disk().
+ */
+mdadm_status_t manage_add_external(struct supertype *st, int fd, char *disk_name,
+ mdu_disk_info_t *disc)
+{
+ mdadm_status_t rv = MDADM_STATUS_ERROR;
+ char container_devpath[MD_NAME_MAX];
+ struct dev_policy *pols = NULL;
+ struct mdinfo new_mdi;
+ struct mdinfo *sra = NULL;
+ int container_fd;
+ int disk_fd = -1;
+
+ snprintf(container_devpath, MD_NAME_MAX, "%s", fd2devnm(fd));
+
+ container_fd = open_dev_excl(container_devpath);
+ if (!is_fd_valid(container_fd)) {
+ pr_err("Failed to get exclusive access to container %s\n", container_devpath);
+ return MDADM_STATUS_ERROR;
+ }
+
+ /* Check if metadata handler is able to accept the drive */
+ if (!st->ss->validate_geometry(st, LEVEL_CONTAINER, 0, 1, NULL, 0, 0, disk_name, NULL,
+ 0, 1))
+ goto out;
+
+ if (mddev_test_and_add_drive_policies(st, &pols, container_fd, 1))
+ goto out;
+
+ Kill(disk_name, NULL, 0, -1, 0);
+
+ disk_fd = dev_open(disk_name, O_RDWR | O_EXCL | O_DIRECT);
+ if (!is_fd_valid(disk_fd)) {
+ pr_err("Failed to exclusively open %s\n", disk_name);
+ goto out;
+ }
+
+ if (drive_test_and_add_policies(st, &pols, disk_fd, 1))
+ goto out;
+
+ if (st->ss->add_to_super(st, disc, disk_fd, disk_name, INVALID_SECTORS))
+ goto out;
+
+ if (!mdmon_running(st->container_devnm))
+ st->ss->sync_metadata(st);
+
+ sra = sysfs_read(container_fd, NULL, 0);
+ if (!sra) {
+ pr_err("Failed to read sysfs for %s\n", disk_name);
+ goto out;
+ }
+
+ sra->array.level = LEVEL_CONTAINER;
+ /* Need to set data_offset and component_size */
+ st->ss->getinfo_super(st, &new_mdi, NULL);
+ new_mdi.disk.major = disc->major;
+ new_mdi.disk.minor = disc->minor;
+ new_mdi.recovery_start = 0;
+
+ st->ss->free_super(st);
+
+ if (sysfs_add_disk(sra, &new_mdi, 0) != 0) {
+ pr_err("Failed to add %s to container %s\n", disk_name, container_devpath);
+ goto out;
+ }
+ ping_monitor(container_devpath);
+ rv = MDADM_STATUS_SUCCESS;
+
+out:
+ close(container_fd);
+ dev_policy_free(pols);
+
+ if (sra)
+ sysfs_free(sra);
+
+ if (rv != MDADM_STATUS_SUCCESS && is_fd_valid(disk_fd))
+ /* Metadata handler records this descriptor, so release it only on failure. */
+ close(disk_fd);
+
+ if (st->sb)
+ st->ss->free_super(st);
+
+ return rv;
+}
+
int Manage_add(int fd, int tfd, struct mddev_dev *dv,
struct supertype *tst, mdu_array_info_t *array,
int force, int verbose, char *devname,
@@ -794,25 +881,23 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
* simply re-add it.
*/
- if (array->not_persistent == 0) {
+ if (array->not_persistent == 0 && dv->disposition != 'S') {
+ int rv = 0;
+
dev_st = dup_super(tst);
dev_st->ss->load_super(dev_st, tfd, NULL);
- if (dev_st->sb && dv->disposition != 'S') {
- int rv;
- rv = attempt_re_add(fd, tfd, dv, dev_st, tst,
- rdev, update, devname,
- verbose, array);
- dev_st->ss->free_super(dev_st);
- if (rv) {
- free(dev_st);
- return rv;
- }
- }
- if (dev_st) {
+ if (dev_st->sb) {
+ rv = attempt_re_add(fd, tfd, dv, dev_st, tst, rdev, update,
+ devname, verbose, array);
+
dev_st->ss->free_super(dev_st);
- free(dev_st);
}
+
+ free(dev_st);
+
+ if (rv)
+ return rv;
}
if (dv->disposition == 'M') {
if (verbose > 0)
@@ -968,68 +1053,8 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
if (dv->failfast == FlagSet)
disc.state |= (1 << MD_DISK_FAILFAST);
if (tst->ss->external) {
- /* add a disk
- * to an external metadata container */
- struct mdinfo new_mdi;
- struct mdinfo *sra;
- int container_fd;
- char devnm[32];
- int dfd;
-
- strcpy(devnm, fd2devnm(fd));
-
- container_fd = open_dev_excl(devnm);
- if (container_fd < 0) {
- pr_err("add failed for %s: could not get exclusive access to container\n",
- dv->devname);
- tst->ss->free_super(tst);
+ if (manage_add_external(tst, fd, dv->devname, &disc) != MDADM_STATUS_SUCCESS)
goto unlock;
- }
-
- /* Check if metadata handler is able to accept the drive */
- if (!tst->ss->validate_geometry(tst, LEVEL_CONTAINER, 0, 1, NULL,
- 0, 0, dv->devname, NULL, 0, 1)) {
- close(container_fd);
- goto unlock;
- }
-
- Kill(dv->devname, NULL, 0, -1, 0);
- dfd = dev_open(dv->devname, O_RDWR | O_EXCL|O_DIRECT);
- if (tst->ss->add_to_super(tst, &disc, dfd,
- dv->devname, INVALID_SECTORS)) {
- close(dfd);
- close(container_fd);
- goto unlock;
- }
- if (!mdmon_running(tst->container_devnm))
- tst->ss->sync_metadata(tst);
-
- sra = sysfs_read(container_fd, NULL, 0);
- if (!sra) {
- pr_err("add failed for %s: sysfs_read failed\n",
- dv->devname);
- close(container_fd);
- tst->ss->free_super(tst);
- goto unlock;
- }
- sra->array.level = LEVEL_CONTAINER;
- /* Need to set data_offset and component_size */
- tst->ss->getinfo_super(tst, &new_mdi, NULL);
- new_mdi.disk.major = disc.major;
- new_mdi.disk.minor = disc.minor;
- new_mdi.recovery_start = 0;
- /* Make sure fds are closed as they are O_EXCL which
- * would block add_disk */
- tst->ss->free_super(tst);
- if (sysfs_add_disk(sra, &new_mdi, 0) != 0) {
- pr_err("add new device to external metadata failed for %s\n", dv->devname);
- close(container_fd);
- sysfs_free(sra);
- goto unlock;
- }
- ping_monitor(devnm);
- sysfs_free(sra);
- close(container_fd);
} else {
tst->ss->free_super(tst);
if (ioctl(fd, ADD_NEW_DISK, &disc)) {
diff --git a/Monitor.c b/Monitor.c
index 824a69f..9b016bc 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -451,17 +451,19 @@ static int check_one_sharer(int scan)
return 2;
}
- if (access(AUTOREBUILD_PID_PATH, F_OK) != 0)
- return 0;
+ fp = fopen(AUTOREBUILD_PID_PATH, "r");
+ if (!fp) {
+ /* PID file does not exist */
+ if (errno == ENOENT)
+ return 0;
- if (!is_file(AUTOREBUILD_PID_PATH)) {
- pr_err("%s is not a regular file.\n", AUTOREBUILD_PID_PATH);
+ pr_err("Cannot open %s file.\n", AUTOREBUILD_PID_PATH);
return 2;
}
- fp = fopen(AUTOREBUILD_PID_PATH, "r");
- if (!fp) {
- pr_err("Cannot open %s file.\n", AUTOREBUILD_PID_PATH);
+ if (!is_file(AUTOREBUILD_PID_PATH)) {
+ pr_err("%s is not a regular file.\n", AUTOREBUILD_PID_PATH);
+ fclose(fp);
return 2;
}
@@ -1006,34 +1008,6 @@ static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist)
return new_found;
}
-static int get_required_spare_criteria(struct state *st,
- struct spare_criteria *sc)
-{
- int fd;
-
- if (!st->metadata || !st->metadata->ss->get_spare_criteria) {
- sc->min_size = 0;
- sc->sector_size = 0;
- return 0;
- }
-
- fd = open(st->devname, O_RDONLY);
- if (fd < 0)
- return 1;
- if (st->metadata->ss->external)
- st->metadata->ss->load_container(st->metadata, fd, st->devname);
- else
- st->metadata->ss->load_super(st->metadata, fd, st->devname);
- close(fd);
- if (!st->metadata->sb)
- return 1;
-
- st->metadata->ss->get_spare_criteria(st->metadata, sc);
- st->metadata->ss->free_super(st->metadata);
-
- return 0;
-}
-
static int check_donor(struct state *from, struct state *to)
{
struct state *sub;
@@ -1068,22 +1042,12 @@ static dev_t choose_spare(struct state *from, struct state *to,
for (d = from->raid; !dev && d < MAX_DISKS; d++) {
if (from->devid[d] > 0 && from->devstate[d] == 0) {
struct dev_policy *pol;
- unsigned long long dev_size;
- unsigned int dev_sector_size;
if (to->metadata->ss->external &&
test_partition_from_id(from->devid[d]))
continue;
- if (sc->min_size &&
- dev_size_from_id(from->devid[d], &dev_size) &&
- dev_size < sc->min_size)
- continue;
-
- if (sc->sector_size &&
- dev_sector_size_from_id(from->devid[d],
- &dev_sector_size) &&
- sc->sector_size != dev_sector_size)
+ if (devid_matches_criteria(to->metadata, from->devid[d], sc) == false)
continue;
pol = devid_policy(from->devid[d]);
@@ -1168,12 +1132,12 @@ static void try_spare_migration(struct state *statelist)
{
struct state *from;
struct state *st;
- struct spare_criteria sc;
link_containers_with_subarrays(statelist);
for (st = statelist; st; st = st->next)
if (st->active < st->raid && st->spare == 0 && !st->err) {
struct domainlist *domlist = NULL;
+ struct spare_criteria sc = {0};
int d;
struct state *to = st;
@@ -1186,8 +1150,11 @@ static void try_spare_migration(struct state *statelist)
/* member of a container */
to = to->parent;
- if (get_required_spare_criteria(to, &sc))
- continue;
+ if (to->metadata->ss->get_spare_criteria)
+ if (to->metadata->ss->get_spare_criteria(to->metadata, to->devname,
+ &sc))
+ continue;
+
if (to->metadata->ss->external) {
/* We must make sure there is
* no suitable spare in container already.
@@ -1228,6 +1195,7 @@ static void try_spare_migration(struct state *statelist)
}
}
domain_free(domlist);
+ dev_policy_free(sc.pols);
}
}
diff --git a/README.initramfs b/README.initramfs
deleted file mode 100644
index c5fa668..0000000
--- a/README.initramfs
+++ /dev/null
@@ -1,122 +0,0 @@
-Assembling md arrays at boot time.
----------------------------------
-December 2005
-
-These notes apply to 2.6 kernels only and, in some cases,
-to 2.6.15 or later.
-
-Md arrays can be assembled at boot time using the 'autodetect' functionality
-which is triggered by storing components of an array in partitions of type
-'fd' - Linux Raid Autodetect.
-They can also be assembled by specifying the component devices in a
-kernel parameter such as
- md=0,/dev/sda,/dev/sdb
-In this case, /dev/md0 will be assembled (because of the 0) from the listed
-devices.
-
-These mechanisms, while useful, do not provide complete functionality
-and are unlikely to be extended. The preferred way to assemble md
-arrays at boot time is using 'mdadm'. To assemble an array which
-contains the root filesystem, mdadm needs to be run before that
-filesystem is mounted, and so needs to be run from an initial-ram-fs.
-It is how this can work that is the primary focus of this document.
-
-It should be noted up front that only the array containing the root
-filesystem should be assembled from the initramfs. Any other arrays
-should be assembled under the control of files on the main filesystem
-as this enhanced flexibility and maintainability.
-
-A minimal initramfs for assembling md arrays can be created using 3
-files and one directory. These are:
-
-/bin Directory
-/bin/mdadm statically linked mdadm binary
-/bin/busybox statically linked busybox binary
-/bin/sh hard link to /bin/busybox
-/init a shell script which call mdadm appropriately.
-
-An example init script is:
-
-==============================================
-#!/bin/sh
-
-echo 'Auto-assembling boot md array'
-mkdir /proc
-mount -t proc proc /proc
-if [ -n "$rootuuid" ]
-then arg=--uuid=$rootuuid
-elif [ -n "$mdminor" ]
-then arg=--super-minor=$mdminor
-else arg=--super-minor=0
-fi
-echo "Using $arg"
-mdadm -Acpartitions $arg --auto=part /dev/mda
-cd /
-mount /dev/mda1 /root || mount /dev/mda /root
-umount /proc
-cd /root
-exec chroot . /sbin/init < /dev/console > /dev/console 2>&1
-=============================================
-
-This could certainly be extended, or merged into a larger init script.
-Though tested and in production use, it is not presented here as
-"The Right Way" to do it, but as a useful example.
-Some key points are:
-
- /proc needs to be mounted so that /proc/partitions can be accessed
- by mdadm, and so that /proc/filesystems can be accessed by mount.
-
- The uuid of the array can be passed in as a kernel parameter
- (rootuuid). As the kernel doesn't use this value, it is made available
- in the environment for /init
-
- If no uuid is given, we default to md0, (--super-minor=0) which is a
- commonly used to store the root filesystem. This may not work in
- all situations.
-
- We assemble the array as a partitionable array (/dev/mda) even if we
- end up using the whole array. There is no cost in using the partitionable
- interface, and in this context it is simpler.
-
- We try mounting both /dev/mda1 and /dev/mda as they are the most like
- part of the array to contain the root filesystem.
-
- The --auto flag is given to mdadm so that it will create /dev/md*
- files automatically. This is needed as /dev will not contain
- and md files, and udev will not create them (as udev only created device
- files after the device exists, and mdadm need the device file to create
- the device). Note that the created md files may not exist in /dev
- of the mounted root filesystem. This needs to be deal with separately
- from mdadm - possibly using udev.
-
- We do not need to create device files for the components which will
- be assembled into /dev/mda. mdadm finds the major/minor numbers from
- /proc/partitions and creates a temporary /dev file if one doesn't already
- exist.
-
-The script "mkinitramfs" which is included with the mdadm distribution
-can be used to create a minimal initramfs. It creates a file called
-'init.cpio.gz' which can be specified as an 'initrd' to lilo or grub
-(or whatever boot loader is being used).
-
-
-
-
-Resume from an md array
------------------------
-
-If you want to make use of the suspend-to-disk/resume functionality in Linux,
-and want to have swap on an md array, you will need to assemble the array
-before resume is possible.
-However, because the array is active in the resumed image, you do not want
-anything written to any drives during the resume process, such as superblock
-updates or array resync.
-
-This can be achieved in 2.6.15-rc1 and later kernels using the
-'start_readonly' module parameter.
-Simply include the command
- echo 1 > /sys/module/md_mod/parameters/start_ro
-before assembling the array with 'mdadm'.
-You can then echo
- 9:0
-or whatever is appropriate to /sys/power/resume to trigger the resume.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..64f2ece
--- /dev/null
+++ b/README.md
@@ -0,0 +1,83 @@
+**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://raid.wiki.kernel.org/index.php/RAID_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.
+
+# How to Contribute
+
+ **mdadm** is hosted on [kernel.org](https://kernel.org/). You can access repository
+[here](https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git).
+
+It is maintained similarly to kernel, using *mailing list*. Patches must be send through email.
+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**.
+
+## Sending patches step-by-step
+
+To maximize change of patches being taken, follow this instruction when submitting:
+
+1. Create possibly logically separated commits and generate patches:
+
+ Use ``git format-patch --cover-letter --signoff -v <nr>`` to create patches:
+ * ``--cover-letter`` can be skipped if it is only one patch;
+ * ``--signoff`` adds sign-off tag;
+ * ``-v <nr>`` indicates review revision number, sender should increment it before resending.
+
+2. Check style of every patch with kernel
+ [checkpatch](https://docs.kernel.org/dev-tools/checkpatch.html) script:
+
+ It is important to keep same coding style that is why in **mdadm**
+ [kernel coding style](https://www.kernel.org/doc/html/v4.10/process/coding-style.html)
+ is preferred. ``checkpath --no-tree <patch_file>`` can be used to verify patches.
+ Following checkpatch issues can be ignored:
+ - New typedefs.
+ - comparing with *True/False*.
+ - kernel *MAINTAINERS* file warning.
+ - *extern* keyword in headers.
+
+3. Send patches using ``git send-mail --to=linux-raid@vger.kernel.org <cover-letter> <patch1> <patch2> (...)``
+
+# Maintainers
+
+It is good practice to add **mdadm maintainers** to recipients for patches:
+
+- Jes Sorensen <jes@trained-monkey.org>;
+- Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>;
+
+Adding **MD maintainers** could be reasonable, especially if patches may affect MD driver:
+
+- Song Liu <song@kernel.org>;
+- Yu Kuai <yukuai3@huawei.com>;
+
+# Reviewers
+
+**mdadm** utility is not part of kernel tree, so there is no certificated *Reviewers* list. Everyone
+can comment on mailing list, last decision (and merging) belongs to maintainers.
+
+# 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.
+
+# License
+
+It is released under the terms of the **GNU General Public License version 2** as published
+by the **Free Software Foundation**.
diff --git a/TODO b/TODO
deleted file mode 100644
index 279d20d..0000000
--- a/TODO
+++ /dev/null
@@ -1,213 +0,0 @@
- - add 'name' field to metadata type and use it.
- - use validate_geometry more
- - metadata should be able to check/reject bitmap stuff.
-
-DDF:
- Three new metadata types:
- ddf - used only to create a container.
- ddf-bvd - used to create an array in a container
- ddf-svd - used to create a secondary array from bvds.
-
- Usage:
- mdadm -C /dev/ddf1 /dev/sd[abcdef]
- mdadm -C /dev/md1 -e ddf /dev/sd[a-f]
- mdadm -C /dev/md1 -l container /dev/sd[a-f]
-
- Each of these create a new ddf container using all those
- devices. The name 'ddf*' signals that ddf metadata should be used.
- '-e ddf' only supports one level - 'container'. 'container' is only
- supported by ddf.
-
- mdadm -C /dev/md1 -l0 -n4 /dev/ddf1 # or maybe not ???
- mdadm -C /dev/md1 -l1 -n2 /dev/sda /dev/sdb
- If exactly one device is given, and it is a container, we select
- devices from that container.
- If devices are given that are already in use, they must be in use by
- a container, and the array is created in the container.
- If devices given are bvds, we slip under the hood to make
- the svd arrays.
-
- mdadm -A /dev/ddf ......
- base drives make a container. Anything in that container is started
- auto-read-only.
- if /dev/ddf is already assembled, we assemble bvds and svds inside it.
-
-
-2005-dec-20
- Want an incremental assembly mode to work nicely with udev.
- Core usage would be something like
- mdadm --incr-assemble /dev/newdevice
- This would
- - examine the device to determine uuid etc.
- - look for a match in /etc/mdadm.conf, abort if not found
- - find that device and collect current contents
- - perform an 'assemble' analysis to make sure we have the best set of devices.
- - remove or add devices as appropriate
- - possibly start the array if it was complete
-
- Other usages could involve
- - specify which array to auto-add to.
- This requires an existing array for uuid matching... is there any point?
-
- -
-
-
-2004-june-02
- * Don't print 'errors' flag, it is meaningless. DONE
- * Handle new superblock format
- * create device file on demand, particularly partitionable devices. DONE
- BUT figure a way to create the partition devices.
- auto=partN
- * Use Event: interface to listen for events. DONE, untested
- * Make sure mdadm -As can assemble multi-level RAIDs ok.
- * --build to build raid1 or multipath arrays
- clean or not ???
-
-----------------------------------------------------------------------------
-* mdadm --monitor to monitor failed multipath paths and re-instate them.
-
-* Maybe make "--help" fit in 80x24 and have a --long-help with more info. DONE
-
-
-* maybe "missing" instead of <bold>missing</> in doco DONE
-* possibly wait for resync to start, or even finish while assembling.- NO
-
-* -Db should have a devices= entry if possible. - DONE
-* when assembling multipath arrays, ignore any error indicators. - DONE
-* rationalise --monitor usage:
- mdadm --monitor
- doesn't do as expected. DONE
-
-* --assemble could have a --update option. - DONE
- following word can be:
- sparc2.2
- super-minor
-
-* mdadm /dev/md11, where md11 is raid0 can segfault, particularly when looking in the
- [UU_UUU] string ... which doesn't exist !
-It should be more sensible. DONE
-
-Example:
-
-from Raimund Sacherer <raimund.sacherer@ngit.at>
-
-mke2fs -m0 -q /dev/ram1 300
-mount -n -t ext2 /dev/ram1 /tmp
-echo DEVICE /dev/[sh]* >> /tmp/mdadm.conf
-mdadm -Esb /dev/[sh]* 2>/dev/null >> /tmp/mdadm.conf
-mdadm -ARsc /tmp/mdadm.conf
-umount /tmp
-
-
-?? Allow -S /dev/md? - current complains subsequent not a/d/r - DONE
-
-* new "Query" mode to subsume --detail and --examine.
- --query or -Q, takes a device and tells if it is an MD device,
- and also tells in a raid superblock is found.
- DONE
-
-* write mdstat.c to parse /proc/mdstat file
- Build list of arrays: name, rebuild-percent
- DONE
-
-* parse /proc/partitions and map major/minor into /dev/* names,
- and use that for default DEVICE list ????
-
-* --detail --scan to read /proc/mdstat, and then iterate over these,
- but assume --brief. --verbose can override
- check each subdevice to see if it is in conf_get_devs.
- Warn if not.
- DONE, but don't warn yet...
-
-* Support multipath ... maybe...
- maybe DONE
-
-* --follow to syslog
-
-* --follow to move spares around DONE
-
-* --follow to notice other events: DONE
- rebuild started
- spare activated
- spare removed
- spare added
-
-------------------------------------
-- --examine --scan scans all drives and build an mdadm.conf file DONE
-
-- check superblock checksum in examine DONE
-- report "chunk" or "rounding" depending on raid level DONE
-- report "linear" instead of "-1" for raid level DONE
-- decode ayout depending on raid level DONE
-- --verbose and --force flags. DONE
-
-- set md_minor, *_disks for Create - DONE
-- for create raid5, how to choose between
- all working, but not insync
- one missing, one spare, insync DONE (--force)
-- and for raid1 - some failed drives... (missing)
-
-- when RUN_ARRAY, make sure *_disks counts are right
-
-- get --detail to extract extra stuff from superblock,
- like uuid DONE
-- --detail --brief to give a config file line DONE
-- parse config file. DONE
-- test...
-
-- when --assemble --scan, if an underlying device is an md device,
- then try to assemble that device first.
-
-
-- mdadm -S /dev/md0 /dev/md1 gives internal error FIXED
-
-- mdadm --detail --scan print summary of what it can find? DONE
-
-
----------
-Assemble doesn't add spares. - DONE
-Create to allow "missing" name for devices.
-Create to accept "--force" for do exactly what is requested
-- get Assemble to upgrade devices if force flag.
-ARRAY lines in config file to have super_minor=n
-ARRAY lines in config file to have device=pattern, and only accept
- those devices
- If UUID given, insist on that
- If not, but super_minor given, require all found with that minor
- to have same uuid
- If only device given, all valid supers on those devices must have
- same uuid
-allow /dev/mdX as first argument before any options
-Possible --dry-run option for create and assemble--force
-
-Assemble to check that all devices mentioned in superblock
- are present.
-
-New mode: --Monitor (or --Follow)
- Periodically check status of all arrays (listed in config file).
- Log every event and apparent cause - or differences
- Email and alert - or run a program - for important events
- Move spares around if necessary.
-
- An Array line can have a spare-group= field that indicates that
- the array shares spares with other arrays with the same
- spare-group name.
- If an array has a failed and no spares, then check all other
- arrays in the spare group. If one has no failures and a spare,
- then consider that spare.
- Choose the smallest considered spare that is large enough.
- If there is one, then hot-remove it from it's home, and
- hot-add it to the array in question.
-
- --mail-to address
- --alert-handler program
-
- Will also extract information from /proc/mdstat if present,
- and consider 20% marks in rebuild as events.
-
- Events are:
- drive fails - causes mail to be sent
- rebuild started
- spare activated
- spare removed
- spare added
diff --git a/config.c b/config.c
index 44f7dd2..b46d71c 100644
--- a/config.c
+++ b/config.c
@@ -81,7 +81,7 @@ char DefaultAltConfDir[] = CONFFILE2 ".d";
enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev,
Homehost, HomeCluster, AutoMode, Policy, PartPolicy, Sysfs,
- MonitorDelay, LTEnd };
+ MonitorDelay, EncryptionNoVerify, LTEnd };
char *keywords[] = {
[Devices] = "devices",
[Array] = "array",
@@ -96,6 +96,7 @@ char *keywords[] = {
[PartPolicy]="part-policy",
[Sysfs] = "sysfs",
[MonitorDelay] = "monitordelay",
+ [EncryptionNoVerify] = "ENCRYPTION_NO_VERIFY",
[LTEnd] = NULL
};
@@ -729,6 +730,19 @@ void monitordelayline(char *line)
}
}
+static bool sata_opal_encryption_no_verify;
+void encryption_no_verify_line(char *line)
+{
+ char *word;
+
+ for (word = dl_next(line); word != line; word = dl_next(word)) {
+ if (strcasecmp(word, "sata_opal") == 0)
+ sata_opal_encryption_no_verify = true;
+ else
+ pr_err("unrecognised word on ENCRYPTION_NO_VERIFY line: %s\n", word);
+ }
+}
+
char auto_yes[] = "yes";
char auto_no[] = "no";
char auto_homehost[] = "homehost";
@@ -913,6 +927,9 @@ void conf_file(FILE *f)
case MonitorDelay:
monitordelayline(line);
break;
+ case EncryptionNoVerify:
+ encryption_no_verify_line(line);
+ break;
default:
pr_err("Unknown keyword %s\n", line);
}
@@ -1075,6 +1092,12 @@ int conf_get_monitor_delay(void)
return monitor_delay;
}
+bool conf_get_sata_opal_encryption_no_verify(void)
+{
+ load_conffile();
+ return sata_opal_encryption_no_verify;
+}
+
struct createinfo *conf_get_create_info(void)
{
load_conffile();
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..8237145
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,2454 @@
+mdadm (4.3+20240412-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 4.3+20240412.
+ * Updating to standards-version 4.7.0.
+ * Updating mdadm docs.
+ * Updating mdadm examples.
+ * Correcting filename of TODO.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 27 Apr 2024 05:20:02 +0200
+
+mdadm (4.3-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 4.3.
+ * Updating copyright for 2024.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 21 Feb 2024 18:13:58 +0100
+
+mdadm (4.2+20240118-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 4.2+20240118.
+ * Updating years in copyright for 2024.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 31 Jan 2024 06:50:56 +0100
+
+mdadm (4.2+20231121-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 4.2+20231121.
+ * Harmonizing license blurbs in copyright file.
+ * Adding updated German debconf translations from Helge Kreutzmann
+ <debian@helgefjell.de> (Closes: #1055789).
+ * Adding updated Swedish debconf translations from Martin Bagge
+ <brother@persilja.net> (Closes: #1057772).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 10 Dec 2023 11:57:19 +0100
+
+mdadm (4.2+20231026-1) sid; urgency=medium
+
+ * Uploading to sid.
+ * Merging upstream version 4.2+20231026.
+ * Refreshing fix-manpages.patch.
+ * Refreshing no-Werror.patch.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 01 Nov 2023 05:09:47 +0100
+
+mdadm (4.2+20230508-7) sid; urgency=medium
+
+ * Uploading to sid.
+ * Removing generated files to fix FTBFS when build twice in a row
+ (Closes: #1047538).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 14 Aug 2023 11:51:05 +0200
+
+mdadm (4.2+20230508-6) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adding updated Dutch debconf translations from Frans Spiesschaert
+ <Frans.Spiesschaert@yucom.be> (Closes: #1041873).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 24 Jul 2023 20:44:54 +0200
+
+mdadm (4.2+20230508-5) sid; urgency=medium
+
+ * Uploading to sid.
+ * Updating package descriptions.
+ * Adding updated Romanian debconf translations from Remus-Gabriel Chelu
+ <remusgabriel.chelu@disroot.org> (Closes: #1039620).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 30 Jun 2023 10:07:14 +0200
+
+mdadm (4.2+20230508-4) sid; urgency=medium
+
+ * Uploading to sid.
+ * Updating watch file.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 25 Jun 2023 16:26:53 +0200
+
+mdadm (4.2+20230508-3) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Updating regex in logcheck ignore patterns for kernels md tunining
+ message (LP: #1176560).
+ * Adding debconf note when run on non-systemd systems (Closes:
+ #1037496).
+ * Updating debconf po files.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 24 Jun 2023 07:03:53 +0200
+
+mdadm (4.2+20230508-2) sid; urgency=medium
+
+ * Uploading to sid.
+ * Uploading without changes after bookworm release.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 11 Jun 2023 14:32:19 +0200
+
+mdadm (4.2+20230508-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 4.2+20230508.
+ * Refreshing and updating readlink-path.patch to cover basename too.
+ * Refreshing randomize-timers.patch.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 12 May 2023 14:48:12 +0200
+
+mdadm (4.2+20230313-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 4.2+20230313.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 13 Mar 2023 17:55:55 +0100
+
+mdadm (4.2+20230304-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 4.2+20230304.
+ * Adding initial Romanian debconf translations from Remus-Gabriel Chelu
+ <remusgabriel.chelu@disroot.org> (Closes: #1032713).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 13 Mar 2023 14:58:14 +0100
+
+mdadm (4.2+20230302-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 4.2+20230302.
+ * Updating host-name-in-default-mailfrom.patch for new upstream.
+ * Updating exit-gracefully-when-md-device-not-found.patch for new
+ upstream.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Mon, 06 Mar 2023 04:25:46 +0100
+
+mdadm (4.2+20230227-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 4.2+20230227.
+ * Removing sysvinit scripts in favour of systemd units:
+ - properly checkrestart mdmonitor (Closes: #815834).
+ - no update-rc.d warnings anymore (Closes: #822354).
+ - properly shutdown (Closes: #829621).
+ - making /etc/default/mdadm obsolete for most things (Closes: #850180).
+ * Removing cron jobs in favour of systemd timers:
+ - daily checks also work if system is not always on (Closes: #889978).
+ * Adding rediffed patch from ubuntu to randomize md array check timers.
+ * Adding rediffed patch from ubuntu to honor debconf daily scan in
+ systemd unit.
+ * Adding rediffed patch from ubuntu to fix empty spaces in timer unit
+ files.
+ * Wrap and sorting debian directory.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Tue, 28 Feb 2023 20:48:50 +0100
+
+mdadm (4.2+20230223-2) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Updating upstream contact in copyright.
+ * Silencing mounting efivars in initramfs-hook by only mounting if not
+ done already.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 25 Feb 2023 22:34:46 +0100
+
+mdadm (4.2+20230223-1) experimental; urgency=medium
+
+ * Uploading to experimental.
+ * Merging upstream version 4.2+20230223.
+ * Removing documentation-keys-in-service-files.patch, included upstream.
+ * Removing fix-command-line-help.patch, included upstream.
+ * Removing strcat-look-for-md-device-in-dev-md.patch, solved differently
+ upstream.
+ * Removing conffile-location.patch, not needed anymore.
+ * Refreshing fix-manpages.patch.
+ * Refreshing mdmonitor-service-simplify.patch.
+ * Refreshing host-name-in-default-mailfrom.patch.
+ * Refreshing exit-gracefully-when-md-device-not-found.patch.
+ * Refreshing sha1-includes.patch.
+ * Refreshing readlink-path.patch.
+ * Refreshing no-Werror.patch.
+ * Refreshing test-installed.patch.
+ * Updating standards version to 4.6.2.
+ * Updating vcs fields.
+ * Updating homepage field in control.
+ * Sorting control file.
+ * Removing unneeded po-debconf build-depends.
+ * Removing groff-base from build-depends as it's pulled in by debhelper.
+ * Removing redundant debconf depends.
+ * Removing unused depends to lsb-base.
+ * Removing suggests on dracut until there's integration for it
+ available.
+ * Removing obsolete alternative depends on module-init-tools.
+ * Reworking package descriptions.
+ * Removing old debian news.
+ * Removing obsolete doc-base integration.
+ * Removing unused salsa-ci.
+ * Marking maintainer scripts executable in debian tree.
+ * Moving scripts to subdirectory in debian tree.
+ * Moving docs to subdirectory in debian tree.
+ * Moving initramfs-tools files to subdirectory in debian tree.
+ * Moving reportbug files to subdirectory in debian tree.
+ * Removing conditional mta suggests/recommends, the mta should not be
+ pulled in by default via recommends.
+ * Also installing apport hook on debian.
+ * Only modprobing efivars on efi systems (Closes: #996622).
+ * Mounting efivarfs in initrd for Intel fakeraid support (Closes:
+ #1003352).
+ * Refreshing debconf po files.
+ * Harmonizing debconf-po file headers.
+ * Shortening depends in tests control.
+ * No longer including the individual announcement files from very old
+ mdadm versions and the current one doesn't contain much information
+ anymore.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 25 Feb 2023 18:55:13 +0100
+
+mdadm (4.2-5) sid; urgency=medium
+
+ * Uploading to sid.
+ * Adopting package (Closes: #1009983).
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 24 Feb 2023 15:37:15 +0100
+
+mdadm (4.2-4) unstable; urgency=medium
+
+ * QA upload
+
+ [ Debian Janitor ]
+ * Remove constraints unnecessary since buster
+ * Add missing ${misc:Depends} to Depends for mdadm-udeb.
+ * Remove 1 obsolete maintscript entry.
+
+ [ Graham Inggs ]
+ * Ship /etc/mdadm directory again to prevent dpkg warning:
+ unable to delete old directory '/etc/mdadm': Directory not empty
+ (Closes: #1004475)
+ * Display $(DEB_VENDOR) $(DEB_VERSION) in mdadm --version output
+ (Closes: #1000663)
+ * Drop /lib/udev/rules.d/64-md-raid-assembly.rules from Ubuntu's
+ mdadm-udeb, no longer built there
+ * Install Ubuntu's Apport package hook with install instead of
+ a second call to dh_install, which clears the execute permission
+ on /usr/share/mdadm/mdcheck
+ * Bump Standards-Version to 4.6.1, no changes
+
+ -- Graham Inggs <ginggs@debian.org> Sun, 26 Jun 2022 08:47:12 +0000
+
+mdadm (4.2-3) unstable; urgency=medium
+
+ * Orphan.
+ * Point Vcs fields to 'debian' namespace on Salsa.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Thu, 21 Apr 2022 10:14:07 -0700
+
+mdadm (4.2-2) unstable; urgency=medium
+
+ * Add host name to default value for MAILFROM address. (See: #1006464)
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Mon, 28 Feb 2022 04:58:49 -0800
+
+mdadm (4.2-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Fix typo in manual page. (Closes: #1003226)
+ * Set upstream's home page to Linux Raid Wiki.
+ * Adjust Lintian override for new install location.
+ * Bump Standards-Version to 4.6.0.
+ * Reorder patches for easier submission upstream.
+ * Refresh Debian patches.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Fri, 07 Jan 2022 09:36:34 -0800
+
+mdadm (4.2~rc2-7) unstable; urgency=medium
+
+ * In initramfs, load efivarfs module, which has a new name. (Closes: #995047)
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Sat, 25 Sep 2021 21:57:51 -0700
+
+mdadm (4.2~rc2-6) unstable; urgency=medium
+
+ * Pass proper build flags to make.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Thu, 26 Aug 2021 06:57:18 -0700
+
+mdadm (4.2~rc2-5) unstable; urgency=medium
+
+ * Use dh sequencer.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Wed, 25 Aug 2021 12:01:24 -0700
+
+mdadm (4.2~rc2-4) unstable; urgency=medium
+
+ * Generate config even when SOURCE_DATE_EPOCH is not set; fixup to 04adb527.
+ (Closes: #992853)
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Tue, 24 Aug 2021 07:01:33 -0700
+
+mdadm (4.2~rc2-3) unstable; urgency=medium
+
+ * Add support for 'repair' action to checkarray. (Closes: #772465)
+ * Use a reproducible timestamp in mkconf; delete temporary file in initramfs.
+ (Closes: #982607)
+ * Adjust character set of Swedish debconf translation; no string changes.
+ (Closes: #972357)
+ * Update the Czech translations of debconf messages. (Closes: #972440)
+ * Drop version check in postinst for an upload predating the release of oldstable.
+ * Add a file with upstream metadata providing the information sought by DEP-12.
+ * Fix typo in manual page.
+ * Refresh Debian patches.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Mon, 23 Aug 2021 13:01:29 -0700
+
+mdadm (4.2~rc2-2) unstable; urgency=medium
+
+ * Upload targeting unstable.
+ * Fix uscan regex for upstream tarballs.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Sun, 15 Aug 2021 14:56:17 -0700
+
+mdadm (4.2~rc2-1) experimental; urgency=medium
+
+ * New release candidate from upstream.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Tue, 03 Aug 2021 07:36:19 -0700
+
+mdadm (4.2~rc1-1) experimental; urgency=medium
+
+ * New release candidate from upstream.
+ * Add libudev-dev to Build-Depends.
+ * Drop patches previously cherry-picked from upstream:
+ - 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch
+ (now 0833f9c3)
+ - 0002-Document-PART-POLICY-lines.patch (now 6b611284)
+ - 0003-policy-support-devices-with-multiple-paths.patch (now cd72f9d1)
+ - 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch (now 4199d3c6)
+ - 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch
+ (now 7cd7e91a)
+ - 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch
+ (now d7a1fda2)
+ - 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch
+ (now 563ac108)
+ - 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch
+ (now 085df422)
+ - 0009-Grow-report-correct-new-chunk-size.patch (now 76d505de)
+ - 0010-policy.c-prevent-NULL-pointer-referencing.patch (now 467e6a1b)
+ - 0011-policy.c-Fix-for-compiler-error.patch (now 757e55435)
+ - 0001-Create-add-support-for-RAID0-layouts.patch (now 329dfc28)
+ - 0002-Assemble-add-support-for-RAID0-layouts.patch (now 027c099f)
+ - 0001-Respect-CROSS_COMPILE-when-CC-is-the-default.patch (now aced6fc9)
+ * Drop patches accepted upstream:
+ - typos-in-programs.patch (now ebf3be99)
+ - lp-1847924-introduce-new-array-state-broken.patch (now 43ebc910)
+ * Refresh remaining patches.
+ * Adapt d/watch to accept release candidates.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Mon, 26 Jul 2021 20:34:36 -0700
+
+mdadm (4.1-11) unstable; urgency=medium
+
+ * Load efivars module in initramfs, if available. (Closes: #962844)
+ * Do not explicitly include /bin/rm in initramfs; /usr/bin/rm
+ is already present. (See: #875918)
+ * Bump Standards-Version to 4.5.1.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Tue, 09 Feb 2021 20:02:47 -0800
+
+mdadm (4.1-10) unstable; urgency=medium
+
+ * For initramfs, copy 'rm' executable from existing location; and to /bin. (Closes: #974829)
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Sun, 15 Nov 2020 04:32:19 -0800
+
+mdadm (4.1-9) unstable; urgency=medium
+
+ * Add 'rm' executable to initramfs hook. (Closes: #875918)
+ * Update Brazilian debconf translation. (Closes: #972835)
+ * Bump d/watch file standard to version 4.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Sat, 14 Nov 2020 20:46:29 -0800
+
+mdadm (4.1-8) unstable; urgency=medium
+
+ * Comprehensive FAQ improvements and amendments.(Closes: #715387)
+ * Update Finnish debconf translation. (Closes: #972143)
+ * Update Portuguese debconf translation. (Closes: #971941)
+ * Update Basque debconf translation.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Tue, 13 Oct 2020 11:15:45 -0700
+
+mdadm (4.1-7) unstable; urgency=medium
+
+ * Look for md device in /dev/md and exit gracefully on failure.
+ (Closes: #958060, #970329)
+ * Update Spanish, Italian, Slovak and Russian debconf translations.
+ (Closes: #970381, #970568, #970578)
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Mon, 21 Sep 2020 07:35:13 -0700
+
+mdadm (4.1-6) unstable; urgency=medium
+
+ * Install misc/mdcheck; thanks Richard Laager. (Closes: #960132)
+ * Update French, Dutch and German debconf translations. (Closes: #935184,
+ #940851, #956350)
+ * Bring command-line help in line with manual page. (Closes: #932791)
+ * Fix spelling and groff macro issues in manual pages. (Closes: #915182,
+ #916946, #962946)
+ * Explain 'max' keyword in command-line option --size. (Closes: #933773)
+ * Patch d/README.recipes for clarity. (Closes: #619043)
+ * Enable autopkgtest for installed version. Requires isolation-machine,
+ untested. (Closes: #872118)
+ * Adopt package. (Closes: #924367)
+ * Turn on hardening.
+ * Avoid a race condition in d/mdadm-shutdown.service.
+ * Implement missing status option in /etc/init.d/mdadm-waitidle.
+ * Add missing Documentation keys to several service files.
+ * Upgrade debhelper compat to 13; use new prerequisite style.
+ * Set Rules-Requires-Root: no.
+ * Bump Standards-Version to 4.5.0.
+ * Convert copyright to DEP-5 machine-readable format.
+ * Host Vcs on salsa.d.o.
+ * Adopt DEP-14 branch naming in Vcs-Git
+ * Enable standard Salsa CI pipeline.
+ * Fix typos in executables.
+ * Explain that --name does not work in Grow mode.
+ * Convert international debconf translations to UTF-8.
+ * Capitalize first word in package synopsis.
+ * Add Lintian overrides for tags that may not be appropriate.
+
+ -- Felix Lechner <felix.lechner@lease-up.com> Sat, 12 Sep 2020 20:46:58 -0700
+
+mdadm (4.1-5) unstable; urgency=medium
+
+ * QA upload.
+ * Fix cross-compilation failure. (Closes: #866522).
+ Thanks to Helmut Grohne.
+ * Add support for raid0/linear 'broken' state. (Closes: #943520).
+ Thanks to Guilherme G. Piccoli and Dan Streetman. LP: #1847924.
+
+ -- dann frazier <dannf@debian.org> Wed, 22 Jan 2020 09:56:25 -0700
+
+mdadm (4.1-4) unstable; urgency=medium
+
+ * QA upload.
+ * Add support for RAID0 layouts. (Closes: #944676) (LP: #1850540)
+
+ -- dann frazier <dannf@debian.org> Mon, 02 Dec 2019 14:35:49 -0700
+
+mdadm (4.1-3) unstable; urgency=medium
+
+ * QA upload.
+ * Adding debconf question to disable daily array scan (Closes: #689304):
+ - if enabled (default), mdadm checks once a day for degraded arrays
+ and missing spares to ensure that such events don't go unnoticed.
+ - this is not useful when the system is part of an infrastructure
+ with dedicated monitoring systems (e.g. icinga).
+ - this debconf question makes it possible to disable these checks.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Fri, 09 Aug 2019 17:19:20 +0000
+
+mdadm (4.1-2) unstable; urgency=medium
+
+ * QA upload.
+ * Orphan package.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 12 Mar 2019 03:58:03 +0000
+
+mdadm (4.1-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Cherrypick patches from master to 757e55435997e355ee9b03e5d913b5496a3c39a8.
+ * Drop XC- prefix from Package-Type field in debian/control.
+ * Bump standards version to 4.3.0.
+ * Use https in the watch file.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 15 Jan 2019 18:23:53 +0000
+
+mdadm (4.1~rc1-4) unstable; urgency=medium
+
+ * Cherrypick master patches up to 20th of July 2018. LP: #1781427
+ * Make safe-timouts udev rules compatible with usr-split systems.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 23 Jul 2018 11:48:50 +0100
+
+mdadm (4.1~rc1-3) unstable; urgency=medium
+
+ * Cherrypick master patches up to 4th of June 2018.
+
+ -- Dimitri John Ledkov 🌈 <xnox@ubuntu.com> Tue, 26 Jun 2018 15:38:04 +0100
+
+mdadm (4.1~rc1-2) unstable; urgency=medium
+
+ * Install identical udev rules into d-i installer udeb, as used in the
+ installed system. Specifically, post-processed rules with full path to
+ mdadm binary subsituted, instead of installing useless rules with the
+ template variable BINDIR. LP: #1705215
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 22 May 2018 14:26:59 +0100
+
+mdadm (4.1~rc1-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Import patches since rc1.
+ * Bump standards version & debhelper compat.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 15 May 2018 12:10:33 +0100
+
+mdadm (4.0-2) unstable; urgency=medium
+
+ * Ship mdadm-shutdown.service and suggest dracut-core. Users of systemd
+ with rootfs on Intel Matrix Raid and DDF external metadata-raid arrays
+ that require mdmon monitoring, may wish to install dracut-core package
+ and enable mdadm-shutdown.service. This will create a shutdown
+ initramfs, that systemd-shutdown can pivot to. This may result in an
+ improved shutdown behaviour with less hangs and synced raid
+ arrays. The generated initramfs will takeover mdmon monitoring, wait
+ for the arrays to be clean before stopping them and unmounting
+ everything and finally executing requested shutdown command.
+ * Bump standards version, no changes required.
+ * Bump debhelper to 9.
+ * Add second email address to avoid NMU warnings.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 10 Oct 2017 11:55:52 +0100
+
+mdadm (4.0-1) unstable; urgency=medium
+
+ * New upstream release. LP: #1668128
+ * Drop warnings that raid arrays are missing from the initramfs
+ configuration. Instead have a positive message as to which arrays are
+ included in the initramfs.
+ * Add a warning to mkconf generated file that mdadm.conf is copied into
+ initrafms.
+ * Fix checkarray script bugs. LP: #1599428 Closes: #787950 Closes: #843665
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 22 Jun 2017 13:23:10 +0100
+
+mdadm (3.4-4) unstable; urgency=high
+
+ * Bring in changes from Ubuntu, to make the two packages in sync:
+ - Drop README.Debian, quite out-of-date w.r.t. current packaging.
+ - debian/control - on ubuntu, downgrade default-mta from Recommends to
+ Suggests.
+ - update-grub in postinst, if available (note does not update grub1).
+ - drop stderr warnings in postrm.
+ - drop presubj, out of date, and all types of bugs are welcomed.
+ - on ubuntu, install apport package hook.
+ - on ubuntu, install incremental assembly udev rules into udeb.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 28 Jul 2016 16:52:07 +0100
+
+mdadm (3.4-3) unstable; urgency=high
+
+ * Fix UUID= grep for configured RAIDs to be case incesetive, regression from 3.4-2.
+
+ * Re-trigger block devices at the start of local-block mdadm loop, to
+ re-incrementally assemble disks that appeared before RAID
+ personalities were registered with the kernel.
+
+ * Also, invoke non-incremental assembly of raid arrays in the
+ local-block loop to support running mdadm with user-exported variables
+ specified via param.conf.
+
+ * Set Vcs- fields to dgit repositories.
+
+ * Closes: #830770, #830300.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 26 Jul 2016 17:09:54 +0100
+
+mdadm (3.4-2) unstable; urgency=low
+
+ * Reneable incremental assembly
+ * Rely on udev to assemble incremental arrays
+ * In environments with systemd rely on mdadm-last-resort@.timer|.service
+ units to activate degrated raids
+ * In environments initramfs-tools initrd (no systemd) add local-block
+ script to do the same after 2/3rds of root delay iteration
+ * Drop local-top initramfs script
+ * Drop dependency on initscripts package
+ * Drop INITRDSTART support
+ * Drop mdadm-raid init script
+ * Drop ancient preinst
+ * In mdadm.init remove dependency on mdadm-raid
+ * In mdadm.init check, and bail out running in a container
+ * In mdadm.config drop mdadm/autostart logic
+ * Drop CREATE stanzas from mkconf and don't include them in the
+ initramfs. The generated defaults, are the compiled-in defaults. And
+ the current one generates warnings when running mdadm in the
+ initramfs, as there is no passwd|group files to resolve root/disk
+ uid/gid. Closes: 717609
+ * Adapt changes and formatting of initramfs hook from Ubuntu
+ * Bump standards version to 3.9.7, no changes required
+ * Fix copyright-refers-to-symlink-license
+ * Closes: #781172, #796624, #769201, #813335, #632401, #804973, #714155,
+ #770002, #737132, #675452, #726390, #813637, #814036.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Sat, 02 Jul 2016 19:16:01 +0100
+
+mdadm (3.4-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Drop use-tempnode-not-devnode.patch, not needed anymore.
+ * Drop use-external-blkid.diff. (Closes: #793631)
+ * Refresh patches.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Fri, 19 Feb 2016 16:18:36 +0000
+
+mdadm (3.3.4-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * disable-incremental-assembly.patch: incremental assembly prevents booting
+ in degraded mode (Closes: #784070)
+
+ -- Yann Soubeyrand <yann-externe.soubeyrand@edf.fr> Tue, 10 Nov 2015 11:18:39 +0100
+
+mdadm (3.3.4-1) unstable; urgency=medium
+
+ [ Dimitri John Ledkov ]
+ * Adopting the package as per mjt delegation. Thank you for your
+ service mainting this package over the years, your contributions
+ are highly appreciated by all of Debian and derivate communities.
+ * New upstream release.
+ * Bump standards version to 3.9.6.0, no changes required.
+ * Use dh_prep instead of dh_clean -k
+ * Drop cherrypicked patches.
+
+ [ Helmut Grohne ]
+ * Fix FTCBFS. Export CROSS_COMPILE=<triplet>- (Closes: #794335)
+
+ [ Cyril B. ]
+ * Copy AUTO lines from host into initrd, when updating initrd.
+ (Closes: #785104)
+
+ [ Martin von Wittich ]
+ * Ignore errors attempting to apply *nice to checkarray, it may be
+ done already. (Closes: #791554)
+
+ -- Dimitri John Ledkov <xnox@debian.org> Sun, 08 Nov 2015 11:48:03 +0000
+
+mdadm (3.3.2-5) unstable; urgency=medium
+
+ * use-tempnode-not-devnode.patch: change udev rules file to use
+ $tempnode which works both on wheezy and jessie udev, instead
+ of $devnode which only works in jessie. At this stage it is
+ better to make rules file compatible with old version instead
+ of adding versioned dependency. Should be removed for jessie+1.
+ (Closes: #770883)
+ * fix Closes: list in previous entry (Closes: #771852)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sat, 20 Dec 2014 11:48:44 +0300
+
+mdadm (3.3.2-4) unstable; urgency=medium
+
+ * really remove /var/lib/mdadm in postinst, fixing a brown-paper bag
+ bug in previous upload (I fixed it earlier but forgot to commit it
+ before 3.3.2-3 release). (Closes: #764036, #771852)
+ * mention closing of #588965 #599352 #694513 by 3.3-1
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Fri, 05 Dec 2014 17:29:22 +0300
+
+mdadm (3.3.2-3) unstable; urgency=medium
+
+ * remove /var/lib/mdadm dir in postinst to clean up from old pkg,
+ remove config files on purge (restore extraneous cleanup from
+ last change) (Closes: #764036)
+ * remove set -u (error on unset variables) from maintscripts
+ (Closes: #766308)
+ * rebuildmap-strip-local-host-name-from-device-name.patch - a patch
+ from upstream fixing a bug when mdadm have to re-create device
+ nodes after assembling arrays (eg, when switching from initramfs
+ without preserving /dev and /run), to choose the same device names
+ as when doing inital assembly
+ * readlink-path.patch: readlink is in /bin not /usr/bin on debian
+ (Closes: #766416)
+ * mdmonitor-service-simplify.diff: simplify mdmonitor.service
+ systemd file, do not try to read non-existing files (Closes: #764647)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Fri, 28 Nov 2014 09:55:14 +0300
+
+mdadm (3.3.2-2) unstable; urgency=medium
+
+ * remove more leftovers from old versions
+ * do not embed $VERSION to mkconf and bugscript
+ * removed unneeded lintian-overrides file
+ * removed examples/mdadd.sh
+ * removed references to MAIL_TO from /etc/default/mdadm (pre-2.x mdadm)
+ * removed AUTOSTART variable from /etc/default/mdadm
+ (system will start arrays listed in mdadm.conf)
+ * simplify d/rules, build udeb in a subdir (for now, to be removed)
+ * install systemd services and disable some initscripts (mask them)
+ when systemd is running (Closes: #763959)
+ * build-sys-no-check_rundir.patch: stop (re)linking executables
+ at install time
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sat, 04 Oct 2014 20:38:36 +0400
+
+mdadm (3.3.2-1) unstable; urgency=low
+
+ * new minor/bugfix upstream release (Closes: #731884, #763080)
+ * removed remove-bashism-from-makefile.patch (applied upstream)
+ * copy 64-md-raid-assembly.rules to initramfs too, this should
+ bring us array auto-assemble during initramfs run (Closes: #678691)
+ * denote inability to initialize md subsystem in local-top script
+ from fatal error to warning (Closes: #733574)
+ * create /etc/modprobe.d/mdadm.conf to set start_ro=1 there
+ instead of doing it in the initramfs
+ * use install -D in d/rules consistently and remove dirs from d/mdadm.dirs
+ * remove references to old (2.x and 1.x) mdadm versions (Closes: #728804)
+ * remove references to very old (pre-wheeze) breaks/replaces/depends
+ * remove support of makedev
+ * reformat mdadm-raid initscript a bit
+ * remove rebuilding-raid.html (had invisible refs) and
+ RAID5_versus_RAID10.txt docs. Maybe it's a good idea to remove
+ other docs shipped with the package, since these becoming stale
+ and these days, better alternatives exist online
+ * removed debian-specific mdadm-startall script which does nothing more than
+ "mdadm --assemble --scan". Remove docbook-to-man from build-deps.
+ * pass dpkg-buildflags to upstream build system and
+ stop using our own -O0, -Os etc
+ * remove separate CFLAGS for udeb and simplify *FLAGS handling
+ * bump Standards-Version to 3.9.5 (no changes needed)
+ * fix VCS links to point to anonscm.d.o
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Wed, 01 Oct 2014 15:09:07 +0400
+
+mdadm (3.3-2) unstable; urgency=low
+
+ * use 63-md-raid-arrays.rules instead of old 64-md-raid.rules
+ (Closes: #726237)
+ * do not use builtin blkid in udev rules, as our udev (at least
+ on wheezy) does not have it (use-external-blkid.diff)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Mon, 14 Oct 2013 15:49:54 +0400
+
+mdadm (3.3-1) unstable; urgency=low
+
+ [ Michael Tokarev ]
+ * new upstream 3.3 release (Closes: #718896, #588965, #599352, #694513)
+ See ANNOUNCE-3.3 for details.
+ Patches:
+ - refreshed debian-conffile-location.diff
+ (added .conf.d)
+ - removed debian-disable-udev-incr-assembly.diff
+ (do not ship udev-md-raid-assembly.rules for now)
+ - refreshed debian-no-Werror.diff
+ - refreshed sha1-includes.diff
+ - removed patches (included upstream)A:
+ spelling-and-manpages.patch
+ fix-enough-function-for-RAID10.patch
+ fix-segfaults-in-detail.patch
+ super0-do-not-override-uuid-with-homehost.patch
+ mdmon-allow-takeover-when-original-was-started-with-.patch
+ mdmon-fix-arg-parsing.patch
+ mdmon-fix-arg-processing-for-a.path
+ Install udev-md-raid-arrays.rules instead of udev-md-raid.rules,
+ don't install new udev-md-raid-assembly.rules for now.
+ * remove Martin F. Krafft from uploaders per his request.
+ Thank you for your contributions!
+ * added remove-bashism-from-makefile.patch patch to work around
+ newly introduced bashism
+ * remove debian/source/options, there's no need to set compression
+ options for debian.tar.gz.
+ * remove outdated debian/docs/md_superblock_formats.txt and
+ debian/docs/md.txt (Closes: #714977, #714978)
+ * ship ANNOUNCE-*, external-reshape-design.txt, mdmon-design.txt
+ files as documentation (Closes: #715324)
+
+ [ Dmitrijs Ledkovs ]
+ * Properly remove 65-mdadm.vol_id.rules, instead of trying to remove a
+ never-existed 65_mdadm.vol_id.rules (note the 65- vs 65_).
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Fri, 11 Oct 2013 10:12:47 +0400
+
+mdadm (3.2.5-6) unstable; urgency=low
+
+ * replace home-grown and not-working-since-etch udevsettle call
+ in initramfs script with proper wait_for_udev function (from
+ common initramfs functions). This unbreaks situations when
+ the underlying device needs some udev magic to happen before
+ being available, which includes stacked devices (md on lvm)
+ and other cases. Thanks to Thomas Parmelan and Dave Whitla
+ for finding the root cause of breakage and for providing
+ the fix. (Closes: #644876)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Tue, 05 Mar 2013 13:32:21 +0400
+
+mdadm (3.2.5-5) unstable; urgency=low
+
+ * add (empty) restart and force-reload actions to mdadm-waitidle
+ script -- this script is used only when the system needs to be
+ shut down or rebooted, there's nothing to start or restart.
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Thu, 24 Jan 2013 17:04:49 +0400
+
+mdadm (3.2.5-4+mdmon) experimental; urgency=low
+
+ * fix `/etc/init.d/mdadm-raid status' inverse logic (Closes: #686100)
+ * /etc/init.d/mdadm: change RUNDIR to /run instead of /var/run.
+ Mdadm itself uses /run internally, we properly depend on initscripts
+ version which creates /run, and the initscript itself is started
+ after local_fs is processed, so this is merely a no-op, but let's
+ do it for consistency.
+ * Fix 'enough' function for RAID10, to prevent starting of a RAID10
+ array which does not have required minimum of component devices.
+ (Closes: #691668).
+ * fix segfaults in Detail() - mdadm --detail may segfault if a drive
+ has been removed from the array (Closes: #691670)
+ * super0: do not override uuid with homehost. The bug prevented
+ re-creating an array with v0.90 superblock with the specified uuid
+ when homehost is also specified. (Closes: #686703)
+ * several fixes for mdmon argument processing (Closes: #691671):
+ - allow --takeover when original was started with --offroot
+ - fix arg parsing.
+ - fix arg processing for -a
+ * Changes based on a patch by Miquel van Smoorenburg (Closes: #684708):
+ - install mdmon in udeb and initramfs, so imsm arrays can work.
+ mdadm runs mdmon automatically when needed (currently for imsm
+ arrays), and mdmon is required to make such arrays read-write
+ (they're read-only by default) so merely presence of mdmon is
+ enough to be able to use imsm arrays.
+ - /etc/init.d/mdadm start: if a mdmon pidfile is found in /run/mdadm,
+ restart mdmon (--takeover --all)
+ - /etc/init.d/mdadm stop: link pidfiles of mdmon processes into
+ /run/sendsigs.omit.d, and make sure that happens before sendsigs runs.
+ - stop mdadm before sendsigs, so that the above code works
+ - add script mdadm-waitidle that runs just before reboot/halt.
+ For each array that is still running, it sets sync_action to idle,
+ and uses mdadm --wait-clean to wait for all arrays to go idle
+ (it has a short timeout).
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sat, 20 Oct 2012 19:20:12 +0400
+
+mdadm (3.2.5-3) unstable; urgency=low
+
+ * revert "Drop unused debconf templates" change -- the templates
+ are actually being (indirectly) used in debian/mdadm.config
+ * fix initramfs-script config name (slipped in the initramfs fixes)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sat, 25 Aug 2012 23:12:50 +0400
+
+mdadm (3.2.5-2) unstable; urgency=low
+
+ [ Sergey B Kirpichev ]
+ * Fix mdadm.lintian-overrides
+ * Fix spelling in binaries, fix lintian warnings
+ manpage-has-errors-from-man and hyphen-used-as-minus-sign
+ * Drop unused debconf templates
+ * Implement status option for mdadm-raid init.d script
+ * Fix lintian info's conflicts-with-version: Conflicts -> Breaks
+
+ [ Michael Tokarev ]
+ * fix spelling mistakes in previous changelog entry
+ * some cleanups for checkarray:
+ - change --help printing and shorten/simplify the text
+ - make --quiet cumulative and stop documenting --real-quiet
+ - do not produce help in case of incorrect usage, and exit with 1
+ * fixes for initramfs integration (Closes: #644389, #678262, #685161):
+ - check INITRDSTART=none early
+ - do not explicitly load raid level modules (modprobe/kmod does this)
+ - do not collect needed raid levels (we include all modules anyway)
+ - load md_mod explicitly since we need to change global parameter
+
+ [ Dmitrijs Ledkovs ]
+ * Use dh_installinit with --no-restart-on-upgrade, which will start
+ arrays, but will not stop them during upgrade. (Closes: 678971)
+ * Copy local administrator's modified udev rules as well as the system
+ one. (Closes: #678973)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Sat, 25 Aug 2012 16:25:37 +0400
+
+mdadm (3.2.5-1) unstable; urgency=low
+
+ [ Michael Tokarev ]
+ * new upstream (bugfix) release, fixing regression when --add'ing
+ device to an array, introduced in 3.2.4, plus other minor fixes
+ (Closes: #673104, #673344)
+ * new patch: sha1-includes.diff to fix #include mess in new sha1.h
+ * added a check into debian/checkarray to skip checking arrays created
+ less than 2 weeks ago (Closes: #624273)
+
+ [ Dmitrijs Ledkovs ]
+ * Remove obsolete documentation dating back to ~etch release
+ * Remove reference to obsolete documention from debconf templates
+ * Update debconf templates translations
+ * Remove compatibility with ancient initramfs-tools
+ * Remove debian-specific mdadm-startall.8 in clean target
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Fri, 25 May 2012 20:23:52 +0400
+
+mdadm (3.2.4-1) unstable; urgency=low
+
+ * new upstream (bugfix) release (Closes: #664088, #661552)
+ * removed debian-run-udev.diff (applied upstream), and
+ all RUNDIR handling from debian/rules (it is the default now)
+ * add build-arch and build-indep targets to debian/rules, and
+ bump Standards-Version to 3.9.3
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Thu, 10 May 2012 17:51:41 +0400
+
+mdadm (3.2.3-3) unstable; urgency=low
+
+ * switch from topgit to plain 3.0 (quilt) layout, creating
+ debian/patches. Don't build-depend on quilt as patching
+ is done automatically by dpkg-source.
+ * debian/patches/debian-run-udev.diff by Roger Leigh (Closes: #644319, #627774)
+ * update debian/mdadm.logcheck.ignore.server to recognize "k" in
+ addition of "blocks" in kernel messages. Thanks to Frédéric Brière
+ for the patch (Closes: #656038)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Mon, 30 Apr 2012 14:12:38 +0400
+
+mdadm (3.2.3-2) unstable; urgency=low
+
+ [ Michael Tokarev ]
+ * new upstream bugfix/stable version, with lots of fixes all over.
+ Closes: #641886, #628667, #645563, #651880, #607375, #633880
+ * update Neil's email (Closes: #650630)
+ * update mdadd.sh to version 1.52 (Closes: #655212)
+ * fixed a typo (RAID6 vs RAID10) in FAQ (Closes: #637068)
+ * declare ordering dependency for multipath-tools-boot in
+ mdadm-raid init script (Closes: #641584)
+ While at it, remove mention of devfsd
+ * added Slovak (sk.po) po-debconf translation from Slavko <linux@slavino.sk>
+ (Closes: #641972)
+ * set nice value of the check/resync thread too, together with I/O
+ scheduling class, based on patch by Sergey B Kirpichev (Closes: #652547)
+ * small changes for debian/checkarray
+ * (internal) move files from contrib/* topgit branches into debian directory
+ * remove dh_testroot from clean target
+ * add myself to uploaders
+
+ [ Peter Eisentraut ]
+ * Added support for "status" action to mdadm init script (Closes: #651737)
+
+ -- Michael Tokarev <mjt@tls.msk.ru> Wed, 18 Jan 2012 22:33:01 +0400
+
+mdadm (3.2.2-1) unstable; urgency=low
+
+ [ martin f. krafft ]
+ * New upstream version (closes: #615494), which addresses:
+ - --grow option aware of size change of underlying device (closes: #618463)
+ - builds with -Werror on gcc-4.6 (closes: #625392).
+ - new features/functionality:
+ + Policy framework.
+ + Improved management of reshaping arrays.
+ + Support for Intel Matrix Storage Manager (IMSM)
+ Thanks to Scott Schaefer for his help in preparing this release!
+ * Do not print io rescheduling info message when run by cron
+ (closes: #598957).
+ * Fix checkarray script so that it does not die after scheduling the first
+ device when there is no scheduling class specified; thanks to Mario
+ 'BitKoenig' Holbe (closes: #611627).
+ * Do not include DEVICE line in generated configs but use the built-in value
+ by default (closes: #604702).
+ * Make mdadm-raid init script depend on hostname; thanks to Mario
+ 'BitKoenig' Holbe (closes: #610421).
+ * Schedule start/stop of mdadm-raid before/after filesystems are
+ checked&mounted/unmounted; thanks to Mario 'BitKoenig' Holbe
+ (closes: #611632).
+ * Work around a shell coding bug for cases when there are zero active
+ devices (closes: #618561).
+ * Add NEWS entry about metadata change and requirement on new Grub version
+ (closes: #595516).
+ * Update mdadd.sh script from Arno's webpage.
+ * Update md.txt from latest kernel source.
+ * Updated debconf translations:
+ - Catalan by Innocent De Marchi (closes: #628371)
+ - Danish by Joe Dalton (closes: #621346)
+ * Small typo fix in RAID5_versus_RAID10.txt
+ * Bump Standards-Version to 3.9.2; no changes required.
+
+ [ Michael Tokarev ]
+ * don't print W: auto-read-only in checkarray in quiet mode,
+ thanks to Bernd Hanisch for the patch (Closes: #605722)
+ * move initscript metadata from /lib/init/rw/.mdadm to /run/mdadm,
+ and depend on initscripts (>= 2.88dsf-13.3) for /run (Closes: #633054)
+ * move runtime stuff from /dev/.mdadm to /run/mdadm
+ * document defaults change in debian/NEWS (it was forgotten to be
+ done for squeeze) - metadata & chunk size (Closes: #595516)
+
+ -- martin f. krafft <madduck@debian.org> Mon, 01 Aug 2011 10:41:41 +0200
+
+mdadm (3.1.4-1+8efb9d1) unstable; urgency=low
+
+ * Added patch with Makefile fix from upstream (commit 8efb9d1) to fix
+ compiler/linker problem on non-x86 architectures (closes: #595290).
+
+ -- martin f. krafft <madduck@debian.org> Fri, 03 Sep 2010 10:45:01 +0200
+
+mdadm (3.1.4-1) unstable; urgency=low
+
+ * New upstream release, which closes:#595039 and addresses the following
+ issues too:
+ - reverts move of incremental map (closes: #585015).
+ - fixes mdadm monitor in the case of an inactive (or start-failed) raid0
+ or linear array (closes: #539154).
+ - prevent --remove faulty from skipping renumbered devices
+ (closes: #587550).
+ - fixed overflow when growing a RAID6 (closes: #589493).
+ * However, disable the incremental assembly upstream turned on in 3.1.3 for
+ now, this will have to wait until after the squeeze release.
+ * initramfs/hook: make sure configuration file exists before accessing it;
+ thanks to Michael Prokop for the fix and NMU (closes: #589836).
+ * initramfs/hook: Match UUID case-insensitive while checking for running
+ arrays not listed in mdadm.conf; thanks to Mario 'BitKoenig' Holbe for the
+ patch (closes: #583545).
+ * Fix URL in the bug reporting preamble (presubj) (closes: #589833).
+ * Add I/O rescheduling functionality to the checkarray script and make the
+ cronjob use the idle priority; this should now minimise the impact of the
+ monthly re-check on the running system; Florian Heigl had the idea
+ (closes: #592149, #508123).
+
+ -- martin f. krafft <madduck@debian.org> Sun, 29 Aug 2010 13:44:59 +0200
+
+mdadm (3.1.2-2) unstable; urgency=low
+
+ * Fix logcheck regexp to cure "egrep: Unmatched [ or [^" message
+ (closes: #583376).
+ * Cherry-pick 94fcb80 from upstream to fix compiler error due to argument
+ type error (at least on ia64, sparc, powerpc) (closes: #583495).
+
+ -- martin f. krafft <madduck@debian.org> Fri, 28 May 2010 09:35:42 +0200
+
+mdadm (3.1.2-1) unstable; urgency=low
+
+ * New upstream release (closes: #567167).
+ * Ignore lintian error about not stopping in runlevel 1.
+ * Include more information about the configuration, initrd, and LVM in
+ bugscript output.
+ * Check active devices against configuration file based on UUID, not device
+ name (closes: #553896).
+ * When preparing the list of devices, treat /dev/mdX and /dev/md/X equally.
+ * Bump Standards-Version to 3.8.4 without having to make changes.
+ * Fix logcheck rule with patch from Frédéric Brière, since Rebuild events
+ are now arbitrary, no longer multiples of 20 (closes: #570315).
+ * checkarray: do not exit non-zero when there are no arrays found (see
+ #582360).
+ * Do not exit checkarray cronjob non-zero when the tests whether to run
+ fail (closes: #580825). This is related to a recent change in behaviour in
+ cron 3.0pl1-110 (see e.g. #581612). Thanks to everyone for their
+ suggestions!
+ * Call MAKEDEV to create device nodes only if MAKEDEV is installed
+ (closes: #569360).
+
+ -- martin f. krafft <madduck@debian.org> Thu, 27 May 2010 09:34:24 +0200
+
+mdadm (3.1.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * Retire fixed/blkid-dev branch.
+ * Reword warning about unbootable system when mdadm is purged
+ (closes: #544558).
+ * Updated FAQ to include s2ram as one of the reasons that can prevent an
+ array from being stopped; thanks to Pascal Hambourg for writing in.
+ * Install udev rules into udeb package (closes: #558823).
+ * Update mdadd.sh (formerly /usr/share/doc/mdadm/examples/newdisk.gz) from
+ Arno's website, refactoring the script into its own branch/patch
+ (closes: #539103).
+ * Do not single-quote homehost in initramfs script (closes: #549083).
+
+ -- martin f. krafft <madduck@debian.org> Wed, 27 Jan 2010 10:14:25 +1300
+
+mdadm (3.0.3-2) unstable; urgency=low
+
+ * Bumped Standards-Version to 3.8.3 without having to make changes.
+ * Fixed init dependencies of mdadm daemon init.d script; thanks Petter
+ Reinholdtsen (closes: #541396).
+ * Switched source package to v3-quilt format.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 06 Nov 2009 10:06:03 +0100
+
+mdadm (3.0.3-1) unstable; urgency=low
+
+ * New upstream release.
+ * Acknowledge 3.0-3.1 NMU by Christian Kujau (patch by Marco d'Itri)
+ (closes: #541884), and add util-linux dependency.
+ * Copy udev rules into initramfs, which udev stopped doing
+ (closes: #549535, #549083, #538843, #538143).
+ * Fix the bug script to write debug information to the correct file
+ descriptor (closes: #537734).
+ * Switch to TopGit and split Debian diff into topic branches; add
+ README.source.
+ * Drop the outdated rootraiddoc.97.html document.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 27 Oct 2009 18:06:13 +0100
+
+mdadm (3.0-3.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * use blkid instead of vold_id in udev-md-raid.rules (closes: #541884)
+
+ -- christian kujau <lists@nerdbynature.de> Mon, 14 Sep 2009 10:15:21 +0200
+
+mdadm (3.0-2) unstable; urgency=low
+
+ * Fixed initramfs script with patch from Steffen Hau: it was still using
+ --auto-update-homehost, which has been removed and replaced by a better
+ heuristic: arrays created for a different "homehost" will now be
+ assembled read-only, rather than shoehorned into the system with
+ --auto-update-homehost (closes: #537820).
+ * Add version stamps to bugscript and mkconf scripts to facilitate
+ debugging.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 21 Jul 2009 10:33:30 +0200
+
+mdadm (3.0-1) unstable; urgency=low
+
+ * New stable upstream release.
+ * Add information about udev and device links in /dev to bugscript output.
+ * Add pointer to FAQ and in particular rootdelay to the bug script
+ pre-subject file, which is displayed by tools like reportbug and thus
+ hopefully reduces the numbers of duplicated bugs.
+ * Patch from Frédéric Brière to make logcheck rules printk_time aware
+ (closes: #537460).
+ * Updated German translation due to typos and old spelling rules; thanks to
+ Helge Kreutzmann for the patch (closes: #534663).
+ * Bumped Standard-Version to 3.8.2; no changes necessary.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 20 Jul 2009 16:12:41 +0200
+
+mdadm (3.0~devel3-43-g2800528-1) experimental; urgency=low
+
+ * Merge tip of upstream's devel-3.0 branch at commit 2800528.
+ * Drop our own udev rules in favour of upstream's. If
+ /etc/udev/rules.d/65_mdadm.vol_id.rules has not been modified (md5sum
+ check), it is automatically removed; else, a warning is emitted.
+ * Add information about udev and device links in /dev to bugscript output.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 05 May 2009 15:10:46 +0200
+
+mdadm (2.6.9-3) unstable; urgency=low
+
+ * Fix the multipath prereq patch (#516605) and make it exit after printing
+ the prerequisites (closes: #526793).
+ * Change my previous recommendation for postfix over to the new virtual
+ package default-mta (see #522300 and #508644).
+ * Enhance bugscript, which now asks to run as root (sudo/su) if invoked by
+ a normal user.
+ * Include MD5 sums of md-related files in initrd in bug reports.
+ * Add grub2 information retrieval to bugscript.
+ * Trap SIGINT and thus prevent ctrl-c from terminating the bugscript
+ prematurely.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 05 May 2009 11:46:22 +0200
+
+mdadm (3.0~devel3-1) experimental; urgency=low
+
+ * Initial release of DEVELOPMENT BRANCH 3.0 to experimental.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 30 Apr 2009 11:51:39 +0200
+
+mdadm (2.6.9-2) unstable; urgency=low
+
+ * Fix the check of whether mdadm.conf defines all devices known to the
+ system; thanks Cristian Ionescu-Idbohrn (closes: #525655).
+ * No longer pass -k to modprobe, which has been deprecated for a long time;
+ thanks to Jan Hudec (closes: #519999).
+ * Remove Mario Joußen from the uploaders list, since his email started
+ bouncing.
+ * Prepare mdadm source to use quilt, with the long-term goal to switch to
+ TopGit, once I find the time.
+ * Cherry-pick caa0f6c & 667e66d from Neil into a quilt patch to fix gcc-4.4
+ compiler issues (closes: #505375).
+
+ -- martin f. krafft <madduck@debian.org> Sun, 26 Apr 2009 16:08:28 +0200
+
+mdadm (2.6.9-1) unstable; urgency=low
+
+ * New upstream release.
+ * Do not set -eu in the bugscript to maximise information output in the case
+ of errors.
+ * Make initramfs script depend on multipath to ensure its script is run
+ before ours (closes: #516605).
+ * Provide an alternative (postfix) for mail-transport-agent (closes:
+ #522300). I chose postfix because that's the only one I could recommend,
+ and since the alternative does not affect people who already have an MTA
+ installed, or have a preference, it won't affect them.
+ * Honour debconf pre-selection of mdadm/initrdstart (closes: #516802).
+ * Incorporate patch from Adrian Bridgett: the initramfs hook now checks to
+ see if all known arrays are listed in mdadm.conf and issues a warning if
+ this is not the case (closes: #519328).
+ * Make checkarray skip over arrays still marked auto-read-only
+ (closes: #510641).
+ * Add cron.daily snippet from Paul Slootman to run one-shot scans every day
+ to ensure that failed arrays don't go unnoticed (closes: #497949).
+ * Bumped Standards-Version to 3.8.1; no changes necessary.
+
+ -- martin f. krafft <madduck@debian.org> Sat, 25 Apr 2009 19:04:47 +0200
+
+mdadm (2.6.8-12-gb47dff6-2) unstable; urgency=low
+
+ * Brown paper bag release: I built from the wrong branch which caused some
+ Debian-specific changes not to get into the package. Thus build fixes it.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 16 Feb 2009 12:15:37 +0100
+
+mdadm (2.6.8-12-gb47dff6-1) unstable; urgency=low
+
+ * New upstream release.
+ - better checks asprintf() return codes, thanks to patch from Dustin
+ Kirkland (closes: #509167).
+ * Fix start/stop runlevels in header of mdadm monitor init.d script
+ (closes: #514923).
+ * Use modprobe -q instead of --syslog from initramfs (closes: #502988).
+
+ -- martin f. krafft <madduck@debian.org> Mon, 16 Feb 2009 11:07:18 +0100
+
+mdadm (2.6.7.2-1) unstable; urgency=low
+
+ * New upstream release, created for Debian lenny:
+ - fixes assembly of arrays that are being reshaped (closes: #512475)
+ - this bug was also responsible for other assembly problems
+ (closes: #498505, #499643, #496334)
+ Again, many thanks to Neil Brown for being such an awesome upstream.
+
+ * Documentation updates:
+ - Actually install David Pashley's blog post added in 2.6.7.1-1, and
+ register it with doc-base.
+ - Update md.txt to version 2.6.26 (the lenny kernel).
+ - Add a dump of a website detailing md superblock formats.
+ - Register FAQ, md.txt, RAID5-vs-RAID10, README.recipes with doc-base
+ - Cherry-picked UID/UUID typo in mdadm.conf(5) manpage fix (commit
+ 0e69da7) (closes: #506245).
+
+ * Added Italian debconf translation; thanks Luca Monducci (closes: #506572).
+
+ -- martin f. krafft <madduck@debian.org> Tue, 03 Feb 2009 21:28:34 +0100
+
+mdadm (2.6.7.1-1) unstable; urgency=low
+
+ * New upstream release, specifically created for Debian lenny to fix the RC
+ bugs, which
+ - fixes typo in forced assembly code (closes: #496334, #499643, #498505).
+ - fixes array component size detection (closes: 500309).
+ Thanks Neil Brown, mdadm upstream: you are spoiling me. :)
+
+ * Minor fixes to documentation:
+ - Add David Pashley's Rebuilding RAID blog post.
+ - Add new (bugfix) version 1.40 of the newdisk script
+ (/usr/share/doc/mdadm/examples/newdisk.gz) (closes: #490955).
+ - Add link to Warren Togami's writeup about remote RAID-1 conversion to
+ README.recipes.
+ - Fix probability of survival in FAQ 4b, since I erroneously labeled the
+ chance of failure as the chance of survival; thanks to Per Olofssen for
+ clarification (closes: #493577).
+ - Cherry-picked 6d6de2e from Neil, which adds HOMEHOST to the manpage and
+ closes: #489257.
+
+ -- martin f. krafft <madduck@debian.org> Wed, 15 Oct 2008 10:27:23 +0200
+
+mdadm (2.6.7-3.1) unstable; urgency=low
+
+ * Non-maintainer upload with permission.
+ * Ask mdadm/initrdstart at medium priority in chrooted environment.
+ (Closes: #493099)
+ * Update Swedish debconf translations. Thanks Martin Ågren.
+ (Closes: #492074)
+
+ -- Jérémy Bobbio <lunar@debian.org> Mon, 25 Aug 2008 22:28:53 +0200
+
+mdadm (2.6.7-3) unstable; urgency=low
+
+ * Correct credits in the NEWS file: Suse authored the udev rules, not Ubuntu
+ (who use the same file without credit).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 05 Jul 2008 12:22:58 +0200
+
+mdadm (2.6.7-2) unstable; urgency=low
+
+ * Remove mdrun completely.
+ * Import udev vol_id handling from Suse, and thus finally export
+ /dev/disk/by-id/* and /dev/disk/by-uuid symlinks (closes: #435983).
+ * Update upstream URLs in copyright and watch file (closes: #488364).
+ * Bump Standards-Version to 3.8.0; no changes required.
+ * Add mdadm homepage link to debian/control.
+
+ -- martin f. krafft <madduck@debian.org> Wed, 02 Jul 2008 11:13:18 +0200
+
+mdadm (2.6.7-1) unstable; urgency=low
+
+ * New upstream version, which
+ - fixes a segfault when reading /proc/mdstat (closes: #462154).
+ - fixes a possible bug with v1 bitmap space allocation (closes: #474548).
+ - supports large files for loop assembly (closes: #463769).
+ * Moved mdadm-raid init.d script to position S60 (from S50) for runlevels
+ 0 and 6, so that arrays get stopped after cryptdisks-early; thanks to
+ J.M.Roth (closes: #486012).
+ * Fixed a typo in checkarray; thanks to Helmut Grohne (closes: #445540).
+ * Updated debconf translations:
+ - Spanish; thanks to Javier Fernández-Sanguino (closes: #477920).
+ - Basque; thanks to Piarres Beobide (closes: #478676).
+ * Updated logcheck rule so that it matches mdadm log entries with and without
+ PID (2.6.5 introduces PIDs in the messages).
+
+ -- martin f. krafft <madduck@debian.org> Wed, 25 Jun 2008 17:31:15 +0200
+
+mdadm (2.6.4-2) unstable; urgency=low
+
+ * Adjusted logcheck rules to follow kernel changes; thanks to Frédéric
+ Brière (closes: #462478).
+ * Debconf templates and debian/control reviewed by the debian-l10n-
+ english team as part of the Smith review project. Closes: #463673
+ * Debconf translation updates (thanks to Christian Perrier for compiling
+ them):
+ * Japanese. Closes: #464438
+ * Galician. Closes: #464454
+ * French. Closes: #465984
+ * Czech. Closes: #466306
+ * Dutch. Closes: #466543
+ * Russian. Closes: #466577
+ * Portuguese. Closes: #466794
+ * German. Closes: #466989
+ * Vietnamese. Closes: #467118
+ * New debconf translations:
+ * Finnish. Closes: #468048
+ * Fixed bashism in mdadm-raid init.d script; thanks to Raphael Geisser
+ (closes: #471874).
+ * Do not output warning when run from cron and no arrays are found
+ (closes: #474542).
+ * Add doc-base registration file; thanks to Roberto C. Sanchez
+ (closes: #451684).
+ * Reschedule "mdadm Sunday" to 00:57 instead of 01:06 to prevent double
+ invocation on DST change (closes: #449244).
+ * Bump DH compatibility level to 6; no changes required.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 11 Apr 2008 10:48:45 +0200
+
+mdadm (2.6.4-1) unstable; urgency=low
+
+ * New upstream release.
+ * Apply patch by Petter Reinholdtsen to fix dependency loop in
+ init.d script (closes: #460256).
+ * Bump Standards-Version to 3.7.3; no changes needed.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 14 Jan 2008 12:47:14 +0100
+
+mdadm (2.6.3+200709292116+4450e59-3) unstable; urgency=low
+
+ * Patch by Jérémy Bobbio which completes the fix for #444682.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 01 Oct 2007 16:16:19 +0100
+
+mdadm (2.6.3+200709292116+4450e59-2) unstable; urgency=low
+
+ * Patch the routine loading v1 superblocks to fix a segfault on amd64
+ (closes: #444682).
+
+ -- martin f. krafft <madduck@debian.org> Sun, 30 Sep 2007 14:10:41 +0100
+
+mdadm (2.6.3+200709292116+4450e59-1) unstable; urgency=low
+
+ * New merge from upstream @4450e59ffaf75623fa4261e244b0717a7463aa84
+ - makes "--write-mostly" effective when re-adding a device to an array.
+ (closes: #442874).
+ * Do not call update-initramfs -k all, it can be set via
+ /etc/initramfs-tools/update-initramfs.conf (closes: #439334).
+ * Depend on udev|makedev instead of just makedev and invoke /dev/MAKEDEV,
+ not /sbin/MAKEDEV (closes: #436998).
+ * De-escalate the initramfs hook warning about an "emergency procedure" and
+ simply note that this involves initramfs assembling arrays it finds
+ automatically at boot. Also added a FAQ entry on how to turn off the init
+ script warning when no arrays are found (closes: #434934).
+ * Add --scan to the single-device-assembly-codepath in the initramfs
+ local-top script; thanks to Mario 'BitKoenig' Holbe for the patch
+ (closes: #440703).
+ * Use short option in initramfs script mkdir call, so make it klibc-utils
+ compatible; thanks maximilian attems for the patch (closes: #443436).
+ * Handle module name synonyms in initramfs hook script (closes: #432585).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 29 Sep 2007 21:21:25 +0100
+
+mdadm (2.6.2-2) unstable; urgency=low
+
+ * Fix typos in md(4) manpage; thanks Jeroen (closes: #425576).
+ * Make init script not report failure when there are no arrays defined in
+ config file.
+ * Add /usr/share/doc/mdadm/examples/newdisk, a script to integrate
+ a replacement disk into an existing array with minimal effort; will remain
+ in examples/ until I had a chance to really test and understand it. Thanks
+ to Arno van Amersfoort (closes: #427880).
+ * Does some sanity checking for proper format of level= arguments in
+ mdadm.conf and bails if an error is found. Since the RAID levels are used
+ verbatim as module names, a discrepancy might lead to an unusable system.
+ Instead, we thus use the emergency fallback. Thanks to Andrew
+ Sackville-West for spotting this and helping me with the fix.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 10 Jul 2007 09:59:45 +0200
+
+mdadm (2.6.2-1) unstable; urgency=low
+
+ * New upstream release
+ - new options --fail detach and --remove faulty can be used to fail and
+ remove devices that are no longer physically present (closes: #416512).
+ - --help output now goes to stdout (closes: #416653).
+ - plenty of manpage fixes, thanks Peter Samuelson (closes: #414688).
+ * Incorporated patch by Mikko Rasa to fix detecting of raid6 (and raid10)
+ devices with --scan (closes: #421915).
+
+ -- martin f. krafft <madduck@debian.org> Mon, 21 May 2007 14:25:43 +0200
+
+mdadm (2.6.1-1) unstable; urgency=low
+
+ * Release to unstable.
+ * Start arrays read-only in initramfs to prevent syncing and hence enable
+ resuming/freezing. The arrays will automatically sync as soon something
+ writes to it; thanks to Tim Dijkstra, Neil Brown, and Luis Rodrigo
+ Gallardo Cruz (closes: #415441).
+ * mkconf now tries to preserve existing values for DEVICE, CREATE and
+ HOMEHOST (in addition to MAILADDR, which it preserved previously already).
+ PROGRAM is preserved but only added to mdadm.conf if it occured in the
+ previously existing configuration file.
+ * startall is now mdadm-startall and lives in /sbin, thanks to Eduard Bloch.
+ It now can handle existing mdadm.conf files much more gracefully, mostly
+ thanks to the above mkconf enhancements (closes: #415336).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 05 May 2007 16:12:29 +0200
+
+mdadm (2.6.1-1~exp.5) experimental; urgency=low
+
+ * Fix mdadm.conf typo; thanks Tim Phipps (closes: #416626).
+ * Execute udevtrigger after assembly of arrays during initramfs processing;
+ thanks to Michael Prokop (closes: #416658).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 31 Mar 2007 12:12:27 +0200
+
+mdadm (2.6.1-1~exp.4) experimental; urgency=low
+
+ * Incorporate patches by Peter Samuelson fixing several typography as well
+ as typesetting issues in the manpages. Thanks a lot! (closes: #414688)
+
+ -- martin f. krafft <madduck@debian.org> Tue, 13 Mar 2007 19:26:37 +0100
+
+mdadm (2.6.1-1~exp.3) experimental; urgency=low
+
+ * Patch by Jørn V. Christensen to properly handle multiple email addresses
+ for the MAILADDR setting (closes: #413330).
+
+ -- martin f. krafft <madduck@debian.org> Mon, 5 Mar 2007 11:19:18 +0000
+
+mdadm (2.6.1-1~exp.2) experimental; urgency=low
+
+ * Updated debconf translations:
+ - Galician by Jacobo Tarrio (closes: #412203).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 24 Feb 2007 16:41:16 +0100
+
+mdadm (2.6.1-1~exp.1) experimental; urgency=low
+
+ * New upstream release, targeted at experimental until etch is out:
+ - adds --syslog option (closes: #402457).
+ - now can --wait for sync activity to finish (closes: #328197).
+ - for other changes, please see /usr/share/doc/mdadm/changelog.gz
+ * Updated debconf translations:
+ - Portuguese by Rui Branco (closes: #411745).
+
+ -- martin f. krafft <madduck@debian.org> Thu, 22 Feb 2007 16:35:16 +0100
+
+mdadm (2.5.6-9) UNRELEASED; urgency=low
+
+ * More logcheck filters to prevent redundant information logged by mdadm
+ --syslog.
+ * Improved mdadm-raid init script to correctly output status information for
+ drives that are initialising or adding spares.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 11 Jan 2007 16:05:12 +0100
+
+mdadm (2.5.6-8) unstable; urgency=low
+
+ * Hard-code path to /sbin/mdadm binary rather than searching the $PATH. This
+ closes: #403307 and should be a little more robust in the presence of
+ installations of mdadm in /usr/local.
+ * Made the bugscript a little more failure-resilient.
+ * Added more documentation.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 8 Jan 2007 02:04:25 +0100
+
+mdadm (2.5.6-7) unstable; urgency=low
+
+ * Only parse ARRAY lines from configuration file when collecting the array
+ pairs. Thanks to Daniel Dehennin for the bug report and suggested fix
+ (closes: #402106).
+ * Prevent modules from being loaded during initramfs time if no arrays are
+ to be assembled at this stage.
+ * Export DAEMON_OPTIONS to /etc/default/mdadm, which gets passed to the
+ mdadm daemon on startup from the init.d script. The value is set to
+ -y/--syslog by default, and will get incorporated into debconf in a future
+ version; thanks for the idea by Alex Owen (closes: #401696).
+ * Incorporate patch by upstream to fix handling of --syslog long option
+ (closes: #402457).
+ * Added logcheck filters for new syslog entries by mdadm monitoring daemon.
+ * Added Spanish debconf translation by Javier Fernández-Sanguino
+ (closes: #402681).
+
+ -- martin f. krafft <madduck@debian.org> Tue, 12 Dec 2006 11:49:52 +0100
+
+mdadm (2.5.6-6) unstable; urgency=medium
+
+ * Fixed a typo in the debconf control script which would cause failures with
+ a dash shell; thanks to Santiago Garcia Mantinan for reporting this, and
+ Andreas Metzeler for providing a solution (closes: #399315).
+
+ -- martin f. krafft <madduck@debian.org> Mon, 20 Nov 2006 15:02:34 +0800
+
+mdadm (2.5.6-5) unstable; urgency=low
+
+ * Prevent initramfs hook from exiting prematurely when VERBOSE=false.
+ * Moved debconf question about arrays to start by initramfs to high
+ priority.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 13 Nov 2006 11:24:21 +0100
+
+mdadm (2.5.6-4) unstable; urgency=low
+
+ * Actually remove mdadm.conf on purge; previously, the generation of
+ a temporary file for initramfs would screw up the purging; thanks to
+ Fabrice Lorrain for the report (closes: #398088).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 11 Nov 2006 20:07:55 +0100
+
+mdadm (2.5.6-3) unstable; urgency=low
+
+ * Fix a syntax error in mdadm-raid script.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 9 Nov 2006 15:47:51 +0100
+
+mdadm (2.5.6-2) unstable; urgency=low
+
+ * Small fixes to mkconf, now returns 255 instead of -1.
+ * Added /usr/share/mdadm/startall, a helper script to facilitate starting
+ all arrays when booting from rescue/live media. It overrides AUTOSTART in
+ /etc/default/mdadm and starts arrays even if the variable is set to
+ a false value.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 9 Nov 2006 14:44:35 +0100
+
+mdadm (2.5.6-1) unstable; urgency=low
+
+ * New upstream release:
+ - added note to mdadm(8)/--metadata about overriding the default in
+ mdadm.conf (closes: #396914).
+ - fixed problems that could cause infinite loop with auto assemble. Thanks
+ to Dan Pascu for pointing this out (closes: #396582).
+ - fixed problems with bitmap file names lost after reading from
+ configuration file.
+ * Merged patch by Dan Pascu to nicely handle situations where a degraded
+ array only has one drive left nicely by the mdadm-raid script.
+ * Updated Japanese debconf translation; thanks to Hideki Yamane
+ (closes: #396400).
+
+ -- martin f. krafft <madduck@debian.org> Thu, 9 Nov 2006 00:47:45 +0100
+
+mdadm (2.5.5-1) unstable; urgency=low
+
+ * New upstream release:
+ - fixes the build problems on several architectures (closes: #393314) by
+ including the contents of linux/blkpg.h literally, not via #include.
+ - optimises bitmap file use on 64bit systems.
+ - does not error out anymore when trying to assemble an already assembled
+ array without a corresponding /dev device node.
+ - does not report an error if --assemble --scan only finds already running
+ arrays.
+ - fixes several bugs related to RAID10 and the new offset layout.
+ - improves error message when a wrong '--update' option is given.
+ * Added FAQ entries about partitionable arrays.
+ * chroot detection now also works for 2.6.18 and beyond (c.f. kernel commit
+ 778c1144771f0064b6f51bee865cceb0d996f2f9).
+ * Now recommends module-init-tools.
+ * Hides ugly errors during configuration in the absense of module-init-tools
+ or initramfs-tools.
+ * Send udev events for arrays assembled by the mdadm-raid init.d script.
+ This does not close #394193 but it's a good addition anyway. I am not
+ sending these events from the initramfs as well because it would be
+ non-trivial to ensure that an event doesn't get sent twice for a given
+ array.
+ Anyway, this is all a hack until the kernel sends online/offline events to
+ udev. See #394193.
+ * Added more RAID10 information to the FAQ.
+ * Added filters to logcheck for regular events, even by the md driver; also
+ promoted messages about non-fresh components to security events.
+ * Hide informational messages unless VERBOSE is set to a true value in
+ /etc/default/mdadm.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 26 Oct 2006 22:35:24 +0200
+
+mdadm (2.5.4-1) unstable; urgency=low
+
+ * New upstream release:
+ - --examine now reports chunk size also for RAID6 and RAID10
+ - fix endianness issues with v1 superblocks (closes: #385726) and bitmap
+ metadata.
+ - improved message when mdadm detects similar superblocks
+ (closes: #385951).
+ - documents that the automatic update of the super-minor field in the
+ superblock when using a 2.6 kernel only applies to RAID levels 1 and
+ higher. RAID0 array superblocks must be manually updated
+ (closes: #386315, #388172).
+ - removes partition table from any whole device added to an array.
+ - allow --auto=yes to specify a number; if mdadm determines from the
+ device name that you want a partitionable array, this number determines
+ the number of sub-device nodes to create.
+ * Removed patch previously used to fix #385951 because it's not adequate.
+ See the bug log for reasons.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 13 Oct 2006 08:32:20 +0200
+
+mdadm (2.5.3.git200608202239-8) unstable; urgency=low
+
+ * This revision is dedicated to Peter Samuelson for his RAID10 expertise^W
+ educated guess^W^W pure luck. (:
+ * Now writes minimal mdadm.conf file even if the MD subsystem has not been
+ loaded and the scan for arrays thus failed.
+ * Now tries to ensure that the configuration file used for the initramfs
+ actually defines arrays.
+ * Now preserves MAILADDR from an existing mdadm.conf when generating a new
+ one.
+ * Documentation updates.
+ * Updated debconf translations:
+ - German by Mario Joußen.
+ - Vietnamese by Clytie Siddall (closes: #390311).
+ - Dutch by Frans Pop (closes: #390955).
+ - French by Jean-Luc Coulon (closes: #391215).
+
+ -- martin f. krafft <madduck@debian.org> Fri, 6 Oct 2006 15:03:46 +0200
+
+mdadm (2.5.3.git200608202239-7) unstable; urgency=medium
+
+ * Fixed a serious bug in the debconf script which would cause the
+ configuration to exit prematurely in cases when the root could not be
+ determined. Since this is RC, the urgency is set to medium.
+ * Updated the documentation a bit.
+ * Updated debconf translations:
+ - Swedish by Daniel Nylander (closes: #389040).
+ - Czech by Miroslav Kure (closes: #389083).
+ - Russian by Yuri Kozlov (closes: #389086).
+ - Brazilian Portuguese by Felipe Augusto.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 29 Sep 2006 16:31:44 +0200
+
+mdadm (2.5.3.git200608202239-6) unstable; urgency=high
+
+ * Bumping urgency to high because previous version has been in unstable for
+ three days and this one really only fixes a stupid segfault:
+ * Reworked the parsing of /proc/partitions and spotted a mean segfault
+ (closes: #388355).
+
+ -- martin f. krafft <madduck@debian.org> Thu, 21 Sep 2006 15:25:21 +0200
+
+mdadm (2.5.3.git200608202239-5) unstable; urgency=medium
+
+ * Keeping medium urgency due to RC bug.
+ * Modified the patch responsible for pruning parent devices so that
+ superblocks at the end of a disk do not get interpreted twice. It now
+ makes less assumptions about the exact output of /proc/partitions and
+ should thus be more robust (now closes: #385951).
+ * Added code that defers mdadm preconfiguration when the debconf backend is
+ too old (and does not provide debconf-escape). Now configuration is
+ postponed until the postinst is run in this case.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 14 Sep 2006 11:16:39 +0200
+
+mdadm (2.5.3.git200608202239-4) unstable; urgency=medium
+
+ * Correct error related to an unbound variable in postinst.
+ * Keeping medium urgency.
+
+ -- martin f. krafft <madduck@debian.org> Wed, 13 Sep 2006 20:49:33 +0200
+
+mdadm (2.5.3.git200608202239-3) unstable; urgency=medium
+
+ * Urgency medium because of RC bugs.
+ * Add versioned dependency to debconf (closes: #385994); temporary fix until
+ we find a proper fix for #386439.
+ * Add patch by Steinar H. Gunderson to ensure mdadm does not interpret
+ a superblock as belonging to a device when it's actually part of
+ a partition on that device (closes: #385951).
+ * Do not override the superblock default version in mdadm.conf to prevent
+ creation of superblocks that the kernel can't handle (closes: #384614).
+ * Added a note to alert people that the warning about arrays not listed in
+ the configuration file is only relevant if the arrays are needed to be
+ brought up by mdadm from initramfs during boot (closes: #385017).
+ * Added bootloader/cmdline info to bugscript so that future bug reports via
+ bug/reportbug include information on how the system is booted with respect
+ to RAID (the root partition).
+ * If mdadm is being configured in a chroot, it now defaults to starting all
+ arrays from the initial ramdisk, rather than trying to figure out the root
+ MD array (we're using /proc information, so it would be the one of the
+ host, not the one of the chroot) (closes: #386468).
+ * Added LSB headers to init scripts.
+ * Reworked the documentation with respect to the use of "MD" and "RAID", and
+ added a FAQ entry on the meaning of "MD". Thanks to Frans Pop for his
+ help!
+ * Updated debconf translations:
+ - Czech by Miroslav Kure (closes: #384754).
+ - French by Florentin Duneau (closes: #385690).
+ - Russian by Yuri Kozlov (closes: #387017).
+
+ -- martin f. krafft <madduck@debian.org> Thu, 7 Sep 2006 14:32:04 +0200
+
+mdadm (2.5.3.git200608202239-2) unstable; urgency=low
+
+ * Allow ARRAY lines in configuration file to break across lines
+ (closes: #384222).
+ * Improved initramfs hook; now does not rely on initramfs to provide RAID
+ assembly:
+ - if a checked mdadm.conf file is present, use that.
+ - if an unchecked mdadm.conf is present, create a temporary one
+ - if that fails, use the unchecked one iff it contains at least one
+ ARRAY statement. Otherwise rely on auto-generation from the initramfs
+ during the book (and hope for the best).
+ - if no mdadm.conf is found, create one on the fly
+ - if that fails, hope that the auto-generation will work during boot
+ * Improved the messages printed by the initramfs script.
+ * Do not store the debconf answer for whether arrays not listed in the
+ configuration file should be used.
+ * Now asks again for the devices to start (preseeded with 'all') if the user
+ does not want to proceed with devices not listed in the configuration
+ file.
+
+ -- martin f. krafft <madduck@debian.org> Wed, 30 Aug 2006 16:29:07 +0200
+
+mdadm (2.5.3.git200608202239-1) unstable; urgency=low
+
+ * Tracking upstream git releases.
+ - now the --run switch behaves as stated in the manpage. This properly
+ fixes #287415
+ - new version-1 partitionable arrays are now named X instead of _dX (e.g.
+ 0 instead of _d0) for device names like md_dX. I actually think this is
+ a bug and hope upstream will use dX (e.g. d0) instead in a future
+ version.
+ - we specify --symlink=no and thus disable the new feature to create
+ /dev/mdX symlinks to /dev/md/X devices until the entire device node mess
+ is cleared up. No need to introduce yet another complicating factor at
+ this stage.
+ * Instead of trying to do a whole lot of magic with respect to detecting
+ RAID devices to start, mdadm from now on requires a valid mdadm.conf file
+ to be installed. It still tries to do what it can, but there are no
+ heuristics anymore. See /usr/share/doc/mdadm/README.upgrading-2.5.3 .
+ * Removed the zero-superblock warning because we require the user to sign
+ off the configuration file anyway.
+ * This also enables us to use mdadm.conf from the initial ramdisk and thus
+ closes: #381303.
+ * In case the user chooses to assemble all arrays from the initial ramdisk,
+ use the new homehost feature of mdadm (closes: #381057). This will start
+ only those arrays belonging to the local system, unless it is the first
+ run on a system, in which case it will start all arrays and mark them as
+ belonging to the local system.
+ * Improved the debconf control script: integrated error messages into the
+ frontends, and made it a bit smarter. Error messages can now be
+ translated, and the script checks whether the user's choice is listed in
+ the configuration file and only proceeds if it is, or the user chooses to
+ ignore that it is not.
+ * mkconf can now take a generate/force-generate parameter to write directly
+ to /etc/mdadm/mdadm.conf. A second parameter specifies an alternate
+ filename.
+ * mkconf now outputs comments for the settings it suggests.
+ * Removed all udev-related stuff. We must coexist with udev because there
+ are setups that assemble arrays without mdadm, so the device nodes must be
+ created by udev, if that is used.
+ (closes: #382263, #382450, #383688, #383891, #383806, #382480)
+ Staying at low urgency since these (RC) bugs only exist in unstable.
+ * Now installs MD modules and mdadm/mdrun into initial ramdisk regardless of
+ whether the hook script thinks there are devices to start. This was done
+ to enable recovery from the initramfs shell.
+ * Now uses 'MD' instead of 'RAID' consistently in all messages.
+ * Now rebuilds initramfs for all installed kernels.
+ * Now breaks the endless config loop only when the user does not see the
+ question (see #381284, #381007).
+ * Don't fail mdadm-raid when /dev is on a read-only filesystem
+ (closes: #382876).
+ * Updated debconf translations:
+ - French by Florentin Duneau (closes: #382389).
+
+ -- martin f. krafft <madduck@debian.org> Mon, 21 Aug 2006 00:25:22 +0100
+
+mdadm (2.5.2-10) unstable; urgency=low
+
+ * Applied patch by upstream to fix the logic of the --run switch (see
+ #287415). Thus also reverted the mdadm-raid hack used to fix the bug in
+ the 2.5.2-9 upload.
+ * Recognise devfs-style device nodes by fixing a regression bug in the root
+ RAID autodetection code (closes: #381007), which was introduced as part of
+ the fix for #380596 in the 2.5.2-9 upload. The bug is RC, but it only
+ applies to unstable right now, so I am not pumping up the urgency.
+ The autodetection code now doesn't care about the actual name of the array
+ device, but instead only insists that it exists, is a block device, and
+ recognised as an array by mdadm (mdadm --detail).
+ * Added safety net to prevent endless loops in RAID autodetection. Now just
+ falls back to starting all arrays from the initramfs if it fails to
+ determine an acceptable array for the / filesystem in three tries
+ (closes: #381284, also see #381007).
+ * Added udev rules file to prevent udev from ever creating md device nodes,
+ which can get in the way of mdadm (also see next item).
+ * Added a workaround to the initramfs hook to deal with the problem with
+ /dev/md/X device nodes when /dev/mdX is also present and version-0
+ superblocks are in use (closes: #381181).
+ * checkarray: correctly recognise when the kernel is too old for parity
+ checks, or when there are no redundant arrays present (closes: #380746).
+ * checkarray: now supports -s|--status switch to query parity check status
+ for given devices.
+ * checkarray: now supports -x|--cancel switch to cancel running checks.
+ * mkconf: now also outputs 'MAILADDR root' and 'HOMEHOST <system>'.
+ * Added README.checkarray with some information about the check process.
+ * Added /usr/share/doc/mdadm/FAQ to answer some FAQs.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 3 Aug 2006 22:54:04 +0100
+
+mdadm (2.5.2-9) unstable; urgency=low
+
+ * Added logcheck rules for kernel messages generated by checkarray, using
+ logcheck server level.
+ * Added handling of partitionable arrays to root RAID autodetection script
+ (closes: #380596).
+ * Forcing RAID assembly to run the arrays, working around an upstream bug
+ until that's fixed (closes: #287415).
+ * Updated documentation in README.initramfs-transition to include
+ information related to #380089.
+ * Updated debconf translations:
+ - Vietnamese by Clytie Syddall, thanks!
+
+ -- martin f. krafft <madduck@debian.org> Mon, 31 Jul 2006 14:35:38 +0100
+
+mdadm (2.5.2-8) unstable; urgency=low
+
+ * Re-added rootraiddoc.97.html which was mysteriously lost (closes: #378678).
+ * Catching modprobe error in case of absence of the kernel modules, or
+ a non-modular kernel. Thanks to Holger Levsen.
+ * Copy raid456 kernel module into initramfs, if present (closes: #380152).
+ * checkarray: check for presence of active RAID arrays and give an
+ appropriate error if there are none present (closes: #379019).
+ * checkarray: skip sync for non-redundant devices (closes: #379352, #380424).
+ * Fixing cron registration for checkarray. crontab(5) is really stupid and
+ makes me think that they simply documented a bug instead of fixing it, so
+ now I have to hack around it. See the cron.d file (closes: #380425).
+ * Removed the code writing auto-detected devices to /var, which was silly
+ since /var isn't necessarily mounted yet by the time mdadm-raid is called.
+ Thanks to Maurizio Avogadro for pointing this out.
+ * Add reference to BAARF to README.Debian and included the RAID5 vs RAID10
+ article from the BAARF website.
+ * Updated debconf translations:
+ - Japanese by Hideki Yamane, thanks!
+ - French by Florentin Duneau, thanks! (closes: #379511)
+
+ -- martin f. krafft <madduck@debian.org> Thu, 27 Jul 2006 22:49:32 +0100
+
+mdadm (2.5.2-7) unstable; urgency=low
+
+ * Release to unstable.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 20 Jul 2006 17:23:23 +0100
+
+mdadm (2.5.2-6) experimental; urgency=low
+
+ * Adding mdrun to generated udeb. I will only remove mdrun after etch.
+ * Updated debconf translations:
+ - Dutch, thanks to Frans "Franzerl" Pop! (closes: #377412)
+ - French, thanks to Florentin Duneau! (closes: #377968)
+
+ -- martin f. krafft <madduck@debian.org> Thu, 13 Jul 2006 23:11:24 +0200
+
+mdadm (2.5.2-5) UNRELEASED; urgency=low
+
+ * Remove the check for the lvm prereq in the initramfs hook, as #369617 is
+ now fixed. Thus conflicts against initramfs-tools (<< 0.65).
+ * Updated debconf translations:
+ - German, thanks to Mario Joußen!
+ * Added short note about maintenance in SVN to README.Debian.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 13 Jul 2006 23:10:36 +0200
+
+mdadm (2.5.2-4) UNRELEASED; urgency=low
+
+ * The "it takes two to swing" release.
+ * Now does not stop arrays on upgrade or remove. Thanks (and sorry) to
+ Christian Pernegger (and hopefully no others).
+ * Fixed small problem in debconf configuration script related to unbound
+ MAIL_TO variable. Thanks to Christian Pernegger.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 7 Jul 2006 16:59:01 +0200
+
+mdadm (2.5.2-3) UNRELEASED; urgency=low
+
+ * The initramfs now gets all RAID modules installed. It's a lot safer to
+ have them all around, the size difference is negligible, and we still only
+ load the needed ones at boot time.
+ * Added /usr/share/mdadm/checkarray, which can be used to check arrays for
+ parity. Also added a debconf question to let the user choose whether
+ cron should run these checks (closes: #377071).
+ * Only shut down arrays automatically when they've been automatically
+ started (closes: #376009).
+ * Make sure the user has a chance to choose the autostart feature by
+ elevating the debconf priority to high (see #376009). The warning about
+ reuse of RAID components has also been elevated to debconf priority high.
+ * The MAIL_TO setting from /etc/default/mdadm has been removed. Instead, use
+ MAILADDR in /etc/mdadm/mdadm.conf. See mdadm.conf(5). Your setting should
+ be automatically migrated.
+ * Now rewrites /etc/default/mdadm (but preserves settings) instead of trying
+ to patch it with changes.
+ * Added note to README.Debian to ensure users know that only the devices
+ listed in mdadm.conf will be autostarted (see #376009).
+ * Now includes latest md.txt from kernel documentation in
+ /usr/share/doc/mdadm/md.txt.gz.
+ * Added some more recipes to /usr/share/doc/mdadm/README.recipes.gz.
+ * Updated debconf translations:
+ - Swedish, thanks to Daniel Nylander!
+ - Brazilian Portuguese, thanks to Felipe Augusto van de Wiel!
+ - Czech, thanks to Miroslav Kure!
+ - Russian, thanks to Yuri Kozlov (closes: #376181).
+ * Further updates to the debconf templates; I hope the translators aren't
+ going to kill me.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 7 Jul 2006 15:09:40 +0200
+
+mdadm (2.5.2-2) experimental; urgency=low
+
+ * The "if it weren't for Munich's wheat beer, there'd be no" release.
+ * Removed -fno-strict-aliasing from compiler options, after upstream fixed
+ the bug that led to its use (see #369779, #356153). Thanks to Elimar
+ Riesebieter for pointing this out (closes: #375876).
+ * Moved detection of RAID devices from initramfs hook to debconf control
+ file, and added a (low-priority) debconf question as to which devices
+ should be started early in the boot sequence. For the cases where we
+ failed to auto-detect previously (e.g. root on LVM on RAID), it's paranoid
+ and suggests to start them all (closes: #375879). Thanks to Alec Berryman
+ for spotting this.
+ * Fixed a typo in README.experimental, which could lead to an unbootable
+ system with initramfs-tools 0.64 or before. Again, thanks to Alec for
+ spotting this.
+ * Extended bug script to include --examine output for all components (at
+ least if called by root, which hopefully should never happen. Err,
+ wait...)
+ * Disabled deprecation warning in mdrun until the transition is complete.
+ * Reworded the debconf templates due to a new question, and also for
+ readability.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 29 Jun 2006 22:54:47 +0200
+
+mdadm (2.5.2-1) experimental; urgency=low
+
+ * New upstream release.
+ * Implemented checks in the initramfs hooks and scripts for compatibility
+ with initramfs-tools. Now we do not need a conflict anymore because
+ mdadm's hooks and scripts will simply do nothing while the ones provided
+ by initramfs-tools are still present.
+ * Not using /bin/bash for mdrun, which I thought we'd need for read timeout
+ support (for the deprecation warning). Since the -n and -t flags to the
+ read shell builtin are non-POSIX, I dropped them, they were merely
+ cosmetic anyway.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 27 Jun 2006 15:06:55 +0200
+
+mdadm (2.5.1-2) experimental; urgency=low
+
+ * Updating dependency on initramfs-tools, which has not yet adopted to mdadm
+ taking over the hooks.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 26 Jun 2006 22:35:08 +0200
+
+mdadm (2.5.1-1) experimental; urgency=low
+
+ * New upstream release:
+ - Really fixes return status of examine (closes: #367901).
+ - Fixes a memory leak in monitor mode (closes: #372618).
+ - Fixes compiler warnings and errors (closes: #373802, #356153, #369779).
+ - Fix byte swapping issues (closes: #369765).
+ - Now lists devices it stops (closes: #369850). This also leads to
+ beautification of the init.d script's stop action.
+ * Fixed RAID init script to not complain about missing logger command.
+
+ -- martin f. krafft <madduck@debian.org> Mon, 26 Jun 2006 00:58:36 +0200
+
+mdadm (2.5-4) experimental; urgency=low
+
+ * The "would you like fries with your parasite?" release.
+ * Now does not require RAID support from the kernel just for package
+ installation; that was silly of me, sorry (closes: Bug#370115).
+ * Added version to Replaces: initramfs-tools dependency.
+ * Further init.d script improvements.
+ * Recommends mail-transport-agent, or the monitor daemon won't be able to
+ send anything.
+ * Ignores failures from modprobe in postinst when RAID modules are not
+ available (closes: #370582).
+
+ -- martin f. krafft <madduck@debian.org> Tue, 6 Jun 2006 12:45:53 +0200
+
+mdadm (2.5-3) experimental; urgency=low
+
+ * Added /usr/share/doc/mdadm/README.recipes with some common usage examples.
+ * Vastly improved the mdadm-raid init.d script output, and removed bashisms.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 2 Jun 2006 00:45:06 +0200
+
+mdadm (2.5-2) experimental; urgency=low
+
+ * The "on her majesty's secret service" release.
+ * Enabled -DDEBIAN during build, which will take care of default permissions
+ on devices created by mdadm. Together with the CREATE configuration
+ directive in 2.5, this now certainly closes: Bug#310241.
+ * Added a patch (incorporating lib/mm/xlate.h from lvm2) to prevent direct
+ access to kernel headers from userspace (closes: Bug#369765).
+ * Disabled strict aliasing compiler checks until we find a better
+ implementation for linked lists in C (closes: Bug#369779, Bug#356153).
+ * Actually decreased the size of the udeb mdadm binary with -Os
+ -fomit-frame-pointer (as suggested by Joey Hess) (closes: Bug#314370)
+ * Added Replaces: initramfs-tools to communicate that we're not conflicting
+ but replacing instead (see Bug#367567)
+ * Updated conflict with initramfs-tools to (<< 0.63) per suggestion by the
+ maintainers.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 1 Jun 2006 20:15:17 +0200
+
+mdadm (2.5-1) experimental; urgency=low
+
+ * The "show me the way to the next whiskey bar" release.
+ * See /usr/share/doc/mdadm/README.experimental or
+ http://madduck.net/~madduck/scratch/README.experimental
+ * New upstream release:
+ - mails include /proc/mdstat output (closes: Bug#355882)
+ - allows specification of device permissions in config (closes: Bug#310241)
+ * /sbin/mdrun has been deprecated and replaced by calls to /sbin/mdadm;
+ a proper deprecation warning is in place (see NEWS).
+ * Moved initramfs hook and script into the package, and switched it to mdadm
+ (from mdadm. Thanks to Stephen Frost for his help (closes: Bug#354144).
+ This should make sure that the right minor numbers are chosen during boot
+ (mainly because mdadm takes care of it all) (closes: Bug#361408).
+ * Removing mdrun from the udeb (d-i patch submitted to debian-boot mailing
+ list)
+ * Upstream links against openssl for SHA1 support (homehost feature), which
+ is a problem. An internal SHA1 implementation is provided, however, so
+ I just link against that.
+ * Switched init.d scripts to use LSB-compliant output.
+ * Enhanced init.d script output.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 1 Jun 2006 02:20:22 +0200
+
+mdadm (2.4.1-2) unstable; urgency=low
+
+ * The "this took way longer than I thought" release.
+ * Migrating to unstable.
+ * If the init.d script creates the mdadm.conf file, it should remove it on
+ purge. To accomplish this, I create a semaphore in /var/lib/mdadm if it
+ was generated, and only remove the conffile on purge if the semaphore
+ exists.
+ * Added a little helper /usr/share/mdadm/mkconf to aid generation of
+ configuration file.
+ * Added a bug script to collect some important information when the user
+ uses Debian bug reporting tools (such as reportbug).
+ * Added a debian/watch file.
+
+ -- martin f. krafft <madduck@debian.org> Wed, 31 May 2006 23:07:48 +0200
+
+mdadm (2.4.1-1) experimental; urgency=low
+
+ * The "I'll kill that maintainer... uh, wait, it's me" release. Sorry for
+ the delay, here's the long awaited new upstream release (closes:
+ Bug#337903, Bug#363592), which gets rid of a bunch of functionality bugs:
+ - reiserfs size does not overflow anymore (closes: Bug#318230)
+ - fixed typos in manpages (closes: Bug#352798)
+ Oh, and we're moving away from that arch nightmare too. Sorry for the
+ confusion.
+ * Experimental release, because I really don't want to be responsible for
+ data loss. Though I am quite sure that the upgrade is painless, I also
+ don't have access to 18 drive RAID 10 with multipath on s390 or similar
+ arrangements.
+ * We now make the /dev/md* devices in postinst unless /dev/md15 exists (no
+ longer checking for /dev/md0), or unless devfs is in use. If udev is used,
+ /dev/md15 will only exist in complex setups, so the devices will be made
+ in /dev/.static by MAKEDEV, which is not really a concern. I opted against
+ unconditionally calling MAKEDEV until #367407 is fixed so as to preserve
+ custom permissions or owner settings. This also acknowledges the NMU
+ (#299623).
+ closes: Bug#310247, Bug#299623
+ * Patched some of the code to make mdadm honour /etc/mdadm/mdadm.conf over
+ /etc/mdadm.conf (see NEWS).
+ * Fixed a couple of typos in the mdadm(8) manpage; thanks to Reuben Thomas.
+ closes: Bug#345669, Bug#345667
+ * Pushed Standards-Version to 3.7.2; no changes required.
+ * Updated Debconf translations:
+ - Vietnamese by Clytie Siddall (closes: Bug#323950)
+ - Czech by Miroslav Kure (closes: Bug#360290)
+ - Russian by Yuri Kozlov (closes: Bug#361116)
+ - French by Eric Madesclair (closes: Bug#323988)
+ * Added new Debconf translations:
+ - Swedish by Daniel Nylander (closes: Bug#333486)
+ - Dutch by Frans Pop (closes: Bug#344714)
+
+ -- martin f. krafft <madduck@debian.org> Tue, 16 May 2006 18:21:36 -0500
+
+mdadm (1.12.0-1) unstable; urgency=low
+
+ * New upstream release.
+ (obsoletes branches: symlinks)
+ (reduces branches: gcc4signedness, debian, autoscan)
+ * Fixed typo in mdadm.conf(5) manpage (closes: Bug#321152).
+
+ -- martin f. krafft <madduck@debian.org> Sun, 24 Jul 2005 19:20:01 +0200
+
+mdadm (1.9.0-5) unstable; urgency=low
+
+ * martin f. krafft: (the, "look ma', we're maintained in arch now!" release)
+ (no functional differences except for added/updated translations)
+ - Acknowledge NMU by Steve Langasek; thanks! (closes: Bug#299623)
+ - split diff.gz into different arch branches (see debian/arch-branches).
+ - debian/control:
+ - Changed maintainer to pkg-mdadm-devel.
+ - Reworded some of the descriptions (closes: Bug#304170).
+ - Pushed Standards-Version to 3.6.2.1; no changes needed.
+ - fixed po-debconf integration
+ - debian/rules:
+ - fixed po-debconf integration
+ - l10n changes:
+ - Removed amiguity from debconf template (closes: Bug#312754).
+ - Added Vietnamese debconf translation; thanks to Clytie Siddall!
+ (closes: Bug#312753)
+ - Added Czech debconf translation; thanks to Miroslav Kure! (closes: Bug#319626)
+ - Updated German debconf translation; thanks to Jens Seidel! (closes: Bug#313981)
+ - backported upstream's gcc4 signedness fixes from 1.12.0 (gcc4signedness
+ branch) (closes: Bug#319743).
+
+ -- martin f. krafft <madduck@debian.org> Sun, 24 Jul 2005 17:58:46 +0200
+
+mdadm (1.9.0-4.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * High-urgency upload for sarge-targetted RC bugfix
+ * Make sure error output from MAKEDEV is sent to stderr, to avoid
+ interfering with debconf; this avoids installation problems on
+ udev-using systems. Thanks to Jonas Smedegaard for the patch.
+ Closes: #299623.
+
+ -- Steve Langasek <vorlon@debian.org> Wed, 1 Jun 2005 03:36:42 -0700
+
+mdadm (1.9.0-4) unstable; urgency=high
+
+ * High-urgency upload for sarge targeted RC bugfix.
+ * mdrun: replaced invocation of /usr/bin/seq with hard-coded sequence
+ (closes: Bug#310671).
+
+ -- martin f. krafft <madduck@debian.org> Wed, 25 May 2005 09:51:41 +0200
+
+mdadm (1.9.0-3) unstable; urgency=high
+
+ * High-urgency upload for sarge targeted RC bugfix.
+ * Applied patch by Peter Samuelson <peter@p12n.org>, which causes mdadm to
+ follow symlinks of device nodes (closes: #274859, #310412, #310492).
+ * Added myself as co-maintainer as per agreement with Mario Joussen.
+
+ -- martin f. krafft <madduck@debian.org> Tue, 24 May 2005 00:03:49 +0200
+
+mdadm (1.9.0-2.3) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * Do not prevent postinst node creation when udev is being used; MAKEDEV
+ puts files into /dev/.static/dev with udev, which is needed so that device
+ nodes will be there even if udev is removed. Sorry for letting this slip
+ my mind and thanks to Steve Langasek for spotting this error.
+ * Leaving urgency at high to make sarge.
+
+ -- martin f. krafft <madduck@debian.org> Sun, 22 May 2005 19:35:04 +0200
+
+mdadm (1.9.0-2.2) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * High-urgency upload for sarge targeted RC bugfix.
+ * Move mdadm-raid back to S25 as it needs to run after modules have been
+ loaded at S20 (see followups to #294404, #301560).
+ * Verified that Steve Langasek's patch to config.c (see item 4 of the
+ 1.9.0-2.1 changelog) is necessary for `mdadm -A -s` to work.
+ (closes: #301560)
+ * Integrated patch by Erik van Konijnenburg to fix mdadm's --auto
+ option in the presence of --scan.
+ (closes: #294404, #273182, #284028, #310126).
+ * Modified mdrun to call mdadm with --auto in assembly mode. Removed code
+ which would auto-create 24 device nodes during system startup when udev
+ was used.
+ * Fixed next_free_md function in mdrun to iterate all 24 nodes instead of
+ using some fragile shell globbing, which did not work anyway.
+ * Prevent postinst node creation when udev is being used.
+ * Added a README.udev file to /usr/share/doc/mdadm.
+
+ -- martin f. krafft <madduck@debian.org> Sun, 22 May 2005 12:57:56 +0200
+
+mdadm (1.9.0-2.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * High-urgency upload for sarge targetted RC bugfix.
+ * Start mdadm-raid before udev on boot-up, so that mdadm device node
+ creation is honored, and support changing the init script ordering
+ on upgrades (closes: #294404).
+ * Fix mdadm --scan to prefer the values contained in /proc/partitions,
+ instead of picking up device node names at random from /dev.
+ * Teach mdrun to look at /dev/.static/dev instead of /.dev for udev
+ mounts requiring autostart (closes: #301560).
+
+ -- Steve Langasek <vorlon@debian.org> Sun, 27 Mar 2005 21:59:12 -0800
+
+mdadm (1.9.0-2) unstable; urgency=low
+
+ * Patched is_standard() to accept /dev/md/* names as standard.
+ Thanks to Colin Watson <cjwatson@debian.org>.
+ (closes: Bug#296794)
+ * Added another typecast to make it compilable on amd64 with gcc-4.0.
+ Thanks to Andreas Jochens <aj@andaco.de>.
+ (closes: Bug#294217)
+ * Removed unnecessary second assignment to $BASE in mdrun.
+ Thanks to Colin Watson <cjwatson@debian.org>.
+ (closes: Bug#295433)
+
+ -- Mario Joussen <joussen@debian.org> Sun, 6 Mar 2005 14:22:24 +0100
+
+mdadm (1.9.0-1) unstable; urgency=high
+
+ * New upstream release.
+ Solves problems with same UUID for each array.
+ Again a stable upstream version.
+ (closes: Bug#292282, Bug#293406, Bug#292784, Bug#290363, Bug#292715)
+ * Added some typecasts to make it compilable on amd64 with gcc-4.0.
+ Thanks to Andreas Jochens <aj@andaco.de>.
+ (closes: Bug#287638)
+
+ -- Mario Joussen <joussen@debian.org> Sun, 6 Feb 2005 12:25:03 +0100
+
+mdadm (1.8.1-1) unstable; urgency=low
+
+ * New upstream release.
+ Fixed segfault if no config file present and --scan is used.
+ (closes: Bug#283425, Bug#282604, Bug#284024)
+ * Fixed typo in detailed help of grow mode.
+ (closes: Bug#286980)
+ * Added japanese debconf translation. Thanks to Hideki Yamane
+ <henrich@samba.gr.jp>.
+ (closes: Bug#281073)
+ * Fixed missing variable initialization causing segfaults.
+
+ -- Mario Joussen <joussen@debian.org> Sun, 26 Dec 2004 14:44:31 +0100
+
+mdadm (1.7.0-2) unstable; urgency=high
+
+ * Changed debconf script to save the settings from the config file.
+ Thanks to Fabio Massimo Di Nitto <fabbione@fabbione.net> and
+ Frank Lichtenheld <djpig@debian.org> for the patch.
+ (closes: Bug#274208)
+ * Moved try to load md module inside the AUTOSTART if branch in
+ /etc/init.d/mdadm.
+ * Removed try to load md module from /etc/init.d/mdadm-raid.
+
+ -- Mario Joussen <joussen@debian.org> Sun, 24 Oct 2004 19:48:06 +0200
+
+mdadm (1.7.0-1) unstable; urgency=low
+
+ * New upstream release.
+ (closes: Bug#267814)
+
+ -- Mario Joussen <joussen@debian.org> Sun, 12 Sep 2004 20:48:33 +0200
+
+mdadm (1.6.0-3) unstable; urgency=high
+
+ * Added 'Conflicts: raidtools2 (<< 1.00.3-12.1)' because these packages
+ contain a mdrun.8 man page also.
+ (closes: Bug#268634, Bug#266527)
+ * Updated the french translation.
+ Thanks to Eric <eric-m@wanadoo.fr>
+ (closes: Bug#266251)
+
+ -- Mario Joussen <joussen@debian.org> Sat, 28 Aug 2004 18:23:17 +0200
+
+mdadm (1.6.0-2) unstable; urgency=low
+
+ * Included version 0.97 of "Debian Software Root Raid Documentation".
+ * Now mdrun is only used if no mdadm.conf is present.
+ Thanks to Thomas Prokosch <7nrmi1s02@sneakemail.com>.
+ (closes: Bug#264059)
+ * Added man page for mdrun.
+ Thanks to Robert Collins <robertc@robertcollins.net>.
+ (closes: Bug#265480)
+ * Moved /etc/mdadm/debian.conf to /etc/default/mdadm.
+ (closes: Bug#254922)
+ * Added a little workaround to mdrun to interact better with udev.
+ Thanks to Fabio Massimo Di Nitto <fabbione@fabbione.net>.
+ (closes: Bug#259491)
+ * Updated Brazilian Portuguese translation.
+ Thanks to Andre Luis Lopes <andrelop@debian.org>.
+ (closes: Bug#264220)
+
+ -- Mario Joussen <joussen@debian.org> Mon, 16 Aug 2004 22:10:59 +0200
+
+mdadm (1.6.0-1) unstable; urgency=low
+
+ * New upstream release.
+ Detect degraded arrays in --monitor mode now.
+ (closes: Bug#257357)
+ * Changed default to autostart RAID array.
+ (closes: Bug#250792)
+ * Fixed mdrun problem with kernel 2.6.
+ Thanks to Andre Tomt <andre@tomt.net> and Fabio Massimo Di Nitto
+ <fabbione@fabbione.net>
+ (closes: Bug#231823)
+ * Changed reuse warning to be less misleading.
+ (closes: Bug#253339)
+
+ -- Mario Joussen <joussen@debian.org> Tue, 20 Jul 2004 21:40:33 +0200
+
+mdadm (1.5.0-2) unstable; urgency=low
+
+ * Added french debconf template.
+ Thanks to Eric Madesclair <eric-m@wanadoo.fr>.
+ (closes: Bug#231968)
+
+ -- Mario Joussen <joussen@debian.org> Tue, 4 May 2004 21:29:19 +0200
+
+mdadm (1.5.0-1) unstable; urgency=low
+
+ * New upstream release.
+ * Rewrote debconf templates to avoid referring to debconf interface
+ widgets.
+ (closes: Bug#231221)
+ * Removed manual scan for RAID devices from init script.
+ (closes: Bug#233122, Bug#236762)
+ * Added creation of an udeb package.
+ (closes: Bug#243609)
+ * Added "Debian Software Root Raid Documentation".
+ Thanks to Lucas Albers <albersl@cs.montana.edu>.
+
+ -- Mario Joussen <joussen@debian.org> Sun, 25 Apr 2004 16:16:06 +0200
+
+mdadm (1.4.0-3) unstable; urgency=low
+
+ * Updated to standards version 3.6.1.0 and debhelper 4.
+ * Corrected definition of BLKGETSIZE64 macro to compile with the
+ 2.6 kernel headers.
+ (closes: Bug#223191)
+ * Swichted to po-debconf to provide localized debconf templates.
+ (closes: Bug#225288)
+
+ -- Mario Joussen <joussen@debian.org> Sun, 1 Feb 2004 19:30:53 +0100
+
+mdadm (1.4.0-2) unstable; urgency=low
+
+ * Corrected human readable size calculation.
+ (closes: Bug#225041)
+ * Added a warning about reusing hard disks and using the autostart
+ feature.
+ (closes: Bug#223790)
+
+ -- Mario Joussen <joussen@debian.org> Thu, 25 Dec 2003 19:52:57 +0100
+
+mdadm (1.4.0-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Mario Joussen <joussen@debian.org> Sun, 7 Dec 2003 19:39:27 +0100
+
+mdadm (1.3.0-2) unstable; urgency=low
+
+ * Added upstream changelog to package.
+
+ -- Mario Joussen <joussen@debian.org> Tue, 12 Aug 2003 21:51:59 +0200
+
+mdadm (1.3.0-1) unstable; urgency=low
+
+ * New upstream release.
+ (closes: Bug#191561, Bug#200921)
+
+ -- Mario Joussen <joussen@debian.org> Thu, 31 Jul 2003 20:59:20 +0200
+
+mdadm (1.2.0-1) unstable; urgency=low
+
+ * New upstream release. (closes: Bug#183191)
+ * New version of mdrun that works properly with devfs and temporary
+ device directory.
+ (closes: Bug#182035)
+ * Added 'Conflicts: raidtools' because of a name clash with mdrun.
+ (closes: Bug#182960)
+
+ -- Mario Joussen <joussen@debian.org> Sun, 16 Mar 2003 13:32:45 +0100
+
+mdadm (1.0.1-4) unstable; urgency=low
+
+ * Changed mdrun so that it can deal with partition statistics in
+ /proc/partitions.
+ (closes: Bug#174000, Bug#175130)
+ * Added russian (ru) debconf template translation. Thanks to Sergey
+ Spiridonov <sena@hurd.homeunix.org>.
+
+ -- Mario Joussen <joussen@debian.org> Sun, 5 Jan 2003 13:14:45 +0100
+
+mdadm (1.0.1-3) unstable; urgency=low
+
+ * Fixed a bug in mdrun. (closes: Bug#167607)
+
+ -- Mario Joussen <joussen@debian.org> Mon, 11 Nov 2002 07:53:23 +0100
+
+mdadm (1.0.1-2) unstable; urgency=low
+
+ * Fixed typo in help option. (closes: Bug#151533)
+ * Added a script that discovers and assembles all arrays automatically.
+ Thanks to Eduard Bloch <blade@debian.org>.
+ (closes: Bug#161699)
+
+ -- Mario Joussen <joussen@debian.org> Fri, 1 Nov 2002 13:46:47 +0100
+
+mdadm (1.0.1-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Mario Joussen <joussen@debian.org> Thu, 30 May 2002 14:01:22 +0200
+
+mdadm (0.8.2-1) unstable; urgency=low
+
+ * New upstream release.
+ * Splitted up mdadm.templates in one file for each language.
+ * Added brazilian portuguese (pt_BR) debconf template translation.
+ Thanks to Andre Luis Lopes <andrelop@ig.com.br>.
+ (closes: Bug#141540)
+
+ -- Mario Joussen <joussen@debian.org> Thu, 18 Apr 2002 19:31:00 +0200
+
+mdadm (0.7.2-1) unstable; urgency=low
+
+ * New upstream release.
+ * 'mdctl' was renamed to 'mdadm' upstream.
+ * Removed question about updating mdctl init script links.
+
+ -- Mario Joussen <joussen@debian.org> Sat, 23 Mar 2002 02:50:51 +0100
+
+mdctl (0.5-4) unstable; urgency=low
+
+ * Added debconf template to ask the user if the init script links
+ should be updated.
+
+ -- Mario Joussen <joussen@debian.org> Mon, 4 Mar 2002 22:53:37 +0100
+
+mdctl (0.5-3) unstable; urgency=low
+
+ * Splitted up init script in two parts. One starts the md array and the
+ other starts the raid monitor daemon.
+ (closes: Bug#136184)
+
+ -- Mario Joussen <joussen@debian.org> Thu, 28 Feb 2002 22:45:57 +0100
+
+mdctl (0.5-2) unstable; urgency=low
+
+ * Included optimization in Makefile
+ (closes: Bug#127687)
+ * Removed Conflicts/Replaces/Provides: mdutils
+ (closes: Bug#127684, Bug#127719)
+ * Added an init script, which can start md arrays and the raid monitor
+ daemon
+ * MD devices are now created under /dev if necessary
+ * Added a sample configuration file
+
+ -- Mario Joussen <mario@joussen.org> Sun, 13 Jan 2002 23:43:40 +0100
+
+mdctl (0.5-1) unstable; urgency=low
+
+ * Initial Release.
+ (closes: Bug#126610)
+
+ -- Mario Joussen <mario@joussen.org> Wed, 26 Dec 2001 17:07:09 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..02dbb13
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,45 @@
+Source: mdadm
+Section: admin
+Priority: optional
+Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
+Build-Depends:
+ debhelper-compat (= 13),
+ libudev-dev,
+Rules-Requires-Root: no
+Standards-Version: 4.7.0
+Homepage: https://raid.wiki.kernel.org
+Vcs-Browser: https://git.progress-linux.org/users/daniel.baumann/debian/packages/mdadm
+Vcs-Git: https://git.progress-linux.org/users/daniel.baumann/debian/packages/mdadm
+
+Package: mdadm
+Section: admin
+Architecture: linux-any
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ udev,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Recommends:
+ kmod,
+Suggests:
+ default-mta | mail-transport-agent,
+Description: tool for managing Linux MD devices (software RAID)
+ The mdadm tool is used to create, manage, and monitor Linux MD (software
+ RAID) devices.
+ .
+ This package configures mdadm to by default assemble arrays automatically
+ during the system startup process.
+
+Package: mdadm-udeb
+Section: debian-installer
+Architecture: linux-any
+Package-Type: udeb
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Description: tool for managing Linux MD devices (software RAID)
+ The mdadm tool is used to create, manage, and monitor Linux MD (software
+ RAID) devices.
+ .
+ This is a minimal package used by the debian-installer.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..a3a3d10
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: mdadm
+Upstream-Contact: Jes Sorensen <jes@trained-monkey.org>
+Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/
+
+Files: *
+Copyright: 2001-2006 Neil Brown <neilb@suse.de>
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2023-2024 Daniel Baumann <daniel.baumann@progress-linux.org>
+ 2020 Felix Lechner <felix.lechner@lease-up.com>
+ 2005-2008 Martin F. Krafft <madduck@debian.org>
+ 2001-2005 Mario Jou/3en <joussen@debian.org>
+License: GPL-2+
+
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ .
+ The complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/GPL-2 file.
diff --git a/debian/local/apport/source_mdadm.py b/debian/local/apport/source_mdadm.py
new file mode 100644
index 0000000..0aad41b
--- /dev/null
+++ b/debian/local/apport/source_mdadm.py
@@ -0,0 +1,60 @@
+'''apport package hook for mdadm
+
+(c) 2009-2016 Canonical Ltd.
+Author: Steve Beattie <sbeattie@ubuntu.com>
+
+Based on the ideas in debian's /usr/share/bug/mdadm/script
+'''
+
+from apport.hookutils import attach_file, attach_file_if_exists, attach_hardware, path_to_key, command_output
+import os
+import re
+import glob
+import gzip
+import subprocess
+import sys
+
+
+def get_initrd_files(pattern):
+ '''Extract listing of files from the current initrd which match a regex.
+
+ pattern should be a "re" object. '''
+
+ (_, _, release, _, _) = os.uname()
+ try:
+ fd = gzip.GzipFile('/boot/initrd.img-' + release, 'rb')
+ # universal_newlines needs to be False here as we're passing
+ # binary data from gzip into cpio, which means we'll need to
+ # decode the bytes into strings later when reading the output
+ cpio = subprocess.Popen(['cpio', '-t'], close_fds=True, stderr=subprocess.STDOUT,
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ universal_newlines=False)
+ except OSError as e:
+ return 'Error: ' + str(e)
+
+ out = cpio.communicate(fd.read())[0].decode(sys.stdout.encoding, errors='replace')
+ if cpio.returncode != 0:
+ return 'Error: command %s failed with exit code %i %' % (
+ 'cpio', cpio.returncode, out)
+
+ lines = ''.join([l for l in out.splitlines(True) if pattern.search(l)])
+ return lines
+
+
+def add_info(report):
+ attach_hardware(report)
+ attach_file(report, '/proc/mounts', 'ProcMounts')
+ attach_file_if_exists(report, '/etc/mdadm/mdadm.conf', 'mdadm.conf')
+ attach_file(report, '/proc/mdstat', 'ProcMDstat')
+ attach_file(report, '/proc/partitions', 'ProcPartitions')
+ attach_file(report, '/etc/blkid.tab', 'etc.blkid.tab')
+ attach_file_if_exists(report, '/boot/grub/menu.lst', 'GrubMenu.lst')
+ attach_file_if_exists(report, '/boot/grub/grub.cfg', 'Grub.cfg')
+ attach_file_if_exists(report, '/etc/lilo.conf', 'lilo.conf')
+
+ devices = glob.glob("/dev/[hs]d*")
+ for dev in devices:
+ report['MDadmExamine' + path_to_key(dev)] = command_output(['/sbin/mdadm', '-E', dev])
+
+ initrd_re = re.compile('md[a/]')
+ report['initrd.files'] = get_initrd_files(initrd_re)
diff --git a/debian/local/bin/checkarray b/debian/local/bin/checkarray
new file mode 100755
index 0000000..2fb7ee7
--- /dev/null
+++ b/debian/local/bin/checkarray
@@ -0,0 +1,221 @@
+#!/bin/sh
+#
+# checkarray -- initiates a check run of an MD array's redundancy information.
+#
+# Copyright © martin f. krafft <madduck@debian.org>
+# distributed under the terms of the Artistic Licence 2.0
+#
+set -eu
+
+PROGNAME=${0##*/}
+
+about()
+{
+ echo "\
+$PROGNAME -- MD array (RAID) redundancy checker tool
+Copyright © martin f. krafft <madduck@debian.org>
+Released under the terms of the Artistic Licence 2.0"
+}
+
+usage()
+{
+ about
+ echo "
+Usage: $PROGNAME [options] [arrays]
+
+Valid options are:
+ -a|--all check all assembled arrays (ignores arrays in command line).
+ -s|--status print redundancy check status of devices.
+ -x|--cancel queue a request to cancel a running redundancy check.
+ -r|--repair repair instead of check
+ -i|--idle perform check in a lowest scheduling class (idle)
+ -l|--slow perform check in a lower-than-standard scheduling class
+ -f|--fast perform check in higher-than-standard scheduling class
+ --realtime perform check in real-time scheduling class (DANGEROUS!)
+ -c|--cron honour AUTOCHECK setting in /etc/default/mdadm.
+ -q|--quiet suppress informational messages
+ (use twice to suppress error messages too).
+ -h|--help show this output.
+ -V|--version show version information.
+
+Examples:
+ $PROGNAME --all --idle
+ $PROGNAME --quiet /dev/md[123]
+ $PROGNAME -sa
+ $PROGNAME -x --all
+
+Devices can be specified in almost any format. The following are equivalent:
+ /dev/md0, md0, /dev/md/0, /sys/block/md0
+
+You can also control the status of a check/repair with /proc/mdstat file."
+}
+
+SHORTOPTS=achVqQsxrilf
+LONGOPTS=all,cron,help,version,quiet,real-quiet,status,cancel,repair,idle,slow,fast,realtime
+
+eval set -- $(getopt -o $SHORTOPTS -l $LONGOPTS -n $PROGNAME -- "$@")
+
+arrays=''
+cron=0
+all=0
+quiet=0
+status=0
+action=check
+ionice=
+
+for opt in $@; do
+ case "$opt" in
+ -a|--all) all=1;;
+ -s|--status) action=status;;
+ -x|--cancel) action=idle;;
+ -r|--repair) action=repair;;
+ -i|--idle) ionice=idle;;
+ -l|--slow) ionice=low;;
+ -f|--fast) ionice=high;;
+ --realtime) ionice=realtime;;
+ -c|--cron) cron=1;;
+ -q|--quiet) quiet=$(($quiet+1));;
+ -Q|--real-quiet) quiet=$(($quiet+2));; # for compatibility
+ -h|--help) usage; exit 0;;
+ -V|--version) about; exit 0;;
+ /dev/md/*|md/*) arrays="${arrays:+$arrays }md${opt#*md/}";;
+ /dev/md*|md*) arrays="${arrays:+$arrays }${opt#/dev/}";;
+ /sys/block/md*) arrays="${arrays:+$arrays }${opt#/sys/block/}";;
+ --) :;;
+ *) echo "$PROGNAME: E: invalid option: $opt. Try --help." >&2; exit 1;;
+ esac
+done
+
+is_true()
+{
+ case "${1:-}" in
+ [Yy]es|[Yy]|1|[Tt]rue|[Tt]) return 0;;
+ *) return 1;
+ esac
+}
+
+DEBIANCONFIG=/etc/default/mdadm
+[ -r $DEBIANCONFIG ] && . $DEBIANCONFIG
+if [ $cron = 1 ] && ! is_true ${AUTOCHECK:-false}; then
+ [ $quiet -lt 1 ] && echo "$PROGNAME: I: disabled in $DEBIANCONFIG ." >&2
+ exit 0
+fi
+
+if [ ! -f /proc/mdstat ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: MD subsystem not loaded, or /proc unavailable." >&2
+ exit 2
+fi
+
+if [ ! -d /sys/block ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: /sys filesystem not available." >&2
+ exit 7
+fi
+
+if [ -z "$(ls /sys/block/md* 2>/dev/null)" ]; then
+ if [ $quiet -lt 2 ] && [ $cron != 1 ]; then
+ echo "$PROGNAME: W: no active MD arrays found." >&2
+ echo "$PROGNAME: W: (maybe uninstall the mdadm package?)" >&2
+ fi
+ exit 0
+fi
+
+if [ -z "$(ls /sys/block/md*/md/level 2>/dev/null)" ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: kernel too old, no support for redundancy checks." >&2
+ exit 6
+fi
+
+if ! egrep -q '^raid([1456]|10)$' /sys/block/md*/md/level 2>/dev/null; then
+ [ $quiet -lt 1 ] && echo "$PROGNAME: I: no redundant arrays present; skipping checks..." >&2
+ exit 0
+fi
+
+if [ -z "$(ls /sys/block/md*/md/sync_action 2>/dev/null)" ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: no kernel support for redundancy checks." >&2
+ exit 3
+fi
+
+[ $all = 1 ] && arrays="$(ls -d1 /sys/block/md* | cut -d/ -f4)"
+
+for array in $arrays; do
+ MDBASE=/sys/block/$array/md
+
+ if [ ! -e $MDBASE/sync_action ]; then
+ [ $quiet -lt 1 ] && echo "$PROGNAME: I: skipping non-redundant array $array." >&2
+ continue
+ fi
+
+ cur_status="$(cat $MDBASE/sync_action)"
+
+ if [ $action = status ]; then
+ echo "$array: $cur_status"
+ continue
+ fi
+
+ if [ ! -w $MDBASE/sync_action ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: $MDBASE/sync_action not writeable." >&2
+ exit 4
+ fi
+
+ if [ "$(cat $MDBASE/array_state)" = 'read-auto' ]; then
+ [ $quiet -lt 1 ] && echo "$PROGNAME: W: array $array in auto-read-only state, skipping..." >&2
+ continue
+ fi
+
+ case "$action" in
+ idle)
+ echo $action > $MDBASE/sync_action
+ [ $quiet -lt 1 ] && echo "$PROGNAME: I: cancel request queued for array $array." >&2
+ ;;
+
+ check|repair)
+ if [ "$cur_status" != idle ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: W: array $array not idle, skipping..." >&2
+ continue
+ fi
+
+ # check if the array created recently and skip test if it is
+ created=$(mdadm --detail /dev/$array 2>/dev/null |
+ sed -n 's/.*Creation Time *://p' )
+ if [ -n "$created" ]; then
+ created=$(date +%s -d "$created" 2>/dev/null)
+ fi
+ if [ -n "$created" ]; then
+ now=$(date +%s)
+ if [ "$created" -lt "$now" -a \
+ "$created" -gt "$(($now - 14 * 24 * 60 * 60))" ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: I: array $array created recently, skipping..." >&2
+ continue
+ fi
+ fi
+
+ # queue request for the array. The kernel will make sure that these requests
+ # are properly queued so as to not kill one of the arrays.
+ echo $action > $MDBASE/sync_action
+ [ $quiet -lt 1 ] && echo "$PROGNAME: I: $action queued for array $array." >&2
+
+ case "$ionice" in
+ idle) ioarg='-c3'; renice=15;;
+ low) ioarg='-c2 -n7'; renice=5;;
+ high) ioarg='-c2 -n0'; renice=0;;
+ realtime) ioarg='-c1 -n4'; renice=-5;;
+ *) continue;;
+ esac
+
+ resync_pid= wait=5
+ while [ $wait -gt 0 ]; do
+ wait=$((wait - 1))
+ resync_pid=$(ps -ef | awk -v dev=$array 'BEGIN { pattern = "^\\[" dev "_resync]$" } $8 ~ pattern { print $2 }')
+ if [ -n "$resync_pid" ]; then
+ [ $quiet -lt 1 ] && echo "$PROGNAME: I: selecting $ionice I/O scheduling class and $renice niceness for resync of $array." >&2
+ ionice -p "$resync_pid" $ioarg 2>/dev/null || :
+ renice -n $renice -p "$resync_pid" 1>/dev/null 2>&1 || :
+ break
+ fi
+ sleep 1
+ done
+ ;;
+ esac
+
+done
+
+exit 0
diff --git a/debian/local/bin/mkconf b/debian/local/bin/mkconf
new file mode 100755
index 0000000..4dd09b1
--- /dev/null
+++ b/debian/local/bin/mkconf
@@ -0,0 +1,104 @@
+#!/bin/sh
+#
+# mkconf -- outputs valid mdadm.conf contents for the local system
+#
+# Copyright © martin f. krafft <madduck@madduck.net>
+# distributed under the terms of the Artistic Licence 2.0
+#
+set -eu
+
+ME="${0##*/}"
+MDADM=/sbin/mdadm
+DEBIANCONFIG=/etc/default/mdadm
+CONFIG=/etc/mdadm/mdadm.conf
+
+# initialise config variables in case the environment leaks
+MAILADDR= DEVICE= HOMEHOST= PROGRAM=
+
+test -r $DEBIANCONFIG && . $DEBIANCONFIG
+
+if [ -n "${MDADM_MAILADDR__:-}" ]; then
+ # honour MAILADDR from the environment (from postinst)
+ MAILADDR="$MDADM_MAILADDR__"
+else
+ # preserve existing MAILADDR
+ MAILADDR="$(sed -ne 's/^MAILADDR //p' $CONFIG 2>/dev/null)" || :
+fi
+
+# save existing values as defaults
+if [ -r "$CONFIG" ]; then
+ DEVICE="$(sed -ne 's/^DEVICE //p' $CONFIG)"
+ HOMEHOST="$(sed -ne 's/^HOMEHOST //p' $CONFIG)"
+ PROGRAM="$(sed -ne 's/^PROGRAM //p' $CONFIG)"
+fi
+
+[ "${1:-}" = force-generate ] && rm -f $CONFIG
+case "${1:-}" in
+ generate|force-generate)
+ [ -n "${2:-}" ] && CONFIG=$2
+ # only barf if the config file specifies anything else than MAILADDR
+ if egrep -qv '^(MAILADDR.*|#.*|)$' $CONFIG 2>/dev/null; then
+ echo "E: $ME: $CONFIG already exists." >&2
+ exit 255
+ fi
+
+ mkdir --parent ${CONFIG%/*}
+ exec >$CONFIG
+ ;;
+esac
+
+cat <<_eof
+# mdadm.conf
+#
+# !NB! Run update-initramfs -u after updating this file.
+# !NB! This will ensure that initramfs has an uptodate copy.
+#
+# Please refer to mdadm.conf(5) for information about this file.
+#
+
+# by default (built-in), scan all partitions (/proc/partitions) and all
+# containers for MD superblocks. alternatively, specify devices to scan, using
+# wildcards if desired.
+#DEVICE ${DEVICE:-partitions containers}
+
+# automatically tag new arrays as belonging to the local system
+HOMEHOST ${HOMEHOST:-<system>}
+
+# instruct the monitoring daemon where to send mail alerts
+MAILADDR ${MAILADDR:-root}
+
+_eof
+
+if [ -n "${PROGRAM:-}" ]; then
+ cat <<-_eof
+ # program to run when mdadm monitor detects potentially interesting events
+ PROGRAM ${PROGRAM}
+
+ _eof
+fi
+
+error=0
+if [ ! -r /proc/mdstat ]; then
+ echo W: $ME: MD subsystem is not loaded, thus I cannot scan for arrays. >&2
+ error=1
+elif [ ! -r /proc/partitions ]; then
+ echo W: $ME: /proc/partitions cannot be read, thus I cannot scan for arrays. >&2
+ error=2
+else
+ echo "# definitions of existing MD arrays"
+ if ! $MDADM --examine --scan --config=partitions; then
+ error=$(($? + 128))
+ echo W: $ME: failed to scan for partitions. >&2
+ echo "### WARNING: scan failed."
+ else
+ echo
+ fi
+fi
+
+if [ -z "${SOURCE_DATE_EPOCH:-}" ]; then
+ echo "# This configuration was auto-generated on $(date -R) by mkconf"
+else
+ echo "# This configuration was auto-generated on $(date -R --utc -d@$SOURCE_DATE_EPOCH) by mkconf"
+fi
+
+exit $error
diff --git a/debian/local/doc/FAQ b/debian/local/doc/FAQ
new file mode 100644
index 0000000..40e0aba
--- /dev/null
+++ b/debian/local/doc/FAQ
@@ -0,0 +1,669 @@
+Frequently asked questions -- Debian mdadm
+==========================================
+
+Also see /usr/share/doc/mdadm/README.recipes.gz .
+
+The latest version of this FAQ is available here:
+ http://anonscm.debian.org/gitweb/?p=pkg-mdadm/mdadm.git;a=blob_plain;f=debian/FAQ;hb=HEAD
+
+0. What does MD stand for?
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MD is an abbreviation for "multiple device" (also often called "multi-
+ disk"). The Linux MD implementation implements various strategies for
+ combining multiple (typically but not necessarily physical) block devices
+ into single logical ones. The most common use case is commonly known as
+ "Software RAID". Linux supports RAID levels 1, 4, 5, 6 and 10 as well
+ as the "pseudo" RAID level 0.
+ In addition, the MD implementation covers linear and multipath
+ configurations.
+
+ Most people refer to MD as RAID. Since the original name of the RAID
+ configuration software is "md"adm, I chose to use MD consistently instead.
+
+1. How do I overwrite ("zero") the superblock?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdadm --zero-superblock /dev/sdXY
+
+ Note that this is a destructive operation. It does not actually delete any
+ data, but the device will have lost its "authority". You cannot assemble the
+ array with it anymore and if you add the device to another array, the
+ synchronisation process *will* *overwrite* all data on the device.
+
+ Nevertheless, sometimes it is necessary to zero the superblock:
+
+ - If you want ot re-use a device (e.g. a HDD or SSD) that has been part of an
+ array (with an different superblock version and/or location) in another one.
+ In this case you zero the superblock before you assemble the array or add
+ the device to a new array.
+
+ - If you are trying to prevent a device from being recognised as part of an
+ array. Say for instance you are trying to change an array spanning sd[ab]1
+ to sd[bc]1 (maybe because sda is failing or too slow), then automatic
+ (scan) assembly will still recognise sda1 as a valid device. You can limit
+ the devices to scan with the DEVICE keyword in the configuration file, but
+ this may not be what you want. Instead, zeroing the superblock will
+ (permanently) prevent a device from being considered as part of an array.
+
+ WARNING: Depending on which superblock version you use, it won't work to just
+ overwrite the first few MiBs of the block device with 0x0 (e.g. via
+ dd), since the superblock may be at other locations (especially the
+ end of the device).
+ Therefore always use mdadm --zero-superblock .
+
+2. How do I change the preferred minor of an MD array (RAID)?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ See item 12 in /usr/share/doc/mdadm/README.recipes.gz and read the mdadm(8)
+ manpage (search for 'preferred').
+
+3. How does mdadm determine which /dev/mdX or /dev/md/X to use?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ The logic used by mdadm to determine the device node name in the mdadm
+ --examine output (which is used to generate mdadm.conf) depends on several
+ factors. Here's how mdadm determines it:
+
+ It first checks the superblock version of a given array (or each array in
+ turn when iterating all of them). Run
+
+ mdadm --detail /dev/mdX | sed -ne 's,.*Version : ,,p'
+
+ to determine the superblock version of a running array, or
+
+ mdadm --examine /dev/sdXY | sed -ne 's,.*Version : ,,p'
+
+ to determine the superblock version from a component device of an array.
+
+ Version 0 superblocks (00.90.XX)
+ ''''''''''''''''''''''''''''''''
+ You need to know the preferred minor number stored in the superblock,
+ so run either of
+
+ mdadm --detail /dev/mdX | sed -ne 's,.*Preferred Minor : ,,p'
+ mdadm --examine /dev/sdXY | sed -ne 's,.*Preferred Minor : ,,p'
+
+ Let's call the resulting number MINOR. Also see FAQ 2 further up.
+
+ Given MINOR, mdadm will output /dev/md<MINOR> if the device node
+ /dev/md<MINOR> exists.
+ Otherwise, it outputs /dev/md/<MINOR>
+
+ Version 1 superblocks (01.XX.XX)
+ ''''''''''''''''''''''''''''''''
+ Version 1 superblocks actually seem to ignore preferred minors and instead
+ use the value of the name field in the superblock. Unless specified
+ explicitly during creation (-N|--name) the name is determined from the
+ device name used, using the following regexp: 's,/dev/md/?(.*),$1,', thus:
+
+ /dev/md0 -> 0
+ /dev/md/0 -> 0
+ /dev/md_d0 -> _d0 (d0 in later versions)
+ /dev/md/d0 -> d0
+ /dev/md/name -> name
+ (/dev/name does not seem to work)
+
+ mdadm will append the name to '/dev/md/', so it will always output device
+ names under the /dev/md/ directory. Newer versions can create a symlink
+ from /dev/mdX. See the symlinks option in mdadm.con(5) and mdadm(8).
+
+ If you want to change the name, you can do so during assembly:
+
+ mdadm -A -U name -N newname /dev/mdX /dev/sd[abc]X
+
+ I know this all sounds inconsistent and upstream has some work to do.
+ We're on it.
+
+4. Which RAID level should I use?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Many people seem to prefer RAID4/5/6 because it makes more efficient use of
+ space. For example, if you have devices of size X, then in order to get 2X
+ storage, you need 3 devices for RAID5, but 4 if you use RAID10 or RAID1+ (or
+ RAID6).
+
+ This gain in usable space comes at a price: performance; RAID1/10 can be up
+ to four times faster than RAID4/5/6.
+
+ At the same time, however, RAID4/5/6 provide somewhat better redundancy in
+ the event of two failing devices. In a RAID10 configuration, if one device is
+ already dead, the RAID can only survive if any of the two devices in the other
+ RAID1 array fails, but not if the second device in the degraded RAID1 array
+ fails (see next item, 4b). A RAID6 across four devices can cope with any two
+ devices failing. However, RAID6 is noticeably slower than RAID5. RAID5 and
+ RAID4 do not differ much, but can only handle single-device failures.
+
+ If you can afford the extra devices (storage *is* cheap these days), I suggest
+ RAID1/10 over RAID4/5/6. If you don't care about performance but need as
+ much space as possible, go with RAID4/5/6, but make sure to have backups.
+ Heck, make sure to have backups whatever you do.
+
+ Let it be said, however, that I thoroughly regret putting my primary
+ workstation on RAID5. Anything device-intensive brings the system to its
+ knees; I will have to migrate to RAID10 at one point.
+
+ Please also consult /usr/share/doc/mdadm/RAID5_versus_RAID10.txt.gz,
+ https://en.wikipedia.org/wiki/Standard_RAID_levels and perhaps even
+ https://en.wikipedia.org/wiki/Non-standard_RAID_levels .
+
+4b. Can a 4-device RAID10 survive two device failures?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ I am assuming that you are talking about a setup with two copies of each
+ block, so --layout=near2/far2/offset2:
+
+ In two thirds of the cases, yes[0], and it does not matter which layout you
+ use. When you assemble 4 devices into a RAID10, you essentially stripe a RAID0
+ across two RAID1, so the four devices A,B,C,D become two pairs: A,B and C,D.
+ If A fails, the RAID10 can only survive if the second failing device is either
+ C or D; if B fails, your array is dead.
+
+ Thus, if you see a device failing, replace it as soon as possible!
+
+ If you need to handle two failing devices out of a set of four, you have to
+ use RAID6, or store more than two copies of each block (see the --layout
+ option in the mdadm(8) manpage).
+
+ See also question 18 further down.
+
+ [0] It's actually (n-2)/(n-1), where n is the number of devices. I am not
+ a mathematician, see http://aput.net/~jheiss/raid10/, which gives the
+ chance of *failure* as 1/(n-1), so the chance of success is 1-1/(n-1), or
+ (n-2)/(n-1), or 2/3 in the four device example.
+ (Thanks to Per Olofsson for clarifying this in #493577).
+
+5. How to convert RAID5 to RAID10?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ To convert 3 device RAID5 to RAID10, you need a spare device (either a hot
+ spare, fourth device in the array, or a new one). Then you remove the spare
+ and one of the three devices from the RAID5, create a degraded RAID10 across
+ them, create the filesystem and copy the data (or do a raw copy), then add the
+ other two devices to the new RAID10. However, mdadm cannot assemble a RAID10
+ with 50% missing devices the way you might like it:
+
+ mdadm --create -l 10 -n4 -pn2 /dev/md1 /dev/sd[cd] missing missing
+
+ For reasons that may be answered by question 20 further down, mdadm actually
+ cares about the order of devices you give it. If you intersperse the "missing"
+ keywords with the physical devices, it should work:
+
+ mdadm --create -l 10 -n4 -pn2 /dev/md1 /dev/sdc missing /dev/sdd missing
+
+ or even
+
+ mdadm --create -l 10 -n4 -pn2 /dev/md1 missing /dev/sd[cd] missing
+
+ Also see item (4b) further up, and this thread:
+ http://thread.gmane.org/gmane.linux.raid/13469/focus=13472
+
+6. What is the difference between RAID1+0 and RAID10?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ RAID1+0 is a form of RAID in which a RAID0 is striped across two RAID1
+ arrays. To assemble it, you create two RAID1 arrays and then create a RAID0
+ array with the two md arrays.
+
+ The Linux kernel provides the RAID10 level to do pretty much exactly the
+ same for you, but with greater flexibility (and somewhat improved
+ performance). While RAID1+0 makes sense with 4 devices, RAID10 can be
+ configured to work with only 3 devices. Also, RAID10 has a little less
+ overhead than RAID1+0, which has data pass the md layer twice.
+
+ I prefer RAID10 over RAID1+0.
+
+6b. What's the difference between RAID1+0 and RAID0+1?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In short: RAID1+0 concatenates two mirrored arrays while RAID0+1 mirrors two
+ concatenated arrays. However, the two are also often switched.
+
+ The linux MD driver supports RAID10, which is equivalent to the above
+ RAID1+0 definition.
+
+ RAID1+0/10 has a greater chance to survive two device failures, its
+ performance suffers less when in degraded state, and it resyncs faster after
+ replacing a failed device.
+
+ See http://aput.net/~jheiss/raid10/ for more details.
+
+7. Which RAID10 layout scheme should I use
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ RAID10 gives you the choice between three ways of laying out chunks on the
+ devices: near, far and offset.
+
+ The examples below explain the chunk distribution for each of these layouts
+ with 2 copies per chunk, using either an even number of devices (fewer than 4)
+ or an odd number (fewer than 5).
+
+ For simplicity we assume that the chunk size matches the block size of the
+ underlying devices and also the RAID10 device exported by the kernel
+ (e.g. /dev/md/name). The chunk numbers map therefore directly to the block
+ addresses in the exported RAID10 device.
+
+ The decimal numbers below (0, 1, 2, …) are the RAID10 chunks. Due to the
+ foregoing assumption they are also the block addresses in the exported RAID10
+ device. Identical numbers refer to copies of a chunk or block, but on different
+ underlying devices. The hexadecimal numbers (0x00, 0x01, 0x02, …) refer to the
+ block addresses in the underlying devices.
+
+ "near" layout with 2 copies per chunk (--layout=n2):
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ The chunk copies are placed "as close to each other as possible".
+
+ With an even number of devices, they lie at the same offset on the each device.
+ It is a classic RAID1+0 setup, i.e. two groups of mirrored devices, with both
+ forming a striped RAID0.
+
+ device1 device2 device3 device4 device1 device2 device3 device4 device5
+ ─────── ─────── ─────── ─────── ─────── ─────── ─────── ─────── ───────
+ 0 0 1 1 0x00 0 0 1 1 2
+ 2 2 3 3 0x01 2 3 3 4 4
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
+ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
+ 254 254 255 255 0x80 317 318 318 319 319
+ ╰──────┬──────╯ ╰──────┬──────╯
+ RAID1 RAID1
+ ╰──────────────┬──────────────╯
+ RAID0
+
+ "far" layout with 2 copies per chunk (--layout=f2):
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ The chunk copies are placed "as far from each other as possible".
+
+ Here, a complete sequence of chunks is striped over all devices. Then a second
+ sequence of chunks is placed next to them. More copies are added as the number
+ 2 goes up.
+
+ It is undesirable, however, to place copies of the same chunks on the same
+ devices. That is prevented by a cyclic permutation of each such stripe.
+
+ device1 device2 device3 device4 device1 device2 device3 device4 device5
+ ─────── ─────── ─────── ─────── ─────── ─────── ─────── ─────── ───────
+ 0 1 2 3 0x00 0 1 2 3 4 ╮
+ 4 5 6 7 0x01 5 6 7 8 9 ├ ▒
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ┆
+ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ┆
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ┆
+ 252 253 254 255 0x40 315 316 317 318 319 ╯
+ 3 0 1 2 0x41 4 0 1 2 3 ╮
+ 7 4 5 6 0x42 9 5 6 7 8 ├ ▒ₚ
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ┆
+ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ┆
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ┆
+ 255 252 253 254 0x80 319 315 316 317 318 ╯
+
+ Each ▒ in the diagram represents a complete sequence of chunks. ▒ₚ is a cyclic
+ permutation.
+
+ A major advantage of the "far" layout is that sequential reads can be spread
+ out over different devices, which makes the setup similar to RAID0 in terms of
+ speed. For writes, there is a cost of seeking. They are substantially slower.
+
+ "offset" layout with 2 copies per chunk (--layout=o2):
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Here, a number of consecutive chunks are bundled on each device during the
+ striping operation. The number of consecutive chunks equals the number of
+ devices. Next, a copy of the same chunks is striped in a different pattern.
+ More copies are added as the number 2 goes up.
+
+ A cyclic permutation in the pattern prevents copies of the same chunks
+ landing on the same devices.
+
+ device1 device2 device3 device4 device1 device2 device3 device4 device5
+ ─────── ─────── ─────── ─────── ─────── ─────── ─────── ─────── ───────
+ 0 1 2 3 0x00 0 1 2 3 4 ) AA
+ 3 0 1 2 0x01 4 0 1 2 3 ) AAₚ
+ 4 5 6 7 0x02 5 6 7 8 9 ) AB
+ 7 4 5 6 0x03 9 5 6 7 8 ) ABₚ
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ) ⋯
+ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
+ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ) ⋯
+ 251 252 253 254 0x79 314 315 316 317 318 ) EX
+ 254 251 252 253 0x80 318 314 315 316 317 ) EXₚ
+
+ With AA, AB, …, AZ, BA, … being the sets of consecutive chunks and
+ AAₚ, ABₚ, …, AZₚ, BAₚ, … their cyclic permutations.
+
+ The read characteristics are probably similar to the "far" layout when a
+ suitably large chunk size is chosen, but with less seeking for writes.
+
+ Upstream and the Debian maintainer do not understand all the nuances and
+ implications. The "offset" layout was only added because the Common
+ RAID Data Disk Format (DDF) supports it, and standard compliance is our
+ goal.
+
+ See the md(4) manpage for more details.
+
+8. (One of) my RAID arrays is busy and cannot be stopped. What gives?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ It is perfectly normal for mdadm to report the array with the root
+ filesystem to be busy on shutdown. The reason for this is that the root
+ filesystem must be mounted to be able to stop the array (or otherwise
+ /sbin/mdadm does not exist), but to stop the array, the root filesystem
+ cannot be mounted. Catch 22. The kernel actually stops the array just before
+ halting, so it's all well.
+
+ If mdadm cannot stop other arrays on your system, check that these arrays
+ aren't used anymore. Common causes for busy/locked arrays are:
+
+ * The array contains a mounted filesystem (check the `mount' output)
+ * The array is used as a swap backend (check /proc/swaps)
+ * The array is used by the device-mapper (check with `dmsetup')
+ * LVM
+ * dm-crypt
+ * EVMS
+ * The array contains a swap partition used for suspend-to-ram
+ (check /etc/initramfs-tools/conf.d/resume)
+ * The array is used by a process (check with `lsof')
+
+9. Should I use RAID0 (or linear)?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ No. Unless you know what you're doing and keep backups, or use it for data
+ that can be lost.
+
+9b. Why not?
+~~~~~~~~~~~~
+ RAID0 has zero redundancy. If you stripe a RAID0 across X devices, you
+ increase the likelyhood of complete loss of the filesystem by a factor of X.
+
+ The same applies to LVM by the way (when LVs are placed over X PVs).
+
+ If you want/must used LVM or RAID0, stripe it across RAID1 arrays
+ (RAID10/RAID1+0, or LVM on RAID1), and keep backups!
+
+10. Can I cancel a running array check (checkarray)?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ See the -x option in the `/usr/share/mdadm/checkarray --help` output.
+
+11. mdadm warns about duplicate/similar superblocks; what gives?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In certain configurations, especially if your last partition extends all the
+ way to the end of the device, mdadm may display a warning like:
+
+ mdadm: WARNING /dev/sdXY and /dev/sdX appear to have very similar
+ superblocks. If they are really different, please --zero the superblock on
+ one. If they are the same or overlap, please remove one from the DEVICE
+ list in mdadm.conf.
+
+ There are two ways to solve this:
+
+ (a) recreate the arrays with version-1 superblocks, which is not always an
+ option -- you cannot yet upgrade version-0 to version-1 superblocks for
+ existing arrays.
+
+ (b) instead of 'DEVICE partitions', list exactly those devices that are
+ components of MD arrays on your system. So istead of:
+
+ DEVICE partitions
+
+ for example:
+
+ DEVICE /dev/sd[ab]* /dev/sdc[123]
+
+12. mdadm -E / mkconf report different arrays with the same device
+ name / minor number. What gives?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In almost all cases, mdadm updates the super-minor field in an array's
+ superblock when assembling the array. It does *not* do this for RAID0
+ arrays. Thus, you may end up seeing something like this when you run
+ mdadm -E or mkconf:
+
+ ARRAY /dev/md0 level=raid0 num-devices=2 UUID=abcd...
+ ARRAY /dev/md0 level=raid1 num-devices=2 UUID=dcba...
+
+ Note how the two arrays have different UUIDs but both appear as /dev/md0.
+
+ The solution in this case is to explicitly tell mdadm to update the
+ superblock of the RAID0 array. Assuming that the RAID0 array in the above
+ example should really be /dev/md1:
+
+ mdadm --stop /dev/md1
+ mdadm --assemble --update=super-minor --uuid=abcd... /dev/md1
+
+ See question 2 of this FAQ, and also http://bugs.debian.org/386315 and
+ recipe #12 in README.recipes .
+
+13. Can a MD array be partitioned?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Since kernel 2.6.28, MD arrays can be partitioned like any other block
+ device.
+
+ Prior to 2.6.28, for a MD array to be able to hold partitions, it must be
+ created as a "partitionable array", using the configuration auto=part on the
+ command line or in the configuration file, or by using the standard naming
+ scheme (md_d* or md/d*) for partitionable arrays:
+
+ mdadm --create --auto=yes ... /dev/md_d0 ...
+ # see mdadm(8) manpage about the values of the --auto keyword
+
+14. When would I partition an array?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ This answer by Doug Ledford is shamelessly adapted from [0] (with
+ permission):
+
+ First, not all MD types make sense to be split up, e.g. multipath. For
+ those types, when a device fails, the *entire* device is considered to have
+ failed, but with different arrays you won't switch over to the next path
+ until each MD array has attempted to access the bad path. This can have
+ obvious bad consequences for certain array types that do automatic
+ failover from one port to another (you can end up getting the array in
+ a loop of switching ports repeatedly to satisfy the fact that one array
+ failed over during a path down, then the path came back up, and another
+ array stayed on the old path because it didn't send any commands during
+ the path down time period).
+
+ Second, convenience. Assume you have a 6 device RAID5 array. If a device
+ fails and you are using a partitioned MD array, then all the partitions on
+ the device will already be handled without using that device. No need to
+ manually fail any still active array members from other arrays.
+
+ Third, safety. Again with the RAID5 array. If you use multiple arrays on
+ a single device, and that device fails, but it only failed on one array, then
+ you now need to manually fail that device from the other arrays before
+ shutting down or hot swapping the device. Generally speaking, that's not
+ a big deal, but people do occasionally have fat finger syndrome and this
+ is a good opportunity for someone to accidentally fail the wrong device, and
+ when you then go to remove the device you create a two device failure instead
+ of one and now you are in real trouble.
+
+ Forth, to respond to what you wrote about independent of each other --
+ part of the reason why you partition. I would argue that's not true. If
+ your goal is to salvage as much use from a failing device as possible, then
+ OK. But, generally speaking, people that have something of value on their
+ devices don't want to salvage any part of a failing device, they want that
+ device gone and replaced immediately. There simply is little to no value in
+ an already malfunctioning device. They're too cheap and the data stored on
+ them too valuable to risk loosing something in an effort to further
+ utilize broken hardware. This of course is written with the understanding
+ that the latest MD RAID code will do read error rewrites to compensate for
+ minor device issues, so anything that will throw a device out of an array is
+ more than just a minor sector glitch.
+
+ [0] http://thread.gmane.org/gmane.linux.raid/13594/focus=13597
+
+15. How can I start a dirty degraded array?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ A degraded array (e.g. a RAID5 with only two devices) that has not been
+ properly stopped cannot be assembled just like that; mdadm will refuse and
+ complain about a "dirty degraded array", for good reasons.
+
+ The solution might be to force-assemble it, and then to start it. Please see
+ recipes 4 and 4b of /usr/share/doc/mdadm/README.recipes.gz and make sure you
+ know what you're doing.
+
+16. How can I influence the speed with which an array is resynchronised?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ For each array, the MD subsystem exports parameters governing the
+ synchronisation speed via sysfs. The values are in kB/sec.
+
+ /sys/block/mdX/md/sync_speed -- the current speed
+ /sys/block/mdX/md/sync_speed_max -- the maximum speed
+ /sys/block/mdX/md/sync_speed_min -- the guaranteed minimum speed
+
+17. When I create a new array, why does it resynchronise at first?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ See the mdadm(8) manpage:
+ When creating a RAID5 array, mdadm will automatically create a degraded
+ array with an extra spare drive. This is because building the spare into
+ a degraded array is in general faster than resyncing the parity on
+ a non-degraded, but not clean, array. This feature can be over-ridden with
+ the --force option.
+
+ This also applies to RAID levels 4 and 6.
+
+ It does not make much sense for RAID levels 1 and 10 and can thus be
+ overridden with the --force and --assume-clean options, but it is not
+ recommended. Read the manpage.
+
+18. How many failed devics can a RAID10 handle?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ (see also question 4b)
+
+ The following table shows how many devices you can lose and still have an
+ operational array. In some cases, you *can* lose more than the given number
+ of devices, but there is no guarantee that the array survives. Thus, the
+ following is the guaranteed number of failed devices a RAID10 array survives
+ and the maximum number of failed devices the array can (but is not guaranteed
+ to) handle, given the number of devices used and the number of data block
+ copies. Note that 2 copies means original + 1 copy. Thus, if you only have
+ one copy (the original), you cannot handle any failures.
+
+ 1 2 3 4 (# of copies)
+ 1 0/0 0/0 0/0 0/0
+ 2 0/0 1/1 1/1 1/1
+ 3 0/0 1/1 2/2 2/2
+ 4 0/0 1/2 2/2 3/3
+ 5 0/0 1/2 2/2 3/3
+ 6 0/0 1/3 2/3 3/3
+ 7 0/0 1/3 2/3 3/3
+ 8 0/0 1/4 2/3 3/4
+ (# of devices)
+
+ Note: I have not really verified the above information. Please don't count
+ on it. If a device fails, replace it as soon as possible. Corrections welcome.
+
+19. What should I do if a device fails?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Replace it as soon as possible.
+
+ In case of physical devices with no hot-swap capabilities, for example via:
+
+ mdadm --remove /dev/md0 /dev/sda1
+ poweroff
+ <replace device and start the machine>
+ mdadm --add /dev/md0 /dev/sda1
+
+20. So how do I find out which other device(s) can fail without killing the
+ array?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Did you read the previous question and its answer?
+
+ For cases when you have two copies of each block, the question is easily
+ answered by looking at the output of /proc/mdstat. For instance on a 4 device
+ array:
+
+ md3 : active raid10 sdg7[3] sde7[0] sdh7[2] sdf7[1]
+
+ you know that sde7/sdf7 form one pair and sdg7/sgh7 the other.
+
+ If sdh now fails, this will become
+
+ md3 : active raid10 sdg7[3] sde7[0] sdh7[4](F) sdf7[1]
+
+ So now the second pair is degraded; the array could take another failure in
+ the first pair, but if sdg now also fails, you're history.
+
+ Now go and read question 19.
+
+ For cases with more copies per block, it becomes more complicated. Let's
+ think of a 7 device array with three copies:
+
+ md5 : active raid10 sdg7[6] sde7[4] sdb7[5] sdf7[2] sda7[3] sdc7[1] sdd7[0]
+
+ Each mirror now has 7/3 = 2.33 devices to it, so in order to determine groups,
+ you need to round up. Note how the devices are arranged in decreasing order of
+ their indices (the number in brackes in /proc/mdstat):
+
+ device: -sdd7- -sdc7- -sdf7- -sda7- -sde7- -sdb7- -sdg7-
+ group: [ one ][ two ][ three ]
+
+ Basically this means that after two devices failed, you need to make sure that
+ the third failed device doesn't destroy all copies of any given block. And
+ that's not always easy as it depends on the layout chosen: whether the
+ blocks are near (same offset within each group), far (spread apart in a way
+ to maximise the mean distance), or offset (offset by size/n within each
+ block).
+
+ I'll leave it up to you to figure things out. Now go read question 19.
+
+21. Why does the kernel speak of 'resync' when using checkarray?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Please see README.checkarray and http://thread.gmane.org/gmane.linux.raid/11864 .
+
+ In short: it's a bug. checkarray is actually not a resync, but the kernel
+ does not distinguish between them.
+
+22. Can I prioritise the sync process and sync certain arrays before others?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Upon start, md will resynchronise any unclean arrays, starting in somewhat
+ random order. Sometimes it's desirable to sync e.g. /dev/md3 first (because
+ it's the most important), but while /dev/md1 is synchronising, /dev/md3 will
+ be DELAYED (see /proc/mdstat; only if they share the same physical
+ components.
+
+ It is possible to delay the synchronisation via /sys:
+
+ echo idle >/sys/block/md1/md/sync_action
+
+ This will cause md1 to go idle and MD to synchronise md3 (or whatever is
+ queued next; repeat the above for other devices if necessary). MD will also
+ realise that md1 is still not in sync and queue it for resynchronisation,
+ so it will sync automatically when its turn has come.
+
+23. mdadm's init script fails because it cannot find any arrays. What gives?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ This does not happen anymore, if no arrays present in config file, no arrays
+ will be started.
+
+24. What happened to mdrun? How do I replace it?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdrun used to be the sledgehammer approach to assembling arrays. It has
+ accumulated several problems over the years (e.g. Debian bug #354705) and
+ thus has been deprecated and removed with the 2.6.7-2 version of this package.
+
+ If you are still using mdrun, please ensure that you have a valid
+ /etc/mdadm/mdadm.conf file (run /usr/share/mdadm/mkconf --generate to get
+ one), and run
+
+ mdadm --assemble --scan --auto=yes
+
+ instead of mdrun.
+
+25. Why are my arrays marked auto-read-only in /proc/mdstat?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Arrays are kept read-only until the first write occurs. This allows md to
+ skip lengthy resynchronisation for arrays that have not been properly shut
+ down, but which also not have changed.
+
+26. Why doesn't mdadm find arrays specified in the config file and causes the
+ boot to fail?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ My boot process dies at an early stage and drops me into the busybox shell.
+ The last relevant output seems to be from mdadm and is something like
+
+ "/dev/md2 does not exist"
+
+ or
+
+ "No devices listed in conf file found"
+
+ Why does mdadm break my system?
+
+ Short answer: It doesn't, the underlying devices aren't yet available yet
+ when mdadm runs during the early boot process.
+
+ Long answer: It doesn't, but the drivers of those devices incorrectly
+ communicate to the kernel that the devices are ready, when in fact they are
+ not. I consider this a bug in those drivers. Please consider reporting it.
+
+ Workaround: there is nothing mdadm can or will do against this. Fortunately
+ though, initramfs provides a method, documented at
+ http://wiki.debian.org/InitramfsDebug. Please append rootdelay=10 (which sets
+ a delay of 10 seconds before trying to mount the root filesystem) to the
+ kernel command line and try if the boot now works.
+
+ -- martin f. krafft <madduck@debian.org> Wed, 13 May 2009 09:59:53 +0200
diff --git a/debian/local/doc/README.checkarray b/debian/local/doc/README.checkarray
new file mode 100644
index 0000000..8071a4d
--- /dev/null
+++ b/debian/local/doc/README.checkarray
@@ -0,0 +1,33 @@
+checkarray notes
+================
+
+checkarray will run parity checks across all your redundant arrays. By
+default, it is configured to run on the first Sunday of each month, at 01:06
+in the morning. This is realised by asking cron to wake up every Sunday with
+/etc/cron.d/mdadm, but then only running the script when the day of the month
+is less than or equal to 7. See #380425.
+
+Cron will try to run the check at "idle I/O priority" (see ionice(1)), so that
+the check does not overload the system too much. Note that this will only
+work if all the component devices of the array employ the (default) "cfq" I/O
+scheduler. See the kernel documentation[0] for information on how to verify
+and modify the scheduler. checkarray does not verify this for you.
+
+ 0. http://www.kernel.org/doc/Documentation/block/switching-sched.txt
+
+If you manually invoke checkarray, it runs with default I/O priority. Should
+you need to run a check at a higher (or lower) I/O priority, then have a look
+at the --idle, --slow, --fast, and --realtime options.
+
+'check' is a read-only operation, even though the kernel logs may suggest
+otherwise (e.g. /proc/mdstat and several kernel messages will mention
+"resync"). Please also see question 21 of the FAQ.
+
+If, however, while reading, a read error occurs, the check will trigger the
+normal response to read errors which is to generate the 'correct' data and try
+to write that out - so it is possible that a 'check' will trigger a write.
+However in the absence of read errors it is read-only.
+
+You can cancel a running array check with the -x option to checkarray.
+
+ -- martin f. krafft <madduck@debian.org> Thu, 02 Sep 2010 10:27:29 +0200
diff --git a/debian/local/doc/README.recipes b/debian/local/doc/README.recipes
new file mode 100644
index 0000000..3906629
--- /dev/null
+++ b/debian/local/doc/README.recipes
@@ -0,0 +1,168 @@
+mdadm recipes
+=============
+
+The following examples/recipes may help you with your mdadm experience. I'll
+leave it as an exercise to use the correct device names and parameters in each
+case. You can find pointers to additional documentation in the README.Debian
+file.
+
+Enjoy. Submissions welcome.
+
+The latest version of this document is available here:
+ http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=blob;f=debian/README.recipes;hb=HEAD
+
+The short options used here are:
+
+ -l Set RAID level.
+ -n Number of active devices in the array.
+ -x Specify the number of spare (eXtra) devices in the initial array.
+
+0. create a new array
+~~~~~~~~~~~~~~~~~~~~~
+ mdadm --create -l1 -n2 -x1 /dev/md0 /dev/sd[abc]1 # RAID 1, 1 spare
+ mdadm --create -l5 -n3 -x1 /dev/md0 /dev/sd[abcd]1 # RAID 5, 1 spare
+ mdadm --create -l6 -n4 -x1 /dev/md0 /dev/sd[abcde]1 # RAID 6, 1 spare
+
+1. create a degraded array
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdadm --create -l5 -n3 /dev/md0 /dev/sda1 missing /dev/sdb1
+ mdadm --create -l6 -n4 /dev/md0 /dev/sda1 missing /dev/sdb1 missing
+
+2. assemble an existing array
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdadm --assemble --auto=yes /dev/md0 /dev/sd[abc]1
+
+ # if the array is degraded, it won't be started. use --run:
+ mdadm --assemble --auto=yes --run /dev/md0 /dev/sd[ab]1
+
+ # or start it by hand:
+ mdadm --run /dev/md0
+
+3. assemble all arrays in /etc/mdadm/mdadm.conf
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdadm --assemble --auto=yes --scan
+
+4. assemble a dirty degraded array
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdadm --assemble --auto=yes --force /dev/md0 /dev/sd[ab]1
+ mdadm --run /dev/md0
+
+4b. assemble a dirty degraded array at boot-time
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ If the array is started at boot time by the kernel (partition type 0xfd),
+ you can force-assemble it by passing the kernel boot parameter
+
+ md-mod.start_dirty_degraded=1
+
+5. stop arrays
+~~~~~~~~~~~~~~
+ mdadm --stop /dev/md0
+
+ # to stop all arrays in /etc/mdadm/mdadm.conf
+ mdadm --stop --scan
+
+6. hot-add components
+~~~~~~~~~~~~~~~~~~~~~
+ # on the running array:
+ mdadm --add /dev/md0 /dev/sdc1
+
+ # if you add more components than the array was setup with, additional
+ # components will be spares
+
+7. hot-remove components
+~~~~~~~~~~~~~~~~~~~~~~~~
+ # on the running array:
+ mdadm --fail /dev/md0 /dev/sdb1
+
+ # if you have configured spares, watch /proc/mdstat how it fills in
+ mdadm --remove /dev/md0 /dev/sdb1
+
+8. hot-grow a RAID1 by adding new components
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # on the running array, in either order:
+ mdadm --grow -n3 /dev/md0
+ mdadm --add /dev/md0 /dev/sdc1
+
+ # note: without growing first, additional devices become spares and are
+ # *not* synchronised after the add.
+
+9. hot-shrink a RAID1 by removing components
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ mdadm --fail /dev/md0 /dev/sdc1
+ mdadm --remove /dev/md0 /dev/sdc1
+ mdadm --grow -n2 /dev/md0
+
+10. convert existing filesystem to RAID 1
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # The idea is to create a degraded RAID 1 on the second partition, move
+ # data, then hot add the first. This seems safer to me than simply to
+ # force-add a superblock to the existing filesystem.
+ #
+ # Assume /dev/sda1 holds the data (and let's assume it's mounted on
+ # /home) and /dev/sdb1 is empty and of the same size...
+ #
+ mdadm --create /dev/md0 -l1 -n2 /dev/sdb1 missing
+
+ mkfs -t <type> /dev/md0
+ mount /dev/md0 /mnt
+
+ tar -cf- -C /home . | tar -xf- -C /mnt -p
+
+ # consider verifying the data
+ umount /home
+ umount /mnt
+ mount /dev/md0 /home # also change /etc/fstab
+
+ mdadm --add /dev/md0 /dev/sda1
+
+ Warren Togami has a document explaining how to convert a filesystem on
+ a remote system via SSH: http://togami.com/~warren/guides/remoteraidcrazies/
+
+10b. convert existing filesystem to RAID 1 in-place
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ In-place conversion of /dev/sda1 to /dev/md0 is effectively
+
+ mdadm --create /dev/md0 -l1 -n2 /dev/sda1 missing
+
+ however, do NOT do this, as you risk filesystem corruption.
+
+ If you need to do this, first unmount and shrink the filesystem by
+ a megabyte (if supported). Then run the above command, then (optionally)
+ again grow the filesystem as much as possible.
+
+ Do make sure you have backups. If you do not yet, consider method (10)
+ instead (and make backups anyway!).
+
+11. convert existing filesystem to RAID 5/6
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # See (10) for the basics.
+ mdadm --create /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 missing
+
+ #mdadm --create /dev/md0 -l6 -n4 /dev/sdb1 /dev/sdc1 /dev/sdd1 missing
+ mkfs -t <type> /dev/md0
+ mount /dev/md0 /mnt
+
+ tar -cf- -C /home . | tar -xf- -C /mnt -p
+
+ # consider verifying the data
+ umount /home
+ umount /mnt
+ mount /dev/md0 /home # also change /etc/fstab
+
+ mdadm --add /dev/md0 /dev/sda1
+
+12. change the preferred minor of an MD array (RAID)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # you need to manually assemble the array to change the preferred minor
+ # if you manually assemble, the superblock will be updated to reflect
+ # the preferred minor as you indicate with the assembly.
+ # for example, to set the preferred minor to 4:
+ mdadm --assemble /dev/md4 /dev/sd[abc]1
+
+ # this only works on 2.6 kernels, and only for RAID levels of 1 and above.
+ # for other MD arrays, you need to specify --update explicitly:
+ mdadm --assemble --update=super-minor /dev/md4 /dev/sd[abc]1
+
+ # see also item 12 in the FAQ contained with the Debian package.
+
+ -- martin f. krafft <madduck@debian.org> Fri, 06 Oct 2006 15:39:58 +0200
diff --git a/debian/local/initramfs-tools/local-block/mdadm b/debian/local/initramfs-tools/local-block/mdadm
new file mode 100755
index 0000000..214f24c
--- /dev/null
+++ b/debian/local/initramfs-tools/local-block/mdadm
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+PREREQ="multipath"
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+. /scripts/functions
+
+# Poor man's mdadm-last-resort@.timer
+# That kicks in 2/3rds into the ROOTDELAY
+
+if [ ! -f /run/count.mdadm.initrd ]
+then
+ COUNT=0
+
+ # Unfortunately raid personalities can be registered _after_ block
+ # devices have already been added, and their rules processed, try
+ # triggering again. See #830770
+ udevadm trigger --action=add -s block || true
+ wait_for_udev 10
+else
+ COUNT=$(cat /run/count.mdadm.initrd)
+fi
+COUNT=$((COUNT + 1))
+
+echo $COUNT > /run/count.mdadm.initrd
+
+# Run pure assemble command, even though we default to incremental
+# assembly it is supported for users to export variables via
+# param.conf such as IMSM_NO_PLATFORM. See #830300
+mdadm -q --assemble --scan --no-degraded || true
+
+MAX=30
+if [ ${ROOTDELAY:-0} -gt $MAX ]; then
+ MAX=$ROOTDELAY
+fi
+MAX=$((MAX*2/3))
+
+if [ "$COUNT" = "$MAX" ]
+then
+ # Poor man's mdadm-last-resort@.service for incremental devices
+ mdadm -q --run /dev/md?*
+
+ # And last try for all others
+ mdadm -q --assemble --scan --run
+
+ rm -f /run/count.mdadm.initrd
+fi
+
+exit 0
diff --git a/debian/local/initramfs-tools/local-bottom/mdadm b/debian/local/initramfs-tools/local-bottom/mdadm
new file mode 100755
index 0000000..eda3b17
--- /dev/null
+++ b/debian/local/initramfs-tools/local-bottom/mdadm
@@ -0,0 +1,3 @@
+#!/bin/sh
+rm -f /run/count.mdadm.initrd
+exit 0 \ No newline at end of file
diff --git a/debian/local/reportbug/script b/debian/local/reportbug/script
new file mode 100755
index 0000000..dcb88eb
--- /dev/null
+++ b/debian/local/reportbug/script
@@ -0,0 +1,219 @@
+#!/bin/bash
+#
+# mdadm bug submission control script
+#
+# allows Debian's bug tools to include relevant information in bug reports.
+#
+# Copyright © martin f. krafft <madduck@debian.org>
+# distributed under the terms of the Artistic Licence 2.0
+#
+# we need /bin/bash for readline and -n capabalities in the prompt(s)
+#
+
+# maximise information output even in the case of errors
+set +eu
+
+if ! command -v yesno >/dev/null; then
+ if [ -r /usr/share/reportbug/handle_bugscript ]; then
+ exec /usr/share/reportbug/handle_bugscript ". $0" /dev/stdout
+ fi
+ yesno() {
+ read -n1 -p"$1" REPLY
+ case "$REPLY" in
+ [yY]) REPLY=yep;;
+ [nN]) REPLY=nop;;
+ ('') REPLY="$2";;
+ esac
+ }
+ exec 3>&1
+fi
+
+# do not let people ctrl-c out of the bugscript
+trap : INT
+
+if [ $(id -u) != 0 ]; then
+ if [ -x "$(command -v sudo)" ]; then
+ yesno "Gather system information as root using sudo? (Y/n) " yep
+ if [ "$REPLY" = yep ]; then
+ echo running sudo "$0" "$@"...
+ sudo "$0" "$@" >&3 && exit 0
+ echo "sudo invocation failed, trying /bin/su..."
+ fi
+ fi
+
+ yesno "Gather system information as root using su? (Y/n) " yep
+ if [ "$REPLY" = yep ]; then
+ ARGS=
+ for i in "$@"; do ARGS="${ARGS:+$ARGS }'$1'"; shift; done
+ echo "running su root -s '/bin/sh -c $0${ARGS:+ $ARGS}'..."
+ su root -s /bin/sh -c "$0 $ARGS" >&3 && exit 0
+ unset ARGS
+ echo "su invocation failed."
+ fi
+
+ # arrive here only if neither sudo nor su worked:
+ yesno "Will you provide system information in the bug report yourself? (N/y) " nop
+ if [ "$REPLY" = yep ]; then
+ cat <<_eof >&3
+
+IMPORTANT:
+ please do not forget to include all relevant system information with this
+ bug report. You could run
+ /usr/share/bug/mdadm/script 3>&1
+ as root and attach or include the output.
+
+_eof
+ exit 0
+ fi
+
+ # try our best
+ cat <<_eof >&3
+
+WARNING:
+ the following output was not generated by the root user. If you can, please
+ replace the following up until "-- System Information:" with the output of
+ /usr/share/bug/mdadm/script 3>&1
+ run as root. Thanks!
+
+_eof
+fi
+
+if [ ! -r /proc/mdstat ]; then
+ echo "The local system does not have MD (RAID) support: no drivers loaded."
+ echo "Without MD support, I cannot collect as much information as I'd like."
+
+ #yesno "Are you sure you want to report a bug at this time? " yep
+ yesno "Hit any key to continue..." yep
+ #[ "$REPLY" = yep ] || exit 1
+fi
+
+echo "--- mdadm.conf" >&3
+if [ -r /etc/mdadm/mdadm.conf ]; then
+ grep '^[^#]' /etc/mdadm/mdadm.conf >&3
+elif [ -r /etc/mdadm.conf ]; then
+ grep '^[^#]' /etc/mdadm.conf >&3
+else
+ echo no mdadm.conf file. >&3
+fi
+echo >&3
+
+echo "--- /etc/default/mdadm" >&3
+if [ -r /etc/default/mdadm ]; then
+ grep '^[^#]' /etc/default/mdadm >&3
+else
+ echo no /etc/default/mdadm file. >&3
+fi
+echo >&3
+
+echo "--- /proc/mdstat:" >&3
+cat /proc/mdstat >&3 2>&3 || :
+echo >&3
+
+echo "--- /proc/partitions:" >&3
+cat /proc/partitions >&3 2>&3 || :
+echo >&3
+
+echo "--- LVM physical volumes:" >&3
+if [ -x "$(command -v pvs)" ]; then
+ pvs >&3
+else
+ echo "LVM does not seem to be used." >&3
+fi
+
+echo "--- mount output" >&3
+mount >&3
+echo >&3
+
+echo "--- initrd.img-$(uname -r):" >&3
+if [ -r /boot/initrd.img-$(uname -r) ]; then
+ TEMPDIR=$(mktemp -d)
+ OLDPWD="$PWD"
+ cd "$TEMPDIR"
+ zcat /boot/initrd.img-$(uname -r) 2>&3 | cpio -i 2>&3
+ find -regex '.*/md[a/].+' -type f -exec md5sum {} \; >&3
+
+ echo >&3
+ echo "--- initrd's /conf/conf.d/md:" >&3
+ if [ -r conf/conf.d/md ]; then
+ cat conf/conf.d/md >&3
+ else
+ echo "no conf/md file." >&3
+ fi
+
+ cd "$OLDPWD"
+ rm -rf "$TEMPDIR"
+ unset TEMPDIR
+else
+ echo "no initrd.img-$(uname -r) found." >&3
+fi
+echo >&3
+
+if [ -r /proc/modules ]; then
+ echo "--- /proc/modules:" >&3
+ egrep '(dm_|raid|linear|multipath|faulty)' < /proc/modules >&3 || :
+ echo >&3
+fi
+
+if [ -f /var/log/syslog ]; then
+ if [ -r /var/log/syslog ]; then
+ echo "--- /var/log/syslog:" >&3
+ egrep "^\w{3} [ :[:digit:]]{11} ($(hostname)|localhost) (kernel: md|mdadm): " /var/log/syslog >&3 || :
+ echo >&3
+ else
+ echo "syslog not readable by user." >&3
+ fi
+fi
+
+echo "--- volume detail:" >&3
+for dev in /dev/[hsv]d[a-z]*; do
+ [ ! -r $dev ] && echo "$dev not readable by user." && continue
+ mdadm -E $dev 2>/dev/null && echo -- || echo "$dev is not recognised by mdadm."
+done >&3
+echo >&3
+
+if [ -r /proc/cmdline ]; then
+ echo "--- /proc/cmdline" >&3
+ cat /proc/cmdline >&3
+ echo >&3
+fi
+
+if [ -f /boot/grub/grub.cfg ]; then
+ echo "--- grub2:" >&3
+ if [ -r /boot/grub/grub.cfg ]; then
+ egrep '^[^#].*\<(root=|raid)' /boot/grub/grub.cfg >&3 || :
+ else
+ echo grub.cfg file not readable. >&3
+ fi
+ echo >&3
+fi
+
+if [ -f /boot/grub/menu.lst ]; then
+ echo "--- grub legacy:" >&3
+ if [ -r /boot/grub/menu.lst ]; then
+ grep '^[^#].*\<root=' /boot/grub/menu.lst >&3 || :
+ else
+ echo menu.lst file not readable. >&3
+ fi
+ echo >&3
+fi
+
+if [ -f /etc/lilo.conf ]; then
+ echo "--- lilo:" >&3
+ if [ -r /etc/lilo.conf ]; then
+ egrep '^([^#].*)?root=' /etc/lilo.conf >&3 || :
+ else
+ echo lilo.conf file not readable. >&3
+ fi
+ echo >&3
+fi
+
+echo "--- udev:" >&3
+COLUMNS=70 dpkg -l udev | grep '\<udev\>' >&3
+md5sum /etc/udev/rules.d/*md* /lib/udev/rules.d/*md* >&3 2>/dev/null
+echo >&3
+
+echo "--- /dev:" >&3
+ls -l /dev/md* /dev/disk/by-* >&3
+echo >&3
+
+echo "Auto-generated on $(date -R) by mdadm bugscript" >&3
diff --git a/debian/mdadm-udeb.install b/debian/mdadm-udeb.install
new file mode 100644
index 0000000..6ceeebf
--- /dev/null
+++ b/debian/mdadm-udeb.install
@@ -0,0 +1,2 @@
+lib/udev/rules.d/63-md-raid-arrays.rules
+sbin/
diff --git a/debian/mdadm.TODO b/debian/mdadm.TODO
new file mode 100644
index 0000000..eb3299e
--- /dev/null
+++ b/debian/mdadm.TODO
@@ -0,0 +1,29 @@
+debian mdadm TODO list
+======================
+
+- version-1 is a nightmare. E.g. on partitionable arrays, with / on
+ /dev/md_d0p3, mdadm -Es ignores /dev/md_d0 and just uses the name, so
+ /dev/md/<arrayname>.
+- figure out something about device names.
+- (better) udev integration
+
+- check whether mdadm.conf and system are consistent during initramfs creation
+ and fail otherwise (#381303).
+- add code to compare existing and expected configuration, after standardising
+ the files. In most cases, we'll have to answer DUNNO as to whether the
+ existing configuration file is okay, but I guess in some cases we can
+ determine that the configuration is okay. A conservative approach would be
+ beneficial to the user. Not sure if it's worth the effort though.
+- one nice^W important thing would be to check device names and UUIDs at least.
+
+- verify operation without udev
+ - udev removed before mdadm installed
+ - udev removed after mdadm installed
+
+- more granular handling of init.d starts/stops, don't force all arrays to be
+ started.
+- let user specify when to start/stop which array (#398310).
+- also only stop those array we started; this can be easily done with
+ sentinels in $STATEDIR
+
+- manage DAEMON_OPTIONS with debconf
diff --git a/debian/mdadm.config b/debian/mdadm.config
new file mode 100644
index 0000000..848e6b6
--- /dev/null
+++ b/debian/mdadm.config
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Copyright © 2001-2004 Mario Jou/3en <joussen@debian.org>
+# Copyright © martin f. krafft <madduck@debian.org>
+# Distributable under the terms of the GNU GPL version 2.
+#
+. /usr/share/debconf/confmodule
+# see #369953 for ordering
+set -eu
+
+CONFIG=/etc/mdadm/mdadm.conf
+ALTCONFIG=/etc/mdadm.conf
+[ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG
+
+DEBIANCONFIG=/etc/default/mdadm
+
+if [ -s $DEBIANCONFIG ] ; then
+ AUTOCHECK=true
+ AUTOSCAN=true
+ START_DAEMON=true
+ MAILADDR=root
+
+ [ -f $DEBIANCONFIG ] && . $DEBIANCONFIG
+ if [ -f $CONFIG ]; then
+ MAILADDR=$(sed -rne 's/^MAILADDR[[:space:]]*([^[:space:]]+).*/\1/p' $CONFIG)
+ fi
+
+ [ -n "$AUTOCHECK" ] && db_set mdadm/autocheck "$AUTOCHECK"
+ [ -n "$AUTOSCAN" ] && db_set mdadm/autoscan "$AUTOSCAN"
+ [ -n "$START_DAEMON" ] && db_set mdadm/start_daemon "$START_DAEMON"
+ [ -n "$MAILADDR" ] && db_set mdadm/mail_to "$MAILADDR"
+fi
+
+db_capb escape
+
+# if system has root on md
+if findmnt / 2>/dev/null | grep -qs \/dev\/md && \
+# and system is not a container
+! grep -qs ':cpuset:/$' /proc/1/cgroup && \
+# and system is not a chroot
+[ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ] && \
+# and systemd is not running
+[ -z "$(pidof systemd)" ]
+then
+ db_input high mdadm/init-system-not-systemd || true
+ db_go
+fi
+
+db_input medium mdadm/autocheck || :
+db_go
+
+db_input medium mdadm/autoscan || :
+db_go
+
+db_input medium mdadm/start_daemon || :
+db_go
+
+db_get mdadm/start_daemon || :
+if [ "$RET" = true ]; then
+ db_input medium mdadm/mail_to || :
+ db_go
+fi
diff --git a/debian/mdadm.docs b/debian/mdadm.docs
new file mode 100644
index 0000000..487761a
--- /dev/null
+++ b/debian/mdadm.docs
@@ -0,0 +1,2 @@
+documentation/*.txt
+debian/local/doc/*
diff --git a/debian/mdadm.examples b/debian/mdadm.examples
new file mode 100644
index 0000000..dc35003
--- /dev/null
+++ b/debian/mdadm.examples
@@ -0,0 +1,2 @@
+documentation/*-example
+misc/syslog-events
diff --git a/debian/mdadm.initramfs-hook b/debian/mdadm.initramfs-hook
new file mode 100644
index 0000000..b69159d
--- /dev/null
+++ b/debian/mdadm.initramfs-hook
@@ -0,0 +1,117 @@
+#!/bin/sh
+#
+# Copyright © 2006-2008 Martin F. Krafft <madduck@debian.org>,
+# 2012 Michael Tokarev <mjt@tls.msk.ru>
+# based on the scripts in the initramfs-tools package.
+# released under the terms of the Artistic Licence.
+#
+set -eu
+
+PREREQ="udev"
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case "${1:-}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+is_true()
+{
+ case "${1:-}" in
+ [Yy]es|[Yy]|1|[Tt]rue|[Tt]) return 0;;
+ *) return 1;;
+ esac
+}
+
+write()
+{
+ local PREFIX; PREFIX=$1; shift
+ echo "${PREFIX}: mdadm: $@" >&2
+}
+
+info()
+{
+ is_true ${VERBOSE:-false} && write I "$@" || :
+}
+
+warn()
+{
+ write W "$@"
+}
+
+. /usr/share/initramfs-tools/hook-functions
+
+# copy the binary as early as possible
+copy_exec /sbin/mdadm /sbin
+copy_exec /sbin/mdmon /sbin
+
+# Copy udev rules, which udev no longer does
+for UDEV_RULE in 63-md-raid-arrays.rules 64-md-raid-assembly.rules; do
+for rules_folder in /lib/udev/rules.d /etc/udev/rules.d; do
+ if [ -f $rules_folder/$UDEV_RULE ]; then
+ mkdir -p $DESTDIR$rules_folder
+ cp $rules_folder/$UDEV_RULE $DESTDIR$rules_folder/$UDEV_RULE
+ fi
+done
+done
+
+# load raid modules in the initramfs
+for module in linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do
+ force_load $module
+done
+
+# load efivars for Intel RST IMSM, see Bug#962844
+if [ -e /sys/firmware/efi ]
+then
+ force_load efivarfs || true
+
+ if ! ls /sys/firmware/efi/efivars/* > /dev/null 2>&1
+ then
+ mount -t efivarfs -o rw,nosuid,nodev,noexec,relatime efivarfs /sys/firmware/efi/efivars || true
+ fi
+fi
+
+# copy the mdadm configuration
+CONFIG=/etc/mdadm/mdadm.conf
+ALTCONFIG=/etc/mdadm.conf
+DESTMDADMCONF=$DESTDIR/etc/mdadm/mdadm.conf
+[ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG || :
+mkdir -p ${DESTDIR}/etc/mdadm
+
+if [ ! -f $CONFIG ]; then
+ # there is no configuration file, so let's create one
+ if /usr/share/mdadm/mkconf generate $CONFIG; then
+ # all is well
+ cp -p $CONFIG $DESTMDADMCONF
+ info "auto-generated the mdadm.conf configuration file."
+ else
+ # we failed to auto-generate, so let the emergency procedure take over
+ warn "failed to auto-generate the mdadm.conf file."
+ warn "please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz ."
+ fi
+else
+ cp -p $CONFIG ${DESTDIR}/etc/mdadm
+ sed -i '/^CREATE/s/^/#/' $DESTMDADMCONF
+ if ! grep -q '^ARRAY' $CONFIG; then
+ tmpfile="${DESTMDADMCONF}.tmp"
+ if /usr/share/mdadm/mkconf > $tmpfile; then
+ cp -p $tmpfile $DESTMDADMCONF
+ rm -f $tmpfile
+ else
+ warn "failed to auto-generate temporary mdadm.conf file."
+ fi
+ else
+ # make sure the configuration file knows about all running devices
+ /sbin/mdadm --detail --scan | while read array device params; do
+ uuid=${params#*UUID=}; uuid=${uuid%% *}
+ if grep -qi "UUID=$uuid" $DESTMDADMCONF; then
+ info "$uuid $device added to the mdadm.conf in the initramfs"
+ fi
+ done
+ fi
+fi
diff --git a/debian/mdadm.install b/debian/mdadm.install
new file mode 100644
index 0000000..1bda1e0
--- /dev/null
+++ b/debian/mdadm.install
@@ -0,0 +1,7 @@
+debian/local/apport/* usr/share/apport/package-hooks
+debian/local/bin/* usr/share/mdadm
+debian/local/initramfs-tools/* usr/share/initramfs-tools/scripts
+debian/local/reportbug/* usr/share/bug/mdadm
+lib/
+misc/mdcheck usr/share/mdadm/
+sbin/
diff --git a/debian/mdadm.lintian-overrides b/debian/mdadm.lintian-overrides
new file mode 100644
index 0000000..c748de8
--- /dev/null
+++ b/debian/mdadm.lintian-overrides
@@ -0,0 +1,5 @@
+# root device could be and array, so keep on in single-user mode
+init.d-script-possible-missing-stop etc/init.d/mdadm-waitidle 1
+
+# mdadm forks mdmon as required, not sure it should start separately
+systemd-service-file-missing-install-key lib/systemd/system/mdmonitor.service
diff --git a/debian/mdadm.logcheck.ignore.server b/debian/mdadm.logcheck.ignore.server
new file mode 100644
index 0000000..448bf96
--- /dev/null
+++ b/debian/mdadm.logcheck.ignore.server
@@ -0,0 +1,23 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: md driver [.[:digit:]]+ MAX_MD_DEVS=[[:digit:]]+, MD_SB_DISKS=[[:digit:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: bitmap version [.[:digit:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: md[[:digit:]]+ stopped\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: md[[:digit:]]+ still in use\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: cannot remove active disk [[:alnum:]]+ from md[[:digit:]]+ \.\.\. ?$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: raid([01456]|456|10) personality registered for level ([01456]|10)$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: (data-check|requested-resync|resync|reshape|recovery) of RAID array md[[:digit:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: resuming (data-check|requested-resync|resync|reshape|recovery) of md[[:digit:]]+ from checkpoint\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: md[[:digit:]]+: (data-check|requested-resync|resync|reshape|recovery) done\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: minimum _guaranteed_ ?speed: [[:digit:]]+ KB/sec/disk\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: using maximum available idle IO bandwidth \(but not more than [[:digit:]]+ KB/sec\) for (data-check|requested-resync|resync|reshape|recovery)\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: delaying (data-check|requested-resync|resync|reshape|recovery) of md[[:digit:]]+ until md[[:digit:]]+ has finished \(they share one or more physical units\)$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: using [[:digit:]]+k window, over a total of [[:digit:]]+k?( blocks)?\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: (un)?bind<[^>]+>$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: export_rdev\([^)]+\)$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? raid[[:digit:]]+: raid set [[:alnum:]]+ active with [[:digit:]]+ out of [[:digit:]]+ mirrors$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? RAID([01456]|10) conf printout:$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])?[[:space:]]+---( [wrf]d:[[:digit:]]+){2,3}$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])?[[:space:]]+disk [[:digit:]]+,( wo:[[:digit:]]+,)? o:[[:digit:]]+, dev:[[:alnum:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ mdadm(\[[[:digit:]]+\])?: Rebuild((Start|Finish)ed|[[:digit:]]+) event detected on md device /dev/[-_./[:alnum:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ mdadm(\[[[:digit:]]+\])?: SpareActive event detected on md device /dev/[-_./[:alnum:]]+, component device /dev/[-_./[:alnum:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ mdadm(\[[[:digit:]]+\])?: (New|Degraded)Array event detected on md device /dev/[-_./[:alnum:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ mdadm(\[[[:digit:]]+\])?: DeviceDisappeared event detected on md device /dev/[-_./[:alnum:]]+$
diff --git a/debian/mdadm.logcheck.violations b/debian/mdadm.logcheck.violations
new file mode 100644
index 0000000..ea8cce7
--- /dev/null
+++ b/debian/mdadm.logcheck.violations
@@ -0,0 +1,3 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? md: kicking non-fresh [[:alnum:]]+ from array!$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])? raid[[:digit:]]+: Disk failure on [[:alnum:]]+, disabling device\.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ kernel:( \[ *[[:digit:]]+\.[[:digit:]]+\])?[[:space:]]+Operation continuing on [[:digit:]]+ devices?$
diff --git a/debian/mdadm.maintscript b/debian/mdadm.maintscript
new file mode 100644
index 0000000..17b5e28
--- /dev/null
+++ b/debian/mdadm.maintscript
@@ -0,0 +1,4 @@
+rm_conffile /etc/cron.d/mdadm 4.2+20230227-1~
+rm_conffile /etc/cron.daily/mdadm 4.2+20230227-1~
+rm_conffile /etc/init.d/mdadm 4.2+20230227-1~
+rm_conffile /etc/init.d/mdadm-waitidle 4.2+20230227-1~
diff --git a/debian/mdadm.manpages b/debian/mdadm.manpages
new file mode 100644
index 0000000..d5a1e98
--- /dev/null
+++ b/debian/mdadm.manpages
@@ -0,0 +1 @@
+usr/share/man/*/*
diff --git a/debian/mdadm.mdadm-shutdown.service b/debian/mdadm.mdadm-shutdown.service
new file mode 100644
index 0000000..a949b7c
--- /dev/null
+++ b/debian/mdadm.mdadm-shutdown.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Prepare mdadm shutdown initramfs
+ConditionFileIsExecutable=/usr/bin/dracut
+After=local-fs.target boot.mount boot.automount
+Wants=local-fs.target
+Before=shutdown.target
+Conflicts=shutdown.target umount.target
+DefaultDependencies=no
+Documentation=man://dracut(8)
+
+[Service]
+RemainAfterExit=yes
+Type=oneshot
+ExecStart=/bin/true
+ExecStop=/bin/mount -o remount,exec,suid /run
+ExecStop=/bin/mkdir -p /run/initramfs
+ExecStop=/usr/bin/dracut --no-compress --no-kernel --quiet --force --force-add "shutdown mdraid" --omit "caps" /run/initramfs/shutdown.cpio
+ExecStop=/bin/sh -c 'cd /run/initramfs; cpio -id --quiet < shutdown.cpio'
+ExecStop=/bin/rm /run/initramfs/shutdown.cpio
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/mdadm.modprobe b/debian/mdadm.modprobe
new file mode 100644
index 0000000..5ad1249
--- /dev/null
+++ b/debian/mdadm.modprobe
@@ -0,0 +1,8 @@
+# mdadm module configuration file
+# set start_ro=1 to make newly assembled arrays read-only initially,
+# to prevent metadata writes. This is needed in order to allow
+# resume-from-disk to work - new boot should not perform writes
+# because it will be done behind the back of the system being
+# resumed. See http://bugs.debian.org/415441 for details.
+
+options md_mod start_ro=1
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
new file mode 100755
index 0000000..c8a3420
--- /dev/null
+++ b/debian/mdadm.postinst
@@ -0,0 +1,111 @@
+#!/bin/sh
+# Copyright © 2001-2005 Mario Jou/3en <joussen@debian.org>
+# Copyright © 2005-2008 Martin F. Krafft <madduck@debian.org>
+# Distributable under the terms of the GNU GPL version 2.
+#
+set -e
+
+. /usr/share/debconf/confmodule
+
+case "${1:-}" in
+ configure|reconfigure)
+
+ if [ ! -f /proc/mdstat ] && [ -x $(command -v modprobe 2>/dev/null) ]; then
+ modprobe md >/dev/null 2>&1 || :
+ fi
+ if [ ! -f /proc/mdstat ]; then
+ echo 'W: mdadm: failed to load MD subsystem.' >&2
+ fi
+
+ DEBIANCONFIG=/etc/default/mdadm
+ CONFIG=/etc/mdadm/mdadm.conf
+ ALTCONFIG=/etc/mdadm.conf
+ MDADM=/sbin/mdadm
+
+ # load current settings, most of which will be overwritten.
+ [ -f $DEBIANCONFIG ] && . $DEBIANCONFIG
+
+ db_get mdadm/mail_to
+ MAILADDR="${RET:-root}"
+
+ [ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG
+ if [ ! -f $CONFIG ]; then
+ echo -n 'Generating mdadm.conf... ' >&2
+ # pass the MAILADDR variable into the script
+ MDADM_MAILADDR__="$MAILADDR"; export MDADM_MAILADDR__
+ if /usr/share/mdadm/mkconf generate $CONFIG 2>/dev/null; then
+ echo done. >&2
+ else
+ echo "done (failed to scan arrays; /proc probably not mounted)." >&2
+ fi
+ fi
+
+ if [ -w $CONFIG ] && [ -z "${MDADM_MAILADDR__:-}" ]; then
+ # if the configuration is writeable but has not been written just
+ # before, then edit it to reflect the MAILADDR preference
+ if grep -q '^MAILADDR' $CONFIG; then
+ sed -i -e "s/^MAILADDR.*/MAILADDR $MAILADDR/" $CONFIG
+ else
+ echo "MAILADDR $MAILADDR" >> $CONFIG
+ fi
+ fi
+ unset MDADM_MAILADDR__
+
+ db_get mdadm/autocheck
+ AUTOCHECK="${RET:-true}"
+ db_get mdadm/autoscan
+ AUTOSCAN="${RET:-true}"
+ db_get mdadm/start_daemon
+ START_DAEMON="${RET:-true}"
+ #db_get mdadm/daemon_options
+ [ -n "${DAEMON_OPTIONS:-}" ] || DAEMON_OPTIONS='--syslog'
+
+ cat <<_eof > $DEBIANCONFIG
+# mdadm Debian configuration
+#
+# You can run 'dpkg-reconfigure mdadm' to modify the values in this file, if
+# you want. You can also change the values here and changes will be preserved.
+# Do note that only the values are preserved; the rest of the file is
+# rewritten.
+#
+
+# AUTOCHECK:
+# should mdadm run periodic redundancy checks over your arrays? See
+# /etc/cron.d/mdadm.
+AUTOCHECK=$AUTOCHECK
+
+# AUTOSCAN:
+# should mdadm check once a day for degraded arrays? See
+# /lib/systemd/system/mdmonitor-oneshot.service
+AUTOSCAN=$AUTOSCAN
+
+# START_DAEMON:
+# should mdadm start the MD monitoring daemon during boot?
+START_DAEMON=$START_DAEMON
+
+# DAEMON_OPTIONS:
+# additional options to pass to the daemon.
+DAEMON_OPTIONS="$DAEMON_OPTIONS"
+
+# VERBOSE:
+# if this variable is set to true, mdadm will be a little more verbose e.g.
+# when creating the initramfs.
+VERBOSE=${VERBOSE:-false}
+_eof
+
+ db_stop
+
+ # Remove old init script
+ update-rc.d mdadm-raid remove
+
+ command -v update-initramfs >/dev/null 2>&1 && update-initramfs -u
+
+ if command -v update-grub2 >/dev/null 2>&1; then
+ update-grub || true
+ fi
+ ;;
+esac
+
+[ -d /run/systemd/system ] && systemctl --system daemon-reload >/dev/null || :
+
+#DEBHELPER#
diff --git a/debian/mdadm.postrm b/debian/mdadm.postrm
new file mode 100755
index 0000000..a3c15f1
--- /dev/null
+++ b/debian/mdadm.postrm
@@ -0,0 +1,23 @@
+#! /bin/sh
+# Copyright © 2001,2002 Mario Jou/3en <joussen@debian.org>
+# Copyright © 2006-2008 Martin F. Krafft <madduck@debian.org>
+# Distributable under the terms of the GNU GPL version 2.
+#
+set -e
+
+case "${1:-}" in
+ remove)
+ if command -v update-initramfs >/dev/null 2>&1; then
+ update-initramfs -u
+ fi
+ ;;
+
+ purge)
+ rm -f /etc/default/mdadm /etc/mdadm.conf /etc/mdadm/mdadm.conf
+ ;;
+
+esac
+
+[ -d /run/systemd/system ] && systemctl --system daemon-reload >/dev/null || :
+
+#DEBHELPER#
diff --git a/debian/mdadm.templates b/debian/mdadm.templates
new file mode 100644
index 0000000..7d2b685
--- /dev/null
+++ b/debian/mdadm.templates
@@ -0,0 +1,55 @@
+# These templates have been reviewed by the debian-l10n-english
+# team
+#
+# If modifications/additions/rewording are needed, please ask
+# debian-l10n-english@lists.debian.org for advice.
+#
+# Even minor modifications require translation updates and such
+# changes should be coordinated with translators and reviewers.
+
+Template: mdadm/init-system-not-systemd
+Type: note
+_Description: no systemd init-system detected
+ The root filesystem of this system was detected to be on a RAID device,
+ so mdadm might be required to run during boot to properly start your system.
+ .
+ Beginning with newer versions of the mdadm package, init-system integration
+ is available for systemd only. This system seems to use an alternative
+ init-system which might or might not leave your system unbootable.
+
+Template: mdadm/autocheck
+Type: boolean
+Default: true
+_Description: Should mdadm run monthly redundancy checks of the MD arrays?
+ If the kernel supports it (versions greater than 2.6.14), mdadm can periodically check the
+ redundancy of MD arrays (RAIDs). This may be a resource-intensive process,
+ depending on the local setup, but it could help prevent rare cases of data loss.
+ Note that this is a read-only check unless errors are found; if errors are
+ found, mdadm will try to correct them, which may result in write access to
+ the media.
+ .
+ The default, if turned on, is to check on the first Sunday of every
+ month at 01:06.
+
+Template: mdadm/autoscan
+Type: boolean
+Default: true
+_Description: Should mdadm check once a day for degraded arrays?
+ mdadm can check once a day for degraded arrays and missing spares
+ to ensure that such events don't go unnoticed.
+
+Template: mdadm/start_daemon
+Type: boolean
+Default: true
+_Description: Do you want to start the MD monitoring daemon?
+ The MD (RAID) monitor daemon sends email notifications in response to
+ important MD events (such as a disk failure).
+ .
+ Enabling this option is recommended.
+
+Template: mdadm/mail_to
+Type: string
+Default: root
+_Description: Recipient for email notifications:
+ Please enter the email address of the user who should get the email
+ notifications for important MD events.
diff --git a/debian/not-installed b/debian/not-installed
new file mode 100644
index 0000000..a03d51f
--- /dev/null
+++ b/debian/not-installed
@@ -0,0 +1,3 @@
+lib/udev/rules.d/01-md-raid-creating.rules
+lib/udev/rules.d/64-md-raid-assembly.rules
+lib/udev/rules.d/69-md-clustered-confirm-device.rules
diff --git a/debian/patches/debian/0001-fix-manpages.patch b/debian/patches/debian/0001-fix-manpages.patch
new file mode 100644
index 0000000..5999e5c
--- /dev/null
+++ b/debian/patches/debian/0001-fix-manpages.patch
@@ -0,0 +1,163 @@
+Author: Felix Lechner <felix.lechner@lease-up.com>
+Description: Fix typos and macro issues in manpages
+ (Closes: #915182, #916946, #962946, #933773).
+
+diff -Naurp mdadm.orig/md.4 mdadm/md.4
+--- mdadm.orig/md.4
++++ mdadm/md.4
+@@ -363,9 +363,9 @@ tab(;);
+ ;Device #1;Device #2;Device #3;Device #4
+ 0x00;0;0;1;1
+ 0x01;2;2;3;3
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
+ :;:;:;:;:
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
+ 0x80;254;254;255;255
+ ;\\---------v---------/;\\---------v---------/
+ ;RAID1;RAID1
+@@ -392,9 +392,9 @@ C.
+ ;Dev #1;Dev #2;Dev #3;Dev #4;Dev #5
+ 0x00;0;0;1;1;2
+ 0x01;2;3;3;4;4
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
+ :;:;:;:;:;:
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
+ 0x80;317;318;318;319;319
+ ;
+ .TE
+@@ -454,15 +454,15 @@ C.
+ ;
+ 0x00;0;1;2;3;\\
+ 0x01;4;5;6;7;> [#]
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ :;:;:;:;:;:
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ 0x40;252;253;254;255;/
+ 0x41;3;0;1;2;\\
+ 0x42;7;4;5;6;> [#]~
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ :;:;:;:;:;:
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ 0x80;255;252;253;254;/
+ ;
+ .TE
+@@ -493,15 +493,15 @@ C.
+ ;
+ 0x00;0;1;2;3;4;\\
+ 0x01;5;6;7;8;9;> [#]
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ :;:;:;:;:;:;:
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ 0x40;315;316;317;318;319;/
+ 0x41;4;0;1;2;3;\\
+ 0x42;9;5;6;7;8;> [#]~
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ :;:;:;:;:;:;:
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
+ 0x80;319;315;316;317;318;/
+ ;
+ .TE
+@@ -572,9 +572,9 @@ C.
+ 0x01;3;0;1;2;) AA~
+ 0x02;4;5;6;7;) AB
+ 0x03;7;4;5;6;) AB~
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
+ :;:;:;:;:; :
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
+ 0x79;251;252;253;254;) EX
+ 0x80;254;251;252;253;) EX~
+ ;
+@@ -605,9 +605,9 @@ C.
+ 0x01;4;0;1;2;3;) AA~
+ 0x02;5;6;7;8;9;) AB
+ 0x03;9;5;6;7;8;) AB~
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
+ :;:;:;:;:;:; :
+-\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
++;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
+ 0x79;314;315;316;317;318;) EX
+ 0x80;318;314;315;316;317;) EX~
+ ;
+@@ -987,7 +987,7 @@ other device(s).
+ .I md
+ cannot control the timeout that the underlying devices use to
+ determine failure. Any changes desired to that timeout must be set
+-explictly on the underlying device, separately from using
++explicitly on the underlying device, separately from using
+ .IR mdadm .
+
+ If a FAILFAST request does fail, and if it is still safe to mark the
+diff -Naurp mdadm.orig/mdadm.8.in mdadm/mdadm.8.in
+--- mdadm.orig/mdadm.8.in
++++ mdadm/mdadm.8.in
+@@ -459,11 +459,10 @@ number of spare devices.
+ Amount (in Kilobytes) of space to use from each drive in RAID levels 1/4/5/6/10
+ and for RAID 0 on external metadata.
+ This must be a multiple of the chunk size, and must leave about 128Kb
+-of space at the end of the drive for the RAID superblock.
+-If this is not specified
+-(as it normally is not) the smallest drive (or partition) sets the
+-size, though if there is a variance among the drives of greater than 1%, a warning is
+-issued.
++of space at the end of the drive for the RAID superblock. When specified as
++\(acmax\(ac (as it often is) the smallest drive (or partition) sets the size.
++In that case, a warning will follow if the drives, as a group, have sizes that
++differ by more than one percent.
+
+ A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
+ Megabytes, Gigabytes or Terabytes respectively.
+@@ -1146,7 +1145,7 @@ out-of-date. If
+ cannot find enough working devices to start the array, but can find
+ some devices that are recorded as having failed, then it will mark
+ those devices as working so that the array can be started. This works only for
+-native. For external metadata it allows to start dirty degraded RAID 4, 5, 6.
++native. For external metadata it allows one to start dirty degraded RAID 4, 5, 6.
+ An array which requires
+ .B \-\-force
+ to be started may contain data corruption. Use it carefully.
+@@ -1829,7 +1828,7 @@ Details of
+ .B check
+ and
+ .B repair
+-can be found it
++can be found in
+ .IR md (4)
+ under
+ .BR "SCRUBBING AND MISMATCHES" .
+@@ -2955,7 +2954,8 @@ option in Grow mode. Currently this work
+ .B ppl
+ and
+ .B resync
+-policies and allows to enable or disable the RAID5 Partial Parity Log (PPL).
++policies and allows one to enable or disable the RAID5 Partial Parity
++Log (PPL).
+
+ .SH INCREMENTAL MODE
+
+diff -Naurp mdadm.orig/mdmon.8 mdadm/mdmon.8
+--- mdadm.orig/mdmon.8
++++ mdadm/mdmon.8
+@@ -115,7 +115,7 @@ container. Some array management comman
+ add are now only valid at the container level. Attempts to perform
+ these actions on member arrays are blocked with error messages like:
+ .IP
+-"mdadm: Cannot remove disks from a \'member\' array, perform this
++"mdadm: Cannot remove disks from a \(aqmember\(aq array, perform this
+ operation on the parent container"
+ .P
+ Containers are identified in /proc/mdstat with a metadata version string
diff --git a/debian/patches/debian/0002-mdmonitor-service-simplify.patch b/debian/patches/debian/0002-mdmonitor-service-simplify.patch
new file mode 100644
index 0000000..a8163d9
--- /dev/null
+++ b/debian/patches/debian/0002-mdmonitor-service-simplify.patch
@@ -0,0 +1,17 @@
+Author: Michael Tokarev <mjt@tls.msk.ru>
+Description: Simplify mdmonitor.service (Closes: #764647).
+ There isn't much for customization for mdadm --monitor.
+ it'll just do what it's supposed to do, so just run it.
+
+diff -Naurp mdadm.orig/systemd/mdmonitor.service mdadm/systemd/mdmonitor.service
+--- mdadm.orig/systemd/mdmonitor.service
++++ mdadm/systemd/mdmonitor.service
+@@ -11,7 +11,4 @@ DefaultDependencies=no
+ Documentation=man:mdadm(8)
+
+ [Service]
+-Environment= MDADM_MONITOR_ARGS=--scan
+-EnvironmentFile=-/run/sysconfig/mdadm
+-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
++ExecStart=BINDIR/mdadm --monitor --scan
diff --git a/debian/patches/debian/0003-host-name-in-default-mailfrom.patch b/debian/patches/debian/0003-host-name-in-default-mailfrom.patch
new file mode 100644
index 0000000..870e9d4
--- /dev/null
+++ b/debian/patches/debian/0003-host-name-in-default-mailfrom.patch
@@ -0,0 +1,17 @@
+Author: Felix Lechner <felix.lechner@lease-up.com>
+Description: Add host name to default MAILFROM (Closes: #1006464).
+ The host on which the error occurred is mentioned in the subject and also in
+ the message body, but some may find it useful in the From address, as well.
+
+diff -Naurp mdadm.orig/Monitor.c mdadm/Monitor.c
+--- mdadm.orig/Monitor.c
++++ mdadm/Monitor.c
+@@ -627,7 +627,7 @@ static void send_event_email(const struc
+ if (info.mailfrom)
+ fprintf(mp, "From: %s\n", info.mailfrom);
+ else
+- fprintf(mp, "From: %s monitoring <root>\n", Name);
+++ fprintf(mp, "From: %s monitoring <root@%s>\n", Name, info.hostname);
+ fprintf(mp, "To: %s\n", info.mailaddr);
+ fprintf(mp, "Subject: %s event on %s:%s\n\n", data->event_name, data->dev, info.hostname);
+ fprintf(mp, "This is an automatically generated mail message.\n");
diff --git a/debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch b/debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch
new file mode 100644
index 0000000..225a8a3
--- /dev/null
+++ b/debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch
@@ -0,0 +1,23 @@
+Author: Felix Lechner <felix.lechner@lease-up.com>
+Description: Exit gracefully when md device not found (Closes: #970329).
+
+diff -Naurp mdadm.orig/Monitor.c mdadm/Monitor.c
+--- mdadm.orig/Monitor.c
++++ mdadm/Monitor.c
+@@ -554,8 +554,14 @@ static int check_array(struct state *st,
+ if (fd < 0)
+ goto disappeared;
+
+- if (st->devnm[0] == 0)
+- snprintf(st->devnm, MD_NAME_MAX, "%s", fd2devnm(fd));
++ if (st->devnm[0] == 0) {
++ char *found = fd2devnm(fd);
++ if (!found) {
++ alert(EVENT_DEVICE_DISAPPEARED, NULL, 0, dev, NULL);
++ goto out;
++ }
++ snprintf(st->devnm, MD_NAME_MAX, "%s", found);
++ }
+
+ for (mse2 = mdstat; mse2; mse2 = mse2->next)
+ if (strcmp(mse2->devnm, st->devnm) == 0) {
diff --git a/debian/patches/debian/0005-sha1-includes.patch b/debian/patches/debian/0005-sha1-includes.patch
new file mode 100644
index 0000000..8116f5f
--- /dev/null
+++ b/debian/patches/debian/0005-sha1-includes.patch
@@ -0,0 +1,40 @@
+Author: Michael Tokarev <mjt@tls.msk.ru>
+Description: Do not #include ansidecl.h from sha1.h, use system headers.
+ In 3.2.5 version of mdadm, new sha1 implementation has been included
+ which tries to include ansidecl.h header which is internal to some
+ other project. But this #include isn't really necessary, since this
+ implementation does not actually use any defines from ansidecl.h. So
+ just remove the #include, instead of adding a new external dependency.
+ .
+ References: http://www.spinics.net/lists/raid/msg38859.html
+ .
+ While at it, unconditionally include system headers like limits.h and
+ stdint.h, since on a Linux system these headers are available, and
+ these contains definitive information about real system types than
+ any guesses.
+
+diff -Naurp mdadm.orig/sha1.h mdadm/sha1.h
+--- mdadm.orig/sha1.h
++++ mdadm/sha1.h
+@@ -22,7 +22,7 @@
+
+ #include <stdio.h>
+
+-#if defined HAVE_LIMITS_H || _LIBC
++#if 1 /* defined HAVE_LIMITS_H || _LIBC */
+ # include <limits.h>
+ #endif
+
+@@ -33,9 +33,9 @@
+ the resulting executable. Locally running cross-compiled executables
+ is usually not possible. */
+
+-#ifdef _LIBC
+-# include <sys/types.h>
+-typedef u_int32_t sha1_uint32;
++#if 1 /* def _LIBC */
++# include <stdint.h>
++typedef uint32_t sha1_uint32;
+ typedef uintptr_t sha1_uintptr;
+ #else
+ # define INT_MAX_32_BITS 2147483647
diff --git a/debian/patches/debian/0006-readlink-path.patch b/debian/patches/debian/0006-readlink-path.patch
new file mode 100644
index 0000000..71ac02a
--- /dev/null
+++ b/debian/patches/debian/0006-readlink-path.patch
@@ -0,0 +1,23 @@
+Author: Michael Tokarev <mjt@tls.msk.ru>
+Description: readlink and basename are in /bin not /usr/bin on debian (Closes: #766416).
+ This is a debian-specific change, upstream ships
+ the rule to use /usr/bin/$foo while on debian
+ it is /bin/$foo
+
+diff -Naurp mdadm.orig/udev-md-raid-arrays.rules mdadm/udev-md-raid-arrays.rules
+--- mdadm.orig/udev-md-raid-arrays.rules
++++ mdadm/udev-md-raid-arrays.rules
+@@ -37,9 +37,9 @@ ENV{ID_FS_USAGE}=="filesystem|other", EN
+ ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
+
+ # Tell systemd to run mdmon for our container, if we need it.
+-ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c"
+-ENV{MD_MON_THIS}=="?*", TEST=="/etc/initrd-release", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@initrd-%c.service"
+-ENV{MD_MON_THIS}=="?*", TEST!="/etc/initrd-release", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service"
+-ENV{RESHAPE_ACTIVE}=="yes", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdadm-grow-continue@%c.service"
++ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c"
++ENV{MD_MON_THIS}=="?*", TEST=="/etc/initrd-release", PROGRAM="/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@initrd-%c.service"
++ENV{MD_MON_THIS}=="?*", TEST!="/etc/initrd-release", PROGRAM="/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service"
++ENV{RESHAPE_ACTIVE}=="yes", PROGRAM="/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdadm-grow-continue@%c.service"
+
+ LABEL="md_end"
diff --git a/debian/patches/debian/0007-no-Werror.patch b/debian/patches/debian/0007-no-Werror.patch
new file mode 100644
index 0000000..f7466a5
--- /dev/null
+++ b/debian/patches/debian/0007-no-Werror.patch
@@ -0,0 +1,18 @@
+Author: Martin F. Krafft <madduck@debian.org>
+Description: Remove -Werror from compiler flags.
+ -Werror seems like a bad idea on released/packaged code because a toolchain
+ update (introducing new warnings) could break the build. We'll let upstream
+ use it to beautify the code, but remove it for out builds.
+
+diff -Naurp mdadm.orig/Makefile mdadm/Makefile
+--- mdadm.orig/Makefile
++++ mdadm/Makefile
+@@ -50,7 +50,7 @@ ifeq ($(origin CC),default)
+ CC := $(CROSS_COMPILE)gcc
+ endif
+ CXFLAGS ?= -ggdb
+-CWFLAGS ?= -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds
++CWFLAGS ?= -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp -O3
+ endif
diff --git a/debian/patches/debian/0008-test-installed.patch b/debian/patches/debian/0008-test-installed.patch
new file mode 100644
index 0000000..dc962e9
--- /dev/null
+++ b/debian/patches/debian/0008-test-installed.patch
@@ -0,0 +1,30 @@
+Author: Felix Lechner <felix.lechner@lease-up.com>
+Description: Test installed files (Closes: #872118).
+ The test suite seems to check the executable bit on the local build product
+ 'mdadm' but runs all programs from the system PATH. This change should test
+ the installed version.
+ .
+ I believe this change tests the installed version, but that hypothesis is not
+ supported by much else. The autopkgtest restriction isolation-machine made it
+ difficult so far to run the test suite anywhere.
+ .
+ The entire setup is untested and may require further modification in order to
+ function.
+ .
+ Incorporates a suggestion from the fdisk maintainer to specify the fdisk
+ prerequisite explicitly.
+
+diff -Naurp mdadm.orig/tests/func.sh mdadm/tests/func.sh
+--- mdadm.orig/tests/func.sh
++++ mdadm/tests/func.sh
+@@ -101,10 +101,6 @@ check_env() {
+ echo "test: testing can only be done as 'root'."
+ exit 1
+ }
+- [ \! -x $mdadm ] && {
+- echo "test: please run make everything before perform testing."
+- exit 1
+- }
+ cmds=(mdadm lsblk df udevadm losetup mkfs.ext3 fsck seq)
+ for cmd in ${cmds[@]}
+ do
diff --git a/debian/patches/debian/0009-randomize-timers.patch b/debian/patches/debian/0009-randomize-timers.patch
new file mode 100644
index 0000000..dc129f2
--- /dev/null
+++ b/debian/patches/debian/0009-randomize-timers.patch
@@ -0,0 +1,55 @@
+Author: Dimitri John Ledkov <xnox@ubuntu.com>
+Description: Randomize md array check timers (LP: #1815201).
+
+diff -Naurp mdadm.orig/systemd/mdcheck_continue.timer mdadm/systemd/mdcheck_continue.timer
+--- mdadm.orig/systemd/mdcheck_continue.timer
++++ mdadm/systemd/mdcheck_continue.timer
+@@ -9,7 +9,9 @@
+ Description=MD array scrubbing - continuation
+
+ [Timer]
+-OnCalendar= 1:05:00
++OnCalendar=daily
++RandomizedDelaySec=12h
++Persistent=true
+
+ [Install]
+ WantedBy= mdmonitor.service
+diff -Naurp mdadm.orig/systemd/mdcheck_start.timer mdadm/systemd/mdcheck_start.timer
+--- mdadm.orig/systemd/mdcheck_start.timer
++++ mdadm/systemd/mdcheck_start.timer
+@@ -10,6 +10,8 @@ Description=MD array scrubbing
+
+ [Timer]
+ OnCalendar=Sun *-*-1..7 1:00:00
++RandomizedDelaySec=24h
++Persistent=true
+
+ [Install]
+ WantedBy= mdmonitor.service
+diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.service mdadm/systemd/mdmonitor-oneshot.service
+--- mdadm.orig/systemd/mdmonitor-oneshot.service
++++ mdadm/systemd/mdmonitor-oneshot.service
+@@ -10,7 +10,4 @@ Description=Reminder for degraded MD arr
+ Documentation=man:mdadm(8)
+
+ [Service]
+-Environment=MDADM_MONITOR_ARGS=--scan
+-EnvironmentFile=-/run/sysconfig/mdadm
+-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+-ExecStart=BINDIR/mdadm --monitor --oneshot $MDADM_MONITOR_ARGS
++ExecStart=BINDIR/mdadm --monitor --oneshot --scan
+diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.timer mdadm/systemd/mdmonitor-oneshot.timer
+--- mdadm.orig/systemd/mdmonitor-oneshot.timer
++++ mdadm/systemd/mdmonitor-oneshot.timer
+@@ -9,7 +9,9 @@
+ Description=Reminder for degraded MD arrays
+
+ [Timer]
+-OnCalendar= 2:00:00
++OnCalendar=daily
++RandomizedDelaySec=24h
++Persistent=true
+
+ [Install]
+ WantedBy= mdmonitor.service
diff --git a/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch b/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch
new file mode 100644
index 0000000..0273500
--- /dev/null
+++ b/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch
@@ -0,0 +1,17 @@
+Author: dann frazier <dannf@ubuntu.com>
+Description: Honor the debconf mdadm/autoscan setting in the systemd timer
+ There was an mdadm/autoscan template added to allow users to disable this
+ feature via debconf. This is exposed as a variable in /etc/default/mdadm,
+ which was processed by a cronjob. Dropping the cronjob and moving to a
+ systemd timer, we need to add our own processing.
+
+diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.service mdadm/systemd/mdmonitor-oneshot.service
+--- mdadm.orig/systemd/mdmonitor-oneshot.service
++++ mdadm/systemd/mdmonitor-oneshot.service
+@@ -10,4 +10,5 @@ Description=Reminder for degraded MD arr
+ Documentation=man:mdadm(8)
+
+ [Service]
+-ExecStart=BINDIR/mdadm --monitor --oneshot --scan
++EnvironmentFile=-/etc/default/mdadm
++ExecStart=sh -c '[ "$AUTOSCAN" != "true" ] || BINDIR/mdadm --monitor --oneshot --scan'
diff --git a/debian/patches/debian/0011-mdcheck-fix-empty-spaces-in-timer-unit-files.patch b/debian/patches/debian/0011-mdcheck-fix-empty-spaces-in-timer-unit-files.patch
new file mode 100644
index 0000000..019d993
--- /dev/null
+++ b/debian/patches/debian/0011-mdcheck-fix-empty-spaces-in-timer-unit-files.patch
@@ -0,0 +1,34 @@
+Author: Eric Desrochers <eric.desrochers@canonical.com>
+Description: mdcheck fix empty spaces in timer unit files (LP: #1852747).
+ dh_installsystemd is failling thus FBTFS because of the spaces
+ in the systemd unit timer files directive.
+
+diff -Naurp mdadm.orig/systemd/mdcheck_continue.timer mdadm/systemd/mdcheck_continue.timer
+--- mdadm.orig/systemd/mdcheck_continue.timer
++++ mdadm/systemd/mdcheck_continue.timer
+@@ -14,4 +14,4 @@ RandomizedDelaySec=12h
+ Persistent=true
+
+ [Install]
+-WantedBy= mdmonitor.service
++WantedBy=mdmonitor.service
+diff -Naurp mdadm.orig/systemd/mdcheck_start.timer mdadm/systemd/mdcheck_start.timer
+--- mdadm.orig/systemd/mdcheck_start.timer
++++ mdadm/systemd/mdcheck_start.timer
+@@ -14,5 +14,5 @@ RandomizedDelaySec=24h
+ Persistent=true
+
+ [Install]
+-WantedBy= mdmonitor.service
+-Also= mdcheck_continue.timer
++WantedBy=mdmonitor.service
++Also=mdcheck_continue.timer
+diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.timer mdadm/systemd/mdmonitor-oneshot.timer
+--- mdadm.orig/systemd/mdmonitor-oneshot.timer
++++ mdadm/systemd/mdmonitor-oneshot.timer
+@@ -14,4 +14,4 @@ RandomizedDelaySec=24h
+ Persistent=true
+
+ [Install]
+-WantedBy= mdmonitor.service
++WantedBy=mdmonitor.service
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b6e5be4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,11 @@
+debian/0001-fix-manpages.patch
+debian/0002-mdmonitor-service-simplify.patch
+debian/0003-host-name-in-default-mailfrom.patch
+debian/0004-exit-gracefully-when-md-device-not-found.patch
+debian/0005-sha1-includes.patch
+debian/0006-readlink-path.patch
+debian/0007-no-Werror.patch
+debian/0008-test-installed.patch
+debian/0009-randomize-timers.patch
+debian/0010-systemd-honor-debconf-daily-scan.patch
+debian/0011-mdcheck-fix-empty-spaces-in-timer-unit-files.patch
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 0000000..0492238
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] mdadm.templates
diff --git a/debian/po/ca.po b/debian/po/ca.po
new file mode 100644
index 0000000..250fac6
--- /dev/null
+++ b/debian/po/ca.po
@@ -0,0 +1,218 @@
+# Catalan debconf translation of mdadm
+# Copyright (C) 2011 Innocent De Marchi <tangram.peces@gmail.com>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 3.1.4-1+8efb9d1\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2011-05-17 16:54+0100\n"
+"Last-Translator: Innocent De Marchi <tangram.peces@gmail.com>\n"
+"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"Voleu que «mdadm» executi comprovacions de redundància mensuals de les "
+"matrius MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Si el nucli ho accepta (versions superiors a la 2.6.14), «mdadm» pot fer "
+"comprovacions periòdiques de la redundància de les matrius MD (RAIDs). Pot "
+"ésser que aquest procés consumeixi molts recursos del sistema, depenent de "
+"la configuració, però pot ajudar a prevenir casos poc freqüents de pèrdua de "
+"dades. Teniu present que aquestes comprovacions es fan en mode lectura "
+"llevat que es detectin errors: si hi ha errors, «mdadm» els corregirà i per "
+"això, caldrà que tengui accés d'escriptura als mitjans físics. "
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"El valor predeterminat, si s'activa, es fer la comprovació el primer "
+"diumenge de cada mes a les 01:06 am."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Desitjau arrencar el dimoni monitor MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"El dimoni monitor de MD (RAID) envia notificacions per correu electrònic "
+"quan es produeixen esdeveniments importants en els dispositius MD (com un "
+"error de disc)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Es recomana l'activació d'aquesta opció."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatari de les notificacions de correu electrònic:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Introduïu l'adreça de correu electrònic de l'usuari que ha de rebre les "
+"notificacions de correu electrònic per a esdeveniments MD rellevants."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Les matrius MD necessaris per al sistema de fitxers arrel:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Escriviu «all» (tots), «none» (cap) o una llista separada per espais dels "
+#~ "dispositius com «md0 md1» o «md/1 md/d0» (podeu ometre el «/dev/» "
+#~ "inicial)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "per a ús intern, només és necessària la descripció llarga. "
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Si el sistema de fitxers arrel del sistema està en un conjunt MD (RAID), "
+#~ "cal que s'iniciï al principi de la seqüència d'arrencada. Si està en un "
+#~ "volum lògic (LVM), que està definit sobre un MD, cal iniciar totes les "
+#~ "matrius que el constitueixen."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Si sabeu exactament quines matrius són necessàries per arrencar el "
+#~ "sistema de fitxers arrel, i vol ajornar l'arrencada de la resta de "
+#~ "conjunts a un punt posterior de la seqüència d'arrencada, Introduïu aquí "
+#~ "els conjunts que voleu arrencar. També podeu seleccionar «all» per, "
+#~ "simplement, arrencar tots els disponibles."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Si no necessita o vol arrencar qualsevol matriu per al sistema de fitxers "
+#~ "arrel, deixau en blanc la resposta (o escriviu «none»). Pot ésser el seu "
+#~ "cas si fa servir l'auto-arrencada del nucli o no necessiteu cap matriu en "
+#~ "l'arrencada."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "S'ha produït un error: el node de dispositiu no existeix."
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "S'ha produït un error: no és un dispositiu de blocs."
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "S'ha produït un error: no és un conjunt («array») MD."
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "S'ha produït un error: la matriu («array») no apareix llistada en el "
+#~ "fitxer de configuració «mdadm.conf»."
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Voleu arrencar les matrius no llistats en el fitxer «mdadm.conf»?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "La matriu («array») especificada (${array}) no apareix llistada en el "
+#~ "fitxer de configuració (${config}). Per tant, no es pot iniciar la matriu "
+#~ "durant l'arrencada del sistema, llevat que corregeixi el fitxer de "
+#~ "configuració i regenereu el disc RAM inicial."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Aquest avís només és important si necessiteu que les matrius s'arrenquin "
+#~ "en el disc RAM inicial per poder arrencar el sistema. Si feu servir "
+#~ "l'arrencada automàtica del nucli o no necessiteu que les matrius "
+#~ "estiguin arrencats quan es carregui el disc RAM, podeu continuar. També "
+#~ "podeu decidir no continuar i introduir «none» quan se li demani quines "
+#~ "matrius cal iniciar del disc RAM inicial."
diff --git a/debian/po/cs.po b/debian/po/cs.po
new file mode 100644
index 0000000..eaef08c
--- /dev/null
+++ b/debian/po/cs.po
@@ -0,0 +1,258 @@
+# Czech debconf translation of mdadm
+# Copyright (C) 2020 Miroslav Kure <kurem@debian.cz>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-10-18 16:52+0200\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Má mdadm spouštět měsíční kontroly redundance MD polí?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Pokud to vaše jádro podporuje (verze větší než 2.6.14), může mdadm "
+"pravidelně kontrolovat redundanci MD polí (RAIDů). Podle konfigurace "
+"počítače to může být proces velmi náročný na prostředky, ovšem může předejít "
+"vzácným případům ztráty dat. Pokud nejsou nalezeny chyby, používá tato "
+"kontrola v zásadě jen čtecí operace. Při nalezení chyb se je mdadm pokusí "
+"opravit, což může znamenat zápis na médium."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Pokud kontrolu povolíte, bude se dle výchozího nastavení spouštět každou "
+"první neděli v měsíci v 01:06 ráno."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Má mdadm jednou denně zjišťovat degradovaná pole?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm může jednou denně zjišťovat degradovaná pole a chybějící náhradní "
+"disky, aby zaručil, že tyto události neprojdou bez povšimnutí."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Chcete spustit daemon pro monitorování MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Daemon pro monitorování MD (RAIDu) zasílá emailová upozornění na významné MD "
+"události, jako je selhání disku."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Povolení této možnosti je doporučeno."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Příjemce emailových upozornění:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Zadejte prosím emailovou adresu uživatele, který má dostávat emailová "
+"upozornění při výskytu významných MD událostí."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "MD pole vyžadovaná pro kořenový souborový systém:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Zadejte prosím mezerami oddělený seznam zařízení, případně „all“ nebo "
+#~ "„none“. Počáteční „/dev/“ můžete vynechat a zadat jen např. „md0 md1“ "
+#~ "nebo „md/1 md/d0“."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "pro vnitřní použití - pouze kvůli zobrazení dlouhého popisu."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Pokud je kořenový souborový systém umístěn na MD (RAID) svazku, musí být "
+#~ "tento spuštěn během zavádění systému co nejdříve. Pokud se kořenový "
+#~ "souborový systém nachází na logickém svazku LVM, který je vytvořen nad MD "
+#~ "polem, musí se spustit všechna související pole."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Jestliže přesně víte, která pole jsou potřeba pro připojení kořenového "
+#~ "souborového systému a zároveň chcete pozdržet spuštění ostatních polí na "
+#~ "pozdější dobu, zadejte zde prosím pole, která se mají spustit. Chcete-li "
+#~ "spustit všechna dostupná pole, můžete zadat „all“."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Nepotřebujete-li nebo nechcete-li spouštět pole pro kořenový souborový "
+#~ "systém, ponechte odpověď prázdnou, případně zadejte „none“. To může "
+#~ "nastat třeba v případě, že používáte automatický start přímo v jádře, "
+#~ "nebo pokud k zavedení systému žádná pole nepotřebujete."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Vyskytla se chyba: uzel zařízení neexistuje"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Vyskytla se chyba: není blokovým zařízením"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Vyskytla se chyba: není MD polem"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Vyskytla se chyba: pole není uvedeno v souboru mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Spustit pole neuvedená v mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Zadané pole (${array}) není uvedeno v konfiguračním souboru ${config} a "
+#~ "tím pádem nemůže být spuštěno při zavádění systému. Napravit to můžete "
+#~ "opravou konfiguračního souboru a znovuvytvořením počátečního ramdisku."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Toto varování je relevantní pouze pokud k zavedení systému potřebujete, "
+#~ "aby se pole spustila z počátečního ramdisku. Používáte-li automatické "
+#~ "spouštění přímo v jádře, nebo pokud nepotřebujete pouštět žádná pole "
+#~ "ještě z počátečního ramdisku, můžete jednoduše pokračovat. Jinou možností "
+#~ "je nepokračovat dále a při dotazu na seznam polí, která se mají spouštět "
+#~ "z počátečního ramdisku, zadat 'none'."
+
+#~ msgid "Initialise the superblock if you reuse hard disks"
+#~ msgstr "Při znovupoužití starších disků inicializujte superblok"
+
+#~ msgid ""
+#~ "WARNING! If you are using hard disks which have RAID superblocks from "
+#~ "earlier installations in different RAID arrays, you MUST zero each "
+#~ "superblock *before* activating the autostart feature."
+#~ msgstr ""
+#~ "VAROVÁNÍ! Používáte-li pevné disky, které obsahují RAID superbloky z "
+#~ "dřívější instalace v jiném RAID poli, MUSÍTE všechny superbloky před "
+#~ "použitím automatického spouštění vynulovat."
+
+#~ msgid ""
+#~ "To do this, do not start the RAID devices automatically. First, zero the "
+#~ "superblock (mdadm --zero-superblock /dev/mdX). Next, use `dpkg-"
+#~ "reconfigure mdadm` to reactivate the autostart feature."
+#~ msgstr ""
+#~ "Chcete-li to provést, nespouštějte RAID zařízení automaticky. Nejprve "
+#~ "vynulujte superblok příkazem 'mdadm --zero-superblock /dev/mdX' a teprve "
+#~ "poté můžete povolit automatické spouštění RAIDu příkazem 'dpkg-"
+#~ "reconfigure mdadm'."
+
+#~ msgid ""
+#~ "You have the option to start all other arrays (those not needed for the "
+#~ "root filesystem) later in the boot sequence. Doing so will give you "
+#~ "greater control over the arrays with the mdadm configuration file. "
+#~ "Starting all arrays at boot-time may be safer though."
+#~ msgstr ""
+#~ "Všechna ostatní pole (ta, která nejsou potřeba pro kořenový souborový "
+#~ "systém) můžete spustit později. Pokud tak učiníte, budete mít v "
+#~ "konfiguračním souboru mdadm nad poli větší kontrolu. Na druhou stranu je "
+#~ "spouštění všech polí hned na začátku zavádění o něco jistější volbou."
+
+#~ msgid ""
+#~ "If RAID devices are started automatically, all RAID devices are "
+#~ "discovered and assembled automatically at system startup. This option "
+#~ "should only be used if the md driver is compiled as a module. If it is "
+#~ "compiled into your kernel, the automatic startup will be performed at "
+#~ "boot time by the kernel and therefore you should not choose this option."
+#~ msgstr ""
+#~ "Jestliže jsou RAID zařízení spouštěna automaticky, jsou všechna RAID "
+#~ "zařízení rozpoznána a poskládána automaticky při zavádění systému. Tuto "
+#~ "volbu byste měli použít pouze v případě, že jste ovladač md zakompilovali "
+#~ "jako modul. Pokud jste jej zakompilovali přímo do jádra, o automatické "
+#~ "spuštění se postará samotné jádro a tedy tuto možnost nepotřebujete."
diff --git a/debian/po/da.po b/debian/po/da.po
new file mode 100644
index 0000000..aada018
--- /dev/null
+++ b/debian/po/da.po
@@ -0,0 +1,211 @@
+# Danish debconf translation of mdadm
+# Copyright (C) 2011 Joe Hansen <joedalton2@yahoo.dk>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2011-04-03 17:30+01:00\n"
+"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
+"Language-Team: Danish <debian-l10n-danish@lists.debian.org> \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Skal mdadm køre månedlig redundanskontrol af MD arrays?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Hvis kernen understøtter det (versioner større end 2.6.14), kan mdadm "
+"periodisk kontrollere redundansen på MD arrays (RAID'er). Det kan være en "
+"ressourcekrævende proces, afhængig af den lokale opsætning, men det kan "
+"hjælpe med at forhindre at du i sjældne tilfælde får datatab. Bemærk at "
+"dette er en skrivebeskyttet kontrol med mindre at der findes fejl; hvis der "
+"registreres fejl vil mdadm forsøge at rette dem, hvilket kan medføre "
+"skriveadgang til mediet."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Standarden - hvis aktiveret - er at kontrollere på den første søndag i hver "
+"måned klokken 01:06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Ønsker du at starte MD-overvågningsdæmonen?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"MD-overvågningsdæmonem (RAID) sender e-post-påmindelser udløst af vigtige MD-"
+"hændelser (såsom en diskfejl)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Aktivering af denne indstilling anbefales."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Modtager af e-post-påmindelser:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Indtast venligst e-post-adressen på brugeren, som skal modtage e-post-"
+"påmindelser for vigtige MD-hændelser."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "MD arrays krævet for rodfilsystemet:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Indtast venligst »all«, »none« eller en mellemrumsadskilt liste af "
+#~ "enheder såsom »md0 md1« eller »md/1 md/d0« (det foranstillede »/dev/« kan "
+#~ "udelades)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "for intern brug - kun den lange beskrivelse er krævet."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Hvis systemets rodfilsystem er placeret på en MD-array (RAID), skal det "
+#~ "startes tidligt under opstartssekvensen. Hvis den er placeret på en "
+#~ "logisk diskenhed (LVM), som er på MD, skal alle indgående arrays startes."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Hvis du ved præcis hvilke arrays som er krævet, for at få rodfilsystemet "
+#~ "op, og du ønsker at udsætte start af alle andre arrays til et senere "
+#~ "tidspunkt i opstartssekvensen, så indtast her de arrays som skal startes. "
+#~ "Alternativt kan du indtaste »all« for at starte alle tilgængelige arrays."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Hvis du ikke har brug for eller ønsker at starte nogen arrays for "
+#~ "rodfilsystemet, så efterlad svaret tomt (eller indtast »none«). Dette kan "
+#~ "være tilfældet, hvis du bruger automatisk start af kernen eller ikke skal "
+#~ "bruge arrays til at starte op med."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Der opstod en fejl: Enhedsknude findes ikke"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Der opstod en fejl: Ikke en blokenhed"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Der opstod en fejl: Ikke en MD array"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Der opstod en fejl: Array er ikke anført i mdadm.conf-filen"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Start arrays er ikke anført i mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Den angivne array (${array}) er ikke anført i konfigurationsfilen "
+#~ "(${config}). Den kan derfor ikke startes under opstarten, med mindre du "
+#~ "retter i konfigurationsfilen og gendanner den oprindleige ramdisk."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Denne advarsel er kun relevant hvis du skal have arrays til at blive "
+#~ "startet fra den oprindelige ramdisk for at kunne starte op. Hvis du "
+#~ "bruger den automatiske opstart i kernen, eller ikke skal bruge at arrays "
+#~ "startes så tidligt som den oprindelige ramdisk indlæses, så kan du bare "
+#~ "fortsætte. Alternativt så vælg at fortsætte og indtaste »none« når du "
+#~ "bliver spurgt om hvilke arrays, der skal startes fra den oprindelige "
+#~ "ramdisk."
diff --git a/debian/po/de.po b/debian/po/de.po
new file mode 100644
index 0000000..4ae897a
--- /dev/null
+++ b/debian/po/de.po
@@ -0,0 +1,140 @@
+# German debconf translation of mdadm
+# Copyright (C) 2009 Mario Joussen <joussen@debian.org>
+# Copyright (C) 2020-2023 Helge Kreutzmann <debian@helgefjell.de>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 4.2+20231026-1\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2023-11-09 21:30+0100\n"
+"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr "Kein Systemd-Init-System erkannt"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+"Es wurde erkannt, dass sich das Wurzeldateisystem auf einem RAID-Gerät "
+"befindet. Daher könnte es notwendig sein, dass Mdadm während des "
+"Systemstarts ausgeführt wird, um Ihr System korrekt zu starten."
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+"Beginnend mit neueren Versionen des Pakets Mdadm, ist die Init-System-"
+"Integration nur noch für Systemd verfügbar. Dieses System scheint ein "
+"alternatives Init-System zu verwenden, wodurch es sein könnte, dass Ihr "
+"System nicht mehr startbar ist."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"Soll Mdadm monatlich die Redundanzüberprüfung auf den RAID-Verbünden "
+"ausführen?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Falls Ihr Kernel es unterstützt (Versionen größer als 2.6.14) kann Mdadm "
+"regelmäßig die Redundanz Ihrer MD-Verbünde (RAID) überprüfen. Dies kann "
+"abhängig von Ihrer Installation ein ressourcenintensiver Vorgang sein, der "
+"aber helfen kann, seltene Fälle von Datenverlust zu vermeiden. Bitte "
+"beachten Sie, dass diese Überprüfung nur lesend erfolgt, solange keine "
+"Fehler gefunden werden. Falls Fehler gefunden werden, wird Mdadm versuchen, "
+"diese zu beheben, was zu schreibendem Zugriff auf das Medium führen kann."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Die Voreinstellung ist, falls eingeschaltet, die Überprüfung am ersten "
+"Sonntag jedes Monats um 01:06 Uhr durchzuführen."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Soll Mdadm einmal täglich auf degradierte Verbünde prüfen?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"Mdadm kann einmal täglich auf degradierte Verbünde und fehlende "
+"Ausweichmedien prüfen, um sicherzustellen, dass diese Ereignisse bemerkt "
+"werden."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Möchten Sie den RAID-Überwachungsdaemon starten?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Der MD- (RAID-)Überwachungsdaemon verschickt Benachrichtigungen als Reaktion "
+"auf wichtige RAID-Ereignisse (wie zum Beispiel Festplattenfehler)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Das Aktivieren dieser Option wird empfohlen."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Empfänger der E-Mail-Benachrichtungen:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Geben Sie bitte die E-Mail-Adresse des Benutzers an, der die E-Mail-"
+"Benachrichtigungen der wichtige MD-Ereignisse erhalten soll."
diff --git a/debian/po/es.po b/debian/po/es.po
new file mode 100644
index 0000000..6bbb5e5
--- /dev/null
+++ b/debian/po/es.po
@@ -0,0 +1,226 @@
+# Spanish debconf translation of mdadm
+# Copyright (C) 2006 Javier Fernández-Sanguino
+# Copyright (C) Fernando Cerezal
+# Copyright (C) 2020 Jonatan Porras <jonatanpc8@gmail.com>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 2.5.6-6\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2008-04-25 17:47+0200\n"
+"Last-Translator: Javier Fernández-Sanguino <jfs@debian.org>\n"
+"Language-Team: Debian Spanish <debian-l10n-spanish@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"¿Debería mdadm ejecutar comprobaciones de redundancia mensuales de los "
+"arrays MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Mdadm puede comprobar de forma periódica la redundancia de sus arrays MD "
+"(RAIDs) si el núcleo lo soporta (si su versión es superior a la 2.6.14). "
+"Esto puede ser un proceso que consuma muchos recursos, dependiendo de su "
+"configuración, pero podría ayudar a prevenir casos raros de pérdida de "
+"datos. Tenga en cuenta que estas comprobaciones se hacen en modo lectura "
+"salvo que se detecten errores, en cuyo caso mdadm necesitará corregirlos, "
+"lo que significa que será necesario tener acceso de escritura a los medios "
+"físicos."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"El valor por omisio, si se activa, es comprobar el primer Domingo de cada "
+"mes a las 01:06 am."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "¿Debería mdadm comprobar una vez al día si hay arrays degradadas?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm puede comprobar una vez al día si hay arrays degradadas y repuestos "
+"que faltan para garantizar que tales eventos no pasen desapercibidos."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "¿Desea arrancar el demonio de monitorización MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"El demonio de monitorización MD (RAID) envía notificaciones por correo "
+"electrónico cuando se producen eventos importantes en los dispositivos MD "
+"(como pueda ser el caso de un fallo de un disco)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Es opcional habilitar esta opción."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatario de las notificaciones por correo:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Introduzca la dirección de correo electrónico del usuario que debería "
+"recibir las notificaciones por correo de eventos relevantes en los "
+"dispositivos MD."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Arrays MD necesarios para el sistema de ficheros raíz:"
+
+# No se traduce «all» y «none» porque no aparecen en la plantilla para traducir los elementos individuales
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Introduzca «all» (todos), «none» (ninguno) o una lista de "
+#~ "dispositivos separados por espacios como por ejemplo puede sólo "
+#~ "introducir «md0 md1» o «md/1 md/d0» (no tiene que preceder los "
+#~ "nombres de dispositivos con «/dev»)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "para uso interno. Sólo se utiliza la descripción larga."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Si el sistema de ficheros raíz de su sistema está en un array MD (RAID) "
+#~ "tiene que inicializarse antes durante de la secuencia de arranque. Si "
+#~ "está en un volumen lógico (LVM), que está definido sobre un MD, todos "
+#~ "los arrays que lo forman tienen que haberse inicializado."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Introduzca los arrays a iniciar aquí, si sabe con exactitud cuáles son "
+#~ "necesarios para arrancar el sistema de ficheros raíz y quiere posponer el "
+#~ "arranque de todos los demás arrays a un punto posterior de la secuencia "
+#~ "de arranque. También puede introducir «all» (todos) para, "
+#~ "sencillamente, iniciar todos los arrays disponibles."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Puede dejar la respuesta en blanco (o introducir «none») si no necesita "
+#~ "o desea arrancar los arrays para el sistema de ficheros raíz. Este puede "
+#~ "ser su caso si está utilizando el autoarranque del núcleo o no necesita "
+#~ "ningún array para el arranque."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Se produjo un error: el nodo de dispositivo no existe"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Se produjo un error: no es un dispositivo de bloques"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Se produjo un error: no es un array MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "Se produjo un error: el array no está en la lista definida en el archivo "
+#~ "mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "¿Desea arrancar los arrays no listados en mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "El array que ha especificado (${array}) no está listado en el fichero de "
+#~ "configuración ${config}. Este array no podrá iniciarse durante el "
+#~ "arranque del sistema a no ser que corrija el fichero de configuración y "
+#~ "regenere el disco de ram inicial."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Este aviso sólo es relevante si necesita que los arrays se inicien en el "
+#~ "disco de RAM inicial para poder arrancar el sistema. Si utiliza el "
+#~ "autoarranque del núcleo o no necesita que los arrays estén arrancados "
+#~ "tan pronto como se cargue el disco de RAM, puede continuar simplemente. "
+#~ "También puede decidir no continuar e introducir «none» cuando se le "
+#~ "pregunte qué arrays deberían arrancarse del disco de RAM inicial."
diff --git a/debian/po/eu.po b/debian/po/eu.po
new file mode 100644
index 0000000..efb3102
--- /dev/null
+++ b/debian/po/eu.po
@@ -0,0 +1,214 @@
+# Basque debconf translation of mdadm
+# Copyright (C) 2008 Piarres Beobide <pi@beobide.net>
+# Copyright (C) 2020 Inaki Larranaga Murgoitio <dooteo@zundan.com>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm-debconf\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-09-21 17:06+0100\n"
+"Last-Translator: Inaki Larranaga Murgoitio <dooteo@zundan.com>, 2020\n"
+"Language-Team: Euskara <debian-l10n-basque@lists.debian.org>\n"
+"Language: eu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "mdadm-ek hilabetero MD matrizen erredundantzia egiaztatu behar du?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Kernelak onartzen badu (2.6.14 baino bertsio berriagoak), mdadm-ek MD "
+"matrizen (RAID-en) erredundantzia aldiro egiazta dezake. Konfigurazio "
+"lokalaren arabera baliabide-eskakizun handiko prozesu bat izan daitekeen "
+"arren datu galera kasuak saihesten lagundu dezake. Kontutan izan irakur-"
+"soileko egiaztapena dela errorerik aurkitu ezean; bestela, erroreeak "
+"aurkituz gero, mdadm-ek hauek konpontzen saiatuko da, horretarako euskarria "
+"idazketa moduan atzitu behar izan dezakeelarik."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Gaituta egonez gero, lehenetsi gisa hilabete bakoitzeko aurreneko "
+"asteleheneko 01:06-etan egiaztatuko da."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "mdadm-ek degradatutako matrizeak egunean behin egiaztatuko ditu?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm-ek egunean behin degradatutako matrizeak eta falta diren ordezkoak "
+"egiazta ditzake halako gertaerak oharkabe ez geratzeko."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "MD monitorizazio-daemona abiarazi nahi duzu?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"MD (RAID) monitorizazio-daemonak mezu elektronikoak bidaltzen ditu MD "
+"gertaera (adib. diskoen erroreak) garrantzitsuetaz berri emanez."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Aukera hau gaitzea gomendatzen da."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Jakinarazpenen hartzailearen helb. eletronikoa:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Idatzi MD gertaera garrantzitsuen jakinarazpenak jasoko dituen "
+"erabiltzailearen helbide elektronikoa."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Erro fitxategi-sistemarentzat beharrezko MD array-ak:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Mesedez idatzi 'denak', 'batez', edo zuriunez bereziriko gailuen "
+#~ "zerrenda, adibidez 'md0 md1' edo 'md/1 md/d0' (hasierako '/dev/' baztertu "
+#~ "daiteke)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "barne erabilerako - deskribapen luzea bakarrik behar da."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Sistemaren erro fitxategi-sistema MD array (RAID) batetan kokaturik "
+#~ "badago, berau abio sekuentziaren hasieran abiarazi behar da. MD batetan "
+#~ "kokaturiko bolumen logiko (LVM) batetan badago osatzen duten array "
+#~ "guztiak abiarazi behar dira."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Erro fitxategi-sistema erabiltzeko beharrezkoak diren arrayak zehazki "
+#~ "jakin eta beste array-en abiaraztea abioaren beranduagoko puntu batetara "
+#~ "atzeratu nahi baduzu, idatzi abiarazi beharreko array-ak hemen. Bestela "
+#~ "idatzi 'denak' array erabilgarri guztiak abiarazteko."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Ez baduzu erro fitxategi sistemarako array-rik abiarazi behar, hutsik "
+#~ "utzi ezazu (edo 'batez' idatzi). Hau abioan array-rik behar ez duzulako "
+#~ "edo kernel auto-abioa erabiltzen duzulako izan daiteke."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Errore bat gertatu da: gailu nodoa ez dago"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Errore bat gertatu da: ez da bloke gailu bat"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Errore bat gertatu da: ez da MD array bat"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "Errore bat gertatu da: array-a ez dago mdadm.conf fitxategian "
+#~ "zerrendaturik"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Abiarazi mdadm.conf fitxategian ez dauden array-ak?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Zehazturiko (${array}) array-a ez dago (${config}) konfigurazio "
+#~ "fitxategian zerrendaturiko. Horregatik ezin da abioan abiarazi zuk "
+#~ "konfigurazio fitxategia konpondu eta abio ramdiskoa bersortu arte."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Abisu hau abiarazi ahal izateko ramdisk.etik array-ak baiaraztea behar "
+#~ "baduzu bakarrik da garrantzitsua. Kernel auto-abioa erabiltzen baduzu edo "
+#~ "ez baduzu ramdisk-etik hasieran array-rik kargatzea behar aurrera "
+#~ "jarraitu dezakezu. Bestela ez jarraitzea hautatu eta 'batez' idatzi "
+#~ "hasierako ramdisk-etik kargatu beharreko array-ez galdetzean."
diff --git a/debian/po/fi.po b/debian/po/fi.po
new file mode 100644
index 0000000..f44c5d7
--- /dev/null
+++ b/debian/po/fi.po
@@ -0,0 +1,215 @@
+# Finnish debconf translation of mdadm
+# Copyright (C) 2020 Ari Ervasti <ari.ervasti87@gmail.com>
+# This file is distributed under the same license as the mdadm package.
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-10-13 10:58+0300\n"
+"Last-Translator: Ari Ervasti <ari.ervasti87@gmail.com>\n"
+"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Tulisiko mdadm:n tarkistaa kuukausittain MD-pakkojen eheys?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Ohjelma mdadm voi säännöllisesti tarkistaa MD-pakkojen (RAIDien) tietojen "
+"monistuksen, jos ydin tukee tätä (versiosta 2.6.14 eteenpäin). Tämä prosessi "
+"voi paikallisesta kokoonpanosta riippuen kuluttaa paljon resursseja, mutta "
+"saattaa ehkäistä tietojen menetyksiä tietyissä harvinaisissa tapauksissa. "
+"Tarkistus vaatii vain tietojen lukemista, jos virheitä ei löyty. Jos "
+"virheitä löytyy, mdadm yrittää korjata ne, jolloin levylle saatetaan myös "
+"kirjoittaa."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Oletuksena, jos tarkistus on käytössä, se tehdään kuukauden ensimmäisenä "
+"sunnuntaina kello 01.06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+"Tulisiko mdadm-ohjelman tehdä tarkastus kerran päivässä pilkkoutuneiden "
+"taulujen varalta?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm voi tehdä tarkastuksen kerran päivässä pilkkoutuneiden taulujen ja "
+"puuttuvien osien varalta varmistaakseen, ettei sellaista tapahdu huomaamatta."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Haluatko käynnistää MD-seurannan?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"MD-pakkoja (RAIDeja) seuraava taustaohjelma lähettää tietoja sähköpostiin "
+"tärkeiden MD-tapahtumien (kuten levyrikon) sattuessa."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Tämän valitseminen on suositeltavaa."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Sähköpostiviestien vastaanottaja:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Anna sähköpostiosoite, johon sähköpostitiedotteet tärkeistä MD-tapahtumista "
+"lähetetään."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Juuritiedostojärjestelmän tarvitsemat MD-pakat:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Syötä ”all” (kaikki), ”none” (ei mitään) tai välilyönnein eroteltu lista "
+#~ "laitteista, esimerkiksi ”md0 md1” tai ”md/1 md/d0” (edeltävä /dev/ "
+#~ "voidaan jättää pois)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "vain sisäiseen käyttöön - vain pitkä kuvaus on tarpeellinen."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Jos järjestelmän juuritiedostojärjestelmä sijaitsee MD-levypakassa "
+#~ "(RAID), pakka tulee käynnistää aikaisessa vaiheessa käynnistettäessä "
+#~ "järjestelmää. Jos se sijaitsee loogisella taltiolla (LVM), joka on MD-"
+#~ "pakassa, kaikki taltioon liittyvät pakat tulee käynnistää."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Jos tiedät tarkalleen mitä pakkoja tarvitaan juuritiedostojärjestelmän "
+#~ "käynnistämiseen ja haluat viivästyttää muiden pakkojen käynnistystä, "
+#~ "syötä käynnistettävät pakat tähän. Vaihtoehtoisesti voit käynnistää "
+#~ "kaikki pakat syöttämällä ”all”."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Jos mitään pakkoja ei tarvitse käynnistää juuritiedostojärjestelmän "
+#~ "käyttämiseksi, jätä kenttä tyhjäksi (tai syötä ”none”). Tämä voi olla "
+#~ "tilanne, jos käytät ytimen autokäynnistystä tai et tarvitse mitään "
+#~ "pakkoja käynnistykseen."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Tapahtui virhe: laitetiedostoa ei ole olemassa"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Tapahtui virhe: ei lohkolaite"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Tapahtui virhe: ei MD-pakka"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Tapahtui virhe: pakkaa ei ole listattu tiedostossa mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr ""
+#~ "Käynnistetäänkö pakat, joita ei ole listattu tiedostossa mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Annettua pakkaa (${array}) ei ole listattu asetustiedostossa (${config}). "
+#~ "Niinpä sitä ei voida käynnistää käynnistettäessä järjestelmä, ellei "
+#~ "asetustiedostoa korjata ja käynnistysmuistilevyä (initrd) luoda uudelleen."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Tämä varoitus on aiheellinen vain, jos järjestelmän käynnistäminen vaatii "
+#~ "pakkojen käynnistämistä käynnistysmuistilevyltä. Jos ytimen "
+#~ "autokäynnistys on käytössä tai pakkoja ei tarvita siinä vaiheessa, kun "
+#~ "käynnistysmuistilevy ladataan, voit jatkaa. Vaihtoehtoisesti voit olla "
+#~ "jatkamatta ja syöttää ”none” kysyttäessä käynnistysmuistilevyltä "
+#~ "käynnistettäviä pakkoja."
diff --git a/debian/po/fr.po b/debian/po/fr.po
new file mode 100644
index 0000000..c7a00ea
--- /dev/null
+++ b/debian/po/fr.po
@@ -0,0 +1,225 @@
+# French debconf translation of mdadm
+# Copyright (C) 2005-2006 Éric Madesclair <eric-m@wanadoo.fr>
+# Copyright (C) 2006 Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>
+# Copyright (C) 2006-2008 Florentin Duneau <fduneau@gmail.com>
+# Copyright (C) 2019 Grégoire Scano <gregoire.scano@malloc.fr>, 2019.
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2019-08-13 16:52+0800\n"
+"Last-Translator: Grégoire Scano <gregoire.scano@malloc.fr>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Faut-il vérifier chaque mois la redondance des ensembles RAID ?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Si le noyau le gère (à partir de la version 2.6.14), mdadm peut vérifier "
+"périodiquement la redondance des ensembles RAID. Cette action peut demander "
+"beaucoup de ressources selon la configuration, mais cela aide à prévenir les "
+"rares cas de pertes de données. Notez que ce test est réalisé en lecture "
+"seule à moins que des erreurs ne soient rencontrées. Si des erreurs sont "
+"détectées, mdadm essayera de les corriger, ce qui entraînera des écritures "
+"sur le média."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Par défaut, la vérification s'effectuera tous les premiers dimanche du mois "
+"à 01 h 06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+"Faut-il rechercher l'existence d'ensembles RAID dégradés tous les jours ?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm peut rechercher des ensembles RAID dégradés et des disques de secours "
+"manquants une fois par jour pour s'assurer que de tels évènements ne passent "
+"pas inaperçus."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Faut-il démarrer le démon de surveillance MD ?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Le démon de surveillance MD envoie des notifications par courriel lors "
+"d'importants événements MD (comme une panne de disque dur)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Il est recommandé d'activer cette option."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinataire des notifications par courriel :"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Veuillez indiquer l'adresse électronique de l'utilisateur qui doit recevoir "
+"les notifications lors d'importants événements MD."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Ensembles MD requis par le système de fichiers racine :"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Veuillez indiquer « all », « none » ou une liste de périphériques, "
+#~ "séparés par des espaces, par exemple, « md0 md1 » ou « md/1 md/d0 » (vous "
+#~ "pouvez omettre « /dev/ »)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr ""
+#~ "Pour une utilisation interne - seule la description longue est nécessaire"
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Si le système de fichiers racine se trouve sur un ensemble MD (RAID), il "
+#~ "doit être lancé au début de la procédure de démarrage. Si le système de "
+#~ "fichiers racine se trouve sur un volume logique (« LVM »), qui se trouve "
+#~ "aussi sur un volume MD, tous les composants de l'ensemble doivent être "
+#~ "démarrés."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Si vous savez exactement quels sont les ensembles RAID nécessaires au "
+#~ "démarrage du système de fichiers racine et si vous souhaitez différer le "
+#~ "démarrage de tous les autres ensembles, veuillez les indiquer ici. Vous "
+#~ "pouvez aussi indiquer « all » pour démarrer tous les ensembles existants."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Si vous n'avez pas besoin ou ne souhaitez pas démarrer d'ensemble RAID "
+#~ "pour le système de fichiers racine, veuillez laissez l'entrée vide (ou "
+#~ "entrez « none »). Ceci peut être le cas si vous utilisez l'option de "
+#~ "démarrage automatique (« autostart ») du noyau ou si vous n'avez besoin "
+#~ "d'aucun ensemble pour démarrer."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Erreur : périphérique inconnu"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Erreur : ce n'est pas un périphérique en mode bloc"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Erreur : ce n'est pas un ensemble RAID"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Erreur : ensemble non mentionné dans le fichier mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr ""
+#~ "Faut-il démarrer les ensembles RAID non mentionnés dans mdadm.conf ?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "L'ensemble (${array}) que vous avez spécifié n'est pas mentionné dans le "
+#~ "fichier de configuration ${config}. Il ne sera donc pas démarré à moins "
+#~ "que vous corrigiez le fichier de configuration et que vous génériez de "
+#~ "nouveau le disque mémoire initial (« ramdisk »)."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Cet avertissement n'a de signification que si des ensembles RAID doivent "
+#~ "être lancés à partir du disque mémoire initial afin de pouvoir démarrer "
+#~ "le système. Si vous utilisez le démarrage automatique par le noyau, ou si "
+#~ "vous n'avez pas besoin de lancer d'ensemble RAID depuis le disque mémoire "
+#~ "initial, vous pouvez simplement poursuivre. Vous pouvez aussi choisir de "
+#~ "ne pas poursuivre et entrer « none » lorsqu'il vous sera demandé le nom "
+#~ "des ensembles RAID à démarrer à partir du disque mémoire initial."
diff --git a/debian/po/gl.po b/debian/po/gl.po
new file mode 100644
index 0000000..c52fc62
--- /dev/null
+++ b/debian/po/gl.po
@@ -0,0 +1,214 @@
+# Galician debconf translation of mdadm
+# Copyright (C) 2007-2008 Jacobo Tarrio <jtarrio@debian.org>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2008-02-06 23:45+0000\n"
+"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
+"Language-Team: Galician <proxecto@trasno.net>\n"
+"Language: gl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"¿Debería mdadm facer comprobacións mensuais de redundancia dos arrays MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Se o núcleo ten soporte para iso (en versións superiores á 2.6.14), mdadm "
+"pode facer comprobacións periódicas de redundancia dos arrays MD (RAIDs). "
+"Este pode ser un proceso intensivo en recursos, dependendo da configuración "
+"local, pero pode axudar a evitar algúns casos raros de perdas de datos. Teña "
+"en conta que esta é unha comprobación de só lectura a menos que se atopen "
+"erros; se se atopan erros, mdadm ha tratar de os arranxar, o que pode "
+"producir accesos de escritura aos soportes."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"A opción por defecto, se se activa, é facer as comprobacións o primeiro "
+"domingo de cada mes ás 01:16."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "¿Quere iniciar o servizo de monitorización de MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"O servizo de monitorización de MD (RAID) envía avisos por email en resposta "
+"a eventos importantes de MD (coma fallos nos discos)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Recoméndase activar esta opción."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatario para os avisos por email:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Introduza o enderezo de email do usuario que debe recibir os avisos por "
+"email de eventos importantes de MD."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Arrays MD necesarios para o sistema de ficheiros raíz"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Introduza \"all\" (todos), \"none\" (ningún) ou unha lista de "
+#~ "dispositivos separados por espazos, tales coma \"md0 md1\" ou \"md/1 "
+#~ "md/0\" (pódese omitir o \"/dev/\" do principio)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "para uso interno - só se precisa da descrición longa."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Se o sistema de ficheiros raíz do sistema está ubicado nun array MD "
+#~ "(RAID), hai que o iniciar no principio da secuencia de inicio. Se está "
+#~ "ubicado nun volume lóxico (LVM) que está nun MD, hai que iniciar os "
+#~ "arrays constituíntes."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Se sabe exactamente que arrays son necesarios para erguer o sistema de "
+#~ "ficheiros raíz, e se quere pospor o inicio dos demáis arrays ata un punto "
+#~ "posterior da secuencia de inicio, introduza aquí os arrays a iniciar. "
+#~ "Alternativamente, introduza \"all\" para iniciar tódolos arrays "
+#~ "dispoñibles."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Se non quere ou precisa de iniciar ningún array para o sistema de "
+#~ "ficheiros raíz, deixe a resposta en branco (ou introduza \"none\"). Este "
+#~ "pode ser o caso se está a empregar o autoinicio do núcleo ou non precisa "
+#~ "de ningún array para o inicio."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Houbo un erro: o nodo do dispositivo non existe"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Houbo un erro: non é un dispositivo de bloques"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Houbo un erro: non é un array MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Houbo un erro: o array non figura no ficheiro mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "¿Iniciar os arrays que non figuran en mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "O array indicado (${array}) non figura no ficheiro de configuración "
+#~ "(${config}). Polo tanto, non se pode arrincar no inicio do sistema, a "
+#~ "menos que corrixa o ficheiro de configuración e volva crear o disco RAM "
+#~ "inicial."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Este aviso só é relevante se precisa de iniciar arrays desde o disco RAM "
+#~ "inicial para poder iniciar o sistema. Se emprega autoinicio do núcleo ou "
+#~ "non precisa de iniciar arrays tan pronto como se cargue o disco RAM "
+#~ "inicial, pode continuar. De xeito alternativo, escolla non continuar e "
+#~ "introduza \"none\" cando se lle pregunte que arrays quere iniciar do "
+#~ "disco RAM inicial."
diff --git a/debian/po/it.po b/debian/po/it.po
new file mode 100644
index 0000000..da5f1d4
--- /dev/null
+++ b/debian/po/it.po
@@ -0,0 +1,215 @@
+# Italian debconf translation of mdadm
+# Copyright (C) 2008-2020 Luca Monducci <luca.mo@tiscali.it>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm italian debconf\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-09-16 20:02+0200\n"
+"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Far eseguire a mdadm i controlli mensili di ridondanza sugli array MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Se il kernel lo supporta (tutte le versioni successive la 2.6.14), mdadm può "
+"effettuare delle verifiche periodiche sulla ridondanza degli array MD "
+"(RAID). Questo è un processo che potrebbe richiedere molte risorse, in base "
+"alle impostazioni locali, ma può prevenire i rari casi di perdita di dati. "
+"Notare che questa verifica è di sola-lettura tranne quando riscontra degli "
+"errori; quando ci sono errori, mdadm prova a correggerli e potrebbe accedere "
+"in scrittura al supporto."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Se attivo, la configurazione predefinita prevede che il controllo sia "
+"eseguito la prima domenica di ogni mese alle 01.06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Far eseguire a mdadm il controllo quotidiano di degrado degli array?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm può controllare una volta al giorno il degrado degli array e l'assenza "
+"dei dischi di scorta in modo che questi eventi non passino inosservati."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Avviare il demone di monitoraggio MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Il demone di monitoraggio MD (RAID) invia delle notifiche via email quando "
+"si verificano eventi importanti (come la rottura di un disco)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Si raccomanda l'attivazione di questa funzione."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatario delle email di notifica:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Inserire l'indirizzo email dell'utente che deve ricevere le notifiche di "
+"eventi importanti legati al MD."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Array MD necessari per il file system di root:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Inserire \"all\", \"none\" oppure un elenco dei device separati da uno "
+#~ "spazio, per esempio \"md0 md1\" o \"md/1 md/d0\" (il \"/dev/\" iniziale "
+#~ "può essere omesso)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "uso interno - è necessaria solo la descrizione lunga."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Se il file system di root è su un array MD (RAID), è necessario attivare "
+#~ "tale array all'inizio della sequenza d'avvio. Se è su un volume logico "
+#~ "(LVM), il quale è su un MD, è necessario attivare tutti gli array che "
+#~ "costituiscono il volume."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Se si conoscono esattamente quali sono gli array da attivare per il file "
+#~ "system di root e si vuole rimandare l'attivazione di tutti gli altri "
+#~ "array a una fase successiva della sequenza d'avvio, inserire adesso gli "
+#~ "array da attivare. In alternativa, inserire \"all\" per attivare tutti "
+#~ "gli array disponibili."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Se non si ha bisogno o non si vuole attivare nessun array per il file "
+#~ "system di root, lasciare la risposta in bianco (oppure inserire \"none"
+#~ "\"). Questo potrebbe essere il caso se si utilizza l'attivazione "
+#~ "automatica da kernel oppure se non si ha bisogno di alcun array per "
+#~ "l'avvio."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Errore: il nodo del device non esiste"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Errore: non è un device a blocchi"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Errore: non è un array MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Errore: array non elencato nel file mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Avviare gli array non elencati in mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "L'array specificato (${array}) non è presente nel file di configurazione "
+#~ "(${config}): quindi non può essere attivato durante l'avvio senza "
+#~ "correggere il file di configurazione e ricreare il ramdisk iniziale."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Questo avviso è pertinente solo se è necessario attivare gli array dal "
+#~ "ramdisk iniziale per permettere l'avvio. Con l'avvio automatico da kernel "
+#~ "o se non è necessario attivare gli array così presto come al caricamento "
+#~ "del ramdisk iniziale, si può proseguire. In alternativa, scegliere di non "
+#~ "continuare e inserire \"none\" quando viene chiesto quali array attivare "
+#~ "dal ramdisk iniziale."
diff --git a/debian/po/ja.po b/debian/po/ja.po
new file mode 100644
index 0000000..3c81fe1
--- /dev/null
+++ b/debian/po/ja.po
@@ -0,0 +1,260 @@
+# Japanese debconf translation of mdadm
+# Copyright (C) 2008 Hideki Yamane (Debian-JP) <henrich@debian.or.jp>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 2.6.3+200709292116+4450e59-4\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2008-02-07 05:52+0900\n"
+"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "mdadm は、毎月 MD アレイの冗長性チェックを行いますか?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"カーネルがサポートしている場合 (バージョン 2.6.14 以降)、mdadm は定期的に MD "
+"アレイ (RAID) の冗長性チェックをすることが可能です。これは、設定に依存します"
+"がリソースを集中的に使用する動作です。しかし、稀なデータ消失をあらかじめ避け"
+"るのに役立つでしょう。これは、エラーが見つからない限りは読み込みチェックのみ"
+"であるのに注意してください。エラーが発見された場合、mdadm は修正しようとし"
+"て、結果的にメディアへ書き込みを行います。"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"有効にした場合、デフォルトでは毎月第一日曜 01:06 にチェックが実行されます。"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "MD 監視デーモンを起動しますか?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"MD (RAID) 監視デーモンは、重大な MD 関連のイベント (ディスク障害など) に対し"
+"てメールで通知を送ります。"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "この機能を有効にするのをお勧めします。"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "メール通知の宛先:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"MD 関連の重大なイベントが発生した際、メールでの通知を受け取る必要があるユーザ"
+"のメールアドレスを入力してください。"
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "ルートファイルシステムに必要な MD アレイ:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "'all' または 'none'、あるいはデバイスのリストを 'md0 md1' や 'md/1 md/d0' "
+#~ "のようにスペースで区切って入力してください (前に付く '/dev/' は省略可能で"
+#~ "す)。"
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "内部での利用について - でも、長い説明が必要です。"
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "あなたのシステムのルートファイルシステムが MD アレイ (RAID) 上に配置されて"
+#~ "いるならば、ブートシーケンスの初期段階で MD アレイを開始する必要がありま"
+#~ "す。ルートファイルシステムが MD のような論理ボリューム (LVM) 上にある場合"
+#~ "は、構成しているアレイ全ての開始が必要です。"
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "どのアレイがルートファイルシステムの立ち上げに必要かを正確に知っており、"
+#~ "ブートシーケンスの後の時点まで意図しているもの以外全てのアレイ起動を遅らせ"
+#~ "たい場合、ここで最初に起動するアレイを入力してください。そうでない場"
+#~ "合、'all' と入力して単に全ての利用可能なアレイを最初に立ち上げてください。"
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "ルートファイルシステムのために、どのアレイも必要ない、あるいはどのアレイも"
+#~ "起動したくは無いという場合は、空白のままに (あるいは 'none' と入力) してく"
+#~ "ださい。これは、カーネルで自動的に起動される場合や起動時にはアレイは不要で"
+#~ "あるという場合です。"
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "エラーが発生しました: デバイスノードが存在しません"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "エラーが発生しました: ブロックデバイスではありません"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "エラーが発生しました: MD アレイではありません"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "エラーが発生しました: mdadm.conf ファイルに記述されていないアレイです"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "mdadm.conf に記述されていないアレイを起動しますか?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "指定したアレイ (${array}) は設定ファイル (${config}) に記述されていませ"
+#~ "ん。そのため、設定ファイルを修正して initrd を再生成しなければブート時に起"
+#~ "動できません。"
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "この警告は、ブートできるようにアレイを initrd から起動する必要がある場合だ"
+#~ "け関係します。カーネルで自動的にアレイを起動するようにしている場合、あるい"
+#~ "は initrd がロードされる程早い段階でどのアレイも起動したくはない場合はその"
+#~ "まま続行できます。他の選択肢としては、起動の続行を中止し、どのアレイを "
+#~ "initrd から起動するかを尋ねられた際に 'none' と入力します。"
+
+#~ msgid ""
+#~ "WARNING! If you are using hard disks which have RAID superblocks from "
+#~ "earlier installations in different RAID arrays, you MUST zero each "
+#~ "superblock *before* activating the autostart feature."
+#~ msgstr ""
+#~ "警告! 以前のインストールによって他の RAID アレイに対する RAID superblock "
+#~ "を保持しているハードディスクを使っている場合、自動起動機能を有効にする"
+#~ "「前」に、その superblock をゼロで上書きすることが「必要」です。"
+
+#~ msgid ""
+#~ "To do this, do not start the RAID devices automatically. First, zero the "
+#~ "superblock (mdadm --zero-superblock /dev/mdX). Next, use `dpkg-"
+#~ "reconfigure mdadm` to reactivate the autostart feature."
+#~ msgstr ""
+#~ "これを行うには、RAID デバイスを自動的に起動してはいけません。まず、 "
+#~ "superblock をゼロで上書きします (mdadm --zero-superblock /dev/xxx)。 そし"
+#~ "て、自動起動機能を有効にするため、'dpkg-reconfigure mdadm' コマンドを実行"
+#~ "します。"
+
+#~ msgid ""
+#~ "You have the option to start all other arrays (those not needed for the "
+#~ "root filesystem) later in the boot sequence. Doing so will give you "
+#~ "greater control over the arrays with the mdadm configuration file. "
+#~ "Starting all arrays at boot-time may be safer though."
+#~ msgstr ""
+#~ "ブートシーケンスの後ろの方で (root ファイルシステムには必要ない) 他のアレ"
+#~ "イ全てを起動するという選択肢もあります。これを選べば、mdadm の設定ファイル"
+#~ "を使って、アレイについて様々な設定が出来るようになるでしょう。もっとも、起"
+#~ "動時に全てのアレイを起動するほうが安全ではあります。"
+
+#~ msgid ""
+#~ "If RAID devices are started automatically, all RAID devices are "
+#~ "discovered and assembled automatically at system startup. This option "
+#~ "should only be used if the md driver is compiled as a module. If it is "
+#~ "compiled into your kernel, the automatic startup will be performed at "
+#~ "boot time by the kernel and therefore you should not choose this option."
+#~ msgstr ""
+#~ "RAID デバイスが自動的に起動するようにすると、システム起動時に全ての RAID "
+#~ "デバイスが検出され、自動的に構成されます。このオプションは md ドライバがモ"
+#~ "ジュールとしてコンパイルされている場合のみに利用します。カーネルに組み込ん"
+#~ "でコンパイルしていた場合、システム起動時にカーネルによって自動起動が実行さ"
+#~ "れるので、このオプションでの選択はできません。"
+
+#~ msgid ""
+#~ "When the RAID monitor daemon runs, email notifications are sent when a "
+#~ "disk belonging to a RAID array fails or changes its status for some "
+#~ "reason."
+#~ msgstr ""
+#~ "RAID 監視デーモンが動作している場合、RAID アレイに属しているディスクが故障"
+#~ "するか何らかの理由で変化した際にメールで通知が送られます。"
diff --git a/debian/po/nl.po b/debian/po/nl.po
new file mode 100644
index 0000000..ab5fca6
--- /dev/null
+++ b/debian/po/nl.po
@@ -0,0 +1,141 @@
+# Dutch debconf translation of mdadm
+# Copyright (C) 2005-2008 Frans Pop <elendil@planet.nl>
+# Copyright (C) 2019 Maarten <Maarten@posteo.de>
+# Copyright (C) 2023 Frans Spiesschaert <Frans.Spiesschaert@yucom.be>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm_4.2+20230508-5\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2023-07-10 22:09+0200\n"
+"Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n"
+"Language-Team: Dutch <debian-l10n-dutch@lists.debian.org>\n"
+"Language: nl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr "geen systemd init-systeem gedetecteerd"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+"Er is gedetecteerd dat het rootbestandssysteem van dit systeem zich op een "
+"RAID-apparaat bevindt. Het kan dus nodig zijn om mdadm tijdens het opstarten "
+"uit te voeren om uw systeem correct op te starten."
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+"Vanaf nieuwere versies van het mdadm-pakket is init-systeemintegratie alleen "
+"beschikbaar voor systemd. Dit systeem lijkt een alternatief init-systeem te "
+"gebruiken waardoor uw systeem mogelijk niet meer kan worden opgestart."
+
+# Zie voor mijn notatie het artikel over 'disk array' in de Engelse Wikipedia. Zie ook het artikel over 'Disk-Array' in de Duitse Wikipedia. De Duitsers vertalen 'disk' dus niet naar 'Festplatte'.
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"Moet mdadm maandelijkse redundatiecontroles van de disk-arrays uitvoeren?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Als uw kernel dit ondersteunt (de versie is groter dan 2.6.14), dan kan "
+"mdadm periodiek de redundantie van uw disk-arrays controleren. Afhankelijk "
+"van de configuratie kan dit een zware systeembelasting teweegbrengen, maar "
+"het zou ook zeldzame gevallen van gegevensverlies kunnen voorkomen. De "
+"controle gebruikt alleen leesopdrachten, tenzij fouten worden gevonden. Als "
+"fouten worden gevonden, dan zal mdadm deze proberen te herstellen, hetgeen "
+"schrijfopdrachten tot gevolg kan hebben."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Als de controle is geactiveerd, dan wordt deze standaard uitgevoerd op elke "
+"eerste zondag van de maand om 01:06 uur 's nachts."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Moet mdadm eens per dag controleren op in verval geraakte disk-arrays?"
+
+# such events -> those events
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm kan eens per dag controleren op in verval geraakte disk-arrays en op "
+"ontbrekende reserveschijven om er zeker van te zijn dat die toestanden niet "
+"onopgemerkt blijven."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Wilt u de achtergronddienst voor de disk-array-monitor starten?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"De achtergronddienst voor de disk-array-monitor stuurt per e-mail berichten "
+"bij belangrijke gebeurtenissen (zoals de uitval van een harde schijf)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Gebruik van deze optie wordt aanbevolen."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Adres voor e-mailberichten:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Voer het e-mailadres in van de gebruiker die de e-mailberichten over "
+"belangrijke gebeurtenissen met betrekking tot de disk-arrays dient te "
+"ontvangen."
diff --git a/debian/po/pt.po b/debian/po/pt.po
new file mode 100644
index 0000000..ef9d6f6
--- /dev/null
+++ b/debian/po/pt.po
@@ -0,0 +1,218 @@
+# Portuguese debconf translation of mdadm
+# Copyright (C) 2008 Pedro Ribeiro <p.m42.ribeiro@gmail.com>
+# Copyright (C) 2020 Miguel Figueiredo <elmig@debianpt.org>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 2.6.3+200709292116+4450e59-4\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-10-10 09:47+0100\n"
+"Last-Translator: Miguel Figueiredo <elmig@debianpt.org>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"O mdadm deve correr verificações de redundância nos grupos MD mensalmente?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Se o kernel suportar (versões mais recentes que 2.6.14) o mdadm pode "
+"verificar periodicamente a redundância dos grupos MD (RAIDs). Isto pode ser "
+"um processo que requer muitos recursos, dependendo da sua configuração, mas "
+"pode prevenir casos raros de perda de dados. Notar que esta verificação é "
+"feita em modo de leitura a não ser que sejam encontrados erros; se forem "
+"encontrados erros, o mdadm tenta corrigi-los, o que pode resultar em "
+"acessosde escrita aos discos."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"O pré-definido, se ligado, é os testes serem executados no primeiro Domingo "
+"de cada mês às 01:06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Deve o mdadm verificar arrays degradados, uma vez por dia?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"O mdadm pode verificar uma vez por dia a existência de arrays degradados e "
+"spares em falta para assegurar que tais eventos não passam despercebidos."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Quer iniciar o deamon de monitorização do MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"O daemon monitor MD(RAID) envia notificações por email no caso de eventos "
+"importantes (tais como falha de um disco). Provavelmente quer activar esta "
+"opção."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "É recomendado activar esta opção."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatário de email para notificações:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Por favor, introduza o endereço de email do utilizador que deve receber as "
+"notificações de eventos MD importantes."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Grupos MD necessários para o sistema de ficheiros raiz:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Por favor, introduza 'all', 'none', ou uma lista de dispositivos "
+#~ "separados por espaços, tais como 'md0 md1' ou 'md/1 md/d0' (o '/dev/' "
+#~ "inicial pode ser omitido)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "para uso interno - apenas a descrição longa é necessária"
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Se o sistema de ficheiros de raiz do sistema estiver num grupo MD (RAID), "
+#~ "necessita de ser iniciado mais cedo na sequência de arranque. Se o seu "
+#~ "sistema de ficheiros de raiz estiver num volume lógico (LVM) que está no "
+#~ "MD, todos os grupos constituintes necessitam de ser iniciados."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Se souber exactamente que grupos são necessários para iniciar o sistema "
+#~ "de ficheiros raiz, e quiser adiar o inicio de todos os outros grupos para "
+#~ "mais tarde no processo de arranque, introduza os grupos aqui. "
+#~ "Alternativamente, introduza 'all' para iniciar todos os grupos "
+#~ "disponíveis."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Se não necessita ou deseja iniciar grupos para o sistema de ficheiros "
+#~ "raiz, deixe a resposta em branco (ou introduza 'none'). Isto vale no caso "
+#~ "de usar o auto-arranque do kernel ou não necessitar de grupos para o "
+#~ "arranque do sistema."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Ocorreu um erro: o nó do dispositivo não existe"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Ocorreu um erro: não é um dispositivo de bloco"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Ocorreu um erro: não é um grupo MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Ocorreu um erro: o grupo não está listado no ficheiro mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Iniciar grupos não listados no mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "O grupo especificado (${array}) não está listado no ficheiro de "
+#~ "configuração (${config}). Portanto, não pode ser iniciado durante o "
+#~ "processo de arranque, a não ser que corrija o ficheiro de configuração e "
+#~ "recrie o ramdisk inicial."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Este aviso só é relevante se houver necessidade de iniciar grupos a "
+#~ "partir do ramdisk durante o arranque do sistema. Se usar o auto-arranque "
+#~ "do kernel, ou não necessitar de iniciar os grupos tão cedo no processo de "
+#~ "arranque do sistema, pode simplesmente continuar. Em alternativa, escolha "
+#~ "não continuar e introduza 'none' quando perguntado sobre quais grupos "
+#~ "iniciar a partir do ramdisk inicial."
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
new file mode 100644
index 0000000..1fdf3cc
--- /dev/null
+++ b/debian/po/pt_BR.po
@@ -0,0 +1,313 @@
+# Brazilian Portuguese debconf translation of mdadm
+# Copyright (C) Felipe Augusto van de Wiel (faw) <faw@cathedrallabs.org>
+# Copyright (C) Adriano Rafael Gomes <adrianorg@debian.org>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-10-09 17:50-0300\n"
+"Last-Translator: Adriano Rafael Gomes <adrianorg@debian.org>\n"
+"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
+"org>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"O mdadm deve, mensalmente, executar checagens de redundância dos "
+"dispositivos MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Se o kernel tiver suporte (versões maiores que 2.6.14), o mdadm pode "
+"periodicamente checar a redundância dos seus dispositivos MD (RAIDs). Este "
+"pode ser um processo com uso intensivo dos recursos, dependendo da sua "
+"configuração local, mas pode ajudar a prevenir casos raros de perda de "
+"dados. Note que esta é uma checagem somente leitura, a menos que erros sejam "
+"encontrados. Se erros forem encontrados, o mdadm tentará corrigi-los, o que "
+"poderá resultar em acesso de escrita na mídia."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"O padrão, se ativado, é checar no primeiro domingo de cada mês à 01:06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "O mdadm deve checar diariamente por dispositivos degradados?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"O mdadm pode checar diariamente por dispositivos degradados e por "
+"dispositivos reserva em falta para garantir que tais eventos não passem "
+"despercebidos."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Você deseja iniciar o \"daemon\" de monitoramento MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"O \"daemon\" de monitoramento MD (RAID) envia e-mails de notificações em "
+"resposta a eventos MD importantes (como uma falha de disco)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "É recomendado habilitar esta opção."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatário para os e-mails de notificações:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Por favor, informe o endereço de e-mail do usuário que deverá receber os e-"
+"mails de notificações para estes eventos MD importantes."
+
+#, fuzzy
+#~| msgid "MD arrays needed for the root filesystem:"
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Dispositivos MD necessários para o sistema de arquivos raiz:"
+
+#, fuzzy
+#~| msgid ""
+#~| "Please enter a space-separated list of devices, 'all', or 'none'. You "
+#~| "may omit the leading '/dev/' and just enter e.g. \"md0 md1\", or \"md/1 "
+#~| "md/d0\"."
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Por favor, informe uma lista separada por espaços dos dispositivos, 'all' "
+#~ "ou 'none'. Você pode omitir a parte inicial '/dev/' e apenas informar, "
+#~ "por exemplo, \"md0 md1\", ou \"md/1 md/d0\"."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "para uso interno - apenas a descrição longa é necessária."
+
+#, fuzzy
+#~| msgid ""
+#~| "If your system has its root filesystem on an MD array (RAID), it needs "
+#~| "to be started early during the boot sequence. If your root filesystem is "
+#~| "on a logical volume (LVM), which is on MD, all constituent arrays need "
+#~| "to be started."
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Se o seu sistema tem o sistema de arquivos raiz em um dispositivo MD "
+#~ "(RAID), este precisa ser iniciado mais cedo durante a seqüência de "
+#~ "inicialização. Se o sistema de arquivos raiz está em um volume lógico "
+#~ "(LVM), que está em um MD, todos os dispositivos que o constituem precisam "
+#~ "ser iniciados."
+
+#, fuzzy
+#~| msgid ""
+#~| "If you know exactly which arrays are needed to bring up the root "
+#~| "filesystem, and you want to postpone starting all other arrays to a "
+#~| "later point in the boot sequence, enter the arrays to start here. "
+#~| "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Se você sabe exatamente quais dispositivos são necessários para ativar o "
+#~ "sistema de arquivos raiz, e você deseja adiar o início de todos os outros "
+#~ "dispositivos para um ponto posterior na seqüência de inicialização, "
+#~ "informe os dispositivos a serem iniciados aqui. Como alternativa, informe "
+#~ "'all' para simplesmente iniciar todos os dispositivos disponíveis."
+
+#, fuzzy
+#~| msgid ""
+#~| "If you do not need or want to start any arrays for the root filesystem, "
+#~| "leave the answer blank (or enter 'none'). This may be the case if you "
+#~| "are using kernel autostart or do not need any arrays to boot."
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Se você não precisa ou não quer iniciar quaisquer dispositivos para o "
+#~ "sistema de arquivos raiz, deixe a resposta em branco (ou informe 'none'). "
+#~ "Este pode ser o caso se você está usando \"kernel autostart\" ou não "
+#~ "precisa de quaisquer dispositivos para a inicialização."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Um erro ocorreu: o dispositivo (\"device node\") não existe"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Um erro ocorreu: não é um dispositivo de blocos"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Um erro ocorreu: não é um dispositivo MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Um erro ocorreu: dispositivo não listado no arquivo mdadm.conf"
+
+#, fuzzy
+#~| msgid "Proceed with starting arrays not listed in mdadm.conf?"
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Continuar com o início de dispositivos não listados no mdadm.conf?"
+
+#, fuzzy
+#~| msgid ""
+#~| "The array you have specified (${array}) is not listed in the "
+#~| "configuration file ${config}. Therefore it cannot be started during "
+#~| "boot, unless you correct the configuration file and recreate the initial "
+#~| "ramdisk."
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "O dispositivo que você especificou (${array}) não está listado no arquivo "
+#~ "de configuração ${config}. Portanto não pode ser iniciado durante a "
+#~ "inicialização, a menos que você corrija o arquivo de configuração e "
+#~ "recrie o \"ramdisk\" inicial."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Este aviso só é relevante se você precisa de dispositivos que sejam "
+#~ "iniciados a partir do \"ramdisk\" inicial para que seja possível "
+#~ "inicializar o computador. Se você usa \"kernel autostarting\", ou não "
+#~ "precisa de quaisquer dispositivos sendo iniciados tão logo o \"ramdisk\" "
+#~ "inicial seja carregado, você pode simplesmente continuar. "
+#~ "Alternativamente, escolha não continuar e informe 'none' quando "
+#~ "perguntado quais dispositivos iniciar a partir do \"ramdisk\" inicial."
+
+#~ msgid "Initialise the superblock if you reuse hard disks"
+#~ msgstr "Inicialize o superbloco caso você reutilize discos rígidos"
+
+#~ msgid ""
+#~ "WARNING! If you are using hard disks which have RAID superblocks from "
+#~ "earlier installations in different RAID arrays, you MUST zero each "
+#~ "superblock *before* activating the autostart feature."
+#~ msgstr ""
+#~ "AVISO! Se você estiver usando discos rígidos que já contêm superblocos "
+#~ "RAID de instalações anteriores em \"arrays\" RAID diferentes, você DEVE "
+#~ "zerar o superbloco *antes* de ativar o recurso de \"autostart\"."
+
+#~ msgid ""
+#~ "To do this, do not start the RAID devices automatically. First, zero the "
+#~ "superblock (mdadm --zero-superblock /dev/mdX). Next, use `dpkg-"
+#~ "reconfigure mdadm` to reactivate the autostart feature."
+#~ msgstr ""
+#~ "Para fazê-lo, não inicie os dispositivos RAID automaticamente. Primeiro, "
+#~ "zere os superblocos (mdadm --zero-superblock /dev/mdX). Em seguida, use "
+#~ "`dpkg-reconfigure mdadm` para reativar o recurso de \"autostart\"."
+
+#~ msgid ""
+#~ "You have the option to start all other arrays (those not needed for the "
+#~ "root filesystem) later in the boot sequence. Doing so will give you "
+#~ "greater control over the arrays with the mdadm configuration file. "
+#~ "Starting all arrays at boot-time may be safer though."
+#~ msgstr ""
+#~ "Você tem a opção de iniciar todos os \"arrays\" (aqueles que não são "
+#~ "necessários pelo sistema de arquivos raiz) posteriormente na seqüência de "
+#~ "inicialização. Fazendo isto, você terá um controle maior sobre os \"arrays"
+#~ "\" com o arquivo de configuração mdadm. No entanto, iniciar todos os "
+#~ "\"arrays\" durante a inicialização pode ser mais seguro."
+
+#~ msgid ""
+#~ "If RAID devices are started automatically, all RAID devices are "
+#~ "discovered and assembled automatically at system startup. This option "
+#~ "should only be used if the md driver is compiled as a module. If it is "
+#~ "compiled into your kernel, the automatic startup will be performed at "
+#~ "boot time by the kernel and therefore you should not choose this option."
+#~ msgstr ""
+#~ "Caso os dispositivos RAID sejam iniciados automaticamente, todos os "
+#~ "dispositivos RAID serão detectados e montados automaticamente na "
+#~ "inicialização do sistema operacional. Esta opção deverá ser usada somente "
+#~ "caso o driver md esteja compilado como módulo. Caso o mesmo esteja "
+#~ "compilado embutido em seu kernel, a inicialização automática será "
+#~ "executada em tempo de inicialização pelo próprio kernel e, portanto, você "
+#~ "não deverá e nem precisará escolher esta opção."
+
+#~ msgid ""
+#~ "When the RAID monitor daemon runs, email notifications are sent when a "
+#~ "disk belonging to a RAID array fails or changes its status for some "
+#~ "reason."
+#~ msgstr ""
+#~ "Quando o daemon monitorador RAID é executado, notificações via e-mail são "
+#~ "enviadas quando um disco pertencente a uma array RAID falha ou muda seu "
+#~ "status por qualquer razão."
+
+#~ msgid "Which user should get the email notification?"
+#~ msgstr "Qual usuário deve receber o e-mail de notificação ?"
diff --git a/debian/po/ro.po b/debian/po/ro.po
new file mode 100644
index 0000000..51cee32
--- /dev/null
+++ b/debian/po/ro.po
@@ -0,0 +1,146 @@
+# Romanian debconf translation of mdadm
+# Copyright (C) 2023 Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 4.2+20230508-4\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2023-06-27 22:27+0200\n"
+"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
+"Language-Team: Romanian <debian-l10n-romanian@lists.debian.org>\n"
+"Language: ro\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && "
+"n%100<=19) ? 1 : 2);\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr "nu a fost detectat sistemul de inițiere (init) „systemd”"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+"Sistemul de fișiere rădăcină al acestui sistem a fost detectat ca fiind pe un "
+"dispozitiv RAID, astfel încât este posibil ca «mdadm» să fie necesar să "
+"ruleze în timpul pornirii pentru a porni corect sistemul."
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+"Începând cu versiunile mai noi ale pachetului „mdadm”, integrarea sistemului "
+"de inițiere (init) este disponibilă numai pentru „systemd”. Acest sistem pare "
+"să utilizeze un sistem de inițiere alternativ care ar putea sau nu să vă lase "
+"sistemul incapabil de-a porni."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"Doriți ca «mdadm» să efectueze verificări lunare de redundanță ale "
+"ansamblurilor de discuri-multiple „MD” (Multi-Disk)?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Dacă nucleul acceptă această operație (versiunile mai mari decât 2.6.14), "
+"«mdadm» poate verifica periodic redundanța ansamblurilor de discuri multiple "
+"(RAID = Redundant Array of Independent Disks). Acesta poate fi un proces care "
+"necesită multe resurse, în funcție de configurația locală, dar ar putea ajuta "
+"la prevenirea cazurilor rare de pierdere de date. Rețineți că aceasta este o "
+"verificare numai în citire, cu excepția cazului în care sunt găsite erori; "
+"dacă se găsesc erori, «mdadm» va încerca să le corecteze, ceea ce poate "
+"conduce la un acces de scriere pe mediile de stocare (discuri)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"În mod implicit, dacă este activată, verificarea se va realiza în prima "
+"duminică a fiecărei luni la ora 01:06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+"Doriți ca «mdadm» să verifice o dată pe zi pentru ansambluri de discuri "
+"multiple degradate?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"«mdadm» poate verifica o dată pe zi pentru ansambluri de discuri multiple "
+"degradate și discuri de rezervă lipsă, pentru a se asigura că astfel de "
+"evenimente nu trec neobservate."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Doriți să porniți demonul de monitorizare de discuri-multiple „MD”?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Demonul de monitorizare de discuri multiple „MD” (RAID) trimite notificări "
+"prin e-mail ca răspuns la evenimente importante în discurile multiple "
+"„MD” (cum ar fi o eroare de disc)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Se recomandă activarea acestei opțiuni."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Destinatarul notificărilor prin e-mail:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Introduceți adresa de e-mail a utilizatorului care ar trebui să primească "
+"notificări prin e-mail pentru evenimentele de discuri multiple „MD” "
+"importante."
diff --git a/debian/po/ru.po b/debian/po/ru.po
new file mode 100644
index 0000000..3d581cf
--- /dev/null
+++ b/debian/po/ru.po
@@ -0,0 +1,219 @@
+# Russian debconf translation of mdadm
+# Copyright (C) 2006-2020 Yuri Kozlov <yuray@komyakino.ru>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 4.1-6\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-09-16 06:37+0300\n"
+"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"Должен ли mdadm запускать ежемесячную проверку избыточности на MD-массивах?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Если это поддерживается ядром (>> 2.6.14), mdadm может периодически "
+"проверять избыточность MD-массивов (RAID-ов). Это может быть ресурсоёмким "
+"процессом в зависимости от настройки, но он может помочь предотвратить "
+"редкие случаи потери данных. Заметим, что пока не обнаружено ошибок, "
+"выполняется только чтение; если обнаруживается ошибка, mdadm попытается "
+"исправить её, что может привести к записи на носитель."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Если ответить утвердительно, то по умолчанию проверка выполняется в первое "
+"воскресенье каждого месяца в 01:06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+"Должен ли mdadm запускать ежедневную проверку наличия повреждённых массивов?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm может ежедневно проверять наличие повреждённых массивов и отсутствие "
+"резерва, чтобы эти события не остались незамеченными."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Запускать службу слежения MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Служба слежения MD (RAID) посылает почтовые уведомления в случае "
+"возникновения важных событий MD (таких как отказ диска)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Рекомендуется ответить утвердительно."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Получатель уведомительных писем:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Введите адрес электронной почты пользователя, который будет получать "
+"почтовые уведомления о важных событиях MD."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "MD-массивы, необходимые для корневой файловой системы:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Введите список устройств через пробел, слово 'all' или 'none'. Вы можете "
+#~ "не указывать начальную часть пути типа '/dev/', а просто вводить имена "
+#~ "устройств, например 'md0 md1' или 'md/1 md/d0'."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr ""
+#~ "для внутреннего пользования - нужно использовать только длинное описание."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Если в системе корневая файловая система расположена на MD-массиве "
+#~ "(RAID), он должен быть запущен в самом начале процесса загрузки. Если "
+#~ "корневая файловая система расположена на логическом томе (LVM), который "
+#~ "расположен на MD, то должны быть запущены все составляющие массивы."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Если вы точно знаете, какие массивы требуются для получения "
+#~ "работоспособной корневой файловой системы и хотите отложить запуск "
+#~ "остальных массивов на более поздний момент в процессе загрузки, то "
+#~ "введите их здесь. Иначе, введите слово 'all', чтобы просто запустить все "
+#~ "доступные массивы."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Если вам это не нужно, или вы хотите запускать все массивы для корневой "
+#~ "файловой системы, оставьте это поле пустым (или введите слово 'none'). "
+#~ "Этот вариант подходит, если вы используете автоматический запуск из ядра "
+#~ "или если для загрузки массивы ненужны."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Произошла ошибка: нода устройства не существует"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Произошла ошибка: устройство не является блочным"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Произошла ошибка: это не MD-массив"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Произошла ошибка: массив не описан в файле mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Запустить массивы, неописанные в mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Указанный вами массив (${array}) не описан в конфигурационном файле "
+#~ "(${config}). Поэтому он не может быть запущен при старте машины, пока вы "
+#~ "не исправите конфигурационный файл и не пересоздадите первоначальный "
+#~ "ramdisk."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Данное предупреждение уместно только, если вам требуется запускать "
+#~ "массивы из первоначального ramdisk для загрузки машины. Если вы "
+#~ "используете автоматический запуск из ядра или вам не нужны массивы для "
+#~ "загрузки на этапе загрузки первоначального ramdisk, вы можете просто "
+#~ "продолжить. Иначе, выберите не продолжать и введите 'none', когда вам "
+#~ "предложат выбрать массивы для запуска из первоначального ramdisk."
diff --git a/debian/po/sk.po b/debian/po/sk.po
new file mode 100644
index 0000000..b783e37
--- /dev/null
+++ b/debian/po/sk.po
@@ -0,0 +1,212 @@
+# Slovak debconf translation of mdadm
+# Copyright (C) 2011-2020 Slavko <linux@slavino.sk>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 4.1-6\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2020-09-15 12:39+0200\n"
+"Last-Translator: Slavko <linux@slavino.sk>\n"
+"Language-Team: slovenčina <linux@slavino.sk>\n"
+"Language: sk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Má mdadm spúšťať mesačnú kontrolu redundancie polí MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Ak to jadro podporuje (verzie novšie ako 2.6.14), mdadm môže periodicky "
+"kontrolovať redundanciu polí MD (RAIDov). Tento proces môže byť (v "
+"závislosti od lokálneho nastavenia) náročný na zdroje systému, ale môže "
+"pomôcť pri predchádzaní vzácnym prípadom straty dát. Pamätajte, že, pokiaľ "
+"nie sú nájdené chyby, je to kontrola len čítaním, až keď sú nájdené chyby, "
+"mdadm sa ich pokúsi opraviť, čo môže mať za následok zápis na médium."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Predvolene je vypnuté, ak túto možnosť zapnete, bude kontrola vykonávaná "
+"každú prvú nedeľu mesiaca o 01:06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Má mdadm raz denne zisťovať degradované polia?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"mdadm môže raz denne zisťovať degradované polia a chýbajúce náhradné "
+"zariadenia, aby zaistil, že takéto udalosti neostanú nepovšimnuté."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Chcete spustiť démona monitorovania MD?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Monitorovací démon MD (RAID) posiela upozornenia emailom, ako reakcie na "
+"dôležité udalosti MD (napr. zlyhanie disku)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Povolenie tejto možnosti je odporúčané."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Adresát emailových upozornení:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Prosím, zadajte emailovú adresu používateľa, ktorý má dostávať emailové "
+"upozornenia na dôležité udalosti MD."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Polia MD, potrebné pre koreň súborového systému:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Prosím, zadajte „all”, „none” alebo medzerou oddelený zoznam zariadení, "
+#~ "napr. „md0 md1” alebo „md/1 md/d0” (počiatočné „/dev/” môže byť "
+#~ "vynechané)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "na interné použitie – potrebný je len dlhý popis."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Ak je koreň súborového systému umiestnený na poli MD (RAID), musí byť "
+#~ "spustený počas zavádzania systému. Ak je koreň umiestnený na logickom "
+#~ "zväzku (LVM), ktorý je na MD, musia byť spustené všetky súvisiace polia."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Ak viete presne, ktoré polia sú potrebné na pripojenie koreňa súborového "
+#~ "systému a chcete odložiť štart všetkých ostatných polí na neskorší okamih "
+#~ "zavádzania, zadajte tu polia, ktoré majú byť spustené. Alebo zadajte "
+#~ "„all”, čím budú jednoducho spustené všetky dostupné polia."
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Ak pre koreň súborového systému nepotrebujete alebo nechcete spúšťať "
+#~ "žiadne polia, nechajte odpoveď prázdnu (alebo zadajte „none”). Tento "
+#~ "prípad môže nastať, ak používate automatický štart polí priamo v jadre "
+#~ "alebo nepotrebujete pri zavádzaní žiadne polia."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Nastala chyba: uzol zariadenia neexistuje"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Nastala chyba: nie je blokové zariadenie"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Nastala chyba: nie je pole MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Nastala chyba: pole nie je uvedené v súbore mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Spustiť polia, ktoré nie sú uvedené v mdadm.conf?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Zadané pole (${array}) nie je uvedené v konfiguračnom súbore (${config}), "
+#~ "a preto nemôže byť spustené počas zavádzania, až kým neopravíte "
+#~ "konfiguračný súbor a nevytvoríte nový počiatočný ramdisk (initrd)."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Toto varovanie je dôležité, len ak potrebujete aby boli polia spúšťané z "
+#~ "počiatočného ramdisku, aby boli dostupné počas zavádzania. Ak používate "
+#~ "automatické spúšťanie polí priamo z jadra, alebo ak nepotrebujte aby boli "
+#~ "polia spúšťané tak skoro (z počiatočného ramdisku), môžete prosto "
+#~ "pokračovať. Alebo môžete zvoliť nepokračovať a odpovedať „none” na "
+#~ "otázku, ktoré polia majú byť spúšťané z počiatočného ramdisku."
diff --git a/debian/po/sv.po b/debian/po/sv.po
new file mode 100644
index 0000000..e9cc361
--- /dev/null
+++ b/debian/po/sv.po
@@ -0,0 +1,135 @@
+# Translation of mdadm debconf template to Swedish
+# Copyright (C) 2008-2023 Martin Bagge <brother@persilja.net>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm_2.6.7-3_sv\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2023-12-08 11:11+0100\n"
+"Last-Translator: Martin Bagge <brother@persilja.net>\n"
+"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr "hittade inget systemd init-system"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+"Rot-filsystemet verkar finnas på en RAID-enhet vilket leder till att mdadm "
+"antagligen behöver köras under uppstartssekvensen."
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+"I nyare versioner av mdadm är integrationen med init-system enbart "
+"tillgänglig för systemd. Denna maskin verkar använda ett alternativt init-"
+"system vilket kan leda till att maskinen inte kan starta korrekt."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr "Ska mdadm köra månatliga redundanskontroller av MD-kedjorna?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Om din kärna har stöd för det (versioner senare än 2.6.14), kan mdadm "
+"periodvis kontrollera redundansen för dina MD-kedjor (RAID). Det här kan "
+"vara en resurskrävande process, beroende på din konfiguration, men den kan "
+"hjälpa till att förhindra ovanliga fall av dataförluster. Observera att det "
+"är en skrivskyddad kontroll såvida inte fel påträffas; om fel hittas kommer "
+"mdadm försöka att rätta till dem, vilket kan leda till skrivåtkomst till "
+"mediet."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Standardvärdet, om påslagen, är att kontrollera på den första söndagen i "
+"varje månad klockan 01.06."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr "Ska mdadm kontrollera RAID-enheterna en gång om dagen?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+"Mdadm kan göra en daglig kontroll av RAID-enheterna och kontrollera status "
+"samt om det finns reservdiskar tillgängligt. På det sättet minskar risken "
+"att sådana kontroller missas."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Vill du starta MD-övervakningsdemonen?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"MD-övervakningsdemonen (RAID) skickar e-postnotifieringar för viktiga MD-"
+"händelser (såsom ett diskfel)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Att aktivera denna funktion rekommenderas."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Mottagare av e-postnotifieringar:"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Ange e-postadressen till den användare som ska ta emot e-postnotifieringar "
+"för dessa viktiga MD-händelser."
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 0000000..55c82d7
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,115 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the mdadm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
diff --git a/debian/po/vi.po b/debian/po/vi.po
new file mode 100644
index 0000000..a07bc27
--- /dev/null
+++ b/debian/po/vi.po
@@ -0,0 +1,215 @@
+# Vietnamese debconf translation of mdadm
+# Copyright (C) 2005-2008 Clytie Siddall <clytie@riverland.net.au>
+# This file is distributed under the same license as the mdadm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mdadm 2.6.3+200709292116+4450e59-4\n"
+"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
+"POT-Creation-Date: 2023-06-18 07:24+0200\n"
+"PO-Revision-Date: 2008-02-23 17:40+1030\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid "no systemd init-system detected"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"The root filesystem of this system was detected to be on a RAID device, so "
+"mdadm might be required to run during boot to properly start your system."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mdadm.templates:2001
+msgid ""
+"Beginning with newer versions of the mdadm package, init-system integration "
+"is available for systemd only. This system seems to use an alternative init-"
+"system which might or might not leave your system unbootable."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
+msgstr ""
+"mdadm có nên chạy việc kiểm tra thừa hàng tháng trên những mảng MD không?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"If the kernel supports it (versions greater than 2.6.14), mdadm can "
+"periodically check the redundancy of MD arrays (RAIDs). This may be a "
+"resource-intensive process, depending on the local setup, but it could help "
+"prevent rare cases of data loss. Note that this is a read-only check unless "
+"errors are found; if errors are found, mdadm will try to correct them, which "
+"may result in write access to the media."
+msgstr ""
+"Nếu hạt nhân có phải hỗ trợ (các phiên bản sau 2.6.14) thì mdadm có thể kiểm "
+"tra theo chu kỳ tình thừa của các mảng MD (RAID). Tiến trình này có thể "
+"chiếm nhiều tài nguyên hệ thống, phụ thuộc vào thiết lập cục bộ, nhưng nó có "
+"thể giúp ngăn cản trường hợp mất dữ liệu (ít có). Ghi chú rằng việc kiểm tra "
+"này là chỉ đọc: gặp lỗi thì mdadm sẽ thử sửa chữa, mà có thể gây ra truy cập "
+"ghi vào vật chứa."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:3001
+msgid ""
+"The default, if turned on, is to check on the first Sunday of every month at "
+"01:06."
+msgstr ""
+"Giá trị mặc định, nếu được bật, là chạy những việc kiểm tra vào ngày hôm Chủ "
+"Nhật thứ nhất của mỗi tháng, vào lúc 01:06 giờ (giờ ti)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid "Should mdadm check once a day for degraded arrays?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:4001
+msgid ""
+"mdadm can check once a day for degraded arrays and missing spares to ensure "
+"that such events don't go unnoticed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Do you want to start the MD monitoring daemon?"
+msgstr "Bạn có muốn khởi chạy trình nền theo dõi MD không?"
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid ""
+"The MD (RAID) monitor daemon sends email notifications in response to "
+"important MD events (such as a disk failure)."
+msgstr ""
+"Trình nền theo dõi MD (RAID) gửi thư thông báo hưởng ứng dữ kiện MD quan "
+"trọng (v.d. đĩa bị hỏng)."
+
+#. Type: boolean
+#. Description
+#: ../mdadm.templates:5001
+msgid "Enabling this option is recommended."
+msgstr "Khuyên bạn hiệu lực tùy chọn này."
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid "Recipient for email notifications:"
+msgstr "Người nhận thư thông báo :"
+
+#. Type: string
+#. Description
+#: ../mdadm.templates:6001
+msgid ""
+"Please enter the email address of the user who should get the email "
+"notifications for important MD events."
+msgstr ""
+"Hãy nhập địa chỉ thư của người dùng nên nhận thư thông báo về dữ kiện MD "
+"quan trọng."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Các mảng MD cần thiết cho hệ thống tập tin gốc:"
+
+#~ msgid ""
+#~ "Please enter 'all', 'none', or a space-separated list of devices such as "
+#~ "'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted)."
+#~ msgstr ""
+#~ "Hãy nhập « all » (tất cả), « none » (không có), hoặc một danh sách các "
+#~ "thiết bị định giới bằng dấu cách như « md0 md1 » hoặc « md/1 md/d0 » (có "
+#~ "thể bỏ sót phần « /dev/ » đi trước)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "để sử dụng nội bộ — chỉ cần thiết mô tả dài."
+
+#~ msgid ""
+#~ "If the system's root file system is located on an MD array (RAID), it "
+#~ "needs to be started early during the boot sequence. If it is located on a "
+#~ "logical volume (LVM), which is on MD, all constituent arrays need to be "
+#~ "started."
+#~ msgstr ""
+#~ "Nếu hệ thống tập tin gốc của hệ thống nằm trên một mảng MD (RAID) thì cần "
+#~ "phải khởi chạy nó sớm trong tiến trình khởi động. Nếu nó nằm trên một "
+#~ "khối tin hợp lý (LVM) mà lần lượt nằm trên một MD thì cần phải khởi chạy "
+#~ "tất cả các mảng thành phần."
+
+#~ msgid ""
+#~ "If you know exactly which arrays are needed to bring up the root file "
+#~ "system, and you want to postpone starting all other arrays to a later "
+#~ "point in the boot sequence, enter the arrays to start here. "
+#~ "Alternatively, enter 'all' to simply start all available arrays."
+#~ msgstr ""
+#~ "Nếu bạn biết chính xác những mảng nào cần thiết để kích hoạt hệ thống tập "
+#~ "tin gốc, và bạn muốn hoãn việc khởi chạy các mảng khác tới một điểm sau "
+#~ "trong dãy khởi động, hãy nhập vào đây các mảng cần khởi chạy. Hoặc nhập « "
+#~ "all » (tất cả) để khởi chạy đơn giản tất cả các mảng sẵn sàng. "
+
+#~ msgid ""
+#~ "If you do not need or want to start any arrays for the root file system, "
+#~ "leave the answer blank (or enter 'none'). This may be the case if you are "
+#~ "using kernel autostart or do not need any arrays to boot."
+#~ msgstr ""
+#~ "Nếu bạn không cần hoặc muốn khởi chạy mảng nào cho hệ thống tập tin gốc, "
+#~ "hãy bỏ trống câu trả lời này (hoặc nhập « none » [không có]). Trường hợp "
+#~ "này có thể xảy ra nếu bạn sử dụng khả năng tự động khởi động hạt nhân "
+#~ "(kernel autostart), hoặc không cần mảng nào để khởi động máy tính."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Gặp lỗi: nút thiết bị không tồn tại"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Gặp lỗi: không phải là một thiết bị khối"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Gặp lỗi: không phải là một mảng MD"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "Gặp lỗi: mảng không được liệt kê trong tập tin cấu hình « mdadm.conf »"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr ""
+#~ "Khởi chạy các mảng không được liệt kê trong tập tin cấu hình « mdadm.conf "
+#~ "» không?"
+
+#~ msgid ""
+#~ "The specified array (${array}) is not listed in the configuration file "
+#~ "(${config}). Therefore, it cannot be started during boot, unless you "
+#~ "correct the configuration file and recreate the initial ramdisk."
+#~ msgstr ""
+#~ "Mảng bạn đã xác định (${array}) không được liệt kê trong tập tin cấu hình "
+#~ "${config}. Vì vậy nó không thể được khởi chạy trong khi khởi động, nếu "
+#~ "bạn không sửa tập tin cấu hình và tạo lại đĩa RAM đầu tiên."
+
+#~ msgid ""
+#~ "This warning is only relevant if you need arrays to be started from the "
+#~ "initial ramdisk to be able to boot. If you use kernel autostarting, or do "
+#~ "not need any arrays to be started as early as the initial ramdisk is "
+#~ "loaded, you can simply continue. Alternatively, choose not to continue "
+#~ "and enter 'none' when prompted which arrays to start from the initial "
+#~ "ramdisk."
+#~ msgstr ""
+#~ "Cảnh báo này chỉ là thích hợp nếu bạn cần thiết mảng được khởi chạy từ "
+#~ "đĩa RAM đầu tiên, để có thể khởi động được. Nếu bạn sử dụng khả năng tự "
+#~ "động khởi chạy hạt nhân (kernel autostart), hoặc không cần mảng nào được "
+#~ "khởi chạy một khi nạp đĩa RAM đầu tiên, bạn đơn giản có thể tiếp tục lại. "
+#~ "Hoặc chọn không tiếp tục, và nhập « none » (không có) khi được nhắc nhập "
+#~ "những mảng nào cần khởi chạy từ đĩa RAM đầu tiên."
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..73813bc
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,43 @@
+#!/usr/bin/make -f
+# Copyright © 2001-2005 Mario Jou/3en <joussen@debian.org>
+# Copyright © 2005-2008 Martin F. Krafft <madduck@debian.org>
+# Copyright © 2021 Felix Lechner <felix.lechner@lease-up.com>
+# Distributable under the terms of the GNU GPL version 2.
+#
+
+#export DH_VERBOSE=1
+
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/vendor.mk
+
+export CROSS_COMPILE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-
+export LDFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS)
+export CXFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS) \
+ $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS)
+
+export DEBIAN="yes"
+export EXTRAVERSION=$(DEB_VENDOR) $(DEB_VERSION)
+
+# these are reversed in the Makefile
+export CONFFILE="/etc/mdadm/mdadm.conf"
+export CONFFILE2="/etc/mdadm.conf"
+
+%:
+ dh $@
+
+execute_after_dh_auto_clean:
+ # remove generated files
+ for file in $$(find . -type f -name "*.in"); \
+ do \
+ rm -f "$$(dirname "$${file}")"/"$$(basename "$${file}" .in)"; \
+ done
+
+override_dh_install:
+ $(MAKE) install-systemd DESTDIR=$(CURDIR)/debian/tmp
+ dh_install
+
+ mkdir -p $(CURDIR)/debian/mdadm/etc/mdadm
+ chmod +x $(CURDIR)/debian/mdadm/usr/share/mdadm/mdcheck
+
+override_dh_installsystemd:
+ dh_installsystemd -pmdadm mdcheck_continue.timer mdcheck_start.timer mdmonitor-oneshot.timer
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..7d03b20
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,6 @@
+Tests: test-installed
+Restrictions: needs-root, isolation-machine
+Depends:
+ fdisk,
+ mdadm,
+ udev,
diff --git a/debian/tests/test-installed b/debian/tests/test-installed
new file mode 100755
index 0000000..98ab4af
--- /dev/null
+++ b/debian/tests/test-installed
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./test
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..7936b35
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,7 @@
+Archive: kernel.org
+Repository: "https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/"
+Repository-Browse: "https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/"
+Bug-Submit: "http://vger.kernel.org/vger-lists.html#linux-raid"
+Bug-Database: "https://marc.info/?l=linux-raid"
+Documentation: "https://raid.wiki.kernel.org/index.php/Linux_Raid"
+Other-References: "https://mirrors.edge.kernel.org/pub/linux/utils/raid/mdadm/"
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..127e519
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="uversionmangle=s/-rc/~rc/, \
+ dversionmangle=s/\+\d\S+//" \
+https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-([.[:digit:]]+(?:-rc[[:digit:]]+)?).tar.gz
diff --git a/external-reshape-design.txt b/documentation/external-reshape-design.txt
index e4cf4e1..e4cf4e1 100644
--- a/external-reshape-design.txt
+++ b/documentation/external-reshape-design.txt
diff --git a/mdadm.conf-example b/documentation/mdadm.conf-example
index 35a75d1..35a75d1 100644
--- a/mdadm.conf-example
+++ b/documentation/mdadm.conf-example
diff --git a/mdmon-design.txt b/documentation/mdmon-design.txt
index f09184a..f09184a 100644
--- a/mdmon-design.txt
+++ b/documentation/mdmon-design.txt
diff --git a/drive_encryption.c b/drive_encryption.c
new file mode 100644
index 0000000..27da962
--- /dev/null
+++ b/drive_encryption.c
@@ -0,0 +1,724 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Read encryption information for Opal and ATA devices.
+ *
+ * Copyright (C) 2024 Intel Corporation
+ * Author: Blazej Kucman <blazej.kucman@intel.com>
+ */
+
+#include "mdadm.h"
+
+#include <asm/types.h>
+#include <linux/nvme_ioctl.h>
+#include <scsi/sg.h>
+#include <scsi/scsi.h>
+#include "drive_encryption.h"
+
+#define DEFAULT_SECTOR_SIZE (512)
+
+/*
+ * Opal defines
+ * TCG Storage Opal SSC 2.01 chapter 3.3.3
+ * NVM ExpressTM Revision 1.4c, chapter 5
+ */
+#define TCG_SECP_01 (0x01)
+#define TCG_SECP_00 (0x00)
+#define OPAL_DISCOVERY_COMID (0x0001)
+#define OPAL_LOCKING_FEATURE (0x0002)
+#define OPAL_IO_BUFFER_LEN 2048
+#define OPAL_DISCOVERY_FEATURE_HEADER_LEN (4)
+
+/*
+ * NVMe defines
+ * NVM ExpressTM Revision 1.4c, chapter 5
+ */
+#define NVME_SECURITY_RECV (0x82)
+#define NVME_IDENTIFY (0x06)
+#define NVME_IDENTIFY_RESPONSE_LEN 4096
+#define NVME_OACS_BYTE_POSITION (256)
+#define NVME_IDENTIFY_CONTROLLER_DATA (1)
+
+/*
+ * ATA defines
+ * ATA/ATAPI Command Set ATA8-ACS
+ * SCSI / ATA Translation - 3 (SAT-3)
+ * SCSI Primary Commands - 4 (SPC-4)
+ * AT Attachment-8 - ATA Serial Transport (ATA8-AST)
+ * ATA Command Pass-Through
+ */
+#define ATA_IDENTIFY (0xec)
+#define ATA_TRUSTED_RECEIVE (0x5c)
+#define ATA_SECURITY_WORD_POSITION (128)
+#define HDIO_DRIVE_CMD (0x031f)
+#define ATA_TRUSTED_COMPUTING_POS (48)
+#define ATA_PASS_THROUGH_12 (0xa1)
+#define ATA_IDENTIFY_RESPONSE_LEN (512)
+#define ATA_PIO_DATA_IN (4)
+#define SG_CHECK_CONDITION (0x02)
+#define ATA_STATUS_RETURN_DESCRIPTOR (0x09)
+#define ATA_PT_INFORMATION_AVAILABLE_ASCQ (0x1d)
+#define ATA_PT_INFORMATION_AVAILABLE_ASC (0x00)
+#define ATA_INQUIRY_LENGTH (0x0c)
+#define SG_INTERFACE_ID 'S'
+#define SG_IO_TIMEOUT (60000)
+#define SG_SENSE_SIZE (32)
+#define SENSE_DATA_CURRENT_FIXED (0x70)
+#define SENSE_DATA_CURRENT_DESC (0x72)
+#define SENSE_CURRENT_RES_DESC_POS (8)
+#define SG_DRIVER_SENSE (0x08)
+
+typedef enum drive_feature_support_status {
+ /* Drive feature is supported. */
+ DRIVE_FEAT_SUP_ST = 0,
+ /* Drive feature is not supported. */
+ DRIVE_FEAT_NOT_SUP_ST,
+ /* Drive feature support check failed. */
+ DRIVE_FEAT_CHECK_FAILED_ST
+} drive_feat_sup_st;
+
+/* TCG Storage Opal SSC 2.01 chapter 3.1.1.3 */
+typedef struct opal_locking_feature {
+ /* feature header */
+ __u16 feature_code;
+ __u8 reserved : 4;
+ __u8 version : 4;
+ __u8 description_length;
+ /* feature description */
+ __u8 locking_supported : 1;
+ __u8 locking_enabled : 1;
+ __u8 locked : 1;
+ __u8 media_encryption : 1;
+ __u8 mbr_enabled : 1;
+ __u8 mbr_done : 1;
+ __u8 mbr_shadowing_not_supported : 1;
+ __u8 hw_reset_for_dor_supported : 1;
+ __u8 reserved1[11];
+} __attribute__((__packed__)) opal_locking_feature_t;
+
+/* TCG Storage Opal SSC 2.01 chapter 3.1.1.1 */
+typedef struct opal_level0_header {
+ __u32 length;
+ __u32 version;
+ __u64 reserved;
+ __u8 vendor_specific[32];
+} opal_level0_header_t;
+
+/**
+ * NVM ExpressTM Revision 1.4c, Figure 249
+ * Structure specifies only OACS filed, which is needed in the current use case.
+ */
+typedef struct nvme_identify_ctrl {
+ __u8 reserved[255];
+ __u16 oacs;
+ __u8 reserved2[3839];
+} nvme_identify_ctrl_t;
+
+/* SCSI Primary Commands - 4 (SPC-4), Table 512 */
+typedef struct supported_security_protocols {
+ __u8 reserved[6];
+ __u16 list_length;
+ __u8 list[504];
+} supported_security_protocols_t;
+
+/* ATA/ATAPI Command Set - 3 (ACS-3), Table 45 */
+typedef struct ata_security_status {
+ __u16 security_supported : 1;
+ __u16 security_enabled : 1;
+ __u16 security_locked : 1;
+ __u16 security_frozen : 1;
+ __u16 security_count_expired : 1;
+ __u16 enhanced_security_erase_supported : 1;
+ __u16 reserved1 : 2;
+ __u16 security_level : 1;
+ __u16 reserved2 : 7;
+} __attribute__((__packed__)) ata_security_status_t;
+
+/* ATA/ATAPI Command Set - 3 (ACS-3), Table 45 */
+typedef struct ata_trusted_computing {
+ __u16 tc_feature :1;
+ __u16 reserved : 13;
+ __u16 var1 : 1;
+ __u16 var2 : 1;
+} __attribute__((__packed__)) ata_trusted_computing_t;
+
+mapping_t encryption_ability_map[] = {
+ { "None", ENC_ABILITY_NONE },
+ { "Other", ENC_ABILITY_OTHER },
+ { "SED", ENC_ABILITY_SED },
+ { NULL, UnSet }
+};
+
+mapping_t encryption_status_map[] = {
+ { "Unencrypted", ENC_STATUS_UNENCRYPTED },
+ { "Locked", ENC_STATUS_LOCKED },
+ { "Unlocked", ENC_STATUS_UNLOCKED },
+ { NULL, UnSet }
+};
+
+/**
+ * get_encryption_ability_string() - get encryption ability name string.
+ * @ability: encryption ability enum.
+ *
+ * Return: encryption ability string.
+ */
+const char *get_encryption_ability_string(enum encryption_ability ability)
+{
+ return map_num_s(encryption_ability_map, ability);
+}
+
+/**
+ * get_encryption_status_string() - get encryption status name string.
+ * @ability: encryption status enum.
+ *
+ * Return: encryption status string.
+ */
+const char *get_encryption_status_string(enum encryption_status status)
+{
+ return map_num_s(encryption_status_map, status);
+}
+
+/**
+ * get_opal_locking_feature_description() - get opal locking feature description.
+ * @response: response from Opal Discovery Level 0.
+ *
+ * Based on the documentation TCG Storage Opal SSC 2.01 chapter 3.1.1,
+ * a Locking feature is searched for in Opal Level 0 Discovery response.
+ *
+ * Return: if locking feature is found, pointer to struct %opal_locking_feature_t, NULL otherwise.
+ */
+static opal_locking_feature_t *get_opal_locking_feature_description(__u8 *response)
+{
+ opal_level0_header_t *response_header = (opal_level0_header_t *)response;
+ int features_length = __be32_to_cpu(response_header->length);
+ int current_position = sizeof(*response_header);
+
+ while (current_position < features_length) {
+ opal_locking_feature_t *feature;
+
+ feature = (opal_locking_feature_t *)(response + current_position);
+
+ if (__be16_to_cpu(feature->feature_code) == OPAL_LOCKING_FEATURE)
+ return feature;
+
+ current_position += feature->description_length + OPAL_DISCOVERY_FEATURE_HEADER_LEN;
+ }
+
+ return NULL;
+}
+
+/**
+ * nvme_security_recv_ioctl() - nvme security receive ioctl.
+ * @disk_fd: a disk file descriptor.
+ * @sec_protocol: security protocol.
+ * @comm_id: command id.
+ * @response_buffer: response buffer to fill out.
+ * @buf_size: response buffer size.
+ * @verbose: verbose flag.
+ *
+ * Based on the documentations TCG Storage Opal SSC 2.01 chapter 3.3.3 and
+ * NVM ExpressTM Revision 1.4c, chapter 5.25,
+ * read security receive command via ioctl().
+ * On success, @response_buffer is completed.
+ *
+ * Return: %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR otherwise.
+ */
+static mdadm_status_t
+nvme_security_recv_ioctl(int disk_fd, __u8 sec_protocol, __u16 comm_id, void *response_buffer,
+ size_t buf_size, const int verbose)
+{
+ struct nvme_admin_cmd nvme_cmd = {0};
+ int status;
+
+ nvme_cmd.opcode = NVME_SECURITY_RECV;
+ nvme_cmd.cdw10 = sec_protocol << 24 | comm_id << 8;
+ nvme_cmd.cdw11 = buf_size;
+ nvme_cmd.data_len = buf_size;
+ nvme_cmd.addr = (__u64)response_buffer;
+
+ status = ioctl(disk_fd, NVME_IOCTL_ADMIN_CMD, &nvme_cmd);
+ if (status != 0) {
+ pr_vrb("Failed to read NVMe security receive ioctl() for device /dev/%s, status: %d\n",
+ fd2kname(disk_fd), status);
+ return MDADM_STATUS_ERROR;
+ }
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * nvme_identify_ioctl() - NVMe identify ioctl.
+ * @disk_fd: a disk file descriptor.
+ * @response_buffer: response buffer to fill out.
+ * @buf_size: response buffer size.
+ * @verbose: verbose flag.
+ *
+ * Based on the documentations TCG Storage Opal SSC 2.01 chapter 3.3.3 and
+ * NVM ExpressTM Revision 1.4c, chapter 5.25,
+ * read NVMe identify via ioctl().
+ * On success, @response_buffer will be completed.
+ *
+ * Return: %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR otherwise.
+ */
+static mdadm_status_t
+nvme_identify_ioctl(int disk_fd, void *response_buffer, size_t buf_size, const int verbose)
+{
+ struct nvme_admin_cmd nvme_cmd = {0};
+ int status;
+
+ nvme_cmd.opcode = NVME_IDENTIFY;
+ nvme_cmd.cdw10 = NVME_IDENTIFY_CONTROLLER_DATA;
+ nvme_cmd.data_len = buf_size;
+ nvme_cmd.addr = (__u64)response_buffer;
+
+ status = ioctl(disk_fd, NVME_IOCTL_ADMIN_CMD, &nvme_cmd);
+ if (status != 0) {
+ pr_vrb("Failed to read NVMe identify ioctl() for device /dev/%s, status: %d\n",
+ fd2kname(disk_fd), status);
+ return MDADM_STATUS_ERROR;
+ }
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * is_sec_prot_01h_supported() - check if security protocol 01h supported.
+ * @security_protocols: struct with response from disk (NVMe, SATA) describing supported
+ * security protocols.
+ *
+ * Return: true if TCG_SECP_01 found, false otherwise.
+ */
+static bool is_sec_prot_01h_supported(supported_security_protocols_t *security_protocols)
+{
+ int list_length = be16toh(security_protocols->list_length);
+ int index;
+
+ for (index = 0 ; index < list_length; index++) {
+ if (security_protocols->list[index] == TCG_SECP_01)
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * is_sec_prot_01h_supported_nvme() - check if security protocol 01h supported for given NVMe disk.
+ * @disk_fd: a disk file descriptor.
+ * @verbose: verbose flag.
+ *
+ * Return: %DRIVE_FEAT_SUP_ST if TCG_SECP_01 supported, %DRIVE_FEAT_NOT_SUP_ST if not supported,
+ * %DRIVE_FEAT_CHECK_FAILED_ST if failed to check.
+ */
+static drive_feat_sup_st is_sec_prot_01h_supported_nvme(int disk_fd, const int verbose)
+{
+ supported_security_protocols_t security_protocols = {0};
+
+ /* security_protocol: TCG_SECP_00, comm_id: not applicable */
+ if (nvme_security_recv_ioctl(disk_fd, TCG_SECP_00, 0x0, &security_protocols,
+ sizeof(security_protocols), verbose))
+ return DRIVE_FEAT_CHECK_FAILED_ST;
+
+ if (is_sec_prot_01h_supported(&security_protocols))
+ return DRIVE_FEAT_SUP_ST;
+
+ return DRIVE_FEAT_NOT_SUP_ST;
+}
+
+/**
+ * is_nvme_sec_send_recv_supported() - check if Security Send and Security Receive is supported.
+ * @disk_fd: a disk file descriptor.
+ * @verbose: verbose flag.
+ *
+ * Check if "Optional Admin Command Support" bit 0 is set in NVMe identify.
+ * Bit 0 set to 1 means controller supports the Security Send and Security Receive commands.
+ *
+ * Return: %DRIVE_FEAT_SUP_ST if security send/receive supported,
+ * %DRIVE_FEAT_NOT_SUP_ST if not supported, %DRIVE_FEAT_CHECK_FAILED_ST if check failed.
+ */
+static drive_feat_sup_st is_nvme_sec_send_recv_supported(int disk_fd, const int verbose)
+{
+ nvme_identify_ctrl_t nvme_identify = {0};
+ int status = 0;
+
+ status = nvme_identify_ioctl(disk_fd, &nvme_identify, sizeof(nvme_identify), verbose);
+ if (status)
+ return DRIVE_FEAT_CHECK_FAILED_ST;
+
+ if ((__le16_to_cpu(nvme_identify.oacs) & 0x1) == 0x1)
+ return DRIVE_FEAT_SUP_ST;
+
+ return DRIVE_FEAT_NOT_SUP_ST;
+}
+
+/**
+ * get_opal_encryption_information() - get Opal encryption information.
+ * @buffer: buffer with Opal Level 0 Discovery response.
+ * @information: struct to fill out, describing encryption status of disk.
+ *
+ * If Locking feature frame is in response from Opal Level 0 discovery, &encryption_information_t
+ * structure is completed with status and ability otherwise the status is set to &None.
+ * For possible encryption statuses and abilities,
+ * please refer to enums &encryption_status and &encryption_ability.
+ *
+ * Return: %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR otherwise.
+ */
+static mdadm_status_t get_opal_encryption_information(__u8 *buffer,
+ encryption_information_t *information)
+{
+ opal_locking_feature_t *opal_locking_feature =
+ get_opal_locking_feature_description(buffer);
+
+ if (!opal_locking_feature)
+ return MDADM_STATUS_ERROR;
+
+ if (opal_locking_feature->locking_supported == 1) {
+ information->ability = ENC_ABILITY_SED;
+
+ if (opal_locking_feature->locking_enabled == 0)
+ information->status = ENC_STATUS_UNENCRYPTED;
+ else if (opal_locking_feature->locked == 1)
+ information->status = ENC_STATUS_LOCKED;
+ else
+ information->status = ENC_STATUS_UNLOCKED;
+ } else {
+ information->ability = ENC_ABILITY_NONE;
+ information->status = ENC_STATUS_UNENCRYPTED;
+ }
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * get_nvme_opal_encryption_information() - get NVMe Opal encryption information.
+ * @disk_fd: a disk file descriptor.
+ * @information: struct to fill out, describing encryption status of disk.
+ * @verbose: verbose flag.
+ *
+ * In case the disk supports Opal Level 0 discovery, &encryption_information_t structure
+ * is completed with status and ability based on ioctl response,
+ * otherwise the ability is set to %ENC_ABILITY_NONE and &status to %ENC_STATUS_UNENCRYPTED.
+ * As the current use case does not need the knowledge of Opal support, if there is no support,
+ * %MDADM_STATUS_SUCCESS will be returned, with the values described above.
+ * For possible encryption statuses and abilities,
+ * please refer to enums &encryption_status and &encryption_ability.
+ *
+ * %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR otherwise.
+ */
+mdadm_status_t
+get_nvme_opal_encryption_information(int disk_fd, encryption_information_t *information,
+ const int verbose)
+{
+ __u8 buffer[OPAL_IO_BUFFER_LEN];
+ int sec_send_recv_supported = 0;
+ int protocol_01h_supported = 0;
+ mdadm_status_t status;
+
+ information->ability = ENC_ABILITY_NONE;
+ information->status = ENC_STATUS_UNENCRYPTED;
+
+ sec_send_recv_supported = is_nvme_sec_send_recv_supported(disk_fd, verbose);
+ if (sec_send_recv_supported == DRIVE_FEAT_CHECK_FAILED_ST)
+ return MDADM_STATUS_ERROR;
+
+ /* Opal not supported */
+ if (sec_send_recv_supported == DRIVE_FEAT_NOT_SUP_ST)
+ return MDADM_STATUS_SUCCESS;
+
+ /**
+ * sec_send_recv_supported determine that it should be possible to read
+ * supported sec protocols
+ */
+ protocol_01h_supported = is_sec_prot_01h_supported_nvme(disk_fd, verbose);
+ if (protocol_01h_supported == DRIVE_FEAT_CHECK_FAILED_ST)
+ return MDADM_STATUS_ERROR;
+
+ /* Opal not supported */
+ if (sec_send_recv_supported == DRIVE_FEAT_SUP_ST &&
+ protocol_01h_supported == DRIVE_FEAT_NOT_SUP_ST)
+ return MDADM_STATUS_SUCCESS;
+
+ if (nvme_security_recv_ioctl(disk_fd, TCG_SECP_01, OPAL_DISCOVERY_COMID, (void *)&buffer,
+ OPAL_IO_BUFFER_LEN, verbose))
+ return MDADM_STATUS_ERROR;
+
+ status = get_opal_encryption_information((__u8 *)&buffer, information);
+ if (status)
+ pr_vrb("Locking feature description not found in Level 0 discovery response. Device /dev/%s.\n",
+ fd2kname(disk_fd));
+
+ if (information->ability == ENC_ABILITY_NONE)
+ assert(information->status == ENC_STATUS_UNENCRYPTED);
+
+ return status;
+}
+
+/**
+ * ata_pass_through12_ioctl() - ata pass through12 ioctl.
+ * @disk_fd: a disk file descriptor.
+ * @ata_command: ata command.
+ * @sec_protocol: security protocol.
+ * @comm_id: additional command id.
+ * @response_buffer: response buffer to fill out.
+ * @buf_size: response buffer size.
+ * @verbose: verbose flag.
+ *
+ * Based on the documentations ATA Command Pass-Through, chapter 13.2.2 and
+ * ATA Translation - 3 (SAT-3), send read ata pass through 12 command via ioctl().
+ * On success, @response_buffer will be completed.
+ *
+ * Return: %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR on fail.
+ */
+static mdadm_status_t
+ata_pass_through12_ioctl(int disk_fd, __u8 ata_command, __u8 sec_protocol, __u16 comm_id,
+ void *response_buffer, size_t buf_size, const int verbose)
+{
+ __u8 cdb[ATA_INQUIRY_LENGTH] = {0};
+ __u8 sense[SG_SENSE_SIZE] = {0};
+ __u8 *sense_desc = NULL;
+ sg_io_hdr_t sg = {0};
+
+ /*
+ * ATA Command Pass-Through, chapter 13.2.2
+ * SCSI Primary Commands - 4 (SPC-4)
+ * ATA Translation - 3 (SAT-3)
+ */
+ cdb[0] = ATA_PASS_THROUGH_12;
+ /* protocol, bits 1-4 */
+ cdb[1] = ATA_PIO_DATA_IN << 1;
+ /* Bytes: CK_COND=1, T_DIR = 1, BYTE_BLOCK = 1, Length in Sector Count = 2 */
+ cdb[2] = 0x2E;
+ cdb[3] = sec_protocol;
+ /* Sector count */
+ cdb[4] = buf_size / DEFAULT_SECTOR_SIZE;
+ cdb[6] = (comm_id) & 0xFF;
+ cdb[7] = (comm_id >> 8) & 0xFF;
+ cdb[9] = ata_command;
+
+ sg.interface_id = SG_INTERFACE_ID;
+ sg.cmd_len = sizeof(cdb);
+ sg.mx_sb_len = sizeof(sense);
+ sg.dxfer_direction = SG_DXFER_FROM_DEV;
+ sg.dxfer_len = buf_size;
+ sg.dxferp = response_buffer;
+ sg.cmdp = cdb;
+ sg.sbp = sense;
+ sg.timeout = SG_IO_TIMEOUT;
+ sg.usr_ptr = NULL;
+
+ if (ioctl(disk_fd, SG_IO, &sg) < 0) {
+ pr_vrb("Failed ata passthrough12 ioctl. Device: /dev/%s.\n", fd2kname(disk_fd));
+ return MDADM_STATUS_ERROR;
+ }
+
+ if ((sg.status && sg.status != SG_CHECK_CONDITION) || sg.host_status ||
+ (sg.driver_status && sg.driver_status != SG_DRIVER_SENSE)) {
+ pr_vrb("Failed ata passthrough12 ioctl. Device: /dev/%s.\n", fd2kname(disk_fd));
+ pr_vrb("SG_IO error: ATA_12 Status: %d Host Status: %d, Driver Status: %d\n",
+ sg.status, sg.host_status, sg.driver_status);
+ return MDADM_STATUS_ERROR;
+ }
+
+ /* verify expected sense response code */
+ if (!(sense[0] == SENSE_DATA_CURRENT_DESC || sense[0] == SENSE_DATA_CURRENT_FIXED)) {
+ pr_vrb("Failed ata passthrough12 ioctl. Device: /dev/%s.\n", fd2kname(disk_fd));
+ return MDADM_STATUS_ERROR;
+ }
+
+ sense_desc = sense + SENSE_CURRENT_RES_DESC_POS;
+ /* verify sense data current response with descriptor format */
+ if (sense[0] == SENSE_DATA_CURRENT_DESC &&
+ !(sense_desc[0] == ATA_STATUS_RETURN_DESCRIPTOR &&
+ sense_desc[1] == ATA_INQUIRY_LENGTH)) {
+ pr_vrb("Failed ata passthrough12 ioctl. Device: /dev/%s. Sense data ASC: %d, ASCQ: %d.\n",
+ fd2kname(disk_fd), sense[2], sense[3]);
+ return MDADM_STATUS_ERROR;
+ }
+
+ /* verify sense data current response with fixed format */
+ if (sense[0] == SENSE_DATA_CURRENT_FIXED &&
+ !(sense[12] == ATA_PT_INFORMATION_AVAILABLE_ASC &&
+ sense[13] == ATA_PT_INFORMATION_AVAILABLE_ASCQ)) {
+ pr_vrb("Failed ata passthrough12 ioctl. Device: /dev/%s. Sense data ASC: %d, ASCQ: %d.\n",
+ fd2kname(disk_fd), sense[12], sense[13]);
+ return MDADM_STATUS_ERROR;
+ }
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * is_sec_prot_01h_supported_ata() - check if security protocol 01h supported for given SATA disk.
+ * @disk_fd: a disk file descriptor.
+ * @verbose: verbose flag.
+ *
+ * Return: %DRIVE_FEAT_SUP_ST if TCG_SECP_01 supported, %DRIVE_FEAT_NOT_SUP_ST if not supported,
+ * %DRIVE_FEAT_CHECK_FAILED_ST if failed.
+ */
+static drive_feat_sup_st is_sec_prot_01h_supported_ata(int disk_fd, const int verbose)
+{
+ supported_security_protocols_t security_protocols;
+
+ mdadm_status_t result = ata_pass_through12_ioctl(disk_fd, ATA_TRUSTED_RECEIVE, TCG_SECP_00,
+ 0x0, &security_protocols,
+ sizeof(security_protocols), verbose);
+ if (result)
+ return DRIVE_FEAT_CHECK_FAILED_ST;
+
+ if (is_sec_prot_01h_supported(&security_protocols))
+ return DRIVE_FEAT_SUP_ST;
+
+ return DRIVE_FEAT_NOT_SUP_ST;
+}
+
+/**
+ * is_ata_trusted_computing_supported() - check if ata trusted computing supported.
+ * @buffer: buffer with ATA identify response, not NULL.
+ *
+ * Return: true if trusted computing bit set, false otherwise.
+ */
+bool is_ata_trusted_computing_supported(__u16 *buffer)
+{
+ /* Added due to warnings from the compiler about a possible uninitialized variable below. */
+ assert(buffer);
+
+ __u16 security_tc_frame = __le16_to_cpu(buffer[ATA_TRUSTED_COMPUTING_POS]);
+ ata_trusted_computing_t *security_tc = (ata_trusted_computing_t *)&security_tc_frame;
+
+ if (security_tc->tc_feature == 1)
+ return true;
+
+ return false;
+}
+
+/**
+ * get_ata_standard_security_status() - get ATA disk encryption information from ATA identify.
+ * @buffer: buffer with response from ATA identify, not NULL.
+ * @information: struct to fill out, describing encryption status of disk.
+ *
+ * The function based on the Security status frame from ATA identify,
+ * completed encryption information.
+ * For possible encryption statuses and abilities,
+ * please refer to enums &encryption_status and &encryption_ability.
+ *
+ * Return: %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR on fail.
+ */
+static mdadm_status_t get_ata_standard_security_status(__u16 *buffer,
+ struct encryption_information *information)
+{
+ /* Added due to warnings from the compiler about a possible uninitialized variable below. */
+ assert(buffer);
+
+ __u16 security_status_frame = __le16_to_cpu(buffer[ATA_SECURITY_WORD_POSITION]);
+ ata_security_status_t *security_status = (ata_security_status_t *)&security_status_frame;
+
+ if (!security_status->security_supported) {
+ information->ability = ENC_ABILITY_NONE;
+ information->status = ENC_STATUS_UNENCRYPTED;
+
+ return MDADM_STATUS_SUCCESS;
+ }
+
+ information->ability = ENC_ABILITY_OTHER;
+
+ if (security_status->security_enabled == 0)
+ information->status = ENC_STATUS_UNENCRYPTED;
+ else if (security_status->security_locked == 1)
+ information->status = ENC_STATUS_LOCKED;
+ else
+ information->status = ENC_STATUS_UNLOCKED;
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * is_ata_opal() - check if SATA disk support Opal.
+ * @disk_fd: a disk file descriptor.
+ * @buffer: buffer with ATA identify response.
+ * @verbose: verbose flag.
+ *
+ * Return: %DRIVE_FEAT_SUP_ST if TCG_SECP_01 supported, %DRIVE_FEAT_NOT_SUP_ST if not supported,
+ * %DRIVE_FEAT_CHECK_FAILED_ST if failed to check.
+ */
+static drive_feat_sup_st is_ata_opal(int disk_fd, __u16 *buffer_identify, const int verbose)
+{
+ bool tc_status = is_ata_trusted_computing_supported(buffer_identify);
+ drive_feat_sup_st tcg_sec_prot_status;
+
+ if (!tc_status)
+ return DRIVE_FEAT_NOT_SUP_ST;
+
+ tcg_sec_prot_status = is_sec_prot_01h_supported_ata(disk_fd, verbose);
+
+ if (tcg_sec_prot_status == DRIVE_FEAT_CHECK_FAILED_ST) {
+ pr_vrb("Failed to verify if security protocol 01h supported. Device /dev/%s.\n",
+ fd2kname(disk_fd));
+ return DRIVE_FEAT_CHECK_FAILED_ST;
+ }
+
+ if (tc_status && tcg_sec_prot_status == DRIVE_FEAT_SUP_ST)
+ return DRIVE_FEAT_SUP_ST;
+
+ return DRIVE_FEAT_NOT_SUP_ST;
+}
+
+/**
+ * get_ata_encryption_information() - get ATA disk encryption information.
+ * @disk_fd: a disk file descriptor.
+ * @information: struct to fill out, describing encryption status of disk.
+ * @verbose: verbose flag.
+ *
+ * The function reads information about encryption, if the disk supports Opal,
+ * the information is completed based on Opal Level 0 discovery, otherwise,
+ * based on ATA security status frame from ATA identification response.
+ * For possible encryption statuses and abilities,
+ * please refer to enums &encryption_status and &encryption_ability.
+ *
+ * Based on the documentations ATA/ATAPI Command Set ATA8-ACS and
+ * AT Attachment-8 - ATA Serial Transport (ATA8-AST).
+ *
+ * Return: %MDADM_STATUS_SUCCESS on success, %MDADM_STATUS_ERROR on fail.
+ */
+mdadm_status_t
+get_ata_encryption_information(int disk_fd, struct encryption_information *information,
+ const int verbose)
+{
+ __u8 buffer_opal_level0_discovery[OPAL_IO_BUFFER_LEN] = {0};
+ __u16 buffer_identify[ATA_IDENTIFY_RESPONSE_LEN] = {0};
+ drive_feat_sup_st ata_opal_status;
+ mdadm_status_t status;
+
+ /* Get disk ATA identification */
+ status = ata_pass_through12_ioctl(disk_fd, ATA_IDENTIFY, 0x0, 0x0, buffer_identify,
+ sizeof(buffer_identify), verbose);
+ if (status == MDADM_STATUS_ERROR)
+ return MDADM_STATUS_ERROR;
+
+ /* Possible OPAL support, further checks require tpm_enabled.*/
+ if (is_ata_trusted_computing_supported(buffer_identify)) {
+ /* OPAL SATA encryption checking disabled. */
+ if (conf_get_sata_opal_encryption_no_verify())
+ return MDADM_STATUS_SUCCESS;
+
+ if (!sysfs_is_libata_allow_tpm_enabled(verbose)) {
+ pr_vrb("Detected SATA drive /dev/%s with Trusted Computing support.\n",
+ fd2kname(disk_fd));
+ pr_vrb("Cannot verify encryption state. Requires libata.tpm_enabled=1.\n");
+ return MDADM_STATUS_ERROR;
+ }
+ }
+
+ ata_opal_status = is_ata_opal(disk_fd, buffer_identify, verbose);
+ if (ata_opal_status == DRIVE_FEAT_CHECK_FAILED_ST)
+ return MDADM_STATUS_ERROR;
+
+ if (ata_opal_status == DRIVE_FEAT_NOT_SUP_ST)
+ return get_ata_standard_security_status(buffer_identify, information);
+
+ /* SATA Opal */
+ status = ata_pass_through12_ioctl(disk_fd, ATA_TRUSTED_RECEIVE, TCG_SECP_01,
+ OPAL_DISCOVERY_COMID, buffer_opal_level0_discovery,
+ OPAL_IO_BUFFER_LEN, verbose);
+ if (status != MDADM_STATUS_SUCCESS)
+ return MDADM_STATUS_ERROR;
+
+ return get_opal_encryption_information(buffer_opal_level0_discovery, information);
+}
diff --git a/drive_encryption.h b/drive_encryption.h
new file mode 100644
index 0000000..0cb8ff1
--- /dev/null
+++ b/drive_encryption.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Read encryption information for Opal and ATA devices.
+ *
+ * Copyright (C) 2024 Intel Corporation
+ * Author: Blazej Kucman <blazej.kucman@intel.com>
+ */
+
+typedef enum encryption_status {
+ /* The drive is not currently encrypted. */
+ ENC_STATUS_UNENCRYPTED = 0,
+ /* The drive is encrypted and the data is not accessible. */
+ ENC_STATUS_LOCKED,
+ /* The drive is encrypted but the data is accessible in unencrypted form. */
+ ENC_STATUS_UNLOCKED
+} encryption_status_t;
+
+typedef enum encryption_ability {
+ ENC_ABILITY_NONE = 0,
+ ENC_ABILITY_OTHER,
+ /* Self encrypted drive */
+ ENC_ABILITY_SED
+} encryption_ability_t;
+
+typedef struct encryption_information {
+ encryption_ability_t ability;
+ encryption_status_t status;
+} encryption_information_t;
+
+mdadm_status_t
+get_nvme_opal_encryption_information(int disk_fd, struct encryption_information *information,
+ const int verbose);
+mdadm_status_t
+get_ata_encryption_information(int disk_fd, struct encryption_information *information,
+ const int verbose);
+const char *get_encryption_ability_string(enum encryption_ability ability);
+const char *get_encryption_status_string(enum encryption_status status);
diff --git a/inventory b/inventory
deleted file mode 100755
index c4801b4..0000000
--- a/inventory
+++ /dev/null
@@ -1,284 +0,0 @@
-
-.gitignore
-ANNOUNCE-3.0
-ANNOUNCE-3.0.1
-ANNOUNCE-3.0.2
-ANNOUNCE-3.0.3
-ANNOUNCE-3.1
-ANNOUNCE-3.1.1
-ANNOUNCE-3.1.2
-ANNOUNCE-3.1.3
-ANNOUNCE-3.1.4
-ANNOUNCE-3.1.5
-ANNOUNCE-3.2
-ANNOUNCE-3.2.1
-ANNOUNCE-3.2.2
-ANNOUNCE-3.2.3
-ANNOUNCE-3.2.4
-ANNOUNCE-3.2.5
-ANNOUNCE-3.2.6
-ANNOUNCE-3.3
-ANNOUNCE-3.3.1
-ANNOUNCE-3.3.2
-ANNOUNCE-3.3.3
-ANNOUNCE-3.3.4
-ANNOUNCE-3.4
-ANNOUNCE-4.0
-ANNOUNCE-4.1
-ANNOUNCE-4.2
-Assemble.c
-Build.c
-COPYING
-ChangeLog
-Create.c
-Detail.c
-Dump.c
-Examine.c
-Grow.c
-INSTALL
-Incremental.c
-Kill.c
-Makefile
-Manage.c
-Monitor.c
-Query.c
-README.initramfs
-ReadMe.c
-TODO
-bitmap.c
-bitmap.h
-clustermd_tests/
-clustermd_tests/00r10_Create
-clustermd_tests/00r1_Create
-clustermd_tests/01r10_Grow_bitmap-switch
-clustermd_tests/01r10_Grow_resize
-clustermd_tests/01r1_Grow_add
-clustermd_tests/01r1_Grow_bitmap-switch
-clustermd_tests/01r1_Grow_resize
-clustermd_tests/02r10_Manage_add
-clustermd_tests/02r10_Manage_add-spare
-clustermd_tests/02r10_Manage_re-add
-clustermd_tests/02r1_Manage_add
-clustermd_tests/02r1_Manage_add-spare
-clustermd_tests/02r1_Manage_re-add
-clustermd_tests/03r10_switch-recovery
-clustermd_tests/03r10_switch-resync
-clustermd_tests/03r1_switch-recovery
-clustermd_tests/03r1_switch-resync
-clustermd_tests/cluster_conf
-clustermd_tests/func.sh
-config.c
-coverity-gcc-hack.h
-crc32.c
-crc32.h
-crc32c.c
-dlink.c
-dlink.h
-external-reshape-design.txt
-inventory
-lib.c
-makedist
-managemon.c
-mapfile.c
-maps.c
-md.4
-md5.h
-md_p.h
-md_u.h
-mdadm.8.in
-mdadm.c
-mdadm.conf-example
-mdadm.conf.5
-mdadm.h
-mdadm.spec
-mdmon-design.txt
-mdmon.8
-mdmon.c
-mdmon.h
-mdopen.c
-mdstat.c
-misc/
-misc/mdcheck
-misc/syslog-events
-mkinitramfs
-monitor.c
-msg.c
-msg.h
-part.h
-platform-intel.c
-platform-intel.h
-policy.c
-probe_roms.c
-probe_roms.h
-pwgr.c
-raid5extend.c
-raid6check.8
-raid6check.c
-restripe.c
-sg_io.c
-sha1.c
-sha1.h
-super-ddf.c
-super-gpt.c
-super-intel.c
-super-mbr.c
-super0.c
-super1.c
-swap_super.c
-sysfs.c
-systemd/
-systemd/SUSE-mdadm_env.sh
-systemd/mdadm-grow-continue@.service
-systemd/mdadm-last-resort@.service
-systemd/mdadm-last-resort@.timer
-systemd/mdadm.shutdown
-systemd/mdcheck_continue.service
-systemd/mdcheck_continue.timer
-systemd/mdcheck_start.service
-systemd/mdcheck_start.timer
-systemd/mdmon@.service
-systemd/mdmonitor-oneshot.service
-systemd/mdmonitor-oneshot.timer
-systemd/mdmonitor.service
-test
-tests/
-tests/00linear
-tests/00multipath
-tests/00names
-tests/00raid0
-tests/00raid1
-tests/00raid10
-tests/00raid4
-tests/00raid5
-tests/00raid6
-tests/00readonly
-tests/01r1fail
-tests/01r5fail
-tests/01r5integ
-tests/01raid6integ
-tests/01replace
-tests/02lineargrow
-tests/02r1add
-tests/02r1grow
-tests/02r5grow
-tests/02r6grow
-tests/03assem-incr
-tests/03r0assem
-tests/03r5assem
-tests/03r5assem-failed
-tests/03r5assemV1
-tests/04r0update
-tests/04r1update
-tests/04r5swap
-tests/04update-metadata
-tests/04update-uuid
-tests/05r1-add-internalbitmap
-tests/05r1-add-internalbitmap-v1a
-tests/05r1-add-internalbitmap-v1b
-tests/05r1-add-internalbitmap-v1c
-tests/05r1-bitmapfile
-tests/05r1-failfast
-tests/05r1-grow-external
-tests/05r1-grow-internal
-tests/05r1-grow-internal-1
-tests/05r1-internalbitmap
-tests/05r1-internalbitmap-v1a
-tests/05r1-internalbitmap-v1b
-tests/05r1-internalbitmap-v1c
-tests/05r1-n3-bitmapfile
-tests/05r1-re-add
-tests/05r1-re-add-nosuper
-tests/05r1-remove-internalbitmap
-tests/05r1-remove-internalbitmap-v1a
-tests/05r1-remove-internalbitmap-v1b
-tests/05r1-remove-internalbitmap-v1c
-tests/05r5-bitmapfile
-tests/05r5-internalbitmap
-tests/05r6-bitmapfile
-tests/05r6tor0
-tests/06name
-tests/06sysfs
-tests/06wrmostly
-tests/07autoassemble
-tests/07autodetect
-tests/07changelevelintr
-tests/07changelevels
-tests/07layouts
-tests/07reshape5intr
-tests/07revert-grow
-tests/07revert-inplace
-tests/07revert-shrink
-tests/07testreshape5
-tests/09imsm-assemble
-tests/09imsm-create-fail-rebuild
-tests/09imsm-overlap
-tests/10ddf-assemble-missing
-tests/10ddf-create
-tests/10ddf-create-fail-rebuild
-tests/10ddf-fail-create-race
-tests/10ddf-fail-readd
-tests/10ddf-fail-readd-readonly
-tests/10ddf-fail-spare
-tests/10ddf-fail-stop-readd
-tests/10ddf-fail-twice
-tests/10ddf-fail-two-spares
-tests/10ddf-geometry
-tests/10ddf-incremental-wrong-order
-tests/10ddf-sudden-degraded
-tests/11spare-migration
-tests/12imsm-r0_2d-grow-r0_3d
-tests/12imsm-r0_2d-grow-r0_4d
-tests/12imsm-r0_2d-grow-r0_5d
-tests/12imsm-r0_3d-grow-r0_4d
-tests/12imsm-r5_3d-grow-r5_4d
-tests/12imsm-r5_3d-grow-r5_5d
-tests/13imsm-r0_r0_2d-grow-r0_r0_4d
-tests/13imsm-r0_r0_2d-grow-r0_r0_5d
-tests/13imsm-r0_r0_3d-grow-r0_r0_4d
-tests/13imsm-r0_r5_3d-grow-r0_r5_4d
-tests/13imsm-r0_r5_3d-grow-r0_r5_5d
-tests/13imsm-r5_r0_3d-grow-r5_r0_4d
-tests/13imsm-r5_r0_3d-grow-r5_r0_5d
-tests/14imsm-r0_3d-r5_3d-migrate-r5_4d-r5_4d
-tests/14imsm-r0_3d_no_spares-migrate-r5_3d
-tests/14imsm-r0_r0_2d-takeover-r10_4d
-tests/14imsm-r10_4d-grow-r10_5d
-tests/14imsm-r10_r5_4d-takeover-r0_2d
-tests/14imsm-r1_2d-grow-r1_3d
-tests/14imsm-r1_2d-takeover-r0_2d
-tests/14imsm-r5_3d-grow-r5_5d-no-spares
-tests/14imsm-r5_3d-migrate-r4_3d
-tests/15imsm-r0_3d_64k-migrate-r0_3d_256k
-tests/15imsm-r5_3d_4k-migrate-r5_3d_256k
-tests/15imsm-r5_3d_64k-migrate-r5_3d_256k
-tests/15imsm-r5_6d_4k-migrate-r5_6d_256k
-tests/15imsm-r5_r0_3d_64k-migrate-r5_r0_3d_256k
-tests/16imsm-r0_3d-migrate-r5_4d
-tests/16imsm-r0_5d-migrate-r5_6d
-tests/16imsm-r5_3d-migrate-r0_3d
-tests/16imsm-r5_5d-migrate-r0_5d
-tests/18imsm-1d-takeover-r0_1d
-tests/18imsm-1d-takeover-r1_2d
-tests/18imsm-r0_2d-takeover-r10_4d
-tests/18imsm-r10_4d-takeover-r0_2d
-tests/18imsm-r1_2d-takeover-r0_1d
-tests/19raid6auto-repair
-tests/19raid6check
-tests/19raid6repair
-tests/19repair-does-not-destroy
-tests/20raid5journal
-tests/21raid5cache
-tests/ToTest
-tests/env-ddf-template
-tests/env-imsm-template
-tests/func.sh
-tests/imsm-grow-template
-tests/utils
-udev-md-clustered-confirm-device.rules
-udev-md-raid-arrays.rules
-udev-md-raid-assembly.rules
-udev-md-raid-creating.rules
-udev-md-raid-safe-timeouts.rules
-util.c
-uuid.c
-xmalloc.c
diff --git a/makedist b/makedist
deleted file mode 100755
index 0c4b39e..0000000
--- a/makedist
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-# avoid silly sorting
-export LANG=C
-arg=$1
-target=~/public_html/source/mdadm
-if [ " $arg" = " test" ]
-then
- target=/tmp/mdadm-test
- rm -rf $target
- mkdir -p $target
-fi
-if [ -d $target ]
-then :
-else echo $target is not a directory
- exit 2
-fi
-set `grep '^#define VERSION' ReadMe.c `
-version=`echo $3 | sed -e 's/"//g'`
-grep "^.TH MDADM 8 .. v$version" mdadm.8.in > /dev/null 2>&1 ||
- {
- echo mdadm.8.in does not mention version $version.
- exit 1
- }
-grep "^.TH MDMON 8 .. v$version" mdmon.8 > /dev/null 2>&1 ||
- {
- echo mdmon.8 does not mention version $version.
- exit 1
- }
-rpmv=`echo $version | tr - _`
-grep "^Version: *$rpmv$" mdadm.spec > /dev/null 2>&1 ||
- {
- echo mdadm.spec does not mention version $version.
- exit 1
- }
-if [ -f ANNOUNCE-$version ]
-then :
-else
- echo ANNOUNCE-$version does not exist
- exit 1
-fi
-if grep "^ANNOUNCE-$version\$" inventory
-then :
-else { cat inventory ; echo ANNOUNCE-$version ; } | sort -o inventory
-fi
-
-echo version = $version
-base=mdadm-$rpmv.tar.gz
-if [ " $arg" != " diff" ]
-then
- if [ -f $target/$base ]
- then
- echo $target/$base exists.
- exit 1
- fi
- trap "rm $target/$base; exit" 1 2 3
- git archive --prefix=mdadm-$rpmv/ HEAD | gzip --best > $target/$base
- chmod a+r $target/$base
- ls -l $target/$base
- if tar tzf $target/$base | sed 's,[^/]*/,,' | sort | diff -u inventory -
- then : correct files found
- else echo "Extra files, or inventory is out-of-date"
- rm $target/$base
- exit 1
- fi
- rpmbuild -ta $target/$base || exit 1
- find ~/rpmbuild/RPMS -name "*mdadm-$version-*" \
- -exec cp {} $target/RPM \;
- cp ANNOUNCE-$version $target/ANNOUNCE
- cp ChangeLog $target/ChangeLog
- if [ " $arg" != " test" ]
- then
- echo -n "Confirm signing this release? "
- read a
- if [ " $a" != " y" ]; then echo OK - bye. ; exit 1; fi
- if zcat $target/$base | gpg -ba > $target/$base.sign && gpg -ba $target/ANNOUNCE
- then
- kup put $target/$base $target/$base.sign \
- /pub/linux/utils/raid/mdadm/mdadm-$version.tar.gz
- kup put $target/ANNOUNCE $target/ANNOUNCE.asc /pub/linux/utils/raid/mdadm/ANNOUNCE
- else
- echo signing failed
- exit 1
- fi
- fi
-else
- if [ ! -f $target/$base ]
- then
- echo $target/$base does not exist.
- exit 1
- fi
- ( cd .. ; ln -s mdadm.v2 mdadm-$version ; tar chf - --exclude=.git --exclude="TAGS" --exclude='*,v' --exclude='*~' --exclude='*.o' --exclude mdadm --exclude=mdadm'.[^ch0-9]' --exclude=RCS mdadm-$version ; rm mdadm-$version ) | gzip --best > /var/tmp/mdadm-new.tgz
- mkdir /var/tmp/mdadm-old ; zcat $target/$base | ( cd /var/tmp/mdadm-old ; tar xf - )
- mkdir /var/tmp/mdadm-new ; zcat /var/tmp/mdadm-new.tgz | ( cd /var/tmp/mdadm-new ; tar xf - )
- diff -ru /var/tmp/mdadm-old /var/tmp/mdadm-new
- rm -rf /var/tmp/mdadm-old /var/tmp/mdadm-new /var/tmp/mdadm-new.tgz
-fi
diff --git a/mdadm.8.in b/mdadm.8.in
index 96a4a08..9ba6682 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -3179,7 +3179,7 @@ environment. This can be useful for testing or for disaster
recovery. You should be aware that interoperability may be
compromised by setting this value.
-These change can also be suppressed by adding
+These change can also be suppressed by adding
.B mdadm.imsm.test=1
to the kernel command line. This makes it easy to test IMSM
code in a virtual machine that doesn't have IMSM virtual hardware.
@@ -3454,6 +3454,25 @@ is any string. These names are supported by
since version 3.3 provided they are enabled in
.IR mdadm.conf .
+.SH UNDERSTANDING OUTPUT
+
+.TP
+EXAMINE
+
+.TP
+.B checkpoint
+Checkpoint value is reported when array is performing some action including
+resync, recovery or reshape. Checkpoints allow resuming action from certain
+point if it was interrupted.
+
+Checkpoint is reported as combination of two values: current migration unit
+and number of blocks per unit. By multiplying those values and dividing by
+array size checkpoint progress percentage can be obtained in relation to
+current progress reported in /proc/mdstat. Checkpoint is also related to (and
+sometimes based on) sysfs entry sync_completed but depending on action units
+may differ. Even if units are the same, it should not be expected that
+checkpoint and sync_completed will be exact match nor updated simultaneously.
+
.SH NOTE
.I mdadm
was previously known as
diff --git a/mdadm.conf.5.in b/mdadm.conf.5.in
index 787e51e..14302a9 100644
--- a/mdadm.conf.5.in
+++ b/mdadm.conf.5.in
@@ -636,6 +636,20 @@ If multiple
.B MINITORDELAY
lines are provided, only first non-zero value is considered.
+.TP
+.B ENCRYPTION_NO_VERIFY
+The
+.B ENCRYPTION_NO_VERIFY
+disables encryption verification for devices with particular encryption support detected.
+Currently, only verification of SATA OPAL encryption can be disabled.
+It does not disable ATA security encryption verification.
+Currently effective only for
+.I IMSM
+metadata.
+Available parameter
+.I "sata_opal".
+
+
.SH FILES
.SS {CONFFILE}
@@ -744,6 +758,8 @@ SYSFS uuid=bead5eb6:31c17a27:da120ba2:7dfda40d group_thread_cnt=4
sync_speed_max=1000000
.br
MONITORDELAY 60
+.br
+ENCRYPTION_NO_VERIFY sata_opal
.SH SEE ALSO
.BR mdadm (8),
diff --git a/mdadm.h b/mdadm.h
index 1f28b3e..2640b39 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -430,8 +430,10 @@ struct createinfo {
};
struct spare_criteria {
+ bool criteria_set;
unsigned long long min_size;
unsigned int sector_size;
+ struct dev_policy *pols;
};
typedef enum mdadm_status {
@@ -776,6 +778,8 @@ enum sysfs_read_flags {
#define SYSFS_MAX_BUF_SIZE 64
+extern void sysfs_get_container_devnm(struct mdinfo *mdi, char *buf);
+
/* If fd >= 0, get the array it is open on,
* else use devnm.
*/
@@ -807,7 +811,7 @@ extern int sysfs_attribute_available(struct mdinfo *sra, struct mdinfo *dev,
extern int sysfs_get_str(struct mdinfo *sra, struct mdinfo *dev,
char *name, char *val, int size);
extern int sysfs_set_safemode(struct mdinfo *sra, unsigned long ms);
-extern int sysfs_set_array(struct mdinfo *info, int vers);
+extern int sysfs_set_array(struct mdinfo *info);
extern int sysfs_add_disk(struct mdinfo *sra, struct mdinfo *sd, int resume);
extern int sysfs_disk_to_scsi_id(int fd, __u32 *id);
extern int sysfs_unique_holder(char *devnm, long rdev);
@@ -849,6 +853,7 @@ extern int restore_stripes(int *dest, unsigned long long *offsets,
int source, unsigned long long read_offset,
unsigned long long start, unsigned long long length,
char *src_buf);
+extern bool sysfs_is_libata_allow_tpm_enabled(const int verbose);
#ifndef Sendmail
#define Sendmail "/usr/lib/sendmail -t"
@@ -937,6 +942,23 @@ struct reshape {
unsigned long long new_size; /* New size of array in sectors */
};
+/**
+ * struct dev_policy - Data structure for policy management.
+ * @next: pointer to next dev_policy.
+ * @name: policy name, category.
+ * @metadata: the metadata type it affects.
+ * @value: value of the policy.
+ *
+ * The functions to manipulate dev_policy lists do not free elements, so they must be statically
+ * allocated. @name and @metadata can be compared by address.
+ */
+typedef struct dev_policy {
+ struct dev_policy *next;
+ char *name;
+ const char *metadata;
+ const char *value;
+} dev_policy_t;
+
/* A superswitch provides entry point to a metadata handler.
*
* The superswitch primarily operates on some "metadata" that
@@ -1115,10 +1137,9 @@ extern struct superswitch {
* Return spare criteria for array:
* - minimum disk size can be used in array;
* - sector size can be used in array.
- * Return values: 0 - for success and -EINVAL on error.
*/
- int (*get_spare_criteria)(struct supertype *st,
- struct spare_criteria *sc);
+ mdadm_status_t (*get_spare_criteria)(struct supertype *st, char *mddev_path,
+ struct spare_criteria *sc);
/* Find somewhere to put a bitmap - possibly auto-size it - and
* update the metadata to record this. The array may be newly
* created, in which case data_size may be updated, or it might
@@ -1166,6 +1187,25 @@ extern struct superswitch {
char *subdev, unsigned long long *freesize,
int consistency_policy, int verbose);
+ /**
+ * test_and_add_drive_policies() - test new and add custom policies from metadata handler.
+ * @pols: list of currently recorded policies.
+ * @disk_fd: file descriptor of the device to check.
+ * @verbose: verbose flag.
+ *
+ * Used by IMSM to verify all drives in container/array, against requirements not recored
+ * in superblock, like controller type for IMSM. It should check all drives even if
+ * they are not actually used, because mdmon or kernel are free to use any drive assigned to
+ * container automatically.
+ *
+ * Generating and comparison methods belong to metadata handler. It is not mandatory to be
+ * implemented.
+ *
+ * Return: MDADM_STATUS_SUCCESS is expected on success.
+ */
+ mdadm_status_t (*test_and_add_drive_policies)(dev_policy_t **pols, int disk_fd,
+ const int verbose);
+
/* Return a linked list of 'mdinfo' structures for all arrays
* in the container. For non-containers, it is like
* getinfo_super with an allocated mdinfo.*/
@@ -1247,21 +1287,6 @@ extern struct superswitch {
*/
struct mdinfo *(*activate_spare)(struct active_array *a,
struct metadata_update **updates);
- /*
- * Return statically allocated string that represents metadata specific
- * controller domain of the disk. The domain is used in disk domain
- * matching functions. Disks belong to the same domain if the they have
- * the same domain from mdadm.conf and belong the same metadata domain.
- * Returning NULL or not providing this handler means that metadata
- * does not distinguish the differences between disks that belong to
- * different controllers. They are in the domain specified by
- * configuration file (mdadm.conf).
- * In case when the metadata has the notion of domains based on disk
- * it shall return NULL for disks that do not belong to the controller
- * the supported domains. Such disks will form another domain and won't
- * be mixed with supported ones.
- */
- const char *(*get_disk_controller_domain)(const char *path);
/* for external backup area */
int (*recover_backup)(struct supertype *st, struct mdinfo *info);
@@ -1368,27 +1393,8 @@ extern struct supertype *dup_super(struct supertype *st);
extern int get_dev_size(int fd, char *dname, unsigned long long *sizep);
extern int get_dev_sector_size(int fd, char *dname, unsigned int *sectsizep);
extern int must_be_container(int fd);
-extern int dev_size_from_id(dev_t id, unsigned long long *size);
-extern int dev_sector_size_from_id(dev_t id, unsigned int *size);
void wait_for(char *dev, int fd);
-/*
- * Data structures for policy management.
- * Each device can have a policy structure that lists
- * various name/value pairs each possibly with a metadata associated.
- * The policy list is sorted by name/value/metadata
- */
-struct dev_policy {
- struct dev_policy *next;
- char *name; /* None of these strings are allocated. They are
- * all just references to strings which are known
- * to exist elsewhere.
- * name and metadata can be compared by address equality.
- */
- const char *metadata;
- const char *value;
-};
-
extern char pol_act[], pol_domain[], pol_metadata[], pol_auto[];
/* iterate over the sublist starting at list, having the same
@@ -1430,10 +1436,16 @@ extern struct dev_policy *disk_policy(struct mdinfo *disk);
extern struct dev_policy *devid_policy(int devid);
extern void dev_policy_free(struct dev_policy *p);
-//extern void pol_new(struct dev_policy **pol, char *name, char *val, char *metadata);
extern void pol_add(struct dev_policy **pol, char *name, char *val, char *metadata);
extern struct dev_policy *pol_find(struct dev_policy *pol, char *name);
+extern mdadm_status_t drive_test_and_add_policies(struct supertype *st, dev_policy_t **pols,
+ int fd, const int verbose);
+extern mdadm_status_t sysfs_test_and_add_drive_policies(struct supertype *st, dev_policy_t **pols,
+ struct mdinfo *mdi, const int verbose);
+extern mdadm_status_t mddev_test_and_add_drive_policies(struct supertype *st, dev_policy_t **pols,
+ int array_fd, const int verbose);
+
enum policy_action {
act_default,
act_include,
@@ -1661,6 +1673,7 @@ extern char *conf_get_program(void);
extern char *conf_get_homehost(int *require_homehostp);
extern char *conf_get_homecluster(void);
extern int conf_get_monitor_delay(void);
+extern bool conf_get_sata_opal_encryption_no_verify(void);
extern char *conf_line(FILE *file);
extern char *conf_word(FILE *file, int allow_key);
extern void print_quoted(char *str);
@@ -1685,8 +1698,7 @@ extern const int uuid_zero[4];
extern int same_uuid(int a[4], int b[4], int swapuuid);
extern void copy_uuid(void *a, int b[4], int swapuuid);
extern char *__fname_from_uuid(int id[4], int swap, char *buf, char sep);
-extern char *fname_from_uuid(struct supertype *st,
- struct mdinfo *info, char *buf, char sep);
+extern char *fname_from_uuid(struct mdinfo *info, char *buf);
extern unsigned long calc_csum(void *super, int bytes);
extern int enough(int level, int raid_disks, int layout, int clean,
char *avail);
@@ -1708,6 +1720,9 @@ extern int assemble_container_content(struct supertype *st, int mdfd,
#define INCR_UNSAFE 2
#define INCR_ALREADY 4
#define INCR_YES 8
+
+extern bool devid_matches_criteria(struct supertype *st, dev_t devid, struct spare_criteria *sc);
+extern bool disk_fd_matches_criteria(struct supertype *st, int disk_fd, struct spare_criteria *sc);
extern struct mdinfo *container_choose_spares(struct supertype *st,
struct spare_criteria *criteria,
struct domainlist *domlist,
@@ -1856,11 +1871,10 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container)
*/
static inline sighandler_t signal_s(int sig, sighandler_t handler)
{
- struct sigaction new_act;
- struct sigaction old_act;
+ struct sigaction new_act = {0};
+ struct sigaction old_act = {0};
new_act.sa_handler = handler;
- new_act.sa_flags = 0;
if (sigaction(sig, &new_act, &old_act) == 0)
return old_act.sa_handler;
@@ -1899,6 +1913,8 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
#define pr_info(fmt, args...) printf("%s: "fmt, Name, ##args)
+#define pr_vrb(fmt, arg...) ((void)(verbose && pr_err(fmt, ##arg)))
+
void *xmalloc(size_t len);
void *xrealloc(void *ptr, size_t len);
void *xcalloc(size_t num, size_t size);
diff --git a/mdadm.spec b/mdadm.spec
deleted file mode 100644
index 12e7859..0000000
--- a/mdadm.spec
+++ /dev/null
@@ -1,47 +0,0 @@
-Summary: mdadm is used for controlling Linux md devices (aka RAID arrays)
-Name: mdadm
-Version: 4.3
-Release: 1
-Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.gz
-URL: https://neil.brown.name/blog/mdadm
-License: GPL
-Group: Utilities/System
-BuildRoot: %{_tmppath}/%{name}-root
-Obsoletes: mdctl
-
-%description
-mdadm is a program that can be used to create, manage, and monitor
-Linux MD (Software RAID) devices.
-
-%prep
-%setup -q
-# we want to install in /sbin, not /usr/sbin...
-%define _exec_prefix %{nil}
-
-%build
-# This is a debatable issue. The author of this RPM spec file feels that
-# people who install RPMs (especially given that the default RPM options
-# will strip the binary) are not going to be running gdb against the
-# program.
-make CXFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}"
-
-%install
-make DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} BINDIR=%{_sbindir} install
-install -D -m644 mdadm.conf-example $RPM_BUILD_ROOT/%{_sysconfdir}/mdadm.conf
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%doc TODO ChangeLog mdadm.conf-example COPYING
-%{_sbindir}/mdadm
-%{_sbindir}/mdmon
-/usr/lib/udev/rules.d/01-md-raid-creating.rules
-/usr/lib/udev/rules.d/63-md-raid-arrays.rules
-/usr/lib/udev/rules.d/64-md-raid-assembly.rules
-/usr/lib/udev/rules.d/69-md-clustered-confirm-device.rules
-%config(noreplace,missingok)/%{_sysconfdir}/mdadm.conf
-%{_mandir}/man*/md*
-
-%changelog
diff --git a/mdmon.c b/mdmon.c
index a2038fe..5fdb5cd 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -302,12 +302,12 @@ static int mdmon(char *devnm, int must_fork, int takeover);
int main(int argc, char *argv[])
{
char *container_name = NULL;
- char *devnm = NULL;
int status = 0;
int opt;
int all = 0;
int takeover = 0;
int dofork = 1;
+ int mdfd = -1;
bool help = false;
static struct option options[] = {
{"all", 0, NULL, 'a'},
@@ -410,19 +410,20 @@ int main(int argc, char *argv[])
free_mdstat(mdstat);
return status;
- } else {
- int mdfd = open_mddev(container_name, 0);
- devnm = fd2devnm(mdfd);
+ }
+
+ mdfd = open_mddev(container_name, 0);
+ if (is_fd_valid(mdfd)) {
+ char *devnm = fd2devnm(mdfd);
close(mdfd);
- }
- if (!devnm) {
- pr_err("%s is not a valid md device name\n",
- container_name);
- return 1;
+ if (devnm)
+ return mdmon(devnm, dofork && do_fork(), takeover);
}
- return mdmon(devnm, dofork && do_fork(), takeover);
+
+ pr_err("%s is not a valid md device name\n", container_name);
+ return 1;
}
static int mdmon(char *devnm, int must_fork, int takeover)
diff --git a/mkinitramfs b/mkinitramfs
deleted file mode 100644
index c6275dd..0000000
--- a/mkinitramfs
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-# make sure we are being run in the right directory...
-if [ -f mkinitramfs ]
-then :
-else
- echo >&2 mkinitramfs must be run from the mdadm source directory.
- exit 1
-fi
-if [ -f /bin/busybox ]
-then : good, it exists
- case `file /bin/busybox` in
- *statically* ) : good ;;
- * ) echo >&2 mkinitramfs: /bin/busybox is not statically linked: cannot proceed.
- exit 1
- esac
-else
- echo >&2 "mkinitramfs: /bin/busybox doesn't exist - please install it statically linked."
- exit 1
-fi
-
-rm -rf initramfs
-mkdir initramfs
-mkdir initramfs/bin
-make mdadm.static
-cp mdadm.static initramfs/bin/mdadm
-cp /bin/busybox initramfs/bin/busybox
-ln initramfs/bin/busybox initramfs/bin/sh
-cat <<- END > initramfs/init
- #!/bin/sh
-
- echo 'Auto-assembling boot md array'
- mkdir /proc
- mount -t proc proc /proc
- if [ -n "$rootuuid" ]
- then arg=--uuid=$rootuuid
- elif [ -n "$mdminor" ]
- then arg=--super-minor=$mdminor
- else arg=--super-minor=0
- fi
- echo "Using $arg"
- mdadm -Acpartitions $arg --auto=part /dev/mda
- cd /
- mount /dev/mda1 /root || mount /dev/mda /root
- umount /proc
- cd /root
- exec chroot . /sbin/init < /dev/console > /dev/console 2>&1
-END
-chmod +x initramfs/init
-
-(cd initramfs
- find init bin | cpio -o -H newc | gzip --best
-) > init.cpio.gz
-rm -rf initramfs
-ls -l init.cpio.gz
diff --git a/monitor.c b/monitor.c
index 4acec67..be0bec7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -412,6 +412,7 @@ static int read_and_act(struct active_array *a, fd_set *fds)
int ret = 0;
int count = 0;
struct timeval tv;
+ bool write_checkpoint = false;
a->next_state = bad_word;
a->next_action = bad_action;
@@ -564,52 +565,40 @@ static int read_and_act(struct active_array *a, fd_set *fds)
}
}
- /* Check for recovery checkpoint notifications. We need to be a
- * minimum distance away from the last checkpoint to prevent
- * over checkpointing. Note reshape checkpointing is handled
- * in the second branch.
- */
- if (sync_completed > a->last_checkpoint &&
- sync_completed - a->last_checkpoint > a->info.component_size >> 4 &&
- a->curr_action > reshape) {
- /* A (non-reshape) sync_action has reached a checkpoint.
- * Record the updated position in the metadata
- */
- a->last_checkpoint = sync_completed;
- a->container->ss->set_array_state(a, a->curr_state <= clean);
- } else if ((a->curr_action == idle && a->prev_action == reshape) ||
- (a->curr_action == reshape &&
- sync_completed > a->last_checkpoint)) {
- /* Reshape has progressed or completed so we need to
- * update the array state - and possibly the array size
- */
+ /* Update reshape checkpoint, depending if it finished or progressed */
+ if (a->curr_action == idle && a->prev_action == reshape) {
+ char buf[SYSFS_MAX_BUF_SIZE];
+
if (sync_completed != 0)
a->last_checkpoint = sync_completed;
- /* We might need to update last_checkpoint depending on
- * the reason that reshape finished.
- * if array reshape is really finished:
- * set check point to the end, this allows
- * set_array_state() to finalize reshape in metadata
- * if reshape if broken: do not set checkpoint to the end
- * this allows for reshape restart from checkpoint
+
+ /*
+ * If reshape really finished, set checkpoint to the end to finalize it.
+ * Do not set checkpoint if reshape is broken.
+ * Reshape will restart from last checkpoint.
*/
- if ((a->curr_action != reshape) &&
- (a->prev_action == reshape)) {
- char buf[SYSFS_MAX_BUF_SIZE];
- if ((sysfs_get_str(&a->info, NULL,
- "reshape_position",
- buf,
- sizeof(buf)) >= 0) &&
- str_is_none(buf) == true)
+ if (sysfs_get_str(&a->info, NULL, "reshape_position", buf, sizeof(buf)) >= 0)
+ if (str_is_none(buf) == true)
a->last_checkpoint = a->info.component_size;
- }
- a->container->ss->set_array_state(a, a->curr_state <= clean);
- a->last_checkpoint = sync_completed;
+
+ write_checkpoint = true;
}
- if (sync_completed > a->last_checkpoint)
+ if (a->curr_action >= reshape && sync_completed > a->last_checkpoint) {
+ /* Update checkpoint if neither reshape nor idle action */
a->last_checkpoint = sync_completed;
+ write_checkpoint = true;
+ }
+
+ /* Save checkpoint */
+ if (write_checkpoint) {
+ a->container->ss->set_array_state(a, a->curr_state <= clean);
+
+ if (a->curr_action <= reshape)
+ a->last_checkpoint = sync_completed;
+ }
+
if (sync_completed >= a->info.component_size)
a->last_checkpoint = 0;
diff --git a/platform-intel.h b/platform-intel.h
index ce29d3d..3c2bc59 100644
--- a/platform-intel.h
+++ b/platform-intel.h
@@ -262,7 +262,6 @@ int disk_attached_to_hba(int fd, const char *hba_path);
int devt_attached_to_hba(dev_t dev, const char *hba_path);
char *devt_to_devpath(dev_t dev, int dev_level, char *buf);
int path_attached_to_hba(const char *disk_path, const char *hba_path);
-const char *get_sys_dev_type(enum sys_dev_type);
const struct orom_entry *get_orom_entry_by_device_id(__u16 dev_id);
const struct imsm_orom *get_orom_by_device_id(__u16 device_id);
struct sys_dev *device_by_id(__u16 device_id);
diff --git a/policy.c b/policy.c
index eee9ef6..dfaafdc 100644
--- a/policy.c
+++ b/policy.c
@@ -365,7 +365,6 @@ struct dev_policy *path_policy(char **paths, char *type)
{
struct pol_rule *rules;
struct dev_policy *pol = NULL;
- int i;
rules = config_rules;
@@ -380,23 +379,104 @@ struct dev_policy *path_policy(char **paths, char *type)
rules = rules->next;
}
- /* Now add any metadata-specific internal knowledge
- * about this path
- */
- for (i=0; paths && paths[0] && superlist[i]; i++)
- if (superlist[i]->get_disk_controller_domain) {
- const char *d =
- superlist[i]->get_disk_controller_domain(
- paths[0]);
- if (d)
- pol_new(&pol, pol_domain, d, superlist[i]->name);
- }
-
pol_sort(&pol);
pol_dedup(pol);
return pol;
}
+/**
+ * drive_test_and_add_policies() - get policies for drive and add them to pols.
+ * @st: supertype.
+ * @pols: pointer to pointer of first list entry, cannot be NULL, may point to NULL.
+ * @fd: device descriptor.
+ * @verbose: verbose flag.
+ *
+ * If supertype doesn't support this functionality return success. Use metadata handler to get
+ * policies.
+ */
+mdadm_status_t drive_test_and_add_policies(struct supertype *st, dev_policy_t **pols, int fd,
+ const int verbose)
+{
+ if (!st->ss->test_and_add_drive_policies)
+ return MDADM_STATUS_SUCCESS;
+
+ if (st->ss->test_and_add_drive_policies(pols, fd, verbose) == MDADM_STATUS_SUCCESS) {
+ /* After successful call list cannot be empty */
+ assert(*pols);
+ return MDADM_STATUS_SUCCESS;
+ }
+
+ return MDADM_STATUS_ERROR;
+}
+
+/**
+ * sysfs_test_and_add_policies() - get policies for mddev and add them to pols.
+ * @st: supertype.
+ * @pols: pointer to pointer of first list entry, cannot be NULL, may point to NULL.
+ * @mdi: mdinfo describes the MD array, must have GET_DISKS option.
+ * @verbose: verbose flag.
+ *
+ * If supertype doesn't support this functionality return success. To get policies, all disks
+ * connected to mddev are analyzed.
+ */
+mdadm_status_t sysfs_test_and_add_drive_policies(struct supertype *st, dev_policy_t **pols,
+ struct mdinfo *mdi, const int verbose)
+{
+ struct mdinfo *sd;
+
+ if (!st->ss->test_and_add_drive_policies)
+ return MDADM_STATUS_SUCCESS;
+
+ for (sd = mdi->devs; sd; sd = sd->next) {
+ char *devpath = map_dev(sd->disk.major, sd->disk.minor, 0);
+ int fd = dev_open(devpath, O_RDONLY);
+ int rv;
+
+ if (!is_fd_valid(fd)) {
+ pr_err("Cannot open fd for %s\n", devpath);
+ return MDADM_STATUS_ERROR;
+ }
+
+ rv = drive_test_and_add_policies(st, pols, fd, verbose);
+ close(fd);
+
+ if (rv)
+ return MDADM_STATUS_ERROR;
+ }
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * mddev_test_and_add_policies() - get policies for mddev and add them to pols.
+ * @st: supertype.
+ * @pols: pointer to pointer of first list entry, cannot be NULL, may point to NULL.
+ * @array_fd: MD device descriptor.
+ * @verbose: verbose flag.
+ *
+ * If supertype doesn't support this functionality return success. Use fd to extract disks.
+ */
+mdadm_status_t mddev_test_and_add_drive_policies(struct supertype *st, dev_policy_t **pols,
+ int array_fd, const int verbose)
+{
+ struct mdinfo *sra;
+ int ret;
+
+ if (!st->ss->test_and_add_drive_policies)
+ return MDADM_STATUS_SUCCESS;
+
+ sra = sysfs_read(array_fd, NULL, GET_DEVS);
+ if (!sra) {
+ pr_err("Cannot load sysfs for %s\n", fd2devnm(array_fd));
+ return MDADM_STATUS_ERROR;
+ }
+
+ ret = sysfs_test_and_add_drive_policies(st, pols, sra, verbose);
+
+ sysfs_free(sra);
+ return ret;
+}
+
void pol_add(struct dev_policy **pol,
char *name, char *val,
char *metadata)
@@ -679,7 +759,6 @@ int domain_test(struct domainlist *dom, struct dev_policy *pol,
* 1: has domains, all match
*/
int found_any = -1;
- int has_one_domain = 1;
struct dev_policy *p;
pol = pol_find(pol, pol_domain);
@@ -689,9 +768,6 @@ int domain_test(struct domainlist *dom, struct dev_policy *pol,
dom = dom->next;
if (!dom || strcmp(dom->dom, p->value) != 0)
return 0;
- if (has_one_domain && metadata && strcmp(metadata, "imsm") == 0)
- found_any = -1;
- has_one_domain = 0;
}
return found_any;
}
diff --git a/super-ddf.c b/super-ddf.c
index 7571e3b..21426c7 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1617,7 +1617,7 @@ static void brief_examine_super_ddf(struct supertype *st, int verbose)
struct mdinfo info;
char nbuf[64];
getinfo_super_ddf(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf("ARRAY metadata=ddf UUID=%s\n", nbuf + 5);
}
@@ -1632,7 +1632,7 @@ static void brief_examine_subarrays_ddf(struct supertype *st, int verbose)
unsigned int i;
char nbuf[64];
getinfo_super_ddf(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
for (i = 0; i < be16_to_cpu(ddf->virt->max_vdes); i++) {
struct virtual_entry *ve = &ddf->virt->entries[i];
@@ -1645,7 +1645,7 @@ static void brief_examine_subarrays_ddf(struct supertype *st, int verbose)
ddf->currentconf =&vcl;
vcl.vcnum = i;
uuid_from_super_ddf(st, info.uuid);
- fname_from_uuid(st, &info, nbuf1, ':');
+ fname_from_uuid(&info, nbuf1);
_ddf_array_name(namebuf, ddf, i);
printf("ARRAY%s%s container=%s member=%d UUID=%s\n",
namebuf[0] == '\0' ? "" : " " DEV_MD_DIR, namebuf,
@@ -1658,7 +1658,7 @@ static void export_examine_super_ddf(struct supertype *st)
struct mdinfo info;
char nbuf[64];
getinfo_super_ddf(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf("MD_METADATA=ddf\n");
printf("MD_LEVEL=container\n");
printf("MD_UUID=%s\n", nbuf+5);
@@ -1798,7 +1798,7 @@ static void brief_detail_super_ddf(struct supertype *st, char *subarray)
return;
else
uuid_of_ddf_subarray(ddf, vcnum, info.uuid);
- fname_from_uuid(st, &info, nbuf,':');
+ fname_from_uuid(&info, nbuf);
printf(" UUID=%s", nbuf + 5);
}
@@ -5162,6 +5162,7 @@ struct superswitch super_ddf = {
.default_geometry = default_geometry_ddf,
.external = 1,
+ .swapuuid = 0,
/* for mdmon */
.open_new = ddf_open_new,
diff --git a/super-intel.c b/super-intel.c
index dbea235..1faab60 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -27,6 +27,7 @@
#include <scsi/sg.h>
#include <ctype.h>
#include <dirent.h>
+#include "drive_encryption.h"
/* MPB == Metadata Parameter Block */
#define MPB_SIGNATURE "Intel Raid ISM Cfg Sig. "
@@ -393,8 +394,6 @@ struct md_list {
struct md_list *next;
};
-#define pr_vrb(fmt, arg...) (void) (verbose && pr_err(fmt, ##arg))
-
static __u8 migr_type(struct imsm_dev *dev)
{
if (dev->vol.migr_type == MIGR_VERIFY &&
@@ -1736,48 +1735,6 @@ static __u32 imsm_min_reserved_sectors(struct intel_super *super)
return (remainder < rv) ? remainder : rv;
}
-/*
- * Return minimum size of a spare and sector size
- * that can be used in this array
- */
-int get_spare_criteria_imsm(struct supertype *st, struct spare_criteria *c)
-{
- struct intel_super *super = st->sb;
- struct dl *dl;
- struct extent *e;
- int i;
- unsigned long long size = 0;
-
- c->min_size = 0;
- c->sector_size = 0;
-
- if (!super)
- return -EINVAL;
- /* find first active disk in array */
- dl = super->disks;
- while (dl && (is_failed(&dl->disk) || dl->index == -1))
- dl = dl->next;
- if (!dl)
- return -EINVAL;
- /* find last lba used by subarrays */
- e = get_extents(super, dl, 0);
- if (!e)
- return -EINVAL;
- for (i = 0; e[i].size; i++)
- continue;
- if (i > 0)
- size = e[i-1].start + e[i-1].size;
- free(e);
-
- /* add the amount of space needed for metadata */
- size += imsm_min_reserved_sectors(super);
-
- c->min_size = size * 512;
- c->sector_size = super->sector_size;
-
- return 0;
-}
-
static bool is_gen_migration(struct imsm_dev *dev);
#define IMSM_4K_DIV 8
@@ -2259,7 +2216,7 @@ static void examine_super_imsm(struct supertype *st, char *homehost)
else
printf("not supported\n");
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf(" UUID : %s\n", nbuf + 5);
sum = __le32_to_cpu(mpb->check_sum);
printf(" Checksum : %08x %s\n", sum,
@@ -2284,7 +2241,7 @@ static void examine_super_imsm(struct supertype *st, char *homehost)
super->current_vol = i;
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
print_imsm_dev(super, dev, nbuf + 5, super->disks->index);
}
for (i = 0; i < mpb->num_disks; i++) {
@@ -2309,7 +2266,7 @@ static void brief_examine_super_imsm(struct supertype *st, int verbose)
char nbuf[64];
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf("ARRAY metadata=imsm UUID=%s\n", nbuf + 5);
}
@@ -2326,13 +2283,13 @@ static void brief_examine_subarrays_imsm(struct supertype *st, int verbose)
return;
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
for (i = 0; i < super->anchor->num_raid_devs; i++) {
struct imsm_dev *dev = get_imsm_dev(super, i);
super->current_vol = i;
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf1, ':');
+ fname_from_uuid(&info, nbuf1);
printf("ARRAY " DEV_MD_DIR "%.16s container=%s member=%d UUID=%s\n",
dev->volume, nbuf + 5, i, nbuf1 + 5);
}
@@ -2346,7 +2303,7 @@ static void export_examine_super_imsm(struct supertype *st)
char nbuf[64];
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf("MD_METADATA=imsm\n");
printf("MD_LEVEL=container\n");
printf("MD_UUID=%s\n", nbuf+5);
@@ -2366,7 +2323,7 @@ static void detail_super_imsm(struct supertype *st, char *homehost,
super->current_vol = strtoul(subarray, NULL, 10);
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf("\n UUID : %s\n", nbuf + 5);
super->current_vol = temp_vol;
@@ -2383,7 +2340,7 @@ static void brief_detail_super_imsm(struct supertype *st, char *subarray)
super->current_vol = strtoul(subarray, NULL, 10);
getinfo_super_imsm(st, &info, NULL);
- fname_from_uuid(st, &info, nbuf, ':');
+ fname_from_uuid(&info, nbuf);
printf(" UUID=%s", nbuf + 5);
super->current_vol = temp_vol;
@@ -2393,12 +2350,41 @@ static int imsm_read_serial(int fd, char *devname, __u8 *serial,
size_t serial_buf_len);
static void fd2devname(int fd, char *name);
-static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_base, int verbose)
+void print_encryption_information(int disk_fd, enum sys_dev_type hba_type)
+{
+ struct encryption_information information = {0};
+ mdadm_status_t status = MDADM_STATUS_SUCCESS;
+ const char *indent = " ";
+
+ switch (hba_type) {
+ case SYS_DEV_VMD:
+ case SYS_DEV_NVME:
+ status = get_nvme_opal_encryption_information(disk_fd, &information, 1);
+ break;
+ case SYS_DEV_SATA:
+ case SYS_DEV_SATA_VMD:
+ status = get_ata_encryption_information(disk_fd, &information, 1);
+ break;
+ default:
+ return;
+ }
+
+ if (status) {
+ pr_err("Failed to get drive encryption information.\n");
+ return;
+ }
+
+ printf("%sEncryption(Ability|Status): %s|%s\n", indent,
+ get_encryption_ability_string(information.ability),
+ get_encryption_status_string(information.status));
+}
+
+static int ahci_enumerate_ports(struct sys_dev *hba, int port_count, int host_base, int verbose)
{
/* dump an unsorted list of devices attached to AHCI Intel storage
* controller, as well as non-connected ports
*/
- int hba_len = strlen(hba_path) + 1;
+ int hba_len = strlen(hba->path) + 1;
struct dirent *ent;
DIR *dir;
char *path = NULL;
@@ -2434,7 +2420,7 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
path = devt_to_devpath(makedev(major, minor), 1, NULL);
if (!path)
continue;
- if (!path_attached_to_hba(path, hba_path)) {
+ if (!path_attached_to_hba(path, hba->path)) {
free(path);
path = NULL;
continue;
@@ -2537,6 +2523,8 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
printf(" (%s)\n", buf);
else
printf(" ()\n");
+
+ print_encryption_information(fd, hba->type);
close(fd);
}
free(path);
@@ -2601,6 +2589,8 @@ static int print_nvme_info(struct sys_dev *hba)
else
printf("()\n");
+ print_encryption_information(fd, hba->type);
+
skip:
close_fd(&fd);
}
@@ -2856,7 +2846,7 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
hba->path, get_sys_dev_type(hba->type));
if (hba->type == SYS_DEV_SATA || hba->type == SYS_DEV_SATA_VMD) {
host_base = ahci_get_port_count(hba->path, &port_count);
- if (ahci_enumerate_ports(hba->path, port_count, host_base, verbose)) {
+ if (ahci_enumerate_ports(hba, port_count, host_base, verbose)) {
if (verbose > 0)
pr_err("failed to enumerate ports on %s controller at %s.\n",
get_sys_dev_type(hba->type), hba->pci_id);
@@ -4174,17 +4164,17 @@ static int imsm_read_serial(int fd, char *devname,
memset(buf, 0, sizeof(buf));
+ if (check_env("IMSM_DEVNAME_AS_SERIAL")) {
+ memset(serial, 0, serial_buf_len);
+ fd2devname(fd, (char *) serial);
+ return 0;
+ }
+
rv = nvme_get_serial(fd, buf, sizeof(buf));
if (rv)
rv = scsi_get_serial(fd, buf, sizeof(buf));
- if (rv && check_env("IMSM_DEVNAME_AS_SERIAL")) {
- memset(serial, 0, MAX_RAID_SERIAL_LEN);
- fd2devname(fd, (char *) serial);
- return 0;
- }
-
if (rv != 0) {
if (devname)
pr_err("Failed to retrieve serial for %s\n",
@@ -8771,6 +8761,9 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
super->updates_pending++;
}
+ if (a->prev_action == idle)
+ goto skip_mark_checkpoint;
+
mark_checkpoint:
/* skip checkpointing for general migration,
* it is controlled in mdadm
@@ -11259,39 +11252,247 @@ abort:
return retval;
}
-static char disk_by_path[] = "/dev/disk/by-path/";
-
-static const char *imsm_get_disk_controller_domain(const char *path)
-{
- char disk_path[PATH_MAX];
- char *drv=NULL;
- struct stat st;
-
- strncpy(disk_path, disk_by_path, PATH_MAX);
- strncat(disk_path, path, PATH_MAX - strlen(disk_path) - 1);
- if (stat(disk_path, &st) == 0) {
- struct sys_dev* hba;
- char *path;
-
- path = devt_to_devpath(st.st_rdev, 1, NULL);
- if (path == NULL)
- return "unknown";
- hba = find_disk_attached_hba(-1, path);
- if (hba && hba->type == SYS_DEV_SAS)
- drv = "isci";
- else if (hba && (hba->type == SYS_DEV_SATA || hba->type == SYS_DEV_SATA_VMD))
- drv = "ahci";
- else if (hba && hba->type == SYS_DEV_VMD)
- drv = "vmd";
- else if (hba && hba->type == SYS_DEV_NVME)
- drv = "nvme";
- else
- drv = "unknown";
- dprintf("path: %s hba: %s attached: %s\n",
- path, (hba) ? hba->path : "NULL", drv);
- free(path);
+/**
+ * test_and_add_drive_controller_policy_imsm() - add disk controller to policies list.
+ * @type: Policy type to search on list.
+ * @pols: List of currently recorded policies.
+ * @disk_fd: File descriptor of the device to check.
+ * @hba: The hba disk is attached, could be NULL if verification is disabled.
+ * @verbose: verbose flag.
+ *
+ * IMSM cares about drive physical placement. If @hba is not set, it adds unknown policy.
+ * If there is no controller policy on pols we are free to add first one. If there is a policy then,
+ * new must be the same - no controller mixing allowed.
+ */
+static mdadm_status_t
+test_and_add_drive_controller_policy_imsm(const char * const type, dev_policy_t **pols, int disk_fd,
+ struct sys_dev *hba, const int verbose)
+{
+ const char *controller_policy = get_sys_dev_type(SYS_DEV_UNKNOWN);
+ struct dev_policy *pol = pol_find(*pols, (char *)type);
+ char devname[MAX_RAID_SERIAL_LEN];
+
+ if (hba)
+ controller_policy = get_sys_dev_type(hba->type);
+
+ if (!pol) {
+ pol_add(pols, (char *)type, (char *)controller_policy, "imsm");
+ return MDADM_STATUS_SUCCESS;
+ }
+
+ if (strcmp(pol->value, controller_policy) == 0)
+ return MDADM_STATUS_SUCCESS;
+
+ fd2devname(disk_fd, devname);
+ pr_vrb("Intel(R) raid controller \"%s\" found for %s, but \"%s\" was detected earlier\n",
+ controller_policy, devname, pol->value);
+ pr_vrb("Disks under different controllers cannot be used, aborting\n");
+
+ return MDADM_STATUS_ERROR;
+}
+
+/**
+ * test_and_add_drive_encryption_policy_imsm() - add disk encryption to policies list.
+ * @type: policy type to search in the list.
+ * @pols: list of currently recorded policies.
+ * @disk_fd: file descriptor of the device to check.
+ * @hba: The hba to which the drive is attached, could be NULL if verification is disabled.
+ * @verbose: verbose flag.
+ *
+ * IMSM cares about drive encryption state. It is not allowed to mix disks with different
+ * encryption state within one md device.
+ * If there is no encryption policy on pols we are free to add first one.
+ * If there is a policy then, new must be the same.
+ */
+static mdadm_status_t
+test_and_add_drive_encryption_policy_imsm(const char * const type, dev_policy_t **pols, int disk_fd,
+ struct sys_dev *hba, const int verbose)
+{
+ struct dev_policy *expected_policy = pol_find(*pols, (char *)type);
+ struct encryption_information information = {0};
+ char *encryption_state = "Unknown";
+ int status = MDADM_STATUS_SUCCESS;
+ bool encryption_checked = true;
+ char devname[PATH_MAX];
+
+ if (!hba)
+ goto check_policy;
+
+ switch (hba->type) {
+ case SYS_DEV_NVME:
+ case SYS_DEV_VMD:
+ status = get_nvme_opal_encryption_information(disk_fd, &information, verbose);
+ break;
+ case SYS_DEV_SATA:
+ case SYS_DEV_SATA_VMD:
+ status = get_ata_encryption_information(disk_fd, &information, verbose);
+ break;
+ default:
+ encryption_checked = false;
+ }
+
+ if (status) {
+ fd2devname(disk_fd, devname);
+ pr_vrb("Failed to read encryption information of device %s\n", devname);
+ return MDADM_STATUS_ERROR;
+ }
+
+ if (encryption_checked) {
+ if (information.status == ENC_STATUS_LOCKED) {
+ fd2devname(disk_fd, devname);
+ pr_vrb("Device %s is in Locked state, cannot use. Aborting.\n", devname);
+ return MDADM_STATUS_ERROR;
+ }
+ encryption_state = (char *)get_encryption_status_string(information.status);
}
- return drv;
+
+check_policy:
+ if (expected_policy) {
+ if (strcmp(expected_policy->value, encryption_state) == 0)
+ return MDADM_STATUS_SUCCESS;
+
+ fd2devname(disk_fd, devname);
+ pr_vrb("Encryption status \"%s\" detected for disk %s, but \"%s\" status was detected eariler.\n",
+ encryption_state, devname, expected_policy->value);
+ pr_vrb("Disks with different encryption status cannot be used.\n");
+ return MDADM_STATUS_ERROR;
+ }
+
+ pol_add(pols, (char *)type, encryption_state, "imsm");
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+struct imsm_drive_policy {
+ char *type;
+ mdadm_status_t (*test_and_add_drive_policy)(const char * const type,
+ struct dev_policy **pols, int disk_fd,
+ struct sys_dev *hba, const int verbose);
+};
+
+struct imsm_drive_policy imsm_policies[] = {
+ {"controller", test_and_add_drive_controller_policy_imsm},
+ {"encryption", test_and_add_drive_encryption_policy_imsm}
+};
+
+mdadm_status_t test_and_add_drive_policies_imsm(struct dev_policy **pols, int disk_fd,
+ const int verbose)
+{
+ struct imsm_drive_policy *imsm_pol;
+ struct sys_dev *hba = NULL;
+ char path[PATH_MAX];
+ mdadm_status_t ret;
+ unsigned int i;
+
+ /* If imsm platform verification is disabled, do not search for hba. */
+ if (check_no_platform() != 1) {
+ if (!diskfd_to_devpath(disk_fd, 1, path)) {
+ pr_vrb("IMSM: Failed to retrieve device path by file descriptor.\n");
+ return MDADM_STATUS_ERROR;
+ }
+
+ hba = find_disk_attached_hba(disk_fd, path);
+ if (!hba) {
+ pr_vrb("IMSM: Failed to find hba for %s\n", path);
+ return MDADM_STATUS_ERROR;
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(imsm_policies); i++) {
+ imsm_pol = &imsm_policies[i];
+
+ ret = imsm_pol->test_and_add_drive_policy(imsm_pol->type, pols, disk_fd, hba,
+ verbose);
+ if (ret != MDADM_STATUS_SUCCESS)
+ /* Inherit error code */
+ return ret;
+ }
+
+ return MDADM_STATUS_SUCCESS;
+}
+
+/**
+ * get_spare_criteria_imsm() - set spare criteria.
+ * @st: supertype.
+ * @mddev_path: path to md device devnode, it must be container.
+ * @c: spare_criteria struct to fill, not NULL.
+ *
+ * If superblock is not loaded, use mddev_path to load_container. It must be given in this case.
+ * Filles size and sector size accordingly to superblock.
+ */
+mdadm_status_t get_spare_criteria_imsm(struct supertype *st, char *mddev_path,
+ struct spare_criteria *c)
+{
+ mdadm_status_t ret = MDADM_STATUS_ERROR;
+ bool free_superblock = false;
+ unsigned long long size = 0;
+ struct intel_super *super;
+ struct extent *e;
+ struct dl *dl;
+ int i;
+
+ /* If no superblock and no mddev_path, we cannot load superblock. */
+ assert(st->sb || mddev_path);
+
+ if (mddev_path) {
+ int fd = open(mddev_path, O_RDONLY);
+ mdadm_status_t rv;
+
+ if (!is_fd_valid(fd))
+ return MDADM_STATUS_ERROR;
+
+ if (!st->sb) {
+ if (load_container_imsm(st, fd, st->devnm)) {
+ close(fd);
+ return MDADM_STATUS_ERROR;
+ }
+ free_superblock = true;
+ }
+
+ rv = mddev_test_and_add_drive_policies(st, &c->pols, fd, 0);
+ close(fd);
+
+ if (rv != MDADM_STATUS_SUCCESS)
+ goto out;
+ }
+
+ super = st->sb;
+
+ /* find first active disk in array */
+ dl = super->disks;
+ while (dl && (is_failed(&dl->disk) || dl->index == -1))
+ dl = dl->next;
+
+ if (!dl)
+ goto out;
+
+ /* find last lba used by subarrays */
+ e = get_extents(super, dl, 0);
+ if (!e)
+ goto out;
+
+ for (i = 0; e[i].size; i++)
+ continue;
+ if (i > 0)
+ size = e[i - 1].start + e[i - 1].size;
+ free(e);
+
+ /* add the amount of space needed for metadata */
+ size += imsm_min_reserved_sectors(super);
+
+ c->min_size = size * 512;
+ c->sector_size = super->sector_size;
+ c->criteria_set = true;
+ ret = MDADM_STATUS_SUCCESS;
+
+out:
+ if (free_superblock)
+ free_super_imsm(st);
+
+ if (ret != MDADM_STATUS_SUCCESS)
+ c->criteria_set = false;
+
+ return ret;
}
static char *imsm_find_array_devnm_by_subdev(int subdev, char *container)
@@ -11422,10 +11623,15 @@ static int imsm_reshape_is_allowed_on_container(struct supertype *st,
*/
static struct mdinfo *get_spares_for_grow(struct supertype *st)
{
- struct spare_criteria sc;
+ struct spare_criteria sc = {0};
+ struct mdinfo *spares;
+
+ get_spare_criteria_imsm(st, NULL, &sc);
+ spares = container_choose_spares(st, &sc, NULL, NULL, NULL, 0);
+
+ dev_policy_free(sc.pols);
- get_spare_criteria_imsm(st, &sc);
- return container_choose_spares(st, &sc, NULL, NULL, NULL, 0);
+ return spares;
}
/******************************************************************************
@@ -12987,7 +13193,7 @@ struct superswitch super_imsm = {
.update_subarray = update_subarray_imsm,
.load_container = load_container_imsm,
.default_geometry = default_geometry_imsm,
- .get_disk_controller_domain = imsm_get_disk_controller_domain,
+ .test_and_add_drive_policies = test_and_add_drive_policies_imsm,
.reshape_super = imsm_reshape_super,
.manage_reshape = imsm_manage_reshape,
.recover_backup = recover_backup_imsm,
@@ -13020,6 +13226,7 @@ struct superswitch super_imsm = {
.validate_ppl = validate_ppl_imsm,
.external = 1,
+ .swapuuid = 0,
.name = "imsm",
/* for mdmon */
diff --git a/super0.c b/super0.c
index a7c5f81..9b8a1bd 100644
--- a/super0.c
+++ b/super0.c
@@ -1369,5 +1369,7 @@ struct superswitch super0 = {
.locate_bitmap = locate_bitmap0,
.write_bitmap = write_bitmap0,
.free_super = free_super0,
+
+ .swapuuid = 0,
.name = "0.90",
};
diff --git a/super1.c b/super1.c
index 871d19f..81d29a6 100644
--- a/super1.c
+++ b/super1.c
@@ -575,17 +575,6 @@ static void examine_super1(struct supertype *st, char *homehost)
inconsistent = 1;
}
}
-#if 0
- /* This is confusing too */
- faulty = 0;
- for (i = 0; i < __le32_to_cpu(sb->max_dev); i++) {
- int role = __le16_to_cpu(sb->dev_roles[i]);
- if (role == MD_DISK_ROLE_FAULTY)
- faulty++;
- }
- if (faulty)
- printf(" %d failed", faulty);
-#endif
printf(" ('A' == active, '.' == missing, 'R' == replacing)");
printf("\n");
for (d = 0; d < __le32_to_cpu(sb->max_dev); d++) {
@@ -1752,7 +1741,10 @@ static int add_to_super1(struct supertype *st, mdu_disk_info_t *dk,
di->devname = devname;
di->disk = *dk;
di->data_offset = data_offset;
- get_dev_size(fd, NULL, &di->dev_size);
+
+ if (is_fd_valid(fd))
+ get_dev_size(fd, NULL, &di->dev_size);
+
di->next = NULL;
*dip = di;
diff --git a/sysfs.c b/sysfs.c
index f95ef70..20fe1e9 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -74,6 +74,29 @@ void sysfs_free(struct mdinfo *sra)
}
}
+/**
+ * sysfs_get_container_devnm() - extract container device name.
+ * @mdi: md_info describes member array, with GET_VERSION option.
+ * @buf: buf to fill, must be MD_NAME_MAX.
+ *
+ * External array version is in format {/,-}<container_devnm>/<array_index>
+ * Extract container_devnm from it and safe it in @buf.
+ */
+void sysfs_get_container_devnm(struct mdinfo *mdi, char *buf)
+{
+ char *p;
+
+ assert(is_subarray(mdi->text_version));
+
+ /* Skip first special sign */
+ snprintf(buf, MD_NAME_MAX, "%s", mdi->text_version + 1);
+
+ /* Remove array index */
+ p = strchr(buf, '/');
+ if (p)
+ *p = 0;
+}
+
int sysfs_open(char *devnm, char *devname, char *attr)
{
char fname[MAX_SYSFS_PATH_LEN];
@@ -655,7 +678,7 @@ int sysfs_set_safemode(struct mdinfo *sra, unsigned long ms)
return sysfs_set_str(sra, NULL, "safe_mode_delay", delay);
}
-int sysfs_set_array(struct mdinfo *info, int vers)
+int sysfs_set_array(struct mdinfo *info)
{
int rv = 0;
char ver[100];
@@ -679,9 +702,7 @@ int sysfs_set_array(struct mdinfo *info, int vers)
if (strlen(buf) >= 9 && buf[9] == '-')
ver[9] = '-';
- if ((vers % 100) < 2 ||
- sysfs_set_str(info, NULL, "metadata_version",
- ver) < 0) {
+ if (sysfs_set_str(info, NULL, "metadata_version", ver) < 0) {
pr_err("This kernel does not support external metadata.\n");
return 1;
}
@@ -1100,3 +1121,32 @@ void sysfsline(char *line)
sr->next = sysfs_rules;
sysfs_rules = sr;
}
+
+/**
+ * sysfs_is_libata_allow_tpm_enabled() - check if libata allow_tmp is enabled.
+ * @verbose: verbose flag.
+ *
+ * Check if libata allow_tmp flag is set, this is required for SATA Opal Security commands to work.
+ *
+ * Return: true if allow_tpm enable, false otherwise.
+ */
+bool sysfs_is_libata_allow_tpm_enabled(const int verbose)
+{
+ const char *path = "/sys/module/libata/parameters/allow_tpm";
+ const char *expected_value = "1";
+ int fd = open(path, O_RDONLY);
+ char buf[3];
+
+ if (!is_fd_valid(fd)) {
+ pr_vrb("Failed open file descriptor to %s. Cannot check libata allow_tpm param.\n",
+ path);
+ return false;
+ }
+
+ sysfs_fd_get_str(fd, buf, sizeof(buf));
+ close(fd);
+
+ if (strncmp(buf, expected_value, 1) == 0)
+ return true;
+ return false;
+}
diff --git a/test b/test
index 49a36c3..338c2db 100755
--- a/test
+++ b/test
@@ -1,11 +1,12 @@
#!/bin/bash
#
# run test suite for mdadm
-mdadm=$PWD/mdadm
+mdadm=`which mdadm`
targetdir="/var/tmp"
logdir="$targetdir"
config=/tmp/mdadm.conf
testdir=$PWD/tests
+system_speed_limit=`cat /proc/sys/dev/raid/speed_limit_max`
devlist=
savelogs=0
@@ -20,9 +21,6 @@ DEVTYPE=loop
INTEGRITY=yes
LVM_VOLGROUP=mdtest
-# make sure to test local mdmon, not system one
-export MDADM_NO_SYSTEMCTL=1
-
# assume md0, md1, md2 exist in /dev
md0=/dev/md0
md1=/dev/md1
@@ -41,7 +39,10 @@ ctrl_c() {
ctrl_c_error=1
}
-# mdadm always adds --quiet, and we want to see any unexpected messages
+restore_system_speed_limit() {
+ echo $system_speed_limit > /proc/sys/dev/raid/speed_limit_max
+}
+
mdadm() {
rm -f $targetdir/stderr
case $* in
@@ -63,10 +64,10 @@ mdadm() {
$mdadm --zero $args > /dev/null
}
done
- $mdadm 2> $targetdir/stderr --quiet "$@" --auto=yes
+ $mdadm 2> $targetdir/stderr "$@" --auto=yes
;;
* )
- $mdadm 2> $targetdir/stderr --quiet "$@"
+ $mdadm 2> $targetdir/stderr "$@"
;;
esac
rv=$?
@@ -99,8 +100,6 @@ do_test() {
fi
rm -f $targetdir/stderr
- # this might have been reset: restore the default.
- echo 2000 > /proc/sys/dev/raid/speed_limit_max
do_clean
# source script in a subshell, so it has access to our
# namespace, but cannot change it.
@@ -122,6 +121,7 @@ do_test() {
echo " (KNOWN BROKEN TEST: $_broken_msg)"
fi
fi
+ restore_system_speed_limit
[ "$savelogs" == "1" ] &&
mv -f $targetdir/log $logdir/$_basename.log
[ "$ctrl_c_error" == "1" ] && exit 1
@@ -299,7 +299,15 @@ parse_args() {
done
}
+print_warning() {
+ cat <<-EOF
+ Warning! Tests are performed on system level mdadm!
+ If you want to test local build, you need to install it first!
+ EOF
+}
+
main() {
+ print_warning
do_setup
echo "Testing on linux-$(uname -r) kernel"
@@ -329,6 +337,7 @@ main() {
break
fi
done
+
exit 0
}
diff --git a/tests/func.sh b/tests/func.sh
index 1c1a28a..b474442 100644
--- a/tests/func.sh
+++ b/tests/func.sh
@@ -213,7 +213,6 @@ do_setup() {
path1=$dev7
ulimit -c unlimited
[ -f /proc/mdstat ] || modprobe md_mod
- echo 2000 > /proc/sys/dev/raid/speed_limit_max
echo 0 > /sys/module/md_mod/parameters/start_ro
}
diff --git a/udev.c b/udev.c
index bc4722b..066e6ab 100644
--- a/udev.c
+++ b/udev.c
@@ -26,7 +26,10 @@
#include <signal.h>
#include <limits.h>
#include <syslog.h>
+
+#ifndef NO_LIBUDEV
#include <libudev.h>
+#endif
static char *unblock_path;
diff --git a/util.c b/util.c
index b145447..9e83704 100644
--- a/util.c
+++ b/util.c
@@ -36,7 +36,7 @@
#include <ctype.h>
#include <dirent.h>
#include <dlfcn.h>
-
+#include <limits.h>
/*
* following taken from linux/blkpg.h because they aren't
@@ -589,19 +589,21 @@ char *__fname_from_uuid(int id[4], int swap, char *buf, char sep)
}
-char *fname_from_uuid(struct supertype *st, struct mdinfo *info,
- char *buf, char sep)
+/**
+ * fname_from_uuid() - generate uuid string. Should not be used with super1.
+ * @info: info with uuid
+ * @buf: buf to fill.
+ *
+ * This routine should not be used with super1. See detail_fname_from_uuid() for details. It does
+ * not use superswitch swapuuid as it should be 0 but it has to do UUID conversion if host is big
+ * endian- left for backward compatibility.
+ */
+char *fname_from_uuid(struct mdinfo *info, char *buf)
{
- // dirty hack to work around an issue with super1 superblocks...
- // super1 superblocks need swapuuid set in order for assembly to
- // work, but can't have it set if we want this printout to match
- // all the other uuid printouts in super1.c, so we force swapuuid
- // to 1 to make our printout match the rest of super1
#if __BYTE_ORDER == BIG_ENDIAN
- return __fname_from_uuid(info->uuid, 1, buf, sep);
+ return __fname_from_uuid(info->uuid, true, buf, ':');
#else
- return __fname_from_uuid(info->uuid, (st->ss == &super1) ? 1 :
- st->ss->swapuuid, buf, sep);
+ return __fname_from_uuid(info->uuid, false, buf, ':');
#endif
}
@@ -1266,40 +1268,6 @@ struct supertype *super_by_fd(int fd, char **subarrayp)
return st;
}
-int dev_size_from_id(dev_t id, unsigned long long *size)
-{
- char buf[20];
- int fd;
-
- sprintf(buf, "%d:%d", major(id), minor(id));
- fd = dev_open(buf, O_RDONLY);
- if (fd < 0)
- return 0;
- if (get_dev_size(fd, NULL, size)) {
- close(fd);
- return 1;
- }
- close(fd);
- return 0;
-}
-
-int dev_sector_size_from_id(dev_t id, unsigned int *size)
-{
- char buf[20];
- int fd;
-
- sprintf(buf, "%d:%d", major(id), minor(id));
- fd = dev_open(buf, O_RDONLY);
- if (fd < 0)
- return 0;
- if (get_dev_sector_size(fd, NULL, size)) {
- close(fd);
- return 1;
- }
- close(fd);
- return 0;
-}
-
struct supertype *dup_super(struct supertype *orig)
{
struct supertype *st;
@@ -1899,8 +1867,7 @@ int set_array_info(int mdfd, struct supertype *st, struct mdinfo *info)
int rv;
if (st->ss->external)
- return sysfs_set_array(info, 9003);
-
+ return sysfs_set_array(info);
memset(&inf, 0, sizeof(inf));
inf.major_version = info->array.major_version;
inf.minor_version = info->array.minor_version;
@@ -2088,6 +2055,65 @@ void append_metadata_update(struct supertype *st, void *buf, int len)
unsigned int __invalid_size_argument_for_IOC = 0;
#endif
+/**
+ * disk_fd_matches_criteria() - check if device matches spare criteria.
+ * @st: supertype, not NULL.
+ * @disk_fd: file descriptor of the disk.
+ * @sc: criteria to test.
+ *
+ * Return: true if disk matches criteria, false otherwise.
+ */
+bool disk_fd_matches_criteria(struct supertype *st, int disk_fd, struct spare_criteria *sc)
+{
+ unsigned int dev_sector_size = 0;
+ unsigned long long dev_size = 0;
+
+ if (!sc->criteria_set)
+ return true;
+
+ if (!get_dev_size(disk_fd, NULL, &dev_size) || dev_size < sc->min_size)
+ return false;
+
+ if (!get_dev_sector_size(disk_fd, NULL, &dev_sector_size) ||
+ sc->sector_size != dev_sector_size)
+ return false;
+
+ if (drive_test_and_add_policies(st, &sc->pols, disk_fd, 0))
+ return false;
+
+ return true;
+}
+
+/**
+ * devid_matches_criteria() - check if device referenced by devid matches spare criteria.
+ * @st: supertype, not NULL.
+ * @devid: devid of the device to check.
+ * @sc: criteria to test.
+ *
+ * Return: true if disk matches criteria, false otherwise.
+ */
+bool devid_matches_criteria(struct supertype *st, dev_t devid, struct spare_criteria *sc)
+{
+ char buf[NAME_MAX];
+ bool ret;
+ int fd;
+
+ if (!sc->criteria_set)
+ return true;
+
+ snprintf(buf, NAME_MAX, "%d:%d", major(devid), minor(devid));
+
+ fd = dev_open(buf, O_RDONLY);
+ if (!is_fd_valid(fd))
+ return false;
+
+ /* Error code inherited */
+ ret = disk_fd_matches_criteria(st, fd, sc);
+
+ close(fd);
+ return ret;
+}
+
/* Pick all spares matching given criteria from a container
* if min_size == 0 do not check size
* if domlist == NULL do not check domains
@@ -2111,28 +2137,13 @@ struct mdinfo *container_choose_spares(struct supertype *st,
dp = &disks->devs;
disks->array.spare_disks = 0;
while (*dp) {
- int found = 0;
+ bool found = false;
+
d = *dp;
if (d->disk.state == 0) {
- /* check if size is acceptable */
- unsigned long long dev_size;
- unsigned int dev_sector_size;
- int size_valid = 0;
- int sector_size_valid = 0;
-
dev_t dev = makedev(d->disk.major,d->disk.minor);
- if (!criteria->min_size ||
- (dev_size_from_id(dev, &dev_size) &&
- dev_size >= criteria->min_size))
- size_valid = 1;
-
- if (!criteria->sector_size ||
- (dev_sector_size_from_id(dev, &dev_sector_size) &&
- criteria->sector_size == dev_sector_size))
- sector_size_valid = 1;
-
- found = size_valid && sector_size_valid;
+ found = devid_matches_criteria(st, dev, criteria);
/* check if domain matches */
if (found && domlist) {
@@ -2141,7 +2152,8 @@ struct mdinfo *container_choose_spares(struct supertype *st,
pol_add(&pol, pol_domain,
spare_group, NULL);
if (domain_test(domlist, pol, metadata) != 1)
- found = 0;
+ found = false;
+
dev_policy_free(pol);
}
}