diff -Nru mdadm-4.1/debian/compat mdadm-4.2~rc2/debian/compat --- mdadm-4.1/debian/compat 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/compat 1970-01-01 02:00:00.000000000 +0200 @@ -1 +0,0 @@ -11 diff -Nru mdadm-4.1/debian/control mdadm-4.2~rc2/debian/control --- mdadm-4.1/debian/control 2020-01-23 20:39:24.000000000 +0200 +++ mdadm-4.2~rc2/debian/control 2021-09-22 13:50:22.000000000 +0200 @@ -2,21 +2,36 @@ Section: admin Priority: optional Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian QA Group -Build-Depends: debhelper (>= 11), po-debconf, groff-base -Standards-Version: 4.3.0 -Vcs-Git: https://git.dgit.debian.org/mdadm -Vcs-Browser: https://browse.dgit.debian.org/mdadm.git +XSBC-Original-Maintainer: Felix Lechner +Build-Depends: + debhelper-compat (= 12), + libudev-dev, + groff-base, + po-debconf +Standards-Version: 4.5.1 +Rules-Requires-Root: no +Vcs-Git: https://salsa.debian.org/lechner/mdadm.git -b debian/master +Vcs-Browser: https://salsa.debian.org/lechner/mdadm Homepage: http://neil.brown.name/blog/mdadm Package: mdadm Architecture: linux-any -Depends: ${shlibs:Depends}, udev, ${misc:Depends}, lsb-base, debconf -Recommends: ${mta:Recommends}, kmod | module-init-tools, finalrd (>= 3~) -Breaks: finalrd (<= 2) -Replaces: finalrd (<= 2) -Suggests: ${mta:Suggests}, dracut-core -Description: tool to administer Linux MD arrays (software RAID) +Pre-Depends: + ${misc:Pre-Depends} +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + debconf, + lsb-base, + udev +Recommends: + ${mta:Recommends}, + finalrd (>= 3~), + kmod | module-init-tools +Suggests: + ${mta:Suggests}, + dracut-core +Description: Tool to administer Linux MD arrays (software RAID) The mdadm utility can be used to create, manage, and monitor MD (multi-disk) arrays for software RAID or multipath I/O. . @@ -27,8 +42,9 @@ Section: debian-installer Package-Type: udeb Architecture: linux-any -Depends: ${shlibs:Depends} -Description: tool to administer Linux MD arrays (software RAID) +Depends: + ${shlibs:Depends} +Description: Tool to administer Linux MD arrays (software RAID) The mdadm utility can be used to create, manage, and monitor MD (multi-disk) arrays for software RAID or multipath I/O. . diff -Nru mdadm-4.1/debian/initramfs/hook mdadm-4.2~rc2/debian/initramfs/hook --- mdadm-4.1/debian/initramfs/hook 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/initramfs/hook 2021-05-11 15:49:35.000000000 +0200 @@ -65,6 +65,9 @@ force_load $module done +# load efivars for Intel RST IMSM, see Bug#962844 +force_load efivars || true + # copy the mdadm configuration CONFIG=/etc/mdadm/mdadm.conf ALTCONFIG=/etc/mdadm.conf diff -Nru mdadm-4.1/debian/mdadm.lintian-overrides mdadm-4.2~rc2/debian/mdadm.lintian-overrides --- mdadm-4.1/debian/mdadm.lintian-overrides 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/mdadm.lintian-overrides 2021-05-11 15:49:35.000000000 +0200 @@ -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 -Nru mdadm-4.1/debian/mdadm.postinst mdadm-4.2~rc2/debian/mdadm.postinst --- mdadm-4.1/debian/mdadm.postinst 2019-08-09 19:12:58.000000000 +0200 +++ mdadm-4.2~rc2/debian/mdadm.postinst 2021-05-11 15:49:35.000000000 +0200 @@ -76,7 +76,7 @@ # AUTOSCAN: # should mdadm check once a day for degraded arrays? See -# /etc/cron.daily/mdadm. +# /lib/systemd/system/mdmonitor-oneshot.service AUTOSCAN=$AUTOSCAN # START_DAEMON: diff -Nru mdadm-4.1/debian/mdadm-shutdown.service mdadm-4.2~rc2/debian/mdadm-shutdown.service --- mdadm-4.1/debian/mdadm-shutdown.service 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/mdadm-shutdown.service 2021-05-11 15:49:35.000000000 +0200 @@ -3,8 +3,10 @@ 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 diff -Nru mdadm-4.1/debian/mdadm-udeb/lib/udev/rules.d/63-md-raid-arrays.rules mdadm-4.2~rc2/debian/mdadm-udeb/lib/udev/rules.d/63-md-raid-arrays.rules --- mdadm-4.1/debian/mdadm-udeb/lib/udev/rules.d/63-md-raid-arrays.rules 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/mdadm-udeb/lib/udev/rules.d/63-md-raid-arrays.rules 2021-09-22 13:51:55.000000000 +0200 @@ -0,0 +1,44 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="block", GOTO="md_end" + +# handle md arrays +ACTION!="add|change", GOTO="md_end" +KERNEL!="md*", GOTO="md_end" + +# partitions have no md/{array_state,metadata_version}, but should not +# for that reason be ignored. +ENV{DEVTYPE}=="partition", GOTO="md_ignore_state" + +# container devices have a metadata version of e.g. 'external:ddf' and +# never leave state 'inactive' +ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state" +TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end" +ATTR{md/array_state}=="clear*|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end" +ATTR{md/sync_action}=="reshape", ENV{RESHAPE_ACTIVE}="yes" +LABEL="md_ignore_state" + +IMPORT{program}="/sbin/mdadm --detail --no-devices --export $devnode" +ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace" +ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" +ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}" +ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace" +ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n" +ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n" +ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n" + +IMPORT{builtin}="blkid" +OPTIONS+="link_priority=100" +OPTIONS+="watch" +ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" +ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}" +ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + +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="/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" +ENV{MD_MON_THIS}=="?*", 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" + +LABEL="md_end" diff -Nru mdadm-4.1/debian/mdadm-udeb/lib/udev/rules.d/64-md-raid-assembly.rules mdadm-4.2~rc2/debian/mdadm-udeb/lib/udev/rules.d/64-md-raid-assembly.rules --- mdadm-4.1/debian/mdadm-udeb/lib/udev/rules.d/64-md-raid-assembly.rules 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/mdadm-udeb/lib/udev/rules.d/64-md-raid-assembly.rules 2021-09-22 13:51:55.000000000 +0200 @@ -0,0 +1,38 @@ +# do not edit this file, it will be overwritten on update + +# Don't process any events if anaconda is running as anaconda brings up +# raid devices manually +ENV{ANACONDA}=="?*", GOTO="md_inc_end" +# assemble md arrays + +SUBSYSTEM!="block", GOTO="md_inc_end" + +# skip non-initialized devices +ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end" + +# handle potential components of arrays (the ones supported by md) +ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc" + +# "noiswmd" on kernel command line stops mdadm from handling +# "isw" (aka IMSM - Intel RAID). +# "nodmraid" on kernel command line stops mdadm from handling +# "isw" or "ddf". +IMPORT{cmdline}="noiswmd" +IMPORT{cmdline}="nodmraid" + +ENV{nodmraid}=="?*", GOTO="md_inc_end" +ENV{ID_FS_TYPE}=="ddf_raid_member", GOTO="md_inc" +ENV{noiswmd}=="?*", GOTO="md_inc_end" +ENV{ID_FS_TYPE}=="isw_raid_member", ACTION!="change", GOTO="md_inc" +GOTO="md_inc_end" + +LABEL="md_inc" + +# remember you can limit what gets auto/incrementally assembled by +# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY' +ACTION=="add|change", IMPORT{program}="/sbin/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}" +ACTION=="add|change", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer" +ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}" +ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name" + +LABEL="md_inc_end" diff -Nru mdadm-4.1/debian/mdadm-waitidle mdadm-4.2~rc2/debian/mdadm-waitidle --- mdadm-4.1/debian/mdadm-waitidle 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/mdadm-waitidle 2021-05-11 15:49:35.000000000 +0200 @@ -47,6 +47,10 @@ fi ;; + status) + status_of_proc /usr/bin/$NAME $NAME + ;; + *) echo "Usage: ${0:-} stop" >&2 exit 1;; diff -Nru mdadm-4.1/debian/patches/debian-conffile-location.diff mdadm-4.2~rc2/debian/patches/debian-conffile-location.diff --- mdadm-4.1/debian/patches/debian-conffile-location.diff 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/debian-conffile-location.diff 2021-07-27 05:25:59.000000000 +0200 @@ -17,11 +17,9 @@ mdassemble.8 | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) -Index: mdadm-4.1/Makefile -=================================================================== ---- mdadm-4.1.orig/Makefile -+++ mdadm-4.1/Makefile -@@ -72,8 +72,8 @@ CPPFLAGS += -DBINDIR=\"$(BINDIR)\" +--- a/Makefile ++++ b/Makefile +@@ -74,8 +74,8 @@ CPPFLAGS += -DBINDIR=\"$(BINDIR)\" PKG_CONFIG ?= pkg-config SYSCONFDIR = /etc @@ -32,11 +30,9 @@ MAILCMD =/usr/sbin/sendmail -t CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\" # Both MAP_DIR and MDMON_DIR should be somewhere that persists across the -Index: mdadm-4.1/ReadMe.c -=================================================================== ---- mdadm-4.1.orig/ReadMe.c -+++ mdadm-4.1/ReadMe.c -@@ -609,7 +609,7 @@ char Help_incr[] = +--- a/ReadMe.c ++++ b/ReadMe.c +@@ -613,7 +613,7 @@ char Help_incr[] = ; char Help_config[] = @@ -45,10 +41,8 @@ " The config file contains, apart from blank lines and comment lines that\n" " start with a hash(#), array lines, device lines, and various\n" " configuration lines.\n" -Index: mdadm-4.1/mdadm.8.in -=================================================================== ---- mdadm-4.1.orig/mdadm.8.in -+++ mdadm-4.1/mdadm.8.in +--- a/mdadm.8.in ++++ b/mdadm.8.in @@ -267,13 +267,13 @@ the exact meaning of this option in diff .TP .BR \-c ", " \-\-config= @@ -67,7 +61,7 @@ If the config file given is .B "partitions" then nothing will be read, but -@@ -1952,9 +1952,9 @@ The config file is only used if explicit +@@ -2008,9 +2008,9 @@ The config file is only used if explicit or requested with (a possibly implicit) .BR \-\-scan . In the later case, @@ -79,7 +73,7 @@ is used. If -@@ -3264,7 +3264,7 @@ uses this to find arrays when +@@ -3333,7 +3333,7 @@ uses this to find arrays when is given in Misc mode, and to monitor array reconstruction on Monitor mode. @@ -88,7 +82,7 @@ The config file lists which devices may be scanned to see if they contain MD super block, and gives identifying information -@@ -3272,7 +3272,7 @@ they contain MD super block, and gives i +@@ -3341,7 +3341,7 @@ they contain MD super block, and gives i .BR mdadm.conf (5) for more details. @@ -97,10 +91,8 @@ A directory containing configuration files which are read in lexical order. -Index: mdadm-4.1/mdadm.conf.5 -=================================================================== ---- mdadm-4.1.orig/mdadm.conf.5 -+++ mdadm-4.1/mdadm.conf.5 +--- a/mdadm.conf.5 ++++ b/mdadm.conf.5 @@ -8,7 +8,7 @@ .SH NAME mdadm.conf \- configuration for management of Software RAID with mdadm diff -Nru mdadm-4.1/debian/patches/debian-no-Werror.diff mdadm-4.2~rc2/debian/patches/debian-no-Werror.diff --- mdadm-4.1/debian/patches/debian-no-Werror.diff 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/debian-no-Werror.diff 2021-07-27 05:25:59.000000000 +0200 @@ -11,13 +11,11 @@ Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -Index: mdadm-4.1/Makefile -=================================================================== ---- mdadm-4.1.orig/Makefile -+++ mdadm-4.1/Makefile -@@ -48,7 +48,7 @@ endif - - CC ?= $(CROSS_COMPILE)gcc +--- a/Makefile ++++ b/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 +CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter diff -Nru mdadm-4.1/debian/patches/documentation-keys-in-service-files.patch mdadm-4.2~rc2/debian/patches/documentation-keys-in-service-files.patch --- mdadm-4.1/debian/patches/documentation-keys-in-service-files.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/documentation-keys-in-service-files.patch 2021-07-27 05:25:59.000000000 +0200 @@ -0,0 +1,77 @@ +Description: Make adjustments to systemd files provided by upstream +Author: Felix Lechner +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/systemd/mdcheck_continue.service ++++ b/systemd/mdcheck_continue.service +@@ -7,7 +7,8 @@ + + [Unit] + Description=MD array scrubbing - continuation +-ConditionPathExistsGlob = /var/lib/mdcheck/MD_UUID_* ++ConditionPathExistsGlob=/var/lib/mdcheck/MD_UUID_* ++Documentation=man:mdadm(8) + + [Service] + Type=oneshot +--- a/systemd/mdcheck_start.service ++++ b/systemd/mdcheck_start.service +@@ -8,6 +8,7 @@ + [Unit] + Description=MD array scrubbing + Wants=mdcheck_continue.timer ++Documentation=man:mdadm(8) + + [Service] + Type=oneshot +--- a/systemd/mdmonitor-oneshot.service ++++ b/systemd/mdmonitor-oneshot.service +@@ -7,6 +7,7 @@ + + [Unit] + Description=Reminder for degraded MD arrays ++Documentation=man:mdadm(8) + + [Service] + Environment=MDADM_MONITOR_ARGS=--scan +--- a/systemd/mdadm-grow-continue@.service ++++ b/systemd/mdadm-grow-continue@.service +@@ -8,6 +8,7 @@ + [Unit] + Description=Manage MD Reshape on /dev/%I + DefaultDependencies=no ++Documentation=man:mdadm(8) + + [Service] + ExecStart=BINDIR/mdadm --grow --continue /dev/%I +--- a/systemd/mdadm-last-resort@.service ++++ b/systemd/mdadm-last-resort@.service +@@ -2,6 +2,7 @@ + Description=Activate md array %I even though degraded + DefaultDependencies=no + ConditionPathExists=!/sys/devices/virtual/block/%i/md/sync_action ++Documentation=man:mdadm(8) + + [Service] + Type=oneshot +--- a/systemd/mdmon@.service ++++ b/systemd/mdmon@.service +@@ -9,6 +9,7 @@ + Description=MD Metadata Monitor on /dev/%I + DefaultDependencies=no + Before=initrd-switch-root.target ++Documentation=man:mdmon(8) + + [Service] + # mdmon should never complain due to lack of a platform, +--- a/systemd/mdmonitor.service ++++ b/systemd/mdmonitor.service +@@ -8,6 +8,7 @@ + [Unit] + Description=MD array monitor + DefaultDependencies=no ++Documentation=man:mdadm(8) + + [Service] + ExecStart=BINDIR/mdadm --monitor --scan diff -Nru mdadm-4.1/debian/patches/exit-gracefully-when-md-device-not-found.patch mdadm-4.2~rc2/debian/patches/exit-gracefully-when-md-device-not-found.patch --- mdadm-4.1/debian/patches/exit-gracefully-when-md-device-not-found.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/exit-gracefully-when-md-device-not-found.patch 2021-07-27 05:25:59.000000000 +0200 @@ -0,0 +1,25 @@ +Description: Exit gracefully when md device not found +Author: Felix Lechner +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970329 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/Monitor.c ++++ b/Monitor.c +@@ -538,8 +538,14 @@ static int check_array(struct state *st, + if (fd < 0) + goto disappeared; + +- if (st->devnm[0] == 0) +- strcpy(st->devnm, fd2devnm(fd)); ++ if (st->devnm[0] == 0) { ++ char *found = fd2devnm(fd); ++ if (!found) { ++ alert("DeviceDisappeared", dev, NULL, ainfo); ++ goto out; ++ } ++ strcpy(st->devnm, found); ++ } + + for (mse2 = mdstat; mse2; mse2 = mse2->next) + if (strcmp(mse2->devnm, st->devnm) == 0) { diff -Nru mdadm-4.1/debian/patches/fix-command-line-help.patch mdadm-4.2~rc2/debian/patches/fix-command-line-help.patch --- mdadm-4.1/debian/patches/fix-command-line-help.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/fix-command-line-help.patch 2021-07-27 05:25:59.000000000 +0200 @@ -0,0 +1,18 @@ +Description: Make command-line help consistent with manual page. + Mode was missing. +Author: Felix Lechner +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932791 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/ReadMe.c ++++ b/ReadMe.c +@@ -477,7 +477,7 @@ char Help_assemble[] = + ; + + char Help_manage[] = +-"Usage: mdadm arraydevice options component devices...\n" ++"Usage: mdadm [mode] arraydevice [options] \n" + "\n" + "This usage is for managing the component devices within an array.\n" + "The --manage option is not needed and is assumed if the first argument\n" diff -Nru mdadm-4.1/debian/patches/fix-manpages.patch mdadm-4.2~rc2/debian/patches/fix-manpages.patch --- mdadm-4.1/debian/patches/fix-manpages.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/fix-manpages.patch 2021-07-27 05:25:59.000000000 +0200 @@ -0,0 +1,182 @@ +Description: Fix typos and macro issues in manpages +Author: Felix Lechner +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915182 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916946 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962946 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933773 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/md.4 ++++ b/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 +--- a/mdadm.8.in ++++ b/mdadm.8.in +@@ -461,11 +461,10 @@ number of spare devices. + .BR \-z ", " \-\-size= + Amount (in Kilobytes) of space to use from each drive in RAID levels 1/4/5/6. + 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. +@@ -682,7 +681,7 @@ A bug introduced in Linux 3.14 means tha + started using a different layout. This could lead to + data corruption. Since Linux 5.4 (and various stable releases that received + backports), the kernel will not accept such an array unless +-a layout is explictly set. It can be set to ++a layout is explicitly set. It can be set to + .RB ' original ' + or + .RB ' alternate '. +@@ -924,6 +923,7 @@ the + .B name + will default to + .IR home . ++(Does not work in Grow mode.) + + .TP + .BR \-R ", " \-\-run +@@ -1445,7 +1445,7 @@ array, and the slot that it used is stil + be added back to the array in the same position. This will normally + cause the data for that device to be recovered. However based on the + event count on the device, the recovery may only require sections that +-are flagged a write-intent bitmap to be recovered or may not require ++are flagged by a write-intent bitmap to be recovered or may not require + any recovery at all. + + When used on an array that has no metadata (i.e. it was built with +@@ -2895,7 +2895,7 @@ long time. A + is required. If the array is not simultaneously being grown or + shrunk, so that the array size will remain the same - for example, + reshaping a 3-drive RAID5 into a 4-drive RAID6 - the backup file will +-be used not just for a "cricital section" but throughout the reshape ++be used not just for a "critical section" but throughout the reshape + operation, as described below under LAYOUT CHANGES. + + .SS CHUNK-SIZE AND LAYOUT CHANGES +@@ -2933,7 +2933,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 + +--- a/mdmon.8 ++++ b/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 -Nru mdadm-4.1/debian/patches/mdcheck-fix-empty-spaces-in-timer-unit-files.patch mdadm-4.2~rc2/debian/patches/mdcheck-fix-empty-spaces-in-timer-unit-files.patch --- mdadm-4.1/debian/patches/mdcheck-fix-empty-spaces-in-timer-unit-files.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/mdcheck-fix-empty-spaces-in-timer-unit-files.patch 2021-07-27 12:24:55.000000000 +0200 @@ -0,0 +1,31 @@ +Description: mdcheck fix empty spaces in timer unit files + dh_installsystemd is failling thus FBTFS because of the spaces + in the systemd unit timer files directive. +Author: Eric Desrochers +Bug-Ubuntu: https://launchpad.net/bugs/1852747 +--- a/systemd/mdcheck_continue.timer ++++ b/systemd/mdcheck_continue.timer +@@ -14,4 +14,4 @@ + Persistent=true + + [Install] +-WantedBy= mdmonitor.service ++WantedBy=mdmonitor.service +--- a/systemd/mdcheck_start.timer ++++ b/systemd/mdcheck_start.timer +@@ -14,5 +14,5 @@ + Persistent=true + + [Install] +-WantedBy= mdmonitor.service +-Also= mdcheck_continue.timer ++WantedBy=mdmonitor.service ++Also=mdcheck_continue.timer +--- a/systemd/mdmonitor-oneshot.timer ++++ b/systemd/mdmonitor-oneshot.timer +@@ -14,4 +14,4 @@ + Persistent=true + + [Install] +-WantedBy= mdmonitor.service ++WantedBy=mdmonitor.service diff -Nru mdadm-4.1/debian/patches/randomize-timers.patch mdadm-4.2~rc2/debian/patches/randomize-timers.patch --- mdadm-4.1/debian/patches/randomize-timers.patch 2020-01-23 20:39:28.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/randomize-timers.patch 2021-07-27 12:10:34.000000000 +0200 @@ -2,37 +2,31 @@ Author: Dimitri John Ledkov Bug-Ubuntu: https://bugs.launchpad.net/bugs/1815201 -Index: mdadm-4.1/systemd/mdcheck_continue.timer -=================================================================== ---- mdadm-4.1.orig/systemd/mdcheck_continue.timer -+++ mdadm-4.1/systemd/mdcheck_continue.timer -@@ -9,5 +9,6 @@ +--- a/systemd/mdcheck_continue.timer ++++ b/systemd/mdcheck_continue.timer +@@ -9,7 +9,9 @@ Description=MD array scrubbing - continuation [Timer] -OnCalendar= 1:05:00 -- +OnCalendar=daily +RandomizedDelaySec=12h +Persistent=true -Index: mdadm-4.1/systemd/mdcheck_start.service -=================================================================== ---- mdadm-4.1.orig/systemd/mdcheck_start.service -+++ mdadm-4.1/systemd/mdcheck_start.service -@@ -11,7 +11,5 @@ Wants=mdcheck_continue.timer + [Install] + WantedBy= mdmonitor.service +--- a/systemd/mdcheck_start.service ++++ b/systemd/mdcheck_start.service +@@ -13,6 +13,4 @@ [Service] Type=oneshot --Environment= MDADM_CHECK_DURATION='"6 hours"' + Environment="MDADM_CHECK_DURATION=6 hours" -EnvironmentFile=-/run/sysconfig/mdadm -ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh -+Environment=MDADM_CHECK_DURATION='"6 hours"' - ExecStart=/usr/share/mdadm/mdcheck --duration $MDADM_CHECK_DURATION -Index: mdadm-4.1/systemd/mdcheck_start.timer -=================================================================== ---- mdadm-4.1.orig/systemd/mdcheck_start.timer -+++ mdadm-4.1/systemd/mdcheck_start.timer -@@ -10,6 +10,8 @@ Description=MD array scrubbing + ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION} +--- a/systemd/mdcheck_start.timer ++++ b/systemd/mdcheck_start.timer +@@ -10,6 +10,8 @@ [Timer] OnCalendar=Sun *-*-1..7 1:00:00 @@ -41,23 +35,19 @@ [Install] WantedBy= mdmonitor.service -Index: mdadm-4.1/systemd/mdmonitor-oneshot.service -=================================================================== ---- mdadm-4.1.orig/systemd/mdmonitor-oneshot.service -+++ mdadm-4.1/systemd/mdmonitor-oneshot.service -@@ -9,7 +9,4 @@ - Description=Reminder for degraded MD arrays +--- a/systemd/mdmonitor-oneshot.service ++++ b/systemd/mdmonitor-oneshot.service +@@ -10,7 +10,4 @@ + Documentation=man:mdadm(8) [Service] --Environment= MDADM_MONITOR_ARGS=--scan +-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 -Index: mdadm-4.1/systemd/mdmonitor-oneshot.timer -=================================================================== ---- mdadm-4.1.orig/systemd/mdmonitor-oneshot.timer -+++ mdadm-4.1/systemd/mdmonitor-oneshot.timer +--- a/systemd/mdmonitor-oneshot.timer ++++ b/systemd/mdmonitor-oneshot.timer @@ -9,7 +9,9 @@ Description=Reminder for degraded MD arrays @@ -69,15 +59,12 @@ [Install] WantedBy= mdmonitor.service -Index: mdadm-4.1/systemd/mdcheck_continue.service -=================================================================== ---- mdadm-4.1.orig/systemd/mdcheck_continue.service -+++ mdadm-4.1/systemd/mdcheck_continue.service -@@ -12,7 +12,5 @@ ConditionPathExistsGlob = /var/lib/mdche +--- a/systemd/mdcheck_continue.service ++++ b/systemd/mdcheck_continue.service +@@ -13,6 +13,4 @@ [Service] Type=oneshot - Environment= MDADM_CHECK_DURATION='"6 hours"' + Environment="MDADM_CHECK_DURATION=6 hours" -EnvironmentFile=-/run/sysconfig/mdadm -ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh - ExecStart=/usr/share/mdadm/mdcheck --continue --duration $MDADM_CHECK_DURATION - + ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION} diff -Nru mdadm-4.1/debian/patches/readlink-path.patch mdadm-4.2~rc2/debian/patches/readlink-path.patch --- mdadm-4.1/debian/patches/readlink-path.patch 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/readlink-path.patch 2021-07-27 05:25:59.000000000 +0200 @@ -10,12 +10,12 @@ --- a/udev-md-raid-arrays.rules +++ b/udev-md-raid-arrays.rules -@@ -35,7 +35,7 @@ +@@ -37,7 +37,7 @@ 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_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" ENV{MD_MON_THIS}=="?*", 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" - LABEL="md_end" diff -Nru mdadm-4.1/debian/patches/series mdadm-4.2~rc2/debian/patches/series --- mdadm-4.1/debian/patches/series 2020-09-28 18:27:11.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/series 2021-07-27 12:28:43.000000000 +0200 @@ -1,24 +1,14 @@ -0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch -0002-Document-PART-POLICY-lines.patch -0003-policy-support-devices-with-multiple-paths.patch -0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch -0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch -0006-imsm-update-metadata-correctly-while-raid10-double-d.patch -0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch -0008-Grow-avoid-overflow-in-compute_backup_blocks.patch -0009-Grow-report-correct-new-chunk-size.patch -0010-policy.c-prevent-NULL-pointer-referencing.patch -0011-policy.c-Fix-for-compiler-error.patch debian-conffile-location.diff debian-no-Werror.diff sha1-includes.diff readlink-path.patch mdmonitor-service-simplify.diff -0001-Create-add-support-for-RAID0-layouts.patch -0002-Assemble-add-support-for-RAID0-layouts.patch -0001-Respect-CROSS_COMPILE-when-CC-is-the-default.patch -lp-1847924-introduce-new-array-state-broken.patch +fix-manpages.patch +documentation-keys-in-service-files.patch +fix-command-line-help.patch +strcat-look-for-md-device-in-dev-md.patch +exit-gracefully-when-md-device-not-found.patch +test-installed.patch randomize-timers.patch systemd-honor-debconf-daily-scan.patch -mdcheck-log-when-done.patch -mdcheck-when-mdcheck-start-is-enabled-mdcheck-continue-too.patch +mdcheck-fix-empty-spaces-in-timer-unit-files.patch diff -Nru mdadm-4.1/debian/patches/strcat-look-for-md-device-in-dev-md.patch mdadm-4.2~rc2/debian/patches/strcat-look-for-md-device-in-dev-md.patch --- mdadm-4.1/debian/patches/strcat-look-for-md-device-in-dev-md.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/strcat-look-for-md-device-in-dev-md.patch 2021-07-27 05:25:59.000000000 +0200 @@ -0,0 +1,17 @@ +Description: Look for md device in /dev/md +Author: Martin Mares +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958060 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/Monitor.c ++++ b/Monitor.c +@@ -188,7 +188,7 @@ int Monitor(struct mddev_dev *devlist, + st->devname = xstrdup(mdlist->devname); + else { + st->devname = xmalloc(8+strlen(mdlist->devname)+1); +- strcpy(strcpy(st->devname, "/dev/md/"), ++ strcat(strcpy(st->devname, "/dev/md/"), + mdlist->devname); + } + st->next = statelist; diff -Nru mdadm-4.1/debian/patches/systemd-honor-debconf-daily-scan.patch mdadm-4.2~rc2/debian/patches/systemd-honor-debconf-daily-scan.patch --- mdadm-4.1/debian/patches/systemd-honor-debconf-daily-scan.patch 2020-01-23 20:39:28.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/systemd-honor-debconf-daily-scan.patch 2021-07-27 12:13:08.000000000 +0200 @@ -5,12 +5,10 @@ and moved to a systemd timer, so we need to add our own processing. Author: dann frazier -Index: mdadm-4.1/systemd/mdmonitor-oneshot.service -=================================================================== ---- mdadm-4.1.orig/systemd/mdmonitor-oneshot.service -+++ mdadm-4.1/systemd/mdmonitor-oneshot.service -@@ -9,4 +9,5 @@ - Description=Reminder for degraded MD arrays +--- a/systemd/mdmonitor-oneshot.service ++++ b/systemd/mdmonitor-oneshot.service +@@ -10,4 +10,5 @@ + Documentation=man:mdadm(8) [Service] -ExecStart=BINDIR/mdadm --monitor --oneshot --scan diff -Nru mdadm-4.1/debian/patches/test-installed.patch mdadm-4.2~rc2/debian/patches/test-installed.patch --- mdadm-4.1/debian/patches/test-installed.patch 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/patches/test-installed.patch 2021-07-27 05:25:59.000000000 +0200 @@ -0,0 +1,32 @@ +Description: Test installed files + 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. +Author: Felix Lechner +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872118 +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/tests/func.sh ++++ b/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 -Nru mdadm-4.1/debian/README.recipes mdadm-4.2~rc2/debian/README.recipes --- mdadm-4.1/debian/README.recipes 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/README.recipes 2021-05-11 15:49:35.000000000 +0200 @@ -11,6 +11,12 @@ 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 @@ -59,6 +65,7 @@ ~~~~~~~~~~~~~~~~~~~~~ # 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 @@ -66,6 +73,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~ # 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 @@ -74,6 +82,7 @@ # 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. @@ -93,13 +102,17 @@ # /home) and /dev/sdb1 is empty and of the same size... # mdadm --create /dev/md0 -l1 -n2 /dev/sdb1 missing + mkfs -t /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 @@ -108,7 +121,9 @@ 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 @@ -122,14 +137,18 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 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 /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) diff -Nru mdadm-4.1/debian/rules mdadm-4.2~rc2/debian/rules --- mdadm-4.1/debian/rules 2020-09-24 13:54:15.000000000 +0200 +++ mdadm-4.2~rc2/debian/rules 2021-05-11 15:49:35.000000000 +0200 @@ -7,9 +7,9 @@ #export DH_VERBOSE=1 export CROSS_COMPILE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)- -LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -CXFLAGS = $(shell dpkg-buildflags --get CFLAGS) \ - $(shell dpkg-buildflags --get CPPFLAGS) +LDFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS) +CXFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS) \ + $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS) BUILDFLAGS = CXFLAGS="$(CXFLAGS)" LDFLAGS="$(LDFLAGS)" DEBIAN=yes DESTDIR = $(CURDIR)/debian/mdadm DESTDIR_UDEB = $(DESTDIR)-udeb @@ -99,6 +99,7 @@ else dh_gencontrol -- -Vmta:Recommends="default-mta | mail-transport-agent" endif + dh_lintian dh_md5sums dh_builddeb diff -Nru mdadm-4.1/debian/salsa-ci.yml mdadm-4.2~rc2/debian/salsa-ci.yml --- mdadm-4.1/debian/salsa-ci.yml 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/salsa-ci.yml 2021-05-11 15:49:35.000000000 +0200 @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff -Nru mdadm-4.1/debian/tests/control mdadm-4.2~rc2/debian/tests/control --- mdadm-4.1/debian/tests/control 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/tests/control 2021-05-11 15:49:35.000000000 +0200 @@ -0,0 +1,6 @@ +Tests: test-installed +Restrictions: needs-root, isolation-machine +Depends: + fdisk | util-linux (<< 2.29.2-3~), + mdadm, + udev diff -Nru mdadm-4.1/debian/tests/test-installed mdadm-4.2~rc2/debian/tests/test-installed --- mdadm-4.1/debian/tests/test-installed 1970-01-01 02:00:00.000000000 +0200 +++ mdadm-4.2~rc2/debian/tests/test-installed 2021-05-11 15:49:35.000000000 +0200 @@ -0,0 +1,3 @@ +#!/bin/sh + +./test diff -Nru mdadm-4.1/debian/watch mdadm-4.2~rc2/debian/watch --- mdadm-4.1/debian/watch 2019-03-12 05:58:03.000000000 +0200 +++ mdadm-4.2~rc2/debian/watch 2021-08-15 23:54:44.000000000 +0200 @@ -1,2 +1,3 @@ -version=3 -https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-([.[:digit:]]+).tar.gz +version=4 +opts="uversionmangle=s/-rc/~rc/" \ + https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-([.[:digit:]]+(?:-rc[[:digit:]]+)?).tar.gz