summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--ANNOUNCE-3.3.318
-rw-r--r--ANNOUNCE-3.3.437
-rw-r--r--ANNOUNCE-3.424
-rw-r--r--Assemble.c211
-rw-r--r--Build.c3
-rw-r--r--Create.c80
-rw-r--r--Detail.c35
-rwxr-xr-x[-rw-r--r--]Grow.c327
-rw-r--r--Incremental.c120
-rw-r--r--Makefile45
-rw-r--r--Manage.c235
-rw-r--r--Monitor.c94
-rw-r--r--ReadMe.c16
-rw-r--r--bitmap.c75
-rw-r--r--bitmap.h8
-rw-r--r--config.c52
-rw-r--r--crc32c.c104
-rw-r--r--debian/.gitignore7
-rw-r--r--debian/changelog70
-rw-r--r--debian/checkarray4
-rw-r--r--debian/control10
-rw-r--r--debian/copyright2
-rw-r--r--debian/initramfs/hook264
-rw-r--r--debian/initramfs/script.local-block44
-rw-r--r--debian/initramfs/script.local-bottom3
-rw-r--r--debian/initramfs/script.local-top101
-rw-r--r--debian/mdadm-raid256
-rw-r--r--debian/mdadm.config131
-rw-r--r--debian/mdadm.init10
-rw-r--r--debian/mdadm.maintscript1
-rw-r--r--debian/mdadm.postinst11
-rw-r--r--debian/mdadm.postrm12
-rw-r--r--debian/mdadm.preinst45
-rw-r--r--debian/mdadm.templates61
-rw-r--r--debian/mkconf6
-rw-r--r--debian/patches/build-sys-no-check_rundir.patch33
-rw-r--r--debian/patches/rebuildmap-strip-local-host-name-from-device-name.patch47
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/use-external-blkid.diff16
-rw-r--r--debian/patches/use-tempnode-not-devnode.patch31
-rw-r--r--debian/po/ca.po232
-rw-r--r--debian/po/cs.po225
-rw-r--r--debian/po/da.po223
-rw-r--r--debian/po/de.po239
-rw-r--r--debian/po/es.po236
-rw-r--r--debian/po/eu.po223
-rw-r--r--debian/po/fi.po225
-rw-r--r--debian/po/fr.po236
-rw-r--r--debian/po/gl.po225
-rw-r--r--debian/po/it.po228
-rw-r--r--debian/po/ja.po223
-rw-r--r--debian/po/nl.po229
-rw-r--r--debian/po/pt.po227
-rw-r--r--debian/po/pt_BR.po296
-rw-r--r--debian/po/ru.po229
-rw-r--r--debian/po/sk.po222
-rw-r--r--debian/po/sv.po225
-rw-r--r--debian/po/templates.pot118
-rw-r--r--debian/po/vi.po230
-rwxr-xr-xdebian/rules10
-rw-r--r--external-reshape-design.txt10
-rwxr-xr-xinventory6
-rw-r--r--managemon.c48
-rw-r--r--mapfile.c15
-rw-r--r--md.426
-rw-r--r--md_p.h71
-rw-r--r--md_u.h5
-rw-r--r--mdadm.8.in79
-rw-r--r--mdadm.c225
-rw-r--r--mdadm.conf-example4
-rw-r--r--mdadm.conf.52
-rwxr-xr-x[-rw-r--r--]mdadm.h148
-rw-r--r--mdadm.spec2
-rw-r--r--mdassemble.86
-rw-r--r--mdassemble.c14
-rw-r--r--mdmon.82
-rw-r--r--mdmon.c4
-rw-r--r--mdmon.h3
-rw-r--r--mdopen.c15
-rw-r--r--mdstat.c4
-rw-r--r--misc/mdcheck3
-rw-r--r--monitor.c25
-rw-r--r--msg.c6
-rw-r--r--platform-intel.c432
-rw-r--r--platform-intel.h43
-rw-r--r--policy.c9
-rw-r--r--raid6check.c316
-rw-r--r--restripe.c54
-rw-r--r--sha1.h8
-rw-r--r--super-ddf.c206
-rw-r--r--super-gpt.c3
-rw-r--r--super-intel.c895
-rw-r--r--super-mbr.c6
-rw-r--r--super0.c23
-rw-r--r--super1.c371
-rw-r--r--sysfs.c34
-rw-r--r--systemd/mdadm-last-resort@.service1
-rw-r--r--systemd/mdmonitor.service5
-rwxr-xr-xtest74
-rw-r--r--tests/00linear2
-rw-r--r--tests/00raid016
-rw-r--r--tests/00raid18
-rw-r--r--tests/00raid44
-rw-r--r--tests/00raid58
-rw-r--r--tests/00raid64
-rw-r--r--tests/01r1fail10
-rw-r--r--tests/01r5fail10
-rw-r--r--tests/01r5integ2
-rw-r--r--tests/01raid6integ4
-rw-r--r--tests/02r1add8
-rw-r--r--tests/02r1grow4
-rw-r--r--tests/02r5grow4
-rw-r--r--tests/02r6grow4
-rw-r--r--tests/03r0assem48
-rw-r--r--tests/03r5assem46
-rw-r--r--tests/04r0update6
-rw-r--r--tests/04r1update6
-rw-r--r--tests/04update-metadata2
-rw-r--r--tests/05r1-add-internalbitmap-v1b2
-rw-r--r--tests/05r1-add-internalbitmap-v1c2
-rw-r--r--tests/05r1-bitmapfile6
-rw-r--r--tests/05r1-grow-external2
-rw-r--r--tests/05r1-grow-internal2
-rw-r--r--tests/05r1-grow-internal-12
-rw-r--r--tests/05r1-internalbitmap6
-rw-r--r--tests/05r1-internalbitmap-v1a6
-rw-r--r--tests/05r1-internalbitmap-v1b6
-rw-r--r--tests/05r1-internalbitmap-v1c6
-rw-r--r--tests/05r1-n3-bitmapfile6
-rw-r--r--tests/05r1-re-add7
-rw-r--r--tests/05r1-re-add-nosuper1
-rw-r--r--tests/05r6tor010
-rw-r--r--tests/07changelevelintr3
-rw-r--r--tests/07changelevels5
-rw-r--r--tests/07layouts4
-rw-r--r--tests/07reshape5intr2
-rw-r--r--tests/07revert-inplace6
-rw-r--r--tests/09imsm-assemble6
-rw-r--r--tests/09imsm-create-fail-rebuild2
-rw-r--r--tests/10ddf-assemble-missing6
-rw-r--r--tests/10ddf-create2
-rw-r--r--tests/10ddf-create-fail-rebuild2
-rw-r--r--tests/10ddf-fail-readd4
-rw-r--r--tests/10ddf-fail-readd-readonly2
-rw-r--r--tests/10ddf-fail-stop-readd8
-rw-r--r--tests/10ddf-fail-twice4
-rw-r--r--tests/10ddf-fail-two-spares8
-rw-r--r--tests/10ddf-incremental-wrong-order16
-rw-r--r--tests/10ddf-sudden-degraded2
-rw-r--r--tests/18imsm-1d-takeover-r0_1d3
-rw-r--r--tests/18imsm-1d-takeover-r1_2d3
-rw-r--r--tests/18imsm-r1_2d-takeover-r0_1d2
-rw-r--r--tests/19raid6auto-repair68
-rw-r--r--tests/19raid6check27
-rw-r--r--tests/19raid6repair81
-rw-r--r--tests/19repair-does-not-destroy1
-rw-r--r--tests/20raid5journal64
-rw-r--r--tests/ToTest4
-rw-r--r--tests/imsm-grow-template10
-rw-r--r--udev-md-raid-arrays.rules2
-rw-r--r--util.c256
-rw-r--r--xmalloc.c28
163 files changed, 5700 insertions, 5349 deletions
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 5d425843..00000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-debian/changelog merge=dpkg-mergechangelogs
diff --git a/ANNOUNCE-3.3.3 b/ANNOUNCE-3.3.3
new file mode 100644
index 00000000..ac1b2173
--- /dev/null
+++ b/ANNOUNCE-3.3.3
@@ -0,0 +1,18 @@
+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
new file mode 100644
index 00000000..52b94562
--- /dev/null
+++ b/ANNOUNCE-3.3.4
@@ -0,0 +1,37 @@
+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
new file mode 100644
index 00000000..2689732d
--- /dev/null
+++ b/ANNOUNCE-3.4
@@ -0,0 +1,24 @@
+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/Assemble.c b/Assemble.c
index cdcdb0f8..d199afc9 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1,7 +1,7 @@
/*
* mdadm - manage Linux "md" devices aka RAID arrays.
*
- * Copyright (C) 2001-2013 Neil Brown <neilb@suse.de>
+ * Copyright (C) 2001-2016 Neil Brown <neilb@suse.com>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -25,21 +25,27 @@
#include "mdadm.h"
#include <ctype.h>
-static int name_matches(char *found, char *required, char *homehost)
+static int name_matches(char *found, char *required, char *homehost, int require_homehost)
{
/* See if the name found matches the required name, possibly
* prefixed with 'homehost'
*/
- char fnd[33];
+ char *sep;
+ unsigned int l;
- strncpy(fnd, found, 32);
- fnd[32] = 0;
if (strcmp(found, required)==0)
return 1;
- if (homehost) {
- int l = strlen(homehost);
- if (l < 32 && fnd[l] == ':' &&
- strcmp(fnd+l+1, required)==0)
+ sep = strchr(found, ':');
+ if (!sep)
+ return 0;
+ l = sep - found;
+ if (strncmp(found, "any:", 4) == 0 ||
+ (homehost && strcmp(homehost, "any") == 0) ||
+ !require_homehost ||
+ (homehost && strlen(homehost) == l &&
+ strncmp(found, homehost, l) == 0)) {
+ /* matching homehost */
+ if (strcmp(sep+1, required) == 0)
return 1;
}
return 0;
@@ -73,7 +79,7 @@ static int is_member_busy(char *metadata_version)
static int ident_matches(struct mddev_ident *ident,
struct mdinfo *content,
struct supertype *tst,
- char *homehost,
+ char *homehost, int require_homehost,
char *update, char *devname)
{
@@ -85,7 +91,7 @@ static int ident_matches(struct mddev_ident *ident,
return 0;
}
if (ident->name[0] && (!update || strcmp(update, "name")!= 0) &&
- name_matches(content->name, ident->name, homehost)==0) {
+ name_matches(content->name, ident->name, homehost, require_homehost)==0) {
if (devname)
pr_err("%s has wrong name.\n", devname);
return 0;
@@ -233,8 +239,7 @@ static int select_devices(struct mddev_dev *devlist,
!conf_test_metadata(tst->ss->name, (pol = devid_policy(stb.st_rdev)),
tst->ss->match_home(tst, c->homehost) == 1)) {
if (report_mismatch)
- pr_err("%s has metadata type %s for which "
- "auto-assembly is disabled\n",
+ pr_err("%s has metadata type %s for which auto-assembly is disabled\n",
devname, tst->ss->name);
tmpdev->used = 2;
} else
@@ -245,7 +250,9 @@ static int select_devices(struct mddev_dev *devlist,
pr_err("no recogniseable superblock on %s\n",
devname);
tmpdev->used = 2;
- } else if (tst->ss->load_super(tst,dfd, NULL)) {
+ } else if ((tst->ignore_hw_compat = 0),
+ tst->ss->load_super(tst, dfd,
+ report_mismatch ? devname : NULL)) {
if (report_mismatch)
pr_err("no RAID superblock on %s\n",
devname);
@@ -259,8 +266,7 @@ static int select_devices(struct mddev_dev *devlist,
!conf_test_metadata(tst->ss->name, (pol = devid_policy(stb.st_rdev)),
tst->ss->match_home(tst, c->homehost) == 1)) {
if (report_mismatch)
- pr_err("%s has metadata type %s for which "
- "auto-assembly is disabled\n",
+ pr_err("%s has metadata type %s for which auto-assembly is disabled\n",
devname, tst->ss->name);
tmpdev->used = 2;
}
@@ -327,7 +333,8 @@ static int select_devices(struct mddev_dev *devlist,
content = content->next) {
if (!ident_matches(ident, content, tst,
- c->homehost, c->update,
+ c->homehost, c->require_homehost,
+ c->update,
report_mismatch ? devname : NULL))
/* message already printed */;
else if (is_member_busy(content->text_version)) {
@@ -350,8 +357,7 @@ static int select_devices(struct mddev_dev *devlist,
st = tst; tst = NULL;
if (!auto_assem && inargv && tmpdev->next != NULL) {
- pr_err("%s is a container, but is not "
- "only device given: confused and aborting\n",
+ pr_err("%s is a container, but is not only device given: confused and aborting\n",
devname);
st->ss->free_super(st);
dev_policy_free(pol);
@@ -370,7 +376,8 @@ static int select_devices(struct mddev_dev *devlist,
tst->ss->getinfo_super(tst, content, NULL);
if (!ident_matches(ident, content, tst,
- c->homehost, c->update,
+ c->homehost, c->require_homehost,
+ c->update,
report_mismatch ? devname : NULL))
goto loop;
@@ -394,7 +401,8 @@ static int select_devices(struct mddev_dev *devlist,
goto loop;
}
if (match && !ident_matches(match, content, tst,
- c->homehost, c->update,
+ c->homehost, c->require_homehost,
+ c->update,
report_mismatch ? devname : NULL))
/* Array exists in mdadm.conf but some
* details don't match, so reject it
@@ -579,13 +587,13 @@ static int load_devices(struct devs *devices, char *devmap,
struct stat stb;
struct supertype *tst;
int i;
+ int dfd;
if (tmpdev->used != 1)
continue;
/* looks like a good enough match to update the super block if needed */
#ifndef MDASSEMBLE
if (c->update) {
- int dfd;
/* prepare useful information in info structures */
struct stat stb2;
int err;
@@ -629,6 +637,19 @@ static int load_devices(struct devs *devices, char *devmap,
if (strcmp(c->update, "byteorder") == 0)
err = 0;
+ else if (strcmp(c->update, "home-cluster") == 0) {
+ tst->cluster_name = c->homecluster;
+ err = tst->ss->write_bitmap(tst, dfd, NameUpdate);
+ } else if (strcmp(c->update, "nodes") == 0) {
+ tst->nodes = c->nodes;
+ err = tst->ss->write_bitmap(tst, dfd, NodeNumUpdate);
+ } else if (strcmp(c->update, "revert-reshape") == 0 &&
+ c->invalid_backup)
+ err = tst->ss->update_super(tst, content,
+ "revert-reshape-nobackup",
+ devname, c->verbose,
+ ident->uuid_set,
+ c->homehost);
else
err = tst->ss->update_super(tst, content, c->update,
devname, c->verbose,
@@ -636,8 +657,7 @@ static int load_devices(struct devs *devices, char *devmap,
c->homehost);
if (err < 0) {
if (err == -1)
- pr_err("--update=%s not understood"
- " for %s metadata\n",
+ pr_err("--update=%s not understood for %s metadata\n",
c->update, tst->ss->name);
tst->ss->free_super(tst);
free(tst);
@@ -656,7 +676,6 @@ static int load_devices(struct devs *devices, char *devmap,
if (tst->ss->store_super(tst, dfd))
pr_err("Could not re-write superblock on %s.\n",
devname);
- close(dfd);
if (strcmp(c->update, "uuid")==0 &&
ident->bitmap_fd >= 0 && !bitmap_done) {
@@ -670,9 +689,9 @@ static int load_devices(struct devs *devices, char *devmap,
} else
#endif
{
- int dfd = dev_open(devname,
- tmpdev->disposition == 'I'
- ? O_RDWR : (O_RDWR|O_EXCL));
+ dfd = dev_open(devname,
+ tmpdev->disposition == 'I'
+ ? O_RDWR : (O_RDWR|O_EXCL));
tst = dup_super(st);
if (dfd < 0 || tst->ss->load_super(tst, dfd, NULL) != 0) {
@@ -689,10 +708,10 @@ static int load_devices(struct devs *devices, char *devmap,
return -1;
}
tst->ss->getinfo_super(tst, content, devmap + devcnt * content->array.raid_disks);
- close(dfd);
}
- stat(devname, &stb);
+ fstat(dfd, &stb);
+ close(dfd);
if (c->verbose > 0)
pr_err("%s is identified as a member of %s, slot %d%s.\n",
@@ -723,7 +742,7 @@ static int load_devices(struct devs *devices, char *devmap,
i = devcnt;
else
i = devices[devcnt].i.disk.raid_disk;
- if (i+1 == 0) {
+ if (i+1 == 0 || i == MD_DISK_ROLE_JOURNAL) {
if (nextspare < content->array.raid_disks*2)
nextspare = content->array.raid_disks*2;
i = nextspare++;
@@ -762,12 +781,9 @@ static int load_devices(struct devs *devices, char *devmap,
* Could be a mis-detection caused by overlapping
* partitions. fail-safe.
*/
- pr_err("WARNING %s and %s appear"
- " to have very similar superblocks.\n"
- " If they are really different, "
- "please --zero the superblock on one\n"
- " If they are the same or overlap,"
- " please remove one from %s.\n",
+ pr_err("WARNING %s and %s appear to have very similar superblocks.\n"
+ " If they are really different, please --zero the superblock on one\n"
+ " If they are the same or overlap, please remove one from %s.\n",
devices[best[i]].devname, devname,
inargv ? "the list" :
"the\n DEVICE list in mdadm.conf"
@@ -825,12 +841,37 @@ static int force_array(struct mdinfo *content,
i < content->array.raid_disks * 2 && i < bestcnt;
i += 2) {
int j = best[i];
- if (j>=0 &&
- !devices[j].uptodate &&
- devices[j].i.recovery_start == MaxSector &&
- (chosen_drive < 0 ||
+ if (j < 0)
+ continue;
+ if (devices[j].uptodate)
+ continue;
+ if (devices[j].i.recovery_start != MaxSector) {
+ int delta;
+ if (!devices[j].i.reshape_active ||
+ devices[j].i.delta_disks <= 0)
+ continue;
+ /* When increasing number of devices, an
+ * added device also appears to be
+ * recovering. It is safe to include it
+ * as long as it won't be a source of
+ * data.
+ * For now, just allow for last data
+ * devices in RAID4 or last devices in RAID4/5/6.
+ */
+ delta = devices[j].i.delta_disks;
+ if (devices[j].i.array.level >= 4 &&
+ devices[j].i.array.level <= 6 &&
+ i/2 >= content->array.raid_disks - delta)
+ /* OK */;
+ else if (devices[j].i.array.level == 4 &&
+ i/2 >= content->array.raid_disks - delta - 1)
+ /* OK */;
+ else
+ continue;
+ }
+ if (chosen_drive < 0 ||
devices[j].i.events
- > devices[chosen_drive].i.events))
+ > devices[chosen_drive].i.events)
chosen_drive = j;
}
if (chosen_drive < 0)
@@ -879,7 +920,6 @@ static int force_array(struct mdinfo *content,
avail[chosen_drive] = 1;
okcnt++;
tst->ss->free_super(tst);
-
/* If there are any other drives of the same vintage,
* add them in as well. We can't lose and we might gain
*/
@@ -910,6 +950,7 @@ static int start_array(int mdfd,
unsigned int okcnt,
unsigned int sparecnt,
unsigned int rebuilding_cnt,
+ unsigned int journalcnt,
struct context *c,
int clean, char *avail,
int start_partial_ok,
@@ -921,6 +962,15 @@ static int start_array(int mdfd,
int i;
unsigned int req_cnt;
+ if (content->journal_device_required && (content->journal_clean == 0)) {
+ if (!c->force) {
+ pr_err("Not safe to assemble with missing or stale journal device, consider --force.\n");
+ return 1;
+ }
+ pr_err("Journal is missing or stale, starting array read only.\n");
+ c->readonly = 1;
+ }
+
rv = set_array_info(mdfd, st, content);
if (rv && !err_ok) {
pr_err("failed to set array info for %s: %s\n",
@@ -968,8 +1018,7 @@ static int start_array(int mdfd,
rv = add_disk(mdfd, st, content, &devices[j].i);
if (rv) {
- pr_err("failed to add "
- "%s to %s: %s\n",
+ pr_err("failed to add %s to %s: %s\n",
devices[j].devname,
mddev,
strerror(errno));
@@ -993,14 +1042,14 @@ static int start_array(int mdfd,
} else if (c->verbose > 0 && i < content->array.raid_disks*2
&& (i&1) == 0)
pr_err("no uptodate device for slot %d of %s\n",
- i, mddev);
+ i/2, mddev);
}
if (content->array.level == LEVEL_CONTAINER) {
if (c->verbose >= 0) {
- pr_err("Container %s has been "
- "assembled with %d drive%s",
- mddev, okcnt+sparecnt, okcnt+sparecnt==1?"":"s");
+ pr_err("Container %s has been assembled with %d drive%s",
+ mddev, okcnt+sparecnt+journalcnt,
+ okcnt+sparecnt+journalcnt==1?"":"s");
if (okcnt < (unsigned)content->array.raid_disks)
fprintf(stderr, " (out of %d)",
content->array.raid_disks);
@@ -1086,6 +1135,8 @@ static int start_array(int mdfd,
fprintf(stderr, "%s %d rebuilding", sparecnt?",":" and", rebuilding_cnt);
if (sparecnt)
fprintf(stderr, " and %d spare%s", sparecnt, sparecnt==1?"":"s");
+ if (content->journal_clean)
+ fprintf(stderr, " and %d journal", journalcnt);
fprintf(stderr, ".\n");
}
if (content->reshape_active &&
@@ -1094,12 +1145,16 @@ static int start_array(int mdfd,
/* might need to increase the size
* of the stripe cache - default is 256
*/
- if (256 < 4 * (content->array.chunk_size/4096)) {
+ int chunk_size = content->array.chunk_size;
+ if (content->reshape_active &&
+ content->new_chunk > chunk_size)
+ chunk_size = content->new_chunk;
+ if (256 < 4 * ((chunk_size+4065)/4096)) {
struct mdinfo *sra = sysfs_read(mdfd, NULL, 0);
if (sra)
sysfs_set_num(sra, NULL,
"stripe_cache_size",
- (4 * content->array.chunk_size / 4096) + 1);
+ (4 * chunk_size / 4096) + 1);
sysfs_free(sra);
}
}
@@ -1141,15 +1196,12 @@ static int start_array(int mdfd,
if (!enough(content->array.level, content->array.raid_disks,
content->array.layout, 1, avail))
- pr_err("Not enough devices to "
- "start the array.\n");
+ pr_err("Not enough devices to start the array.\n");
else if (!enough(content->array.level,
content->array.raid_disks,
content->array.layout, clean,
avail))
- pr_err("Not enough devices to "
- "start the array while not clean "
- "- consider --force.\n");
+ pr_err("Not enough devices to start the array while not clean - consider --force.\n");
return 1;
}
@@ -1174,9 +1226,7 @@ static int start_array(int mdfd,
content->array.raid_disks,
content->array.layout, clean,
avail))
- fprintf(stderr, " - not enough to start the "
- "array while not clean - consider "
- "--force.\n");
+ fprintf(stderr, " - not enough to start the array while not clean - consider --force.\n");
else {
if (req_cnt == (unsigned)content->array.raid_disks)
fprintf(stderr, " - need all %d to start it", req_cnt);
@@ -1258,7 +1308,8 @@ int Assemble(struct supertype *st, char *mddev,
int *best = NULL; /* indexed by raid_disk */
int bestcnt = 0;
int devcnt;
- unsigned int okcnt, sparecnt, rebuilding_cnt, replcnt;
+ unsigned int okcnt, sparecnt, rebuilding_cnt, replcnt, journalcnt;
+ int journal_clean = 0;
int i;
int was_forced = 0;
int most_recent = 0;
@@ -1314,7 +1365,7 @@ try_again:
mddev ? mddev : "further assembly");
content = &info;
- if (st)
+ if (st && c->force)
st->ignore_hw_compat = 1;
num_devs = select_devices(devlist, ident, &st, &content, c,
inargv, auto_assem);
@@ -1338,7 +1389,10 @@ try_again:
*/
if (map_lock(&map))
pr_err("failed to get exclusive lock on mapfile - continue anyway...\n");
- mp = map_by_uuid(&map, content->uuid);
+ if (c->update && strcmp(c->update,"uuid") == 0)
+ mp = NULL;
+ else
+ mp = map_by_uuid(&map, content->uuid);
if (mp) {
struct mdinfo *dv;
/* array already exists. */
@@ -1496,6 +1550,7 @@ try_again:
okcnt = 0;
replcnt = 0;
sparecnt=0;
+ journalcnt=0;
rebuilding_cnt=0;
for (i=0; i< bestcnt; i++) {
int j = best[i];
@@ -1506,8 +1561,13 @@ try_again:
/* note: we ignore error flags in multipath arrays
* as they don't make sense
*/
- if (content->array.level != LEVEL_MULTIPATH)
- if (!(devices[j].i.disk.state & (1<<MD_DISK_ACTIVE))) {
+ if (content->array.level != LEVEL_MULTIPATH) {
+ if (devices[j].i.disk.state & (1<<MD_DISK_JOURNAL)) {
+ if (content->journal_device_required)
+ journalcnt++;
+ else /* unexpected journal, mark as faulty */
+ devices[j].i.disk.state |= (1<<MD_DISK_FAULTY);
+ } else if (!(devices[j].i.disk.state & (1<<MD_DISK_ACTIVE))) {
if (!(devices[j].i.disk.state
& (1<<MD_DISK_FAULTY))) {
devices[j].uptodate = 1;
@@ -1515,6 +1575,7 @@ try_again:
}
continue;
}
+ }
/* If this device thinks that 'most_recent' has failed, then
* we must reject this device.
*/
@@ -1538,12 +1599,12 @@ try_again:
devices[most_recent].i.events
) {
devices[j].uptodate = 1;
+ if (devices[j].i.disk.state & (1<<MD_DISK_JOURNAL))
+ journal_clean = 1;
if (i < content->array.raid_disks * 2) {
if (devices[j].i.recovery_start == MaxSector ||
(content->reshape_active &&
- ((i >= content->array.raid_disks - content->delta_disks) ||
- (i >= content->array.raid_disks - content->delta_disks - 1
- && content->array.level == 4)))) {
+ i >= content->array.raid_disks - content->delta_disks)) {
if (!avail[i/2]) {
okcnt++;
avail[i/2]=1;
@@ -1551,7 +1612,7 @@ try_again:
replcnt++;
} else
rebuilding_cnt++;
- } else
+ } else if (devices[j].i.disk.raid_disk != MD_DISK_ROLE_JOURNAL)
sparecnt++;
}
}
@@ -1611,11 +1672,15 @@ try_again:
#ifndef MDASSEMBLE
sysfs_init(content, mdfd, NULL);
#endif
+ /* after reload context, store journal_clean in context */
+ content->journal_clean = journal_clean;
for (i=0; i<bestcnt; i++) {
int j = best[i];
unsigned int desired_state;
- if (i >= content->array.raid_disks * 2)
+ if (devices[j].i.disk.raid_disk == MD_DISK_ROLE_JOURNAL)
+ desired_state = (1<<MD_DISK_JOURNAL);
+ else if (i >= content->array.raid_disks * 2)
desired_state = 0;
else if (i & 1)
desired_state = (1<<MD_DISK_ACTIVE) | (1<<MD_DISK_REPLACEMENT);
@@ -1698,8 +1763,7 @@ try_again:
int err = 0;
int *fdlist = xmalloc(sizeof(int)* bestcnt);
if (c->verbose > 0)
- pr_err(":%s has an active reshape - checking "
- "if critical section needs to be restored\n",
+ pr_err("%s has an active reshape - checking if critical section needs to be restored\n",
chosen_name);
if (!c->backup_file)
c->backup_file = locate_backup(content->sys_name);
@@ -1727,8 +1791,7 @@ try_again:
c->backup_file, c->verbose > 0);
if (err && c->invalid_backup) {
if (c->verbose > 0)
- pr_err("continuing"
- " without restoring backup\n");
+ pr_err("continuing without restoring backup\n");
err = 0;
}
}
@@ -1764,7 +1827,7 @@ try_again:
rv = start_array(mdfd, mddev, content,
st, ident, best, bestcnt,
chosen_drive, devices, okcnt, sparecnt,
- rebuilding_cnt,
+ rebuilding_cnt, journalcnt,
c,
clean, avail, start_partial_ok,
pre_exist != NULL,
diff --git a/Build.c b/Build.c
index da64dc89..8603c710 100644
--- a/Build.c
+++ b/Build.c
@@ -254,8 +254,7 @@ int Build(char *mddev, struct mddev_dev *devlist,
pr_err("RUN_ARRAY failed: %s\n",
strerror(errno));
if (s->chunk & (s->chunk-1)) {
- cont_err("Problem may be that chunk size"
- " is not a power of 2\n");
+ cont_err("Problem may be that chunk size is not a power of 2\n");
}
goto abort;
}
diff --git a/Create.c b/Create.c
index 330c5b42..1e4a6ee0 100644
--- a/Create.c
+++ b/Create.c
@@ -87,7 +87,7 @@ int Create(struct supertype *st, char *mddev,
unsigned long long minsize=0, maxsize=0;
char *mindisc = NULL;
char *maxdisc = NULL;
- int dnum;
+ int dnum, raid_disk_num;
struct mddev_dev *dv;
int fail=0, warn=0;
struct stat stb;
@@ -114,6 +114,8 @@ int Create(struct supertype *st, char *mddev,
unsigned long long newsize;
int major_num = BITMAP_MAJOR_HI;
+ if (s->bitmap_file && strcmp(s->bitmap_file, "clustered") == 0)
+ major_num = BITMAP_MAJOR_CLUSTERED;
memset(&info, 0, sizeof(info));
if (s->level == UnSet && st && st->ss->default_geometry)
@@ -177,15 +179,14 @@ int Create(struct supertype *st, char *mddev,
close(fd);
}
if (st && st->ss->external && s->sparedisks) {
- pr_err("This metadata type does not support "
- "spare disks at create time\n");
+ pr_err("This metadata type does not support spare disks at create time\n");
return 1;
}
- if (subdevs > s->raiddisks+s->sparedisks) {
+ if (subdevs > s->raiddisks+s->sparedisks+s->journaldisks) {
pr_err("You have listed more devices (%d) than are in the array(%d)!\n", subdevs, s->raiddisks+s->sparedisks);
return 1;
}
- if (!have_container && subdevs < s->raiddisks+s->sparedisks) {
+ if (!have_container && subdevs < s->raiddisks+s->sparedisks+s->journaldisks) {
pr_err("You haven't given enough devices (real or missing) to create this array\n");
return 1;
}
@@ -261,8 +262,7 @@ int Create(struct supertype *st, char *mddev,
if (do_default_chunk) {
/* default chunk was just set */
if (c->verbose > 0)
- pr_err("chunk size "
- "defaults to %dK\n", s->chunk);
+ pr_err("chunk size defaults to %dK\n", s->chunk);
s->size &= ~(unsigned long long)(s->chunk - 1);
do_default_chunk = 0;
}
@@ -330,7 +330,7 @@ int Create(struct supertype *st, char *mddev,
}
close(dfd);
info.array.working_disks++;
- if (dnum < s->raiddisks)
+ if (dnum < s->raiddisks && dv->disposition != 'j')
info.array.active_disks++;
if (st == NULL) {
struct createinfo *ci = conf_get_create_info();
@@ -375,8 +375,7 @@ int Create(struct supertype *st, char *mddev,
dname, strerror(errno));
exit(2);
}
- pr_err("device %s not suitable "
- "for any style of array\n",
+ pr_err("device %s not suitable for any style of array\n",
dname);
exit(2);
}
@@ -393,14 +392,16 @@ int Create(struct supertype *st, char *mddev,
dname, &freesize,
c->verbose >= 0)) {
- pr_err("%s is not suitable for "
- "this array.\n",
+ pr_err("%s is not suitable for this array.\n",
dname);
fail = 1;
continue;
}
}
+ if (dv->disposition == 'j')
+ goto skip_size_check; /* skip write journal for size check */
+
freesize /= 2; /* convert to K */
if (s->chunk && s->chunk != UnSet) {
/* round to chunk size */
@@ -408,8 +409,7 @@ int Create(struct supertype *st, char *mddev,
if (do_default_chunk) {
/* default chunk was just set */
if (c->verbose > 0)
- pr_err("chunk size "
- "defaults to %dK\n", s->chunk);
+ pr_err("chunk size defaults to %dK\n", s->chunk);
s->size &= ~(unsigned long long)(s->chunk - 1);
do_default_chunk = 0;
}
@@ -421,8 +421,7 @@ int Create(struct supertype *st, char *mddev,
}
if (s->size && freesize < s->size) {
- pr_err("%s is smaller than given size."
- " %lluK < %lluK + metadata\n",
+ pr_err("%s is smaller than given size. %lluK < %lluK + metadata\n",
dname, freesize, s->size);
fail = 1;
continue;
@@ -435,6 +434,7 @@ int Create(struct supertype *st, char *mddev,
mindisc = dname;
minsize = freesize;
}
+ skip_size_check:
if (c->runstop != 1 || c->verbose >= 0) {
int fd = open(dname, O_RDONLY);
if (fd <0 ) {
@@ -473,8 +473,7 @@ int Create(struct supertype *st, char *mddev,
}
}
if (s->raiddisks + s->sparedisks > st->max_devs) {
- pr_err("Too many devices:"
- " %s metadata only supports %d\n",
+ pr_err("Too many devices: %s metadata only supports %d\n",
st->ss->name, st->max_devs);
return 1;
}
@@ -538,6 +537,8 @@ int Create(struct supertype *st, char *mddev,
st->ss->name);
warn = 1;
}
+ st->nodes = c->nodes;
+ st->cluster_name = c->homecluster;
if (warn) {
if (c->runstop!= 1) {
@@ -618,8 +619,7 @@ int Create(struct supertype *st, char *mddev,
memset(&inf, 0, sizeof(inf));
ioctl(mdfd, GET_ARRAY_INFO, &inf);
if (inf.working_disks != 0) {
- pr_err("another array by this name"
- " is already running.\n");
+ pr_err("another array by this name is already running.\n");
goto abort_locked;
}
}
@@ -741,8 +741,7 @@ int Create(struct supertype *st, char *mddev,
mdi?mdi->text_version:"managed", devnm);
sysfs_free(mdi);
} else
- pr_err("Defaulting to version"
- " %s metadata\n", info.text_version);
+ pr_err("Defaulting to version %s metadata\n", info.text_version);
}
map_update(&map, fd2devnm(mdfd), info.text_version,
@@ -759,7 +758,8 @@ int Create(struct supertype *st, char *mddev,
#endif
}
- if (s->bitmap_file && strcmp(s->bitmap_file, "internal")==0) {
+ if (s->bitmap_file && (strcmp(s->bitmap_file, "internal")==0 ||
+ strcmp(s->bitmap_file, "clustered")==0)) {
if ((vers%100) < 2) {
pr_err("internal bitmaps not supported by this kernel.\n");
goto abort_locked;
@@ -797,14 +797,12 @@ int Create(struct supertype *st, char *mddev,
*/
container_fd = open_dev_excl(st->container_devnm);
if (container_fd < 0) {
- pr_err("Cannot get exclusive "
- "open on container - weird.\n");
+ pr_err("Cannot get exclusive open on container - weird.\n");
goto abort_locked;
}
if (mdmon_running(st->container_devnm)) {
if (c->verbose)
- pr_err("reusing mdmon "
- "for %s.\n",
+ pr_err("reusing mdmon for %s.\n",
st->container_devnm);
st->update_tail = &st->updates;
} else
@@ -845,7 +843,7 @@ int Create(struct supertype *st, char *mddev,
for (pass=1; pass <=2 ; pass++) {
struct mddev_dev *moved_disk = NULL; /* the disk that was moved out of the insert point */
- for (dnum=0, dv = devlist ; dv ;
+ for (dnum=0, raid_disk_num=0, dv = devlist ; dv ;
dv=(dv->next)?(dv->next):moved_disk, dnum++) {
int fd;
struct stat stb;
@@ -854,11 +852,14 @@ int Create(struct supertype *st, char *mddev,
if (dnum >= total_slots)
abort();
if (dnum == insert_point) {
+ raid_disk_num += 1;
moved_disk = dv;
continue;
}
- if (strcasecmp(dv->devname, "missing")==0)
+ if (strcasecmp(dv->devname, "missing")==0) {
+ raid_disk_num += 1;
continue;
+ }
if (have_container)
moved_disk = NULL;
if (have_container && dnum < info.array.raid_disks - 1)
@@ -870,8 +871,13 @@ int Create(struct supertype *st, char *mddev,
*inf = info;
inf->disk.number = dnum;
- inf->disk.raid_disk = dnum;
- if (inf->disk.raid_disk < s->raiddisks)
+ inf->disk.raid_disk = raid_disk_num++;
+
+ if (dv->disposition == 'j') {
+ inf->disk.raid_disk = MD_DISK_ROLE_JOURNAL;
+ inf->disk.state = (1<<MD_DISK_JOURNAL);
+ raid_disk_num--;
+ } else if (inf->disk.raid_disk < s->raiddisks)
inf->disk.state = (1<<MD_DISK_ACTIVE) |
(1<<MD_DISK_SYNC);
else
@@ -890,8 +896,7 @@ int Create(struct supertype *st, char *mddev,
fd = open(dv->devname, O_RDWR|O_EXCL);
if (fd < 0) {
- pr_err("failed to open %s "
- "after earlier success - aborting\n",
+ pr_err("failed to open %s after earlier success - aborting\n",
dv->devname);
goto abort_locked;
}
@@ -928,8 +933,7 @@ int Create(struct supertype *st, char *mddev,
rv = add_disk(mdfd, st, &info, inf);
if (rv) {
- pr_err("ADD_NEW_DISK for %s "
- "failed: %s\n",
+ pr_err("ADD_NEW_DISK for %s failed: %s\n",
dv->devname, strerror(errno));
goto abort_locked;
}
@@ -1007,8 +1011,7 @@ int Create(struct supertype *st, char *mddev,
}
sysfs_set_safemode(&info, safe_mode_delay);
if (err) {
- pr_err("failed to"
- " activate array.\n");
+ pr_err("failed to activate array.\n");
ioctl(mdfd, STOP_ARRAY, NULL);
goto abort;
}
@@ -1029,8 +1032,7 @@ int Create(struct supertype *st, char *mddev,
pr_err("RUN_ARRAY failed: %s\n",
strerror(errno));
if (info.array.chunk_size & (info.array.chunk_size-1)) {
- cont_err("Problem may be that "
- "chunk size is not a power of 2\n");
+ cont_err("Problem may be that chunk size is not a power of 2\n");
}
ioctl(mdfd, STOP_ARRAY, NULL);
goto abort;
diff --git a/Detail.c b/Detail.c
index c4fcad96..0cfccadb 100644
--- a/Detail.c
+++ b/Detail.c
@@ -295,11 +295,12 @@ int Detail(char *dev, struct context *c)
goto out;
}
- disks = xmalloc(max_disks * sizeof(mdu_disk_info_t));
- for (d = 0; d < max_disks; d++) {
+ disks = xmalloc(max_disks * 2 * sizeof(mdu_disk_info_t));
+ for (d = 0; d < max_disks * 2; d++) {
disks[d].state = (1<<MD_DISK_REMOVED);
disks[d].major = disks[d].minor = 0;
- disks[d].number = disks[d].raid_disk = d;
+ disks[d].number = -1;
+ disks[d].raid_disk = d/2;
}
next = array.raid_disks*2;
@@ -325,9 +326,10 @@ int Detail(char *dev, struct context *c)
&& disks[disk.raid_disk*2].state == (1<<MD_DISK_REMOVED))
disks[disk.raid_disk*2] = disk;
else if (disk.raid_disk >= 0 && disk.raid_disk < array.raid_disks
- && disks[disk.raid_disk*2+1].state == (1<<MD_DISK_REMOVED))
+ && disks[disk.raid_disk*2+1].state == (1<<MD_DISK_REMOVED)
+ && !(disk.state & (1<<MD_DISK_JOURNAL)))
disks[disk.raid_disk*2+1] = disk;
- else if (next < max_disks)
+ else if (next < max_disks*2)
disks[next++] = disk;
}
@@ -339,7 +341,8 @@ int Detail(char *dev, struct context *c)
(disks[d*2+1].state & (1<<MD_DISK_SYNC))) {
avail_disks ++;
avail[d] = 1;
- }
+ } else
+ rv |= !! c->test;
}
if (c->brief) {
@@ -422,8 +425,9 @@ int Detail(char *dev, struct context *c)
else
printf(" Used Dev Size : unknown\n");
} else
- printf(" Used Dev Size : %d%s\n", array.size,
- human_size((long long)array.size<<10));
+ printf(" Used Dev Size : %lu%s\n",
+ (unsigned long)array.size,
+ human_size((unsigned long long)array.size<<10));
}
if (array.raid_disks)
printf(" Raid Devices : %d\n", array.raid_disks);
@@ -602,7 +606,7 @@ This is pretty boring
}
free(info);
- for (d= 0; d < max_disks; d++) {
+ for (d= 0; d < max_disks * 2; d++) {
char *dv;
mdu_disk_info_t disk = disks[d];
@@ -616,12 +620,15 @@ This is pretty boring
continue;
if (!c->brief) {
if (d == array.raid_disks*2) printf("\n");
- if (disk.number < 0)
+ if (disk.number < 0 && disk.raid_disk < 0)
printf(" - %5d %5d - ",
disk.major, disk.minor);
- else if (disk.raid_disk < 0)
+ else if (disk.raid_disk < 0 || disk.state & (1<<MD_DISK_JOURNAL))
printf(" %5d %5d %5d - ",
disk.number, disk.major, disk.minor);
+ else if (disk.number < 0)
+ printf(" - %5d %5d %5d ",
+ disk.major, disk.minor, disk.raid_disk);
else
printf(" %5d %5d %5d %5d ",
disk.number, disk.major, disk.minor, disk.raid_disk);
@@ -650,9 +657,10 @@ This is pretty boring
}
if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed");
if (disk.state & (1<<MD_DISK_WRITEMOSTLY)) printf(" writemostly");
+ if (disk.state & (1<<MD_DISK_JOURNAL)) printf(" journal");
if ((disk.state &
((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)
- |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)))
+ |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)|(1<<MD_DISK_JOURNAL)))
== 0) {
printf(" spare");
if (is_26) {
@@ -671,9 +679,6 @@ This is pretty boring
}
}
if (disk.state == 0) spares++;
- if (c->test && d < array.raid_disks
- && !(disk.state & (1<<MD_DISK_SYNC)))
- rv |= 1;
dv=map_dev_preferred(disk.major, disk.minor, 0, c->prefer);
if (dv != NULL) {
if (c->brief)
diff --git a/Grow.c b/Grow.c
index a9c8589c..bbdd46c0 100644..100755
--- a/Grow.c
+++ b/Grow.c
@@ -87,11 +87,9 @@ int restore_backup(struct supertype *st,
}
free(fdlist);
if (err) {
- pr_err("Failed to restore critical"
- " section for reshape - sorry.\n");
+ pr_err("Failed to restore critical section for reshape - sorry.\n");
if (!backup_file)
- pr_err("Possibly you need"
- " to specify a --backup-file\n");
+ pr_err("Possibly you need to specify a --backup-file\n");
return 1;
}
@@ -295,12 +293,13 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
if (vers < 9003) {
major = BITMAP_MAJOR_HOSTENDIAN;
- pr_err("Warning - bitmaps created on this kernel"
- " are not portable\n"
- " between different architectures. Consider upgrading"
- " the Linux kernel.\n");
+ pr_err("Warning - bitmaps created on this kernel are not portable\n"
+ " between different architectures. Consider upgrading the Linux kernel.\n");
}
+ if (s->bitmap_file && strcmp(s->bitmap_file, "clustered") == 0)
+ major = BITMAP_MAJOR_CLUSTERED;
+
if (ioctl(fd, GET_BITMAP_FILE, &bmf) != 0) {
if (errno == ENOMEM)
pr_err("Memory allocation failure.\n");
@@ -329,13 +328,15 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
if (strcmp(s->bitmap_file, "none")==0) {
array.state &= ~(1<<MD_SB_BITMAP_PRESENT);
if (ioctl(fd, SET_ARRAY_INFO, &array)!= 0) {
- pr_err("failed to remove internal bitmap.\n");
+ if (array.state & (1<<MD_SB_CLUSTERED))
+ pr_err("failed to remove clustered bitmap.\n");
+ else
+ pr_err("failed to remove internal bitmap.\n");
return 1;
}
return 0;
}
- pr_err("Internal bitmap already present on %s\n",
- devname);
+ pr_err("bitmap already present on %s\n", devname);
return 1;
}
@@ -379,16 +380,18 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
free(st);
return 1;
}
- if (strcmp(s->bitmap_file, "internal") == 0) {
+ if (strcmp(s->bitmap_file, "internal") == 0 ||
+ strcmp(s->bitmap_file, "clustered") == 0) {
int rv;
int d;
int offset_setable = 0;
struct mdinfo *mdi;
if (st->ss->add_internal_bitmap == NULL) {
- pr_err("Internal bitmaps not supported "
- "with %s metadata\n", st->ss->name);
+ pr_err("Internal bitmaps not supported with %s metadata\n", st->ss->name);
return 1;
}
+ st->nodes = c->nodes;
+ st->cluster_name = c->homecluster;
mdi = sysfs_read(fd, NULL, GET_BITMAP_LOCATION);
if (mdi)
offset_setable = 1;
@@ -415,10 +418,9 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
bitmapsize, offset_setable,
major)
)
- st->ss->write_bitmap(st, fd2);
+ st->ss->write_bitmap(st, fd2, NoUpdate);
else {
- pr_err("failed to create internal bitmap"
- " - chunksize problem.\n");
+ pr_err("failed to create internal bitmap - chunksize problem.\n");
close(fd2);
return 1;
}
@@ -432,13 +434,14 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
rv = sysfs_set_num_signed(mdi, NULL, "bitmap/location",
mdi->bitmap_offset);
} else {
+ if (strcmp(s->bitmap_file, "clustered") == 0)
+ array.state |= (1<<MD_SB_CLUSTERED);
array.state |= (1<<MD_SB_BITMAP_PRESENT);
rv = ioctl(fd, SET_ARRAY_INFO, &array);
}
if (rv < 0) {
if (errno == EBUSY)
- pr_err("Cannot add bitmap while array is"
- " resyncing or reshaping etc.\n");
+ pr_err("Cannot add bitmap while array is resyncing or reshaping etc.\n");
pr_err("failed to set internal bitmap.\n");
return 1;
}
@@ -489,8 +492,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
if (ioctl(fd, SET_BITMAP_FILE, bitmap_fd) < 0) {
int err = errno;
if (errno == EBUSY)
- pr_err("Cannot add bitmap while array is"
- " resyncing or reshaping etc.\n");
+ pr_err("Cannot add bitmap while array is resyncing or reshaping etc.\n");
pr_err("Cannot set bitmap file for %s: %s\n",
devname, strerror(err));
return 1;
@@ -620,10 +622,8 @@ static void unfreeze(struct supertype *st)
if (sra &&
sysfs_get_str(sra, NULL, "sync_action", buf, 20) > 0
- && strcmp(buf, "frozen\n") == 0) {
- printf("unfreeze\n");
+ && strcmp(buf, "frozen\n") == 0)
sysfs_set_str(sra, NULL, "sync_action", "idle");
- }
sysfs_free(sra);
}
}
@@ -726,9 +726,14 @@ int start_reshape(struct mdinfo *sra, int already_running,
if (!already_running)
sysfs_set_num(sra, NULL, "sync_min", sync_max_to_set);
err = err ?: sysfs_set_num(sra, NULL, "sync_max", sync_max_to_set);
- if (!already_running)
- err = err ?: sysfs_set_str(sra, NULL, "sync_action", "reshape");
-
+ if (!already_running && err == 0) {
+ int cnt = 5;
+ do {
+ err = sysfs_set_str(sra, NULL, "sync_action", "reshape");
+ if (err)
+ sleep(1);
+ } while (err && errno == EBUSY && cnt-- > 0);
+ }
return err;
}
@@ -853,7 +858,8 @@ int reshape_prepare_fdlist(char *devname,
for (sd = sra->devs; sd; sd = sd->next) {
if (sd->disk.state & (1<<MD_DISK_FAULTY))
continue;
- if (sd->disk.state & (1<<MD_DISK_SYNC)) {
+ if (sd->disk.state & (1<<MD_DISK_SYNC) &&
+ sd->disk.raid_disk < raid_disks) {
char *dn = map_dev(sd->disk.major,
sd->disk.minor, 1);
fdlist[sd->disk.raid_disk]
@@ -917,8 +923,7 @@ int reshape_open_backup_file(char *backup_file,
dev = stb.st_dev;
fstat(fd, &stb);
if (stb.st_rdev == dev) {
- pr_err("backup file must NOT be"
- " on the array being reshaped.\n");
+ pr_err("backup file must NOT be on the array being reshaped.\n");
close(*fdlist);
return 0;
}
@@ -926,8 +931,7 @@ int reshape_open_backup_file(char *backup_file,
memset(buf, 0, 512);
for (i=0; i < blocks + 8 ; i++) {
if (write(*fdlist, buf, 512) != 512) {
- pr_err("%s: cannot create"
- " backup file %s: %s\n",
+ pr_err("%s: cannot create backup file %s: %s\n",
devname, backup_file, strerror(errno));
return 0;
}
@@ -941,7 +945,7 @@ int reshape_open_backup_file(char *backup_file,
if (!restart && strncmp(backup_file, MAP_DIR, strlen(MAP_DIR)) != 0) {
char *bu = make_backup(sys_name);
if (symlink(backup_file, bu))
- pr_err("Recording backup file in " MAP_DIR "failed: %s\n",
+ pr_err("Recording backup file in " MAP_DIR " failed: %s\n",
strerror(errno));
free(bu);
}
@@ -1041,13 +1045,11 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
*/
if (info->new_level > 1 &&
(info->component_size & 7))
- return "Cannot convert RAID1 of this size - "
- "reduce size to multiple of 4K first.";
+ return "Cannot convert RAID1 of this size - reduce size to multiple of 4K first.";
if (info->new_level == 0) {
if (info->delta_disks != UnSet &&
info->delta_disks != 0)
- return "Cannot change number of disks "
- "with RAID1->RAID0 conversion";
+ return "Cannot change number of disks with RAID1->RAID0 conversion";
re->level = 0;
re->before.data_disks = 1;
re->after.data_disks = 1;
@@ -1133,8 +1135,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
if (far > 1 && !offset)
return "Cannot reshape RAID10 to far-mode";
if (near * far != copies)
- return "Cannot change number of copies"
- " when reshaping RAID10";
+ return "Cannot change number of copies when reshaping RAID10";
}
if (info->delta_disks == UnSet)
info->delta_disks = 0;
@@ -1184,15 +1185,13 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
/ info->array.raid_disks);
if (info->array.raid_disks * (copies-1)
!= info->delta_disks)
- return "Impossible number of devices"
- " for RAID0->RAID10";
+ return "Impossible number of devices for RAID0->RAID10";
info->new_layout = 0x100 + copies;
}
if (info->delta_disks == UnSet) {
int copies = info->new_layout & 0xff;
if (info->new_layout != 0x100 + copies)
- return "New layout impossible"
- " for RAID0->RAID10";;
+ return "New layout impossible for RAID0->RAID10";;
info->delta_disks = (copies - 1) *
info->array.raid_disks;
}
@@ -1287,8 +1286,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
return "Can only convert a 2-device array to RAID1";
if (info->delta_disks != UnSet &&
info->delta_disks != 0)
- return "Cannot set raid_disk when "
- "converting RAID5->RAID1";
+ return "Cannot set raid_disk when converting RAID5->RAID1";
re->level = 1;
info->new_chunk = 0;
return NULL;
@@ -1383,8 +1381,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
strcat(strcpy(layout, ls), "-6");
l = map_name(r6layout, layout);
if (l == UnSet)
- return "Cannot find RAID6 layout"
- " to convert to";
+ return "Cannot find RAID6 layout to convert to";
} else {
/* Current RAID6 has no equivalent.
* If it is already a '-6' layout we
@@ -1496,8 +1493,8 @@ static int set_array_size(struct supertype *st, struct mdinfo *sra,
ret_val = 0;
dprintf("Array size changed");
}
- dprintf(" from %llu to %llu.\n",
- current_size, new_size);
+ dprintf_cont(" from %llu to %llu.\n",
+ current_size, new_size);
}
sysfs_free(info);
} else
@@ -1571,10 +1568,8 @@ int Grow_reshape(char *devname, int fd,
if (s->size > 0 &&
(s->chunk || s->level!= UnSet || s->layout_str || s->raiddisks)) {
- pr_err("cannot change component size at the same time "
- "as other changes.\n"
- " Change size first, then check data is intact before "
- "making other changes.\n");
+ pr_err("cannot change component size at the same time as other changes.\n"
+ " Change size first, then check data is intact before making other changes.\n");
return 1;
}
@@ -1592,10 +1587,18 @@ int Grow_reshape(char *devname, int fd,
return 1;
}
if (s->raiddisks > st->max_devs) {
- pr_err("Cannot increase raid-disks on this array"
- " beyond %d\n", st->max_devs);
+ pr_err("Cannot increase raid-disks on this array beyond %d\n", st->max_devs);
return 1;
}
+ if (s->level == 0 &&
+ (array.state & (1<<MD_SB_BITMAP_PRESENT)) &&
+ !(array.state & (1<<MD_SB_CLUSTERED))) {
+ array.state &= ~(1<<MD_SB_BITMAP_PRESENT);
+ if (ioctl(fd, SET_ARRAY_INFO, &array)!= 0) {
+ pr_err("failed to remove internal bitmap.\n");
+ return 1;
+ }
+ }
/* in the external case we need to check that the requested reshape is
* supported, and perform an initial check that the container holds the
@@ -1647,9 +1650,7 @@ int Grow_reshape(char *devname, int fd,
& (1<<MD_SB_BLOCK_CONTAINER_RESHAPE))
allow_reshape = 0;
if (!allow_reshape) {
- pr_err("cannot reshape arrays in"
- " container with unsupported"
- " metadata: %s(%s)\n",
+ pr_err("cannot reshape arrays in container with unsupported metadata: %s(%s)\n",
devname, container);
sysfs_free(cc);
free(subarray);
@@ -1668,8 +1669,7 @@ int Grow_reshape(char *devname, int fd,
if (s->raiddisks > array.raid_disks &&
array.spare_disks +added_disks < (s->raiddisks - array.raid_disks) &&
!c->force) {
- pr_err("Need %d spare%s to avoid degraded array,"
- " and only have %d.\n"
+ pr_err("Need %d spare%s to avoid degraded array, and only have %d.\n"
" Use --force to over-ride this check.\n",
s->raiddisks - array.raid_disks,
s->raiddisks - array.raid_disks == 1 ? "" : "s",
@@ -1695,8 +1695,7 @@ int Grow_reshape(char *devname, int fd,
sysfs_free(sra);
return 1;
} else if (frozen < 0) {
- pr_err("%s is performing resync/recovery and cannot"
- " be reshaped\n", devname);
+ pr_err("%s is performing resync/recovery and cannot be reshaped\n", devname);
sysfs_free(sra);
return 1;
}
@@ -1737,8 +1736,7 @@ int Grow_reshape(char *devname, int fd,
sizeinfo->array.layout,
sizeinfo->array.raid_disks);
new_size /= data_disks;
- dprintf("Metadata size correction from %llu to "
- "%llu (%llu)\n", orig_size, new_size,
+ dprintf("Metadata size correction from %llu to %llu (%llu)\n", orig_size, new_size,
new_size * data_disks);
s->size = new_size;
sysfs_free(sizeinfo);
@@ -1775,13 +1773,11 @@ int Grow_reshape(char *devname, int fd,
}
}
if (rv) {
- pr_err("Cannot set size on "
- "array members.\n");
+ pr_err("Cannot set size on array members.\n");
goto size_change_error;
}
if (min_csize && s->size > min_csize) {
- pr_err("Cannot safely make this array "
- "use more than 2TB per device on this kernel.\n");
+ pr_err("Cannot safely make this array use more than 2TB per device on this kernel.\n");
rv = 1;
goto size_change_error;
}
@@ -1789,8 +1785,7 @@ int Grow_reshape(char *devname, int fd,
/* Don't let the kernel choose a size - it will get
* it wrong
*/
- pr_err("Limited v0.90 array to "
- "2TB per device\n");
+ pr_err("Limited v0.90 array to 2TB per device\n");
s->size = min_csize;
}
if (st->ss->external) {
@@ -1799,8 +1794,8 @@ int Grow_reshape(char *devname, int fd,
"raid5");
if (!rv) {
raid0_takeover = 1;
- /* get array parametes after takeover
- * to chane one parameter at time only
+ /* get array parameters after takeover
+ * to change one parameter at time only
*/
rv = ioctl(fd, GET_ARRAY_INFO, &array);
}
@@ -1818,7 +1813,7 @@ int Grow_reshape(char *devname, int fd,
if (s->size == MAX_SIZE)
s->size = 0;
array.size = s->size;
- if (array.size != (signed)s->size) {
+ if (s->size & ~INT32_MAX) {
/* got truncated to 32bit, write to
* component_size instead
*/
@@ -1879,12 +1874,10 @@ size_change_error:
s->size = array.size;
if (c->verbose >= 0) {
if (s->size == orig_size)
- pr_err("component size of %s "
- "unchanged at %lluK\n",
+ pr_err("component size of %s unchanged at %lluK\n",
devname, s->size);
else
- pr_err("component size of %s "
- "has been set to %lluK\n",
+ pr_err("component size of %s has been set to %lluK\n",
devname, s->size);
}
changed = 1;
@@ -1919,7 +1912,7 @@ size_change_error:
int err;
err = remove_disks_for_takeover(st, sra, array.layout);
if (err) {
- dprintf(Name": Array cannot be reshaped\n");
+ dprintf("Array cannot be reshaped\n");
if (cfd > -1)
close(cfd);
rv = 1;
@@ -1952,12 +1945,9 @@ size_change_error:
if (info.array.level == 6 &&
(info.new_level == 6 || info.new_level == UnSet) &&
info.array.layout >= 16) {
- pr_err("%s has a non-standard layout. If you"
- " wish to preserve this\n", devname);
- cont_err("during the reshape, please specify"
- " --layout=preserve\n");
- cont_err("If you want to change it, specify a"
- " layout or use --layout=normalise\n");
+ pr_err("%s has a non-standard layout. If you wish to preserve this\n", devname);
+ cont_err("during the reshape, please specify --layout=preserve\n");
+ cont_err("If you want to change it, specify a layout or use --layout=normalise\n");
rv = 1;
goto release;
}
@@ -1974,8 +1964,7 @@ size_change_error:
info.new_layout = map_name(r6layout, l);
}
} else {
- pr_err("%s is only meaningful when reshaping"
- " a RAID6 array.\n", s->layout_str);
+ pr_err("%s is only meaningful when reshaping a RAID6 array.\n", s->layout_str);
rv = 1;
goto release;
}
@@ -1997,8 +1986,7 @@ size_change_error:
strcat(l, "-6");
info.new_layout = map_name(r6layout, l);
} else {
- pr_err("%s in only meaningful when reshaping"
- " to RAID6\n", s->layout_str);
+ pr_err("%s in only meaningful when reshaping to RAID6\n", s->layout_str);
rv = 1;
goto release;
}
@@ -2020,14 +2008,12 @@ size_change_error:
info.new_layout = parse_layout_faulty(s->layout_str);
break;
default:
- pr_err("layout not meaningful"
- " with this level\n");
+ pr_err("layout not meaningful with this level\n");
rv = 1;
goto release;
}
if (info.new_layout == UnSet) {
- pr_err("layout %s not understood"
- " for this level\n",
+ pr_err("layout %s not understood for this level\n",
s->layout_str);
rv = 1;
goto release;
@@ -2133,27 +2119,22 @@ static int verify_reshape_position(struct mdinfo *info, int level)
char *ep;
unsigned long long position = strtoull(buf, &ep, 0);
- dprintf(Name": Read sync_max sysfs entry is: %s\n", buf);
+ dprintf("Read sync_max sysfs entry is: %s\n", buf);
if (!(ep == buf || (*ep != 0 && *ep != '\n' && *ep != ' '))) {
position *= get_data_disks(level,
info->new_layout,
info->array.raid_disks);
if (info->reshape_progress < position) {
- dprintf("Corrected reshape progress (%llu) to "
- "md position (%llu)\n",
+ dprintf("Corrected reshape progress (%llu) to md position (%llu)\n",
info->reshape_progress, position);
info->reshape_progress = position;
ret_val = 1;
} else if (info->reshape_progress > position) {
- pr_err("Fatal error: array "
- "reshape was not properly frozen "
- "(expected reshape position is %llu, "
- "but reshape progress is %llu.\n",
+ pr_err("Fatal error: array reshape was not properly frozen (expected reshape position is %llu, but reshape progress is %llu.\n",
position, info->reshape_progress);
ret_val = -1;
} else {
- dprintf("Reshape position in md and metadata "
- "are the same;");
+ dprintf("Reshape position in md and metadata are the same;");
ret_val = 1;
}
}
@@ -2255,7 +2236,10 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
if (info2.space_before == 0 &&
info2.space_after == 0) {
/* Metadata doesn't support data_offset changes */
- return 1;
+ if (!can_fallback)
+ pr_err("%s: Metadata version doesn't support data_offset changes\n",
+ devname);
+ goto fallback;
}
if (before > info2.space_before)
before = info2.space_before;
@@ -2500,8 +2484,7 @@ static int raid10_reshape(char *container, int fd, char *devname,
devname);
if (err == EBUSY &&
(info->array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err(" Bitmap must be removed before"
- " shape can be changed\n");
+ cont_err(" Bitmap must be removed before shape can be changed\n");
goto release;
}
sysfs_free(sra);
@@ -2574,7 +2557,7 @@ static void update_cache_size(char *container, struct mdinfo *sra,
/* make sure there is room for 'blocks' with a bit to spare */
if (cache < 16 + blocks / disks)
cache = 16 + blocks / disks;
- cache /= (4096/512); /* Covert from sectors to pages */
+ cache /= (4096/512); /* Convert from sectors to pages */
if (sra->cache_size < cache)
subarray_set_num(container, sra, "stripe_cache_size",
@@ -2625,8 +2608,7 @@ static int impose_reshape(struct mdinfo *sra,
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err("Bitmap must be removed before"
- " shape can be changed\n");
+ cont_err("Bitmap must be removed before shape can be changed\n");
goto release;
}
@@ -2650,8 +2632,7 @@ static int impose_reshape(struct mdinfo *sra,
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err("Bitmap must be removed before"
- " shape can be changed\n");
+ cont_err("Bitmap must be removed before shape can be changed\n");
goto release;
}
}
@@ -2739,8 +2720,7 @@ static int impose_level(int fd, int level, char *devname, int verbose)
devname, c);
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err("Bitmap must be removed"
- " before level can be changed\n");
+ cont_err("Bitmap must be removed before level can be changed\n");
return err;
}
if (verbose >= 0)
@@ -2870,8 +2850,7 @@ static int reshape_array(char *container, int fd, char *devname,
reshape.before.layout != info->array.layout ||
reshape.before.data_disks + reshape.parity
!= info->array.raid_disks - max(0, info->delta_disks))) {
- pr_err("reshape info is not in native format -"
- " cannot continue.\n");
+ pr_err("reshape info is not in native format - cannot continue.\n");
goto release;
}
@@ -2928,8 +2907,7 @@ static int reshape_array(char *container, int fd, char *devname,
if (!force &&
info->new_level > 1 && info->array.level > 1 &&
spares_needed > info->array.spare_disks + added_disks) {
- pr_err("Need %d spare%s to avoid degraded array,"
- " and only have %d.\n"
+ pr_err("Need %d spare%s to avoid degraded array, and only have %d.\n"
" Use --force to over-ride this check.\n",
spares_needed,
spares_needed == 1 ? "" : "s",
@@ -2942,8 +2920,7 @@ static int reshape_array(char *container, int fd, char *devname,
- array.raid_disks;
if ((info->new_level > 1 || info->new_level == 0) &&
spares_needed > info->array.spare_disks +added_disks) {
- pr_err("Need %d spare%s to create working array,"
- " and only have %d.\n",
+ pr_err("Need %d spare%s to create working array, and only have %d.\n",
spares_needed,
spares_needed == 1 ? "" : "s",
info->array.spare_disks + added_disks);
@@ -3150,8 +3127,19 @@ static int reshape_array(char *container, int fd, char *devname,
devname, container, &reshape) < 0)
goto release;
if (sysfs_set_str(sra, NULL, "sync_action", "reshape") < 0) {
- pr_err("Failed to initiate reshape!\n");
- goto release;
+ struct mdinfo *sd;
+ if (errno != EINVAL) {
+ pr_err("Failed to initiate reshape!\n");
+ goto release;
+ }
+ /* revert data_offset and try the old way */
+ for (sd = sra->devs; sd; sd = sd->next) {
+ sysfs_set_num(sra, sd, "new_offset",
+ sd->data_offset);
+ sysfs_set_str(sra, NULL, "reshape_direction",
+ "forwards");
+ }
+ break;
}
if (info->new_level == reshape.level)
return 0;
@@ -3194,12 +3182,10 @@ started:
blocks < 16*1024*2)
blocks *= 2;
} else
- pr_err("Need to backup %luK of critical "
- "section..\n", blocks/2);
+ pr_err("Need to backup %luK of critical section..\n", blocks/2);
if (blocks >= sra->component_size/2) {
- pr_err("%s: Something wrong"
- " - reshape aborted\n",
+ pr_err("%s: Something wrong - reshape aborted\n",
devname);
goto release;
}
@@ -3216,7 +3202,7 @@ started:
d = reshape_prepare_fdlist(devname, sra, odisks,
nrdisks, blocks, backup_file,
fdlist, offsets);
- if (d < 0) {
+ if (d < odisks) {
goto release;
}
if ((st->ss->manage_reshape == NULL) ||
@@ -3228,10 +3214,8 @@ started:
devname);
pr_err(" Please provide one with \"--backup=...\"\n");
goto release;
- } else if (sra->array.spare_disks == 0) {
- pr_err("%s: Cannot grow - "
- "need a spare or backup-file to backup "
- "critical section\n", devname);
+ } else if (d == odisks) {
+ pr_err("%s: Cannot grow - need a spare or backup-file to backup critical section\n", devname);
goto release;
}
} else {
@@ -3274,8 +3258,7 @@ started:
free(fdlist);
free(offsets);
sysfs_free(sra);
- pr_err("Reshape has to be continued from"
- " location %llu when root filesystem has been mounted.\n",
+ pr_err("Reshape has to be continued from location %llu when root filesystem has been mounted.\n",
sra->reshape_progress);
return 1;
}
@@ -3372,7 +3355,7 @@ started:
bul = make_backup(sra->sys_name);
if (bul) {
char buf[1024];
- int l = readlink(bul, buf, sizeof(buf));
+ int l = readlink(bul, buf, sizeof(buf) - 1);
if (l > 0) {
buf[l]=0;
unlink(buf);
@@ -3492,8 +3475,7 @@ int reshape_container(char *container, char *devname,
return 1;
default: /* parent */
if (!freeze_reshape)
- printf(Name ": multi-array reshape continues"
- " in background\n");
+ printf("%s: multi-array reshape continues in background\n", Name);
return 0;
case 0: /* child */
map_fork();
@@ -3555,8 +3537,7 @@ int reshape_container(char *container, char *devname,
fd = open_dev(mdstat->devnm);
if (fd < 0) {
- printf(Name ": Device %s cannot be opened for reshape.",
- adev);
+ pr_err("Device %s cannot be opened for reshape.\n", adev);
break;
}
@@ -3571,8 +3552,7 @@ int reshape_container(char *container, char *devname,
* This is possibly interim until the behaviour of
* reshape_array is resolved().
*/
- printf(Name ": Multiple reshape execution detected for "
- "device %s.", adev);
+ printf("%s: Multiple reshape execution detected for device %s.\n", Name, adev);
close(fd);
break;
}
@@ -3882,9 +3862,11 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
* So we need these extra tests.
*/
if (completed == 0 && advancing
+ && strncmp(action, "idle", 4) == 0
&& info->reshape_progress > 0)
break;
if (completed == 0 && !advancing
+ && strncmp(action, "idle", 4) == 0
&& info->reshape_progress < (info->component_size
* reshape->after.data_disks))
break;
@@ -3893,21 +3875,31 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
goto check_progress;
}
/* Some kernels reset 'sync_completed' to zero,
- * we need to have real point we are in md
+ * we need to have real point we are in md.
+ * So in that case, read 'reshape_position' from sysfs.
*/
- if (completed == 0)
- completed = max_progress;
-
- /* some kernels can give an incorrectly high 'completed' number */
- completed /= (info->new_chunk/512);
- completed *= (info->new_chunk/512);
- /* Convert 'completed' back in to a 'progress' number */
- completed *= reshape->after.data_disks;
- if (!advancing) {
- completed = info->component_size * reshape->after.data_disks
- - completed;
+ if (completed == 0) {
+ unsigned long long reshapep;
+ char action[20];
+ if (sysfs_get_str(info, NULL, "sync_action",
+ action, 20) > 0 &&
+ strncmp(action, "idle", 4) == 0 &&
+ sysfs_get_ll(info, NULL,
+ "reshape_position", &reshapep) == 0)
+ *reshape_completed = reshapep;
+ } else {
+ /* some kernels can give an incorrectly high
+ * 'completed' number, so round down */
+ completed /= (info->new_chunk/512);
+ completed *= (info->new_chunk/512);
+ /* Convert 'completed' back in to a 'progress' number */
+ completed *= reshape->after.data_disks;
+ if (!advancing)
+ completed = (info->component_size
+ * reshape->after.data_disks
+ - completed);
+ *reshape_completed = completed;
}
- *reshape_completed = completed;
close(fd);
@@ -3927,7 +3919,6 @@ check_progress:
* it was just a device failure that leaves us degraded but
* functioning.
*/
- strcpy(buf, "hi");
if (sysfs_get_str(info, NULL, "reshape_position", buf, sizeof(buf)) < 0
|| strncmp(buf, "none", 4) != 0) {
/* The abort might only be temporary. Wait up to 10
@@ -4524,11 +4515,10 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
* sometimes they aren't... So allow considerable flexability in matching, and allow
* this test to be overridden by an environment variable.
*/
- if (info->array.utime > (int)__le64_to_cpu(bsb.mtime) + 2*60*60 ||
- info->array.utime < (int)__le64_to_cpu(bsb.mtime) - 10*60) {
+ if(time_after(info->array.utime, (unsigned int)__le64_to_cpu(bsb.mtime) + 2*60*60) ||
+ time_before(info->array.utime, (unsigned int)__le64_to_cpu(bsb.mtime) - 10*60)) {
if (check_env("MDADM_GROW_ALLOW_OLD")) {
- pr_err("accepting backup with timestamp %lu "
- "for array with timestamp %lu\n",
+ pr_err("accepting backup with timestamp %lu for array with timestamp %lu\n",
(unsigned long)__le64_to_cpu(bsb.mtime),
(unsigned long)info->array.utime);
} else {
@@ -4609,7 +4599,7 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
st->ss->free_super(st);
offsets[j] = dinfo.data_offset * 512;
}
- printf(Name ": restoring critical section\n");
+ printf("%s: restoring critical section\n", Name);
if (restore_stripes(fdlist, offsets,
info->array.raid_disks,
@@ -4768,10 +4758,9 @@ int Grow_continue_command(char *devname, int fd,
dprintf("Grow continue is run for ");
if (st->ss->external == 0) {
int d;
- dprintf("native array (%s)\n", devname);
+ dprintf_cont("native array (%s)\n", devname);
if (ioctl(fd, GET_ARRAY_INFO, &array.array) < 0) {
- pr_err("%s is not an active md array -"
- " aborting\n", devname);
+ pr_err("%s is not an active md array - aborting\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
@@ -4816,19 +4805,18 @@ int Grow_continue_command(char *devname, int fd,
char *container;
if (subarray) {
- dprintf("subarray (%s)\n", subarray);
+ dprintf_cont("subarray (%s)\n", subarray);
container = st->container_devnm;
cfd = open_dev_excl(st->container_devnm);
} else {
container = st->devnm;
close(fd);
cfd = open_dev_excl(st->devnm);
- dprintf("container (%s)\n", container);
+ dprintf_cont("container (%s)\n", container);
fd = cfd;
}
if (cfd < 0) {
- pr_err("Unable to open container "
- "for %s\n", devname);
+ pr_err("Unable to open container for %s\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
@@ -4864,9 +4852,7 @@ int Grow_continue_command(char *devname, int fd,
allow_reshape = 0;
if (!allow_reshape) {
- pr_err("cannot continue reshape of an array"
- " in container with unsupported"
- " metadata: %s(%s)\n",
+ pr_err("cannot continue reshape of an array in container with unsupported metadata: %s(%s)\n",
devname, container);
ret_val = 1;
goto Grow_continue_command_exit;
@@ -4886,8 +4872,7 @@ int Grow_continue_command(char *devname, int fd,
break;
}
if (!content) {
- pr_err("Unable to determine reshaped "
- "array for %s\n", devname);
+ pr_err("Unable to determine reshaped array for %s\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
@@ -4900,6 +4885,9 @@ int Grow_continue_command(char *devname, int fd,
sysfs_init(content, fd2, mdstat->devnm);
+ close(fd2);
+ fd2 = -1;
+
/* start mdmon in case it is not running
*/
if (!mdmon_running(container))
@@ -4909,8 +4897,7 @@ int Grow_continue_command(char *devname, int fd,
if (mdmon_running(container))
st->update_tail = &st->updates;
else {
- pr_err("No mdmon found. "
- "Grow cannot continue.\n");
+ 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 c9372587..24fd8276 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -104,6 +104,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
struct map_ent target_array;
int have_target;
char *devname = devlist->devname;
+ int journal_device_missing = 0;
struct createinfo *ci = conf_get_create_info();
@@ -130,16 +131,13 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
if (must_be_container(dfd)) {
if (!st)
st = super_by_fd(dfd, NULL);
- if (st)
- st->ignore_hw_compat = 1;
if (st && st->ss->load_container)
rv = st->ss->load_container(st, dfd, NULL);
close(dfd);
if (!rv && st->ss->container_content) {
if (map_lock(&map))
- pr_err("failed to get "
- "exclusive lock on mapfile\n");
+ pr_err("failed to get exclusive lock on mapfile\n");
if (c->export)
printf("MD_DEVNAME=%s\n", devname);
rv = Incremental_container(st, devname, c, NULL);
@@ -196,18 +194,19 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
policy = disk_policy(&dinfo);
have_target = policy_check_path(&dinfo, &target_array);
- if (st == NULL && (st = guess_super(dfd)) == NULL) {
+ if (st == NULL && (st = guess_super_type(dfd, guess_array)) == NULL) {
if (c->verbose >= 0)
pr_err("no recognisable superblock on %s.\n",
devname);
rv = try_spare(devname, &dfd, policy,
have_target ? &target_array : NULL,
- st, c->verbose);
+ NULL, c->verbose);
goto out;
}
- st->ignore_hw_compat = 1;
+ st->ignore_hw_compat = 0;
+
if (st->ss->compare_super == NULL ||
- st->ss->load_super(st, dfd, NULL)) {
+ st->ss->load_super(st, dfd, c->verbose >= 0 ? devname : NULL)) {
if (c->verbose >= 0)
pr_err("no RAID superblock on %s.\n",
devname);
@@ -229,8 +228,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
if (match && match->devname
&& strcasecmp(match->devname, "<ignore>") == 0) {
if (c->verbose >= 0)
- pr_err("array containing %s is explicitly"
- " ignored by mdadm.conf\n",
+ pr_err("array containing %s is explicitly ignored by mdadm.conf\n",
devname);
goto out;
}
@@ -251,8 +249,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
if (!match && !conf_test_metadata(st->ss->name, policy,
(trustworthy == LOCAL))) {
if (c->verbose >= 1)
- pr_err("%s has metadata type %s for which "
- "auto-assembly is disabled\n",
+ pr_err("%s has metadata type %s for which auto-assembly is disabled\n",
devname, st->ss->name);
goto out;
}
@@ -289,8 +286,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
/* 4/ Check if array exists.
*/
if (map_lock(&map))
- pr_err("failed to get exclusive lock on "
- "mapfile\n");
+ pr_err("failed to get exclusive lock on mapfile\n");
/* Now check we can get O_EXCL. If not, probably "mdadm -A" has
* taken over
*/
@@ -317,6 +313,12 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
if (mdfd < 0) {
+ /* Skip the clustered ones. This should be started by
+ * clustering resource agents
+ */
+ if (info.array.state & (1 << MD_SB_CLUSTERED))
+ goto out;
+
/* Couldn't find an existing array, maybe make a new one */
mdfd = create_mddev(match ? match->devname : NULL,
name_to_use, c->autof, trustworthy, chosen_name);
@@ -352,8 +354,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
* So reject it.
*/
ioctl(mdfd, STOP_ARRAY, NULL);
- pr_err("You have an old buggy kernel which cannot support\n"
- " --incremental reliably. Aborting.\n");
+ pr_err("You have an old buggy kernel which cannot support\n --incremental reliably. Aborting.\n");
rv = 2;
goto out_unlock;
}
@@ -420,8 +421,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
st2 = dup_super(st);
if (st2->ss->load_super(st2, dfd2, NULL) ||
st->ss->compare_super(st, st2) != 0) {
- pr_err("metadata mismatch between %s and "
- "chosen array %s\n",
+ pr_err("metadata mismatch between %s and chosen array %s\n",
devname, chosen_name);
close(dfd2);
rv = 2;
@@ -444,6 +444,10 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
/* add disk needs to know about containers */
if (st->ss->external)
sra->array.level = LEVEL_CONTAINER;
+
+ if (info.array.state & (1 << MD_SB_CLUSTERED))
+ info.disk.state |= (1 << MD_DISK_CLUSTER_ADD);
+
err = add_disk(mdfd, st, sra, &info);
if (err < 0 && errno == EBUSY) {
/* could be another device present with the same
@@ -521,6 +525,9 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
sra = sysfs_read(mdfd, NULL, (GET_DEVS | GET_STATE |
GET_OFFSET | GET_SIZE));
active_disks = count_active(st, sra, mdfd, &avail, &info);
+
+ journal_device_missing = (info.journal_device_required) && (info.journal_clean == 0);
+
if (enough(info.array.level, info.array.raid_disks,
info.array.layout, info.array.state & 1,
avail) == 0) {
@@ -550,10 +557,12 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
}
map_unlock(&map);
- if (c->runstop > 0 || active_disks >= info.array.working_disks) {
+ if (c->runstop > 0 || (!journal_device_missing && active_disks >= info.array.working_disks)) {
struct mdinfo *dsk;
/* Let's try to start it */
+ if (journal_device_missing)
+ pr_err("Trying to run with missing journal device\n");
if (info.reshape_active && !(info.reshape_active & RESHAPE_NO_BACKUP)) {
pr_err("%s: This array is being reshaped and cannot be started\n",
chosen_name);
@@ -620,6 +629,8 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
} else {
if (c->export) {
printf("MD_STARTED=unsafe\n");
+ } else if (journal_device_missing) {
+ pr_err("Journal device is missing, not safe to start yet.\n");
} else if (c->verbose >= 0)
pr_err("%s attached to %s, not enough to start safely.\n",
devname, chosen_name);
@@ -656,7 +667,7 @@ static void find_reject(int mdfd, struct supertype *st, struct mdinfo *sra,
* without thinking more */
for (d = sra->devs; d ; d = d->next) {
- char dn[10];
+ char dn[24]; // 2*11 bytes for ints (including sign) + colon + null byte
int dfd;
struct mdinfo info;
sprintf(dn, "%d:%d", d->disk.major, d->disk.minor);
@@ -720,8 +731,11 @@ static int count_active(struct supertype *st, struct mdinfo *sra,
close(dfd);
if (ok != 0)
continue;
+
info.array.raid_disks = raid_disks;
st->ss->getinfo_super(st, &info, devmap + raid_disks * devnum);
+ if (info.disk.raid_disk == MD_DISK_ROLE_JOURNAL)
+ bestinfo->journal_clean = 1;
if (!avail) {
raid_disks = info.array.raid_disks;
avail = xcalloc(raid_disks, 1);
@@ -771,6 +785,7 @@ static int count_active(struct supertype *st, struct mdinfo *sra,
replcnt++;
st->ss->free_super(st);
}
+
if (!avail)
return 0;
/* We need to reject any device that thinks the best device is
@@ -864,8 +879,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
*/
if (map_lock(&map)) {
- pr_err("failed to get exclusive lock on "
- "mapfile\n");
+ pr_err("failed to get exclusive lock on mapfile\n");
return 1;
}
for (mp = map ; mp ; mp = mp->next) {
@@ -911,8 +925,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
sra->text_version);
if (!st2) {
if (verbose > 1)
- pr_err("not adding %s to %s"
- " as metadata not recognised.\n",
+ pr_err("not adding %s to %s as metadata not recognised.\n",
devname, mp->path);
goto next;
}
@@ -994,8 +1007,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
if (domain_test(dl, pol, st2->ss->name) != 1) {
/* domain test fails */
if (verbose > 1)
- pr_err("not adding %s to %s as"
- " it is not in a compatible domain\n",
+ pr_err("not adding %s to %s as it is not in a compatible domain\n",
devname, mp->path);
goto next;
@@ -1022,12 +1034,12 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
int mdfd = open_dev(chosen->sys_name);
if (mdfd >= 0) {
struct mddev_dev devlist;
- char devname[20];
+ char chosen_devname[24]; // 2*11 for int (including signs) + colon + null
devlist.next = NULL;
devlist.used = 0;
devlist.writemostly = 0;
- devlist.devname = devname;
- sprintf(devname, "%d:%d", major(stb.st_rdev),
+ devlist.devname = chosen_devname;
+ sprintf(chosen_devname, "%d:%d", major(stb.st_rdev),
minor(stb.st_rdev));
devlist.disposition = 'a';
close(dfd);
@@ -1132,6 +1144,7 @@ static int partition_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
if (st2 == NULL ||
st2->ss->load_super(st2, fd, NULL) < 0)
goto next;
+ st2->ignore_hw_compat = 0;
if (!st) {
/* Check domain policy again, this time referring to metadata */
@@ -1267,8 +1280,7 @@ static int try_spare(char *devname, int *dfdp, struct dev_policy *pol,
!policy_action_allows(pol, st?st->ss->name:NULL,
act_spare_same_slot)) {
if (verbose > 1)
- pr_err("%s is not bare, so not "
- "considering as a spare\n",
+ pr_err("%s is not bare, so not considering as a spare\n",
devname);
return 1;
}
@@ -1359,12 +1371,11 @@ restart:
struct supertype *st = super_by_fd(mdfd, NULL);
int ret = 0;
struct map_ent *map = NULL;
- if (st)
- st->ignore_hw_compat = 1;
+
if (st && st->ss->load_container)
ret = st->ss->load_container(st, mdfd, NULL);
close(mdfd);
- if (!ret && st->ss->container_content) {
+ if (!ret && st && st->ss->container_content) {
if (map_lock(&map))
pr_err("failed to get exclusive lock on mapfile\n");
ret = Incremental_container(st, me->path, c, only);
@@ -1576,8 +1587,7 @@ static int Incremental_container(struct supertype *st, char *devname,
if (match && match->devname &&
strcasecmp(match->devname, "<ignore>") == 0) {
if (c->verbose > 0)
- pr_err("array %s/%s is "
- "explicitly ignored by mdadm.conf\n",
+ pr_err("array %s/%s is explicitly ignored by mdadm.conf\n",
match->container, match->member);
continue;
}
@@ -1710,34 +1720,34 @@ int IncrementalRemove(char *devname, char *id_path, int verbose)
char buf[32];
if (!id_path)
- dprintf(Name ": incremental removal without --path <id_path> "
- "lacks the possibility to re-add new device in this "
- "port\n");
+ dprintf("incremental removal without --path <id_path> lacks the possibility to re-add new device in this port\n");
if (strchr(devname, '/')) {
- pr_err("incremental removal requires a "
- "kernel device name, not a file: %s\n", devname);
+ pr_err("incremental removal requires a kernel device name, not a file: %s\n", devname);
return 1;
}
ent = mdstat_by_component(devname);
if (!ent) {
if (verbose >= 0)
- pr_err("%s does not appear to be a component "
- "of any array\n", devname);
+ pr_err("%s does not appear to be a component of any array\n", devname);
return 1;
}
sysfs_init(&mdi, -1, ent->devnm);
- if (sysfs_get_str(&mdi, NULL, "array_state",
- buf, sizeof(buf)) > 0) {
- if (strncmp(buf, "active", 6) == 0 ||
- strncmp(buf, "clean", 5) == 0)
- sysfs_set_str(&mdi, NULL,
- "array_state", "read-auto");
+ mdfd = open_dev_excl(ent->devnm);
+ if (mdfd > 0) {
+ close(mdfd);
+ if (sysfs_get_str(&mdi, NULL, "array_state",
+ buf, sizeof(buf)) > 0) {
+ if (strncmp(buf, "active", 6) == 0 ||
+ strncmp(buf, "clean", 5) == 0)
+ sysfs_set_str(&mdi, NULL,
+ "array_state", "read-auto");
+ }
}
mdfd = open_dev(ent->devnm);
if (mdfd < 0) {
if (verbose >= 0)
- pr_err("Cannot open array %s!!\n", ent->dev);
+ pr_err("Cannot open array %s!!\n", ent->devnm);
free_mdstat(ent);
return 1;
}
@@ -1759,11 +1769,11 @@ int IncrementalRemove(char *devname, char *id_path, int verbose)
struct mdstat_ent *mdstat = mdstat_read(0, 0);
struct mdstat_ent *memb;
for (memb = mdstat ; memb ; memb = memb->next)
- if (is_container_member(memb, ent->dev)) {
+ if (is_container_member(memb, ent->devnm)) {
int subfd = open_dev(memb->devnm);
if (subfd >= 0) {
rv |= Manage_subdevs(
- memb->dev, subfd,
+ memb->devnm, subfd,
&devlist, verbose, 0,
NULL, 0);
close(subfd);
@@ -1771,7 +1781,7 @@ int IncrementalRemove(char *devname, char *id_path, int verbose)
}
free_mdstat(mdstat);
} else
- rv |= Manage_subdevs(ent->dev, mdfd, &devlist,
+ rv |= Manage_subdevs(ent->devnm, mdfd, &devlist,
verbose, 0, NULL, 0);
if (rv & 2) {
/* Failed due to EBUSY, try to stop the array.
@@ -1779,7 +1789,7 @@ int IncrementalRemove(char *devname, char *id_path, int verbose)
*/
int devid = devnm2devid(ent->devnm);
run_udisks("--unmount", map_dev(major(devid),minor(devid), 0));
- rv = Manage_stop(ent->dev, mdfd, verbose, 1);
+ rv = Manage_stop(ent->devnm, mdfd, verbose, 1);
if (rv)
/* At least we can try to trigger a 'remove' */
sysfs_uevent(&mdi, "remove");
@@ -1789,7 +1799,7 @@ int IncrementalRemove(char *devname, char *id_path, int verbose)
}
} else {
devlist.disposition = 'r';
- rv = Manage_subdevs(ent->dev, mdfd, &devlist,
+ rv = Manage_subdevs(ent->devnm, mdfd, &devlist,
verbose, 0, NULL, 0);
}
close(mdfd);
diff --git a/Makefile b/Makefile
index f058a22e..664c79ff 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIB
CC = $(CROSS_COMPILE)gcc
CXFLAGS ?= -ggdb
-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
+CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
ifdef WARN_UNUSED
CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
endif
@@ -62,8 +62,8 @@ CPPFLAGS += -DBINDIR=\"$(BINDIR)\"
PKG_CONFIG ?= pkg-config
SYSCONFDIR = /etc
-CONFFILE = $(SYSCONFDIR)/mdadm.conf
-CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf
+CONFFILE = $(SYSCONFDIR)/mdadm/mdadm.conf
+CONFFILE2 = $(SYSCONFDIR)/mdadm.conf
MAILCMD =/usr/sbin/sendmail -t
CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\"
# Both MAP_DIR and MDMON_DIR should be somewhere that persists across the
@@ -79,10 +79,14 @@ MDMON_DIR = $(RUN_DIR)
# place for autoreplace cookies
FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
SYSTEMD_DIR=/lib/systemd/system
+
+COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
+DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
+
DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\"
-CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)
+CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS) $(COROSYNC) $(DLM)
VERSION = $(shell [ -d .git ] && git describe HEAD | sed 's/mdadm-//')
VERS_DATE = $(shell [ -d .git ] && date --date="`git log -n1 --format=format:%cd --date=short`" '+%0dth %B %Y' | sed -e 's/1th/1st/' -e 's/2th/2nd/' -e 's/11st/11th/' -e 's/12nd/12th/')
@@ -101,6 +105,7 @@ endif
# If you want a static binary, you might uncomment these
# LDFLAGS = -static
# STRIP = -s
+LDLIBS=-ldl
INSTALL = /usr/bin/install
DESTDIR =
@@ -115,6 +120,12 @@ ifndef UDEVDIR
UDEVDIR = /lib/udev
endif
+ifeq (,$(findstring s,$(MAKEFLAGS)))
+ ECHO=echo
+else
+ ECHO=:
+endif
+
OBJS = mdadm.o config.o policy.o mdstat.o ReadMe.o util.o maps.o lib.o \
Manage.o Assemble.o Build.o \
Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o \
@@ -122,7 +133,7 @@ OBJS = mdadm.o config.o policy.o mdstat.o ReadMe.o util.o maps.o lib.o \
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
+ platform-intel.o probe_roms.o crc32c.o
CHECK_OBJS = restripe.o sysfs.o maps.o lib.o xmalloc.o dlink.o
@@ -145,7 +156,7 @@ STATICOBJS = pwgr.o
ASSEMBLE_SRCS := mdassemble.c Assemble.c Manage.c config.c policy.c dlink.c util.c \
maps.c lib.c xmalloc.c \
super0.c super1.c super-ddf.c super-intel.c sha1.c crc32.c sg_io.c mdstat.c \
- platform-intel.c probe_roms.c sysfs.c super-mbr.c super-gpt.c
+ platform-intel.c probe_roms.c sysfs.c super-mbr.c super-gpt.c mapfile.c
ASSEMBLE_AUTO_SRCS := mdopen.c
ASSEMBLE_FLAGS:= $(CFLAGS) -DMDASSEMBLE
ifdef MDASSEMBLE_AUTO
@@ -153,7 +164,7 @@ ASSEMBLE_SRCS += $(ASSEMBLE_AUTO_SRCS)
ASSEMBLE_FLAGS += -DMDASSEMBLE_AUTO
endif
-all : check_rundir mdadm mdmon
+all : mdadm mdmon
man : mdadm.man md.man mdadm.conf.man mdmon.man raid6check.man
check_rundir:
@@ -172,11 +183,11 @@ everything-test: all mdadm.static swap_super test_stripe \
# mdadm.uclibc and mdassemble.uclibc don't work on x86-64
# mdadm.tcc doesn't work..
-mdadm : check_rundir $(OBJS)
+mdadm : $(OBJS) | check_rundir
$(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
mdadm.static : $(OBJS) $(STATICOBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS) $(LDLIBS)
mdadm.tcc : $(SRCS) $(INCL)
$(TCC) -o mdadm.tcc $(SRCS)
@@ -186,21 +197,21 @@ mdadm.klibc : $(SRCS) $(INCL)
$(CC) -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 $(CFLAGS) $(SRCS)
mdadm.Os : $(SRCS) $(INCL)
- $(CC) -o mdadm.Os $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -Os $(SRCS)
+ $(CC) -o mdadm.Os $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -Os $(SRCS) $(LDLIBS)
mdadm.O2 : $(SRCS) $(INCL) mdmon.O2
- $(CC) -o mdadm.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(SRCS)
+ $(CC) -o mdadm.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(SRCS) $(LDLIBS)
mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
- $(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
+ $(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS) $(LDLIBS)
# use '-z now' to guarantee no dynamic linker interactions with the monitor thread
-mdmon : check_rundir $(MON_OBJS)
+mdmon : $(MON_OBJS) | check_rundir
$(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
msg.o: msg.c msg.h
test_stripe : restripe.c xmalloc.o mdadm.h
- $(CC) $(CXFLAGS) $(LDFLAGS) -o test_stripe xmalloc.o -DMAIN restripe.c
+ $(CC) $(CFLAGS) $(CXFLAGS) $(LDFLAGS) -o test_stripe xmalloc.o -DMAIN restripe.c
raid6check : raid6check.o mdadm.h $(CHECK_OBJS)
$(CC) $(CXFLAGS) $(LDFLAGS) -o raid6check raid6check.o $(CHECK_OBJS)
@@ -283,7 +294,7 @@ install-man: mdadm.8 md.4 mdadm.conf.5 mdmon.8
install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules
@for file in 63-md-raid-arrays.rules 64-md-raid-assembly.rules ; \
do sed -e 's,BINDIR,$(BINDIR),g' udev-$${file#??-} > .install.tmp.1 && \
- echo $(INSTALL) -D -m 644 udev-$${file#??-} $(DESTDIR)$(UDEVDIR)/rules.d/$$file ; \
+ $(ECHO) $(INSTALL) -D -m 644 udev-$${file#??-} $(DESTDIR)$(UDEVDIR)/rules.d/$$file ; \
$(INSTALL) -D -m 644 .install.tmp.1 $(DESTDIR)$(UDEVDIR)/rules.d/$$file ; \
rm -f .install.tmp.1; \
done
@@ -292,13 +303,13 @@ install-systemd: systemd/mdmon@.service
@for file in mdmon@.service mdmonitor.service mdadm-last-resort@.timer \
mdadm-last-resort@.service mdadm-grow-continue@.service; \
do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp.2 && \
- echo $(INSTALL) -D -m 644 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
+ $(ECHO) $(INSTALL) -D -m 644 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
$(INSTALL) -D -m 644 .install.tmp.2 $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
rm -f .install.tmp.2; \
done
@for file in mdadm.shutdown ; \
do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp.3 && \
- echo $(INSTALL) -D -m 755 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
+ $(ECHO) $(INSTALL) -D -m 755 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
$(INSTALL) -D -m 755 .install.tmp.3 $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
rm -f .install.tmp.3; \
done
diff --git a/Manage.c b/Manage.c
index 206f34ef..7e1b94be 100644
--- a/Manage.c
+++ b/Manage.c
@@ -211,15 +211,11 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
if (md_get_version(fd) < 9000) {
if (ioctl(fd, STOP_MD, 0) == 0)
return 0;
- pr_err("stopping device %s "
- "failed: %s\n",
+ pr_err("stopping device %s failed: %s\n",
devname, strerror(errno));
return 1;
}
- /* If this is an mdmon managed array, just write 'inactive'
- * to the array state and let mdmon clear up.
- */
strcpy(devnm, fd2devnm(fd));
/* Get EXCL access first. If this fails, then attempting
* to stop is probably a bad idea.
@@ -236,13 +232,17 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
container[0] = 0;
close(fd);
count = 5;
- while (((fd = ((devnm[0] == '/')
+ while (((fd = ((devname[0] == '/')
?open(devname, O_RDONLY|O_EXCL)
:open_dev_flags(devnm, O_RDONLY|O_EXCL))) < 0
|| strcmp(fd2devnm(fd), devnm) != 0)
&& container[0]
&& mdmon_running(container)
&& count) {
+ /* Can't open, so something might be wrong. However it
+ * is a container, so we might be racing with mdmon, so
+ * retry for a bit.
+ */
if (fd >= 0)
close(fd);
flush_mdmon(container);
@@ -252,13 +252,13 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
if (fd >= 0)
close(fd);
if (verbose >= 0)
- pr_err("Cannot get exclusive access to %s:"
- "Perhaps a running "
- "process, mounted filesystem "
- "or active volume group?\n",
+ pr_err("Cannot get exclusive access to %s:Perhaps a running process, mounted filesystem or active volume group?\n",
devname);
return 1;
}
+ /* If this is an mdmon managed array, just write 'inactive'
+ * to the array state and let mdmon clear up.
+ */
if (mdi &&
mdi->array.level > 0 &&
is_subarray(mdi->text_version)) {
@@ -266,7 +266,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
/* This is mdmon managed. */
close(fd);
- /* As we have an O_EXCL open, any use of the device
+ /* As we had an O_EXCL open, any use of the device
* which blocks STOP_ARRAY is probably a transient use,
* so it is reasonable to retry for a while - 5 seconds.
*/
@@ -293,8 +293,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
fd = open_dev_excl(devnm);
if (fd < 0) {
if (verbose >= 0)
- pr_err("failed to completely stop %s"
- ": Device is busy\n",
+ pr_err("failed to completely stop %s: Device is busy\n",
devname);
rv = 1;
goto out;
@@ -320,9 +319,8 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
metadata_container_matches(m->metadata_version+9,
devnm)) {
if (verbose >= 0)
- pr_err("Cannot stop container %s: "
- "member %s still active\n",
- devname, m->dev);
+ pr_err("Cannot stop container %s: member %s still active\n",
+ devname, m->devnm);
free_mdstat(mds);
rv = 1;
goto out;
@@ -346,9 +344,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
sysfs_attribute_available(mdi, NULL, "reshape_direction") &&
sysfs_get_str(mdi, NULL, "sync_action", buf, 20) > 0 &&
strcmp(buf, "reshape\n") == 0 &&
- sysfs_get_two(mdi, NULL, "raid_disks", &rd1, &rd2) == 2 &&
- sysfs_set_str(mdi, NULL, "sync_action", "frozen") == 0) {
- /* Array is frozen */
+ sysfs_get_two(mdi, NULL, "raid_disks", &rd1, &rd2) == 2) {
unsigned long long position, curr;
unsigned long long chunk1, chunk2;
unsigned long long rddiv, chunkdiv;
@@ -359,12 +355,28 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
int delay;
int scfd;
+ delay = 40;
+ while (rd1 > rd2 && delay > 0 &&
+ sysfs_get_ll(mdi, NULL, "sync_max", &old_sync_max) == 0) {
+ /* must be in the critical section - wait a bit */
+ delay -= 1;
+ usleep(100000);
+ }
+
+ if (sysfs_set_str(mdi, NULL, "sync_action", "frozen") != 0)
+ goto done;
+ /* Array is frozen */
+
rd1 -= mdi->array.level == 6 ? 2 : 1;
rd2 -= mdi->array.level == 6 ? 2 : 1;
sysfs_get_str(mdi, NULL, "reshape_direction", buf, sizeof(buf));
if (strncmp(buf, "back", 4) == 0)
backwards = 1;
- sysfs_get_ll(mdi, NULL, "reshape_position", &position);
+ if (sysfs_get_ll(mdi, NULL, "reshape_position", &position) != 0) {
+ /* reshape must have finished now */
+ sysfs_set_str(mdi, NULL, "sync_action", "idle");
+ goto done;
+ }
sysfs_get_two(mdi, NULL, "chunk_size", &chunk1, &chunk2);
chunk1 /= 512;
chunk2 /= 512;
@@ -381,9 +393,20 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
size &= ~(chunk1-1);
size &= ~(chunk2-1);
/* rd1 must be smaller */
+ /* Reshape may have progressed further backwards than
+ * recorded, so target even further back (hence "-1")
+ */
position = (position / sectors - 1) * sectors;
+ /* rd1 is always the conversion factor between 'sync'
+ * position and 'reshape' position.
+ * We read 1 "new" stripe worth of data from where-ever,
+ * and when write out that full stripe.
+ */
sync_max = size - position/rd1;
} else {
+ /* Reshape will very likely be beyond position, and it may
+ * be too late to stop at '+1', so aim for '+2'
+ */
position = (position / sectors + 2) * sectors;
sync_max = position/rd1;
}
@@ -406,6 +429,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
delay = 3000;
scfd = sysfs_open(mdi->sys_name, NULL, "sync_completed");
while (scfd >= 0 && delay > 0 && old_sync_max > 0) {
+ unsigned long long max_completed;
sysfs_get_ll(mdi, NULL, "reshape_position", &curr);
sysfs_fd_get_str(scfd, buf, sizeof(buf));
if (strncmp(buf, "none", 4) == 0) {
@@ -419,7 +443,10 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
break;
}
- if (sysfs_fd_get_ll(scfd, &completed) == 0 &&
+ if (sysfs_fd_get_two(scfd, &completed,
+ &max_completed) == 2 &&
+ /* 'completed' sometimes reads as max-uulong */
+ completed < max_completed &&
(completed > sync_max ||
(completed == sync_max && curr != position))) {
while (completed > sync_max) {
@@ -443,6 +470,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
close(scfd);
}
+done:
/* As we have an O_EXCL open, any use of the device
* which blocks STOP_ARRAY is probably a transient use,
@@ -460,9 +488,7 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
pr_err("failed to stop array %s: %s\n",
devname, strerror(errno));
if (errno == EBUSY)
- cont_err("Perhaps a running "
- "process, mounted filesystem "
- "or active volume group?\n");
+ cont_err("Perhaps a running process, mounted filesystem or active volume group?\n");
}
rv = 1;
goto out;
@@ -643,6 +669,15 @@ int attempt_re_add(int fd, int tfd, struct mddev_dev *dv,
disc.number = mdi.disk.number;
disc.raid_disk = mdi.disk.raid_disk;
disc.state = mdi.disk.state;
+ if (array->state & (1 << MD_SB_CLUSTERED)) {
+ /* extra flags are needed when adding to a cluster as
+ * there are two cases to distinguish
+ */
+ if (dv->disposition == 'c')
+ disc.state |= (1 << MD_DISK_CANDIDATE);
+ else
+ disc.state |= (1 << MD_DISK_CLUSTER_ADD);
+ }
if (dv->writemostly == 1)
disc.state |= 1 << MD_DISK_WRITEMOSTLY;
if (dv->writemostly == 2)
@@ -652,8 +687,7 @@ int attempt_re_add(int fd, int tfd, struct mddev_dev *dv,
int rv = -1;
tfd = dev_open(dv->devname, O_RDWR);
if (tfd < 0) {
- pr_err("failed to open %s for"
- " superblock update during re-add\n", dv->devname);
+ pr_err("failed to open %s for superblock update during re-add\n", dv->devname);
return -1;
}
@@ -673,8 +707,7 @@ int attempt_re_add(int fd, int tfd, struct mddev_dev *dv,
rv = dev_st->ss->store_super(dev_st, tfd);
close(tfd);
if (rv != 0) {
- pr_err("failed to update"
- " superblock during re-add\n");
+ pr_err("failed to update superblock during re-add\n");
return -1;
}
}
@@ -700,7 +733,8 @@ skip_re_add:
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,
- char *update, unsigned long rdev, unsigned long long array_size)
+ char *update, unsigned long rdev, unsigned long long array_size,
+ int raid_slot)
{
unsigned long long ldsize;
struct supertype *dev_st = NULL;
@@ -717,17 +751,13 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
if (tst->ss == &super0 && ldsize > 4ULL*1024*1024*1024*1024) {
/* More than 4TB is wasted on v0.90 */
if (!force) {
- pr_err("%s is larger than %s can "
- "effectively use.\n"
- " Add --force is you "
- "really want to add this device.\n",
+ pr_err("%s is larger than %s can effectively use.\n"
+ " Add --force is you really want to add this device.\n",
dv->devname, devname);
return -1;
}
- pr_err("%s is larger than %s can "
- "effectively use.\n"
- " Adding anyway as --force "
- "was given.\n",
+ pr_err("%s is larger than %s can effectively use.\n"
+ " Adding anyway as --force was given.\n",
dv->devname, devname);
}
if (!tst->ss->external &&
@@ -795,7 +825,9 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
}
/* Make sure device is large enough */
- if (tst->ss->avail_size(tst, ldsize/512, INVALID_SECTORS) <
+ if (dv->disposition != 'j' && /* skip size check for Journal */
+ tst->sb &&
+ tst->ss->avail_size(tst, ldsize/512, INVALID_SECTORS) <
array_size) {
if (dv->disposition == 'M')
return 0;
@@ -841,7 +873,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
int d;
int found = 0;
- for (d = 0; d < MAX_DISKS && found < array->active_disks; d++) {
+ for (d = 0; d < MAX_DISKS && found < array->nr_disks; d++) {
disc.number = d;
if (ioctl(fd, GET_DISK_INFO, &disc))
continue;
@@ -893,10 +925,36 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
}
disc.major = major(rdev);
disc.minor = minor(rdev);
- disc.number =j;
+ if (raid_slot < 0)
+ disc.number = j;
+ else
+ disc.number = raid_slot;
disc.state = 0;
+
+ /* only add journal to array that supports journaling */
+ if (dv->disposition == 'j') {
+ struct mdinfo mdi;
+ struct mdinfo *mdp;
+
+ mdp = sysfs_read(fd, NULL, GET_ARRAY_STATE);
+
+ if (strncmp(mdp->sysfs_array_state, "readonly", 8) != 0) {
+ pr_err("%s is not readonly, cannot add journal.\n", devname);
+ return -1;
+ }
+
+ tst->ss->getinfo_super(tst, &mdi, NULL);
+ if (mdi.journal_device_required == 0) {
+ pr_err("%s does not support journal device.\n", devname);
+ return -1;
+ }
+ disc.raid_disk = 0;
+ }
+
if (array->not_persistent==0) {
int dfd;
+ if (dv->disposition == 'j')
+ disc.state |= (1 << MD_DISK_JOURNAL) | (1 << MD_DISK_SYNC);
if (dv->writemostly == 1)
disc.state |= 1 << MD_DISK_WRITEMOSTLY;
dfd = dev_open(dv->devname, O_RDWR | O_EXCL|O_DIRECT);
@@ -934,6 +992,14 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
}
free(used);
}
+
+ if (array->state & (1 << MD_SB_CLUSTERED)) {
+ if (dv->disposition == 'c')
+ disc.state |= (1 << MD_DISK_CANDIDATE);
+ else
+ disc.state |= (1 << MD_DISK_CLUSTER_ADD);
+ }
+
if (dv->writemostly == 1)
disc.state |= (1 << MD_DISK_WRITEMOSTLY);
if (tst->ss->external) {
@@ -949,8 +1015,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
container_fd = open_dev_excl(devnm);
if (container_fd < 0) {
- pr_err("add failed for %s:"
- " could not get exclusive access to container\n",
+ pr_err("add failed for %s: could not get exclusive access to container\n",
dv->devname);
tst->ss->free_super(tst);
return -1;
@@ -989,8 +1054,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
* 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);
+ pr_err("add new device to external metadata failed for %s\n", dv->devname);
close(container_fd);
sysfs_free(sra);
return -1;
@@ -1001,10 +1065,20 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
} else {
tst->ss->free_super(tst);
if (ioctl(fd, ADD_NEW_DISK, &disc)) {
- pr_err("add new device failed for %s as %d: %s\n",
- dv->devname, j, strerror(errno));
+ if (dv->disposition == 'j')
+ pr_err("Failed to hot add %s as journal, "
+ "please try restart %s.\n", dv->devname, devname);
+ else
+ pr_err("add new device failed for %s as %d: %s\n",
+ dv->devname, j, strerror(errno));
return -1;
}
+ if (dv->disposition == 'j') {
+ pr_err("Journal added successfully, making %s read-write\n", devname);
+ if (Manage_ro(devname, fd, -1))
+ pr_err("Failed to make %s read-write\n", devname);
+ }
+
}
if (verbose >= 0)
pr_err("added %s\n", dv->devname);
@@ -1032,8 +1106,7 @@ int Manage_remove(struct supertype *tst, int fd, struct mddev_dev *dv,
strcpy(devnm, fd2devnm(fd));
lfd = open_dev_excl(devnm);
if (lfd < 0) {
- pr_err("Cannot get exclusive access "
- " to container - odd\n");
+ pr_err("Cannot get exclusive access to container - odd\n");
return -1;
}
/* We may not be able to check on holders in
@@ -1093,8 +1166,7 @@ int Manage_remove(struct supertype *tst, int fd, struct mddev_dev *dv,
}
}
if (err) {
- pr_err("hot remove failed "
- "for %s: %s\n", dv->devname,
+ pr_err("hot remove failed for %s: %s\n", dv->devname,
strerror(errno));
if (lfd >= 0)
close(lfd);
@@ -1239,6 +1311,7 @@ int Manage_subdevs(char *devname, int fd,
* try HOT_ADD_DISK
* If that fails EINVAL, try ADD_NEW_DISK
* 'S' - add the device as a spare - don't try re-add
+ * 'j' - add the device as a journal device
* 'A' - re-add the device
* 'r' - remove the device: HOT_REMOVE_DISK
* device can be 'faulty' or 'detached' in which case all
@@ -1257,6 +1330,7 @@ int Manage_subdevs(char *devname, int fd,
* variant on 'A'
* 'F' - Another variant of 'A', where the device was faulty
* so must be removed from the array first.
+ * 'c' - confirm the device as found (for clustered environments)
*
* For 'f' and 'r', the device can also be a kernel-internal
* name such as 'sdb'.
@@ -1270,8 +1344,10 @@ int Manage_subdevs(char *devname, int fd,
int sysfd = -1;
int count = 0; /* number of actions taken */
struct mdinfo info;
+ struct mdinfo devinfo;
int frozen = 0;
int busy = 0;
+ int raid_slot = -1;
if (ioctl(fd, GET_ARRAY_INFO, &array)) {
pr_err("Cannot get array info for %s\n",
@@ -1300,12 +1376,22 @@ int Manage_subdevs(char *devname, int fd,
int rv;
int mj,mn;
+ raid_slot = -1;
+ if (dv->disposition == 'c') {
+ rv = parse_cluster_confirm_arg(dv->devname,
+ &dv->devname,
+ &raid_slot);
+ if (rv) {
+ pr_err("Could not get the devname of cluster\n");
+ goto abort;
+ }
+ }
+
if (strcmp(dv->devname, "failed") == 0 ||
strcmp(dv->devname, "faulty") == 0) {
if (dv->disposition != 'A'
&& dv->disposition != 'r') {
- pr_err("%s only meaningful "
- "with -r or --re-add, not -%c\n",
+ pr_err("%s only meaningful with -r or --re-add, not -%c\n",
dv->devname, dv->disposition);
goto abort;
}
@@ -1315,8 +1401,7 @@ int Manage_subdevs(char *devname, int fd,
}
if (strcmp(dv->devname, "detached") == 0) {
if (dv->disposition != 'r' && dv->disposition != 'f') {
- pr_err("%s only meaningful "
- "with -r of -f, not -%c\n",
+ pr_err("%s only meaningful with -r of -f, not -%c\n",
dv->devname, dv->disposition);
goto abort;
}
@@ -1327,9 +1412,13 @@ int Manage_subdevs(char *devname, int fd,
if (strcmp(dv->devname, "missing") == 0) {
struct mddev_dev *add_devlist = NULL;
struct mddev_dev **dp;
+ if (dv->disposition == 'c') {
+ rv = ioctl(fd, CLUSTERED_DISK_NACK, NULL);
+ break;
+ }
+
if (dv->disposition != 'A') {
- pr_err("'missing' only meaningful "
- "with --re-add\n");
+ pr_err("'missing' only meaningful with --re-add\n");
goto abort;
}
add_devlist = conf_get_devs();
@@ -1381,8 +1470,7 @@ int Manage_subdevs(char *devname, int fd,
int found = 0;
char dname[55];
if (dv->disposition != 'r' && dv->disposition != 'f') {
- pr_err("%s only meaningful "
- "with -r or -f, not -%c\n",
+ pr_err("%s only meaningful with -r or -f, not -%c\n",
dv->devname, dv->disposition);
goto abort;
}
@@ -1402,8 +1490,7 @@ int Manage_subdevs(char *devname, int fd,
if (!found) {
sysfd = sysfs_open(fd2devnm(fd), dname, "state");
if (sysfd < 0) {
- pr_err("%s does not appear "
- "to be a component of %s\n",
+ pr_err("%s does not appear to be a component of %s\n",
dv->devname, devname);
goto abort;
}
@@ -1457,16 +1544,28 @@ int Manage_subdevs(char *devname, int fd,
goto abort;
case 'a':
case 'S': /* --add-spare */
+ case 'j': /* --add-journal */
case 'A':
case 'M': /* --re-add missing */
case 'F': /* --re-add faulty */
+ case 'c': /* --cluster-confirm */
/* add the device */
if (subarray) {
- pr_err("Cannot add disks to a"
- " \'member\' array, perform this"
- " operation on the parent container\n");
+ pr_err("Cannot add disks to a \'member\' array, perform this operation on the parent container\n");
goto abort;
}
+
+ /* Let's first try to write re-add to sysfs */
+ if (rdev != 0 &&
+ (dv->disposition == 'A' || dv->disposition == 'F')) {
+ sysfs_init_dev(&devinfo, rdev);
+ if (sysfs_set_str(&info, &devinfo, "state", "re-add") == 0) {
+ pr_err("re-add %s to %s succeed\n",
+ dv->devname, info.sys_name);
+ break;
+ }
+ }
+
if (dv->disposition == 'F')
/* Need to remove first */
ioctl(fd, HOT_REMOVE_DISK, rdev);
@@ -1495,7 +1594,7 @@ int Manage_subdevs(char *devname, int fd,
}
rv = Manage_add(fd, tfd, dv, tst, &array,
force, verbose, devname, update,
- rdev, array_size);
+ rdev, array_size, raid_slot);
close(tfd);
tfd = -1;
if (rv < 0)
@@ -1507,9 +1606,7 @@ int Manage_subdevs(char *devname, int fd,
case 'r':
/* hot remove */
if (subarray) {
- pr_err("Cannot remove disks from a"
- " \'member\' array, perform this"
- " operation on the parent container\n");
+ pr_err("Cannot remove disks from a \'member\' array, perform this operation on the parent container\n");
rv = -1;
} else
rv = Manage_remove(tst, fd, dv, sysfd,
@@ -1547,9 +1644,7 @@ int Manage_subdevs(char *devname, int fd,
break;
case 'R': /* Mark as replaceable */
if (subarray) {
- pr_err("Cannot replace disks in a"
- " \'member\' array, perform this"
- " operation on the parent container\n");
+ pr_err("Cannot replace disks in a \'member\' array, perform this operation on the parent container\n");
rv = -1;
} else {
if (!frozen) {
diff --git a/Monitor.c b/Monitor.c
index 5cb24fab..f19c2e58 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -310,15 +310,11 @@ static int check_one_sharer(int scan)
rv = stat(dir, &buf);
if (rv != -1) {
if (scan) {
- pr_err("Only one "
- "autorebuild process allowed"
- " in scan mode, aborting\n");
+ pr_err("Only one autorebuild process allowed in scan mode, aborting\n");
fclose(fp);
return 1;
} else {
- pr_err("Warning: One"
- " autorebuild process already"
- " running.\n");
+ pr_err("Warning: One autorebuild process already running.\n");
}
}
fclose(fp);
@@ -326,14 +322,11 @@ static int check_one_sharer(int scan)
if (scan) {
if (mkdir(MDMON_DIR, S_IRWXU) < 0 &&
errno != EEXIST) {
- pr_err("Can't create "
- "autorebuild.pid file\n");
+ pr_err("Can't create autorebuild.pid file\n");
} else {
fp = fopen(path, "w");
if (!fp)
- pr_err("Cannot create"
- " autorebuild.pid"
- "file\n");
+ pr_err("Cannot create autorebuild.pidfile\n");
else {
pid = getpid();
fprintf(fp, "%d\n", pid);
@@ -381,24 +374,21 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info)
if (info->mailfrom)
fprintf(mp, "From: %s\n", info->mailfrom);
else
- fprintf(mp, "From: " Name " monitoring <root>\n");
+ fprintf(mp, "From: %s monitoring <root>\n", Name);
fprintf(mp, "To: %s\n", info->mailaddr);
fprintf(mp, "Subject: %s event on %s:%s\n\n",
event, dev, hname);
fprintf(mp,
- "This is an automatically generated"
- " mail message from " Name "\n");
+ "This is an automatically generated mail message from %s\n", Name);
fprintf(mp, "running on %s\n\n", hname);
fprintf(mp,
- "A %s event had been detected on"
- " md device %s.\n\n", event, dev);
+ "A %s event had been detected on md device %s.\n\n", event, dev);
if (disc && disc[0] != ' ')
fprintf(mp,
- "It could be related to"
- " component device %s.\n\n", disc);
+ "It could be related to component device %s.\n\n", disc);
if (disc && disc[0] == ' ')
fprintf(mp, "Extra information:%s.\n\n", disc);
@@ -409,8 +399,7 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info)
char buf[8192];
int n;
fprintf(mp,
- "\nP.S. The /proc/mdstat file"
- " currently contains the following:\n\n");
+ "\nP.S. The /proc/mdstat file currently contains the following:\n\n");
while ( (n=fread(buf, 1, sizeof(buf), mdstat)) > 0)
n=fwrite(buf, 1, n, mp);
fclose(mdstat);
@@ -437,10 +426,13 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info)
else
priority = LOG_INFO;
- if (disc)
+ if (disc && disc[0] != ' ')
syslog(priority,
- "%s event detected on md device %s,"
- " component device %s", event, dev, disc);
+ "%s event detected on md device %s, component device %s", event, dev, disc);
+ else if (disc)
+ syslog(priority,
+ "%s event detected on md device %s: %s",
+ event, dev, disc);
else
syslog(priority,
"%s event detected on md device %s",
@@ -460,7 +452,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
mdu_array_info_t array;
struct mdstat_ent *mse = NULL, *mse2;
char *dev = st->devname;
- int fd;
+ int fd = -1;
int i;
int remaining_disks;
int last_disk;
@@ -468,6 +460,33 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
if (test)
alert("TestMessage", dev, NULL, ainfo);
+ if (st->devnm[0])
+ fd = open("/sys/block", O_RDONLY|O_DIRECTORY);
+ if (fd >= 0) {
+ /* Don't open the device unless it is present and
+ * active in sysfs.
+ */
+ char buf[10];
+ close(fd);
+ fd = sysfs_open(st->devnm, NULL, "array_state");
+ if (fd < 0 ||
+ read(fd, buf, 10) < 5 ||
+ strncmp(buf,"clear",5) == 0 ||
+ strncmp(buf,"inact",5) == 0) {
+ if (fd >= 0)
+ close(fd);
+ fd = sysfs_open(st->devnm, NULL, "level");
+ if (fd < 0 || read(fd, buf, 10) != 0) {
+ if (fd >= 0)
+ close(fd);
+ if (!st->err)
+ alert("DeviceDisappeared", dev, NULL, ainfo);
+ st->err++;
+ return 0;
+ }
+ }
+ close(fd);
+ }
fd = open(dev, O_RDONLY);
if (fd < 0) {
if (!st->err)
@@ -488,7 +507,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
*/
if (array.level == 0 || array.level == -1) {
if (!st->err && !st->from_config)
- alert("DeviceDisappeared", dev, "Wrong-Level", ainfo);
+ alert("DeviceDisappeared", dev, " Wrong-Level", ainfo);
st->err++;
close(fd);
return 0;
@@ -668,6 +687,7 @@ static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
{
struct mdstat_ent *mse;
int new_found = 0;
+ char *name;
for (mse=mdstat; mse; mse=mse->next)
if (mse->devnm[0] &&
@@ -678,7 +698,14 @@ static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
struct state *st = xcalloc(1, sizeof *st);
mdu_array_info_t array;
int fd;
- st->devname = xstrdup(get_md_name(mse->devnm));
+
+ name = get_md_name(mse->devnm);
+ if (!name) {
+ free(st);
+ continue;
+ }
+
+ st->devname = xstrdup(name);
if ((fd = open(st->devname, O_RDONLY)) < 0 ||
ioctl(fd, GET_ARRAY_INFO, &array)< 0) {
/* no such array */
@@ -966,6 +993,7 @@ int Wait(char *dev)
struct stat stb;
char devnm[32];
int rv = 1;
+ int frozen_remaining = 3;
if (stat(dev, &stb) != 0) {
pr_err("Cannot find %s: %s\n", dev,
@@ -982,7 +1010,7 @@ int Wait(char *dev)
if (strcmp(e->devnm, devnm) == 0)
break;
- if (e->percent == RESYNC_NONE) {
+ if (e && e->percent == RESYNC_NONE) {
/* We could be in the brief pause before something
* starts. /proc/mdstat doesn't show that, but
* sync_action does.
@@ -992,8 +1020,15 @@ int Wait(char *dev)
sysfs_init(&mdi, -1, devnm);
if (sysfs_get_str(&mdi, NULL, "sync_action",
buf, 20) > 0 &&
- strcmp(buf,"idle\n") != 0)
+ strcmp(buf,"idle\n") != 0) {
e->percent = RESYNC_UNKNOWN;
+ if (strcmp(buf, "frozen\n") == 0) {
+ if (frozen_remaining == 0)
+ e->percent = RESYNC_NONE;
+ else
+ frozen_remaining -= 1;
+ }
+ }
}
if (!e || e->percent == RESYNC_NONE) {
if (e && e->metadata_version &&
@@ -1035,8 +1070,7 @@ int WaitClean(char *dev, int sock, int verbose)
mdi = sysfs_read(fd, devnm, GET_VERSION|GET_LEVEL|GET_SAFEMODE);
if (!mdi) {
if (verbose)
- pr_err("Failed to read sysfs attributes for "
- "%s\n", dev);
+ pr_err("Failed to read sysfs attributes for %s\n", dev);
close(fd);
return 0;
}
diff --git a/ReadMe.c b/ReadMe.c
index 445c3882..d40310a9 100644
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -1,7 +1,7 @@
/*
* mdadm - manage Linux "md" devices aka RAID arrays.
*
- * Copyright (C) 2001-2014 Neil Brown <neilb@suse.de>
+ * Copyright (C) 2001-2016 Neil Brown <neilb@suse.com>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -25,12 +25,12 @@
#include "mdadm.h"
#ifndef VERSION
-#define VERSION "3.3.2"
+#define VERSION "3.4"
#endif
#ifndef VERS_DATE
-#define VERS_DATE "21st August 2014"
+#define VERS_DATE "28th January 2016"
#endif
-char Version[] = Name " - v" VERSION " - " VERS_DATE "\n";
+char Version[] = "mdadm - v" VERSION " - " VERS_DATE "\n";
/*
* File: ReadMe.c
@@ -140,6 +140,9 @@ struct option long_options[] = {
{"homehost", 1, 0, HomeHost},
{"symlinks", 1, 0, Symlinks},
{"data-offset",1, 0, DataOffset},
+ {"nodes",1, 0, Nodes}, /* also for --assemble */
+ {"home-cluster",1, 0, ClusterName},
+ {"write-journal",1, 0, WriteJournal},
/* For assemble */
{"uuid", 1, 0, 'u'},
@@ -154,6 +157,7 @@ struct option long_options[] = {
/* Management */
{"add", 0, 0, Add},
{"add-spare", 0, 0, AddSpare},
+ {"add-journal", 0, 0, AddJournal},
{"remove", 0, 0, Remove},
{"fail", 0, 0, Fail},
{"set-faulty",0, 0, Fail},
@@ -167,6 +171,7 @@ struct option long_options[] = {
{"wait", 0, 0, WaitOpt},
{"wait-clean", 0, 0, Waitclean },
{"action", 1, 0, Action },
+ {"cluster-confirm", 0, 0, ClusterConfirm},
/* For Detail/Examine */
{"brief", 0, 0, Brief},
@@ -372,6 +377,7 @@ char Help_create[] =
" --name= -N : Textual name for array - max 32 characters\n"
" --bitmap-chunk= : bitmap chunksize in Kilobytes.\n"
" --delay= -d : bitmap update delay in seconds.\n"
+" --write-journal= : Specify journal device for RAID-4/5/6 array\n"
"\n"
;
@@ -593,7 +599,7 @@ char Help_incr[] =
;
char Help_config[] =
-"The /etc/mdadm.conf config file:\n\n"
+"The /etc/mdadm/mdadm.conf config file:\n\n"
" 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"
diff --git a/bitmap.c b/bitmap.c
index 020f10d9..dab674b4 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -20,7 +20,7 @@
#include "mdadm.h"
-inline void sb_le_to_cpu(bitmap_super_t *sb)
+static inline void sb_le_to_cpu(bitmap_super_t *sb)
{
sb->magic = __le32_to_cpu(sb->magic);
sb->version = __le32_to_cpu(sb->version);
@@ -32,9 +32,11 @@ inline void sb_le_to_cpu(bitmap_super_t *sb)
sb->daemon_sleep = __le32_to_cpu(sb->daemon_sleep);
sb->sync_size = __le64_to_cpu(sb->sync_size);
sb->write_behind = __le32_to_cpu(sb->write_behind);
+ sb->nodes = __le32_to_cpu(sb->nodes);
+ sb->sectors_reserved = __le32_to_cpu(sb->sectors_reserved);
}
-inline void sb_cpu_to_le(bitmap_super_t *sb)
+static inline void sb_cpu_to_le(bitmap_super_t *sb)
{
sb_le_to_cpu(sb); /* these are really the same thing */
}
@@ -74,7 +76,7 @@ typedef struct bitmap_info_s {
} bitmap_info_t;
/* count the dirty bits in the first num_bits of byte */
-inline int count_dirty_bits_byte(char byte, int num_bits)
+static inline int count_dirty_bits_byte(char byte, int num_bits)
{
int num = 0;
@@ -140,8 +142,7 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief)
info = xmalloc(sizeof(*info));
if (n < sizeof(info->sb)) {
- pr_err("failed to read superblock of bitmap "
- "file: %s\n", strerror(errno));
+ pr_err("failed to read superblock of bitmap file: %s\n", strerror(errno));
free(info);
free(buf);
return NULL;
@@ -182,8 +183,7 @@ bitmap_info_t *bitmap_fd_read(int fd, int brief)
}
if (read_bits < total_bits) { /* file truncated... */
- pr_err("WARNING: bitmap file is not large "
- "enough for array size %llu!\n\n",
+ pr_err("WARNING: bitmap file is not large enough for array size %llu!\n\n",
(unsigned long long)info->sb.sync_size);
total_bits = read_bits;
}
@@ -221,8 +221,12 @@ int bitmap_file_open(char *filename, struct supertype **stp)
pr_err("No bitmap possible with %s metadata\n",
st->ss->name);
return -1;
- } else
- st->ss->locate_bitmap(st, fd);
+ } else {
+ if (st->ss->locate_bitmap(st, fd)) {
+ pr_err("%s doesn't have bitmap\n", filename);
+ fd = -1;
+ }
+ }
*stp = st;
} else {
@@ -260,7 +264,7 @@ int ExamineBitmap(char *filename, int brief, struct supertype *st)
int rv = 1;
char buf[64];
int swap;
- int fd;
+ int fd, i;
__u32 uuid32[4];
fd = bitmap_file_open(filename, &st);
@@ -287,7 +291,7 @@ int ExamineBitmap(char *filename, int brief, struct supertype *st)
}
printf(" Version : %d\n", sb->version);
if (sb->version < BITMAP_MAJOR_LO ||
- sb->version > BITMAP_MAJOR_HI) {
+ sb->version > BITMAP_MAJOR_CLUSTERED) {
pr_err("unknown bitmap version %d, either the bitmap file\n",
sb->version);
pr_err("is corrupted or you need to upgrade your tools\n");
@@ -317,9 +321,13 @@ int ExamineBitmap(char *filename, int brief, struct supertype *st)
uuid32[2],
uuid32[3]);
- printf(" Events : %llu\n", (unsigned long long)sb->events);
- printf(" Events Cleared : %llu\n", (unsigned long long)sb->events_cleared);
- printf(" State : %s\n", bitmap_state(sb->state));
+ if (sb->nodes == 0) {
+ printf(" Events : %llu\n", (unsigned long long)sb->events);
+ printf(" Events Cleared : %llu\n", (unsigned long long)sb->events_cleared);
+ printf(" State : %s\n", bitmap_state(sb->state));
+
+ }
+
printf(" Chunksize : %s\n", human_chunksize(sb->chunksize));
printf(" Daemon : %ds flush period\n", sb->daemon_sleep);
if (sb->write_behind)
@@ -329,11 +337,40 @@ int ExamineBitmap(char *filename, int brief, struct supertype *st)
printf(" Write Mode : %s\n", buf);
printf(" Sync Size : %llu%s\n", (unsigned long long)sb->sync_size/2,
human_size(sb->sync_size * 512));
- if (brief)
- goto free_info;
- printf(" Bitmap : %llu bits (chunks), %llu dirty (%2.1f%%)\n",
- info->total_bits, info->dirty_bits,
- 100.0 * info->dirty_bits / (info->total_bits?:1));
+
+ if (sb->nodes == 0) {
+ if (brief)
+ goto free_info;
+ printf(" Bitmap : %llu bits (chunks), %llu dirty (%2.1f%%)\n",
+ info->total_bits, info->dirty_bits,
+ 100.0 * info->dirty_bits / (info->total_bits?:1));
+ } else {
+ printf(" Cluster nodes : %d\n", sb->nodes);
+ printf(" Cluster name : %-64s\n", sb->cluster_name);
+ for (i = 0; i < (int)sb->nodes; i++) {
+ if (i) {
+ free(info);
+ info = bitmap_fd_read(fd, brief);
+ sb = &info->sb;
+ }
+ if (sb->magic != BITMAP_MAGIC)
+ pr_err("invalid bitmap magic 0x%x, the bitmap file appears to be corrupted\n", sb->magic);
+
+ printf(" Node Slot : %d\n", i);
+ printf(" Events : %llu\n",
+ (unsigned long long)sb->events);
+ printf(" Events Cleared : %llu\n",
+ (unsigned long long)sb->events_cleared);
+ printf(" State : %s\n", bitmap_state(sb->state));
+ if (brief)
+ continue;
+ printf(" Bitmap : %llu bits (chunks), %llu dirty (%2.1f%%)\n",
+ info->total_bits, info->dirty_bits,
+ 100.0 * info->dirty_bits / (info->total_bits?:1));
+
+ }
+ }
+
free_info:
free(info);
return rv;
diff --git a/bitmap.h b/bitmap.h
index c8725a30..b8fb0714 100644
--- a/bitmap.h
+++ b/bitmap.h
@@ -12,6 +12,7 @@
*/
#define BITMAP_MAJOR_HI 4
#define BITMAP_MAJOR_HOSTENDIAN 3
+#define BITMAP_MAJOR_CLUSTERED 5
#define BITMAP_MINOR 39
@@ -154,8 +155,11 @@ typedef struct bitmap_super_s {
__u32 chunksize; /* 52 the bitmap chunk size in bytes */
__u32 daemon_sleep; /* 56 seconds between disk flushes */
__u32 write_behind; /* 60 number of outstanding write-behind writes */
-
- __u8 pad[256 - 64]; /* set to zero */
+ __u32 sectors_reserved; /* 64 number of 512-byte sectors that are
+ * reserved for the bitmap. */
+ __u32 nodes; /* 68 the maximum number of nodes in cluster. */
+ __u8 cluster_name[64]; /* 72 cluster name to which this md belongs */
+ __u8 pad[256 - 136]; /* set to zero */
} bitmap_super_t;
/* notes:
diff --git a/config.c b/config.c
index 909f83f4..b308b6cc 100644
--- a/config.c
+++ b/config.c
@@ -63,6 +63,9 @@
* but may not wrap over lines
*
*/
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
#ifndef CONFFILE
#define CONFFILE "/etc/mdadm.conf"
@@ -77,7 +80,7 @@ char DefaultAltConfFile[] = CONFFILE2;
char DefaultAltConfDir[] = CONFFILE2 ".d";
enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev,
- Homehost, AutoMode, Policy, PartPolicy, LTEnd };
+ Homehost, HomeCluster, AutoMode, Policy, PartPolicy, LTEnd };
char *keywords[] = {
[Devices] = "devices",
[Array] = "array",
@@ -86,6 +89,7 @@ char *keywords[] = {
[Program] = "program",
[CreateDev]= "create",
[Homehost] = "homehost",
+ [HomeCluster] = "homecluster",
[AutoMode] = "auto",
[Policy] = "policy",
[PartPolicy]="part-policy",
@@ -167,10 +171,10 @@ struct mddev_dev *load_containers(void)
!is_subarray(&ent->metadata_version[9])) {
d = xmalloc(sizeof(*d));
memset(d, 0, sizeof(*d));
- me = map_by_devnm(&map, ent->dev);
+ me = map_by_devnm(&map, ent->devnm);
if (me)
d->devname = xstrdup(me->path);
- else if (asprintf(&d->devname, "/dev/%s", ent->dev) < 0) {
+ else if (asprintf(&d->devname, "/dev/%s", ent->devnm) < 0) {
free(d);
continue;
}
@@ -396,14 +400,12 @@ void arrayline(char *line)
) {
/* This is acceptable */;
if (mis.devname)
- pr_err("only give one "
- "device per ARRAY line: %s and %s\n",
+ pr_err("only give one device per ARRAY line: %s and %s\n",
mis.devname, w);
else
mis.devname = w;
}else {
- pr_err("%s is an invalid name for "
- "an md device - ignored.\n", w);
+ pr_err("%s is an invalid name for an md device - ignored.\n", w);
}
} else if (strncasecmp(w, "uuid=", 5)==0 ) {
if (mis.uuid_set)
@@ -564,6 +566,21 @@ void homehostline(char *line)
}
}
+static char *home_cluster = NULL;
+void homeclusterline(char *line)
+{
+ char *w;
+
+ for (w=dl_next(line); w != line ; w=dl_next(w)) {
+ if (home_cluster == NULL) {
+ if (strcasecmp(w, "<none>")==0)
+ home_cluster = xstrdup("");
+ else
+ home_cluster = xstrdup(w);
+ }
+ }
+}
+
char auto_yes[] = "yes";
char auto_no[] = "no";
char auto_homehost[] = "homehost";
@@ -726,6 +743,9 @@ void conf_file(FILE *f)
case Homehost:
homehostline(line);
break;
+ case HomeCluster:
+ homeclusterline(line);
+ break;
case AutoMode:
autoline(line);
break;
@@ -886,6 +906,12 @@ char *conf_get_homehost(int *require_homehostp)
return home_host;
}
+char *conf_get_homecluster(void)
+{
+ load_conffile();
+ return home_cluster;
+}
+
struct createinfo *conf_get_create_info(void)
{
load_conffile();
@@ -1121,8 +1147,7 @@ struct mddev_ident *conf_match(struct supertype *st,
!array_list->devices &&
array_list->super_minor == UnSet) {
if (verbose >= 2 && array_list->devname)
- pr_err("%s doesn't have any identifying"
- " information.\n",
+ pr_err("%s doesn't have any identifying information.\n",
array_list->devname);
continue;
}
@@ -1131,13 +1156,11 @@ struct mddev_ident *conf_match(struct supertype *st,
if (match) {
if (verbose >= 0) {
if (match->devname && array_list->devname)
- pr_err("we match both %s and %s - "
- "cannot decide which to use.\n",
+ pr_err("we match both %s and %s - cannot decide which to use.\n",
match->devname,
array_list->devname);
else
- pr_err("multiple lines in mdadm.conf"
- " match\n");
+ pr_err("multiple lines in mdadm.conf match\n");
}
if (rvp)
*rvp = 2;
@@ -1174,8 +1197,7 @@ int conf_verify_devnames(struct mddev_ident *array_list)
"%s have the same name: %s\n",
nbuf, a1->devname);
} else
- pr_err("Device %s given twice"
- " in config file\n", a1->devname);
+ pr_err("Device %s given twice in config file\n", a1->devname);
return 1;
}
}
diff --git a/crc32c.c b/crc32c.c
new file mode 100644
index 00000000..156cba19
--- /dev/null
+++ b/crc32c.c
@@ -0,0 +1,104 @@
+/*
+ * Oct 28, 2015 Song Liu simplified the code and port it to mdadm
+ *
+ * Aug 8, 2011 Bob Pearson with help from Joakim Tjernlund and George Spelvin
+ * cleaned up code to current version of sparse and added the slicing-by-8
+ * algorithm to the closely similar existing slicing-by-4 algorithm.
+ *
+ * Oct 15, 2000 Matt Domsch <Matt_Domsch@dell.com>
+ * Nicer crc32 functions/docs submitted by linux@horizon.com. Thanks!
+ * Code was from the public domain, copyright abandoned. Code was
+ * subsequently included in the kernel, thus was re-licensed under the
+ * GNU GPL v2.
+ *
+ * Oct 12, 2000 Matt Domsch <Matt_Domsch@dell.com>
+ * Same crc32 function was used in 5 other places in the kernel.
+ * I made one version, and deleted the others.
+ * There are various incantations of crc32(). Some use a seed of 0 or ~0.
+ * Some xor at the end with ~0. The generic crc32() function takes
+ * seed as an argument, and doesn't xor at the end. Then individual
+ * users can do whatever they need.
+ * drivers/net/smc9194.c uses seed ~0, doesn't xor with ~0.
+ * fs/jffs2 uses seed 0, doesn't xor with ~0.
+ * fs/partitions/efi.c uses seed ~0, xor's with ~0.
+ *
+ * This source code is licensed under the GNU General Public License,
+ * Version 2. See the file COPYING for more details.
+ */
+
+#include <sys/types.h>
+#include <asm/types.h>
+#include <stdlib.h>
+
+/*
+ * There are multiple 16-bit CRC polynomials in common use, but this is
+ * *the* standard CRC-32 polynomial, first popularized by Ethernet.
+ * x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0
+ */
+#define CRCPOLY_LE 0xedb88320
+#define CRCPOLY_BE 0x04c11db7
+
+/*
+ * This is the CRC32c polynomial, as outlined by Castagnoli.
+ * x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+x^19+x^18+x^14+x^13+x^11+x^10+x^9+
+ * x^8+x^6+x^0
+ */
+#define CRC32C_POLY_LE 0x82F63B78
+
+/**
+ * crc32_le_generic() - Calculate bitwise little-endian Ethernet AUTODIN II
+ * CRC32/CRC32C
+ * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for other
+ * uses, or the previous crc32/crc32c value if computing incrementally.
+ * @p: pointer to buffer over which CRC32/CRC32C is run
+ * @len: length of buffer @p
+ * @polynomial: CRC32/CRC32c LE polynomial
+ */
+static inline __u32 crc32_le_generic(__u32 crc, unsigned char const *p,
+ size_t len, __u32 polynomial)
+{
+ int i;
+ while (len--) {
+ crc ^= *p++;
+ for (i = 0; i < 8; i++)
+ crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
+ }
+ return crc;
+}
+
+__u32 crc32_le(__u32 crc, unsigned char const *p, size_t len)
+{
+ return crc32_le_generic(crc, p, len, CRCPOLY_LE);
+}
+
+__u32 crc32c_le(__u32 crc, unsigned char const *p, size_t len)
+{
+ return crc32_le_generic(crc, p, len, CRC32C_POLY_LE);
+}
+
+/**
+ * crc32_be_generic() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32
+ * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for
+ * other uses, or the previous crc32 value if computing incrementally.
+ * @p: pointer to buffer over which CRC32 is run
+ * @len: length of buffer @p
+ * @polynomial: CRC32 BE polynomial
+ */
+static inline __u32 crc32_be_generic(__u32 crc, unsigned char const *p,
+ size_t len, __u32 polynomial)
+{
+ int i;
+ while (len--) {
+ crc ^= *p++ << 24;
+ for (i = 0; i < 8; i++)
+ crc =
+ (crc << 1) ^ ((crc & 0x80000000) ? polynomial :
+ 0);
+ }
+ return crc;
+}
+
+__u32 crc32_be(__u32 crc, unsigned char const *p, size_t len)
+{
+ return crc32_be_generic(crc, p, len, CRCPOLY_BE);
+}
diff --git a/debian/.gitignore b/debian/.gitignore
deleted file mode 100644
index b14b640b..00000000
--- a/debian/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.*.sw?
-/*.substvars
-/files
-/mdadm
-/mdadm-udeb
-/*.debhelper
-/*.log
diff --git a/debian/changelog b/debian/changelog
index 0a6a95a6..f843ff8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,73 @@
+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
diff --git a/debian/checkarray b/debian/checkarray
index 88266c45..1fb97356 100644
--- a/debian/checkarray
+++ b/debian/checkarray
@@ -205,8 +205,8 @@ for array in $arrays; do
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 || :
- renice -n $renice -p "$resync_pid" 1>/dev/null || :
+ ionice -p "$resync_pid" $ioarg 2>/dev/null || :
+ renice -n $renice -p "$resync_pid" 1>/dev/null 2>&1 || :
break
fi
sleep 1
diff --git a/debian/control b/debian/control
index 4a053617..96491c6d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,16 +2,16 @@ Source: mdadm
Section: admin
Priority: optional
Maintainer: Debian mdadm maintainers <pkg-mdadm-devel@lists.alioth.debian.org>
-Uploaders: Michael Tokarev <mjt@tls.msk.ru>
+Uploaders: Dimitri John Ledkov <xnox@debian.org>
Build-Depends: debhelper (>= 6.0.7~), po-debconf, groff-base
-Standards-Version: 3.9.5
+Standards-Version: 3.9.7
Vcs-Git: git://anonscm.debian.org/pkg-mdadm/mdadm.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-mdadm/mdadm.git
Homepage: http://neil.brown.name/blog/mdadm
Package: mdadm
-Architecture: any
-Depends: ${shlibs:Depends}, udev, ${misc:Depends}, lsb-base, debconf, initscripts
+Architecture: linux-any
+Depends: ${shlibs:Depends}, udev, ${misc:Depends}, lsb-base, debconf
Recommends: default-mta | mail-transport-agent, kmod | module-init-tools
Description: tool to administer Linux MD arrays (software RAID)
The mdadm utility can be used to create, manage, and monitor MD
@@ -23,7 +23,7 @@ Description: tool to administer Linux MD arrays (software RAID)
Package: mdadm-udeb
Section: debian-installer
XC-Package-Type: udeb
-Architecture: any
+Architecture: linux-any
Depends: ${shlibs:Depends}
Description: tool to administer Linux MD arrays (software RAID)
The mdadm utility can be used to create, manage, and monitor MD
diff --git a/debian/copyright b/debian/copyright
index f6eaec91..39f1435d 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -18,4 +18,4 @@ the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in '/usr/share/common-licenses/GPL'.
+Public License can be found in '/usr/share/common-licenses/GPL-2'.
diff --git a/debian/initramfs/hook b/debian/initramfs/hook
index 85bad65e..ae7d4d18 100644
--- a/debian/initramfs/hook
+++ b/debian/initramfs/hook
@@ -7,10 +7,10 @@
#
set -eu
-PREREQ=
+PREREQ="udev"
prereqs()
{
- echo "$PREREQ"
+ echo "$PREREQ"
}
case "${1:-}" in
@@ -44,223 +44,67 @@ warn()
write W "$@"
}
-err()
-{
- write E "$@"
-}
-
-MDADM=/sbin/mdadm
-MDMON=/sbin/mdmon
-[ -x "$MDADM" ] || exit 0
-
-[ -r /usr/share/initramfs-tools/hook-functions ] || exit 0
. /usr/share/initramfs-tools/hook-functions
# copy the binary as early as possible
-copy_exec $MDADM /sbin
-copy_exec $MDMON /sbin
+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
-# copy all modules into the initramfs, just for safety.
-# we copy raid456 / raid5+raid6 because the hook script just won't do
-# anything when the module cannot be found.
-modules="linear multipath raid0 raid1 raid456 raid5 raid6 raid10"
-for mod in $modules; do manual_add_modules $mod; done
+# load raid modules in the initramfs
+for module in linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do
+ force_load $module
+done
-# read in the configuration
+# copy the mdadm configuration
CONFIG=/etc/mdadm/mdadm.conf
ALTCONFIG=/etc/mdadm.conf
-[ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG || :
-
-DEBIANCONFIG=/etc/default/mdadm
-INITRDSTART=all
-[ -s $DEBIANCONFIG ] && . $DEBIANCONFIG
-[ -z "$INITRDSTART" ] && INITRDSTART=none
-
DESTMDADMCONF=$DESTDIR/etc/mdadm/mdadm.conf
-DESTCONFIG=$DESTDIR/conf/mdadm
-
-if [ -f $CONFIG ]; then
- homehost="$(sed -ne 's,^[[:space:]]*HOMEHOST[[:space:]]*,,p' $CONFIG)"
-fi
-if [ -z "${homehost:-}" ] || [ "${homehost:-}" = '<system>' ]; then
- echo "MD_HOMEHOST='$(hostname)'" > $DESTCONFIG
-fi
-
-install_config()
-{
- # install the configuration file
- mkdir -p ${2%/*}
- # only copy ARRAY/DEVICE/HOMEHOST lines, and merge continuation lines into one
- if [ -f "$1" ] ; then
- sed -e :a -re '$!N;s/\n[[:space:]]+/ /;ta' -ne '/^(ARRAY|DEVICE|HOMEHOST)/P;D' $1 > $2
- fi
-}
+[ ! -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
- install_config $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."
- fi
-
+ # 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
-
- if grep -q '^ARRAY' $CONFIG; then
-
- # this is the ideal case
- install_config $CONFIG $DESTMDADMCONF
- info "using configuration file: $CONFIG"
-
- else
-
- # the file defines no ARRAYs. We better create a temporary file to be sure.
-
- warn "$CONFIG defines no arrays."
-
- mkdir --parents ${DESTMDADMCONF%/*}
- tmpfile="${DESTMDADMCONF}.tmp"
- if /usr/share/mdadm/mkconf > $tmpfile; then
- # all is well, we now have a temporary configuration file
- info "auto-generated temporary mdadm.conf configuration file."
- install_config $tmpfile $DESTMDADMCONF
- else
- # stuff's really broke, as we failed to generate a temporary file.
- # let's hope the unchecked file works, provided it contains at least one
- # ARRAY statement...
- warn "failed to auto-generate temporary mdadm.conf file."
- if grep -q '^ARRAY' $CONFIG; then
- warn "using the unchecked file and hoping for the best..."
- install_config $CONFIG $DESTMDADMCONF
- fi
- fi
- rm -f $tmpfile
-
- fi
-
-fi
-
-# if at this point, $DESTMDADMCONF does not exist or it does not contain any
-# ARRAY statements, we must let the initramfs handle stuff.
-if [ ! -f $DESTMDADMCONF ]; then
- warn "no configuration file available."
- info "letting initramfs assemble auto-detected arrays."
- exit 0
-elif ! grep -q '^ARRAY' $DESTMDADMCONF; then
- warn "no arrays defined in configuration file."
- info "letting initramfs assemble auto-detected arrays."
- exit 0
-else
- # obtain devices list from config file, honouring multiline entries
- devices="$(
- dev=
- while read line; do
- case "$line" in
- (ARRAY*) :;;
- (*) continue;;
- esac
- for atom in $line; do
- case "$atom" in
- (/dev*) dev=$atom;;
- esac
- done
-
- # /dev/mdX and /dev/md/X are the same, really
- case "$dev" in
- "") continue ;;
- (/dev/md/*) alt=/dev/md${dev##*/};;
- (/dev/md*) alt=/dev/md/${dev#/dev/md};;
- (*)
- err "unknown device encountered: $dev"
- warn_emergency
- exit 0
- ;;
- esac
- if [ ! -b "$dev" ] && [ -b "$alt" ]; then
- dev="$alt"
- fi
-
- echo "$dev"
- done < $DESTMDADMCONF)" || exit $?
-fi
-
-if [ "$INITRDSTART" != none ] && [ -n "$devices" ]; then
-
- devs=
- for dev in $devices; do
- case "$INITRDSTART " in
- all|*${dev}[[:space:]]*)
- case "$devs " in # uniquiness
- (*${dev}\ *) :;;
- (*) devs="${devs:+$devs }$dev" ;;
- esac
- ;;
- *) :;;
- esac
- done
-
- # make sure the configuration file knows about all running devices
- $MDADM --detail --scan | while read array device params; do
- uuid=${params#*UUID=}; uuid=${uuid%% *}
- if ! grep -qi "uuid=$uuid" $DESTMDADMCONF; then
- warn "the array $device with UUID $uuid"
- warn "is currently active, but it is not listed in mdadm.conf. if"
- warn "it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!"
- warn "please inspect the output of /usr/share/mdadm/mkconf, compare"
- warn "it to $CONFIG, and make the necessary changes."
- fi
- done
-
- for i in $INITRDSTART; do
- case "$INITRDSTART" in all) break;; *) :;; esac
- case "$devs" in
- *${i}*) continue;;
- *) :;;
- esac
-
- warn "I am supposed to start $i from the initial ramdisk,"
- warn "yet I cannot find the array in the configuration file."
- warn "I am thus reverting to starting all arrays."
- INITRDSTART=all
- break
- done
-
- if [ "$INITRDSTART" = all ]; then
- echo "MD_DEVS=all" >> $DESTCONFIG
- else
- echo "MD_DEVS='$devs'" >> $DESTCONFIG
- fi
-
- if [ "$INITRDSTART" = all ]; then
- info "will start all available MD arrays from the initial ramdisk."
- else
- for i in $devs; do
- info "will start MD array $i from the initial ramdisk."
- done
- fi
-
- # Copy udev rules, which udev no longer does
- for rules_file 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/$rules_file ]; then
- mkdir -p $DESTDIR$rules_folder
- cp $rules_folder/$rules_file $DESTDIR$rules_folder/$rules_file
- fi
- done
- done
-
-else
- echo "MD_DEVS=none" >> $DESTCONFIG
- info "no MD arrays will be started from the initial ramdisk."
+ cp -p $CONFIG ${DESTDIR}/etc/mdadm
+ sed -i '/^CREATE/s/^/#/' $DESTMDADMCONF
+ if ! grep -q '^ARRAY' $CONFIG; then
+ tmpfile="${DESTMDADMCONF}.tmp"
+ warn "$CONFIG defines no arrays."
+ if /usr/share/mdadm/mkconf > $tmpfile; then
+ cp -p $tmpfile $DESTMDADMCONF
+ 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 -q "UUID=$uuid" $DESTMDADMCONF; then
+ warn "the array $device with UUID $uuid"
+ warn "is currently active, but it is not listed in mdadm.conf. if"
+ warn "it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!"
+ warn "please inspect the output of /usr/share/mdadm/mkconf, compare"
+ warn "it to $CONFIG, and make the necessary changes."
+ fi
+ done
+ fi
fi
-
-# only output this on Debian systems
-[ -s /etc/default/mdadm ] && \
- info 'use `dpkg-reconfigure --priority=low mdadm` to change this.'
-
-exit 0
diff --git a/debian/initramfs/script.local-block b/debian/initramfs/script.local-block
new file mode 100644
index 00000000..e9b47c3d
--- /dev/null
+++ b/debian/initramfs/script.local-block
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+PREREQ="multipath"
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# Poor man's mdadm-last-resort@.timer
+# That kicks in 2/3rds into the ROOTDELAY
+
+if [ ! -f /run/count.mdadm.initrd ]
+then
+ COUNT=0
+else
+ COUNT=$(cat /run/count.mdadm.initrd)
+fi
+COUNT=$((COUNT + 1))
+
+echo $COUNT > /run/count.mdadm.initrd
+
+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
+ mdadm -q --run /dev/md?*
+ rm -f /run/count.mdadm.initrd
+fi
+
+exit 0
diff --git a/debian/initramfs/script.local-bottom b/debian/initramfs/script.local-bottom
new file mode 100644
index 00000000..eda3b179
--- /dev/null
+++ b/debian/initramfs/script.local-bottom
@@ -0,0 +1,3 @@
+#!/bin/sh
+rm -f /run/count.mdadm.initrd
+exit 0 \ No newline at end of file
diff --git a/debian/initramfs/script.local-top b/debian/initramfs/script.local-top
deleted file mode 100644
index 9450bb72..00000000
--- a/debian/initramfs/script.local-top
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/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
-
-case ${1:-} in
- prereqs) echo "multipath"; exit 0;;
-esac
-
-. /scripts/functions
-
-maybe_break pre-mdadm
-
-if [ -e /scripts/local-top/md ]; then
- log_warning_msg "old md initialisation script found, getting out of its way..."
- exit 0
-fi
-
-MDADM=/sbin/mdadm
-[ -x "$MDADM" ] || exit 0
-
-verbose()
-{
- case "$quiet" in y*|Y*|1|t*|T*)
- return 1;;
- *)
- return 0;;
- esac
-}
-
-MD_DEVS=all
-[ -s /conf/mdadm ] && . /conf/mdadm
-
-if [ "$MD_DEVS" = none ]; then
- verbose &&
- log_warning_msg "INITRDSTART set to \"none\" in /etc/default/mdadm, not assembling raid arrays"
- exit 0
-fi
-
-if [ ! -f /proc/mdstat ] && ! modprobe -q md_mod; then
- verbose && log_warning_msg "failed to load module md_mod."
-fi
-if [ ! -f /proc/mdstat ]; then
- verbose && log_warning_msg "cannot initialise MD subsystem (/proc/mdstat missing)"
- exit 0
-fi
-
-# handle /dev/md/X nodes
-mkdir -p /dev/md
-
-CONFIG=/etc/mdadm/mdadm.conf
-# in case the hook failed to install a configuration file, this is our last
-# attempt... the "emergency procedure"... <drumroll>
-if [ ! -e $CONFIG ]; then
- log_warning_msg "missing mdadm.conf file, trying to create one..."
- mkdir -p ${CONFIG%/*}
- echo DEVICE partitions > $CONFIG
- $MDADM --examine --scan >> $CONFIG
- if [ -s $CONFIG ]; then
- verbose && log_success_msg "mdadm.conf created."
- else
- verbose && log_failure_msg "could not create mdadm.conf, the boot will likely fail."
- fi
- MD_DEVS=all
-fi
-
-if [ "$MD_DEVS" = all ]; then
-
- verbose && log_begin_msg "Assembling all MD arrays"
- extra_args=''
- [ -n "${MD_HOMEHOST:-}" ] && extra_args="--homehost=$MD_HOMEHOST"
- if $MDADM --assemble --scan --run --auto=yes${extra_args:+ $extra_args}; then
- verbose && log_success_msg "assembled all arrays."
- else
- log_failure_msg "failed to assemble all arrays."
- fi
- verbose && log_end_msg
-
-else
- for dev in $MD_DEVS; do
-
- verbose && log_begin_msg "Assembling MD array $dev"
- if $MDADM --assemble --scan --run --auto=yes $dev; then
- verbose && log_success_msg "started $dev"
- else
- log_failure_msg "failed to start $dev"
- fi
- verbose && log_end_msg
-
- done
-fi
-
-wait_for_udev 10
-
-maybe_break post-mdadm
-
-exit 0
diff --git a/debian/mdadm-raid b/debian/mdadm-raid
deleted file mode 100644
index 6d4d6a99..00000000
--- a/debian/mdadm-raid
+++ /dev/null
@@ -1,256 +0,0 @@
-#!/bin/sh
-#
-# Start all arrays specified in the configuration file.
-#
-# 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.
-#
-### BEGIN INIT INFO
-# Provides: mdadm-raid
-# Required-Start: mountkernfs hostname
-# Should-Start: udev multipath-tools-boot
-# X-Start-Before: checkfs mountall
-# Required-Stop: mountkernfs
-# Should-Stop: udev
-# X-Stop-After: umountfs
-# Default-Start: S
-# Default-Stop: 0 6
-# Short-Description: MD array assembly
-# Description: This script assembles a system's MD arrays, according to
-# the settings in /etc/mdadm/mdadm.conf and the preferences
-# in /etc/default/mdadm.
-### END INIT INFO
-#
-set -eu
-
-MDADM=/sbin/mdadm
-CONFIG=/etc/mdadm/mdadm.conf
-ALTCONFIG=/etc/mdadm.conf
-DEBIANCONFIG=/etc/default/mdadm
-
-test -x "$MDADM" || exit 0
-
-STATEDIR=/run/mdadm
-test -f $DEBIANCONFIG && . $DEBIANCONFIG
-
-. /lib/lsb/init-functions
-
-short_dev()
-{
- local dev; dev=${1##*/}
- case "$dev" in
- md*|md_*|mdp*|mdp_*) echo "$dev";;
- d*) echo "md_${dev}";;
- *) echo "md${dev}";;
- esac
-}
-
-log()
-{
- case "$1" in
- [[:digit:]]*) success=$1; shift;;
- *) :;;
- esac
- log_action_begin_msg "$1"; shift
- log_action_end_msg ${success:-0} "$*"
-}
-
-log_dev()
-{
- success=${1:-}; shift
- dev=${1:-}; shift
- log $success "${PREFIX:-} $(short_dev ${dev:-})" "$*"
-}
-
-log_notice()
-{
- log 0 "${PREFIX:-}s" "$*"
-}
-
-log_problem()
-{
- log 1 "${PREFIX:-}s" "$*"
-}
-
-is_true()
-{
- case "${1:-}" in
- [Yy]es|[Yy]|1|[Tt]rue|[Tt]) return 0;;
- *) return 1;;
- esac
-}
-
-case "${1:-}" in
-
- start)
- PREFIX="Assembling MD array"
-
- if [ ! -f /proc/mdstat ] && [ -x "$(command -v modprobe)" ] ; then
- modprobe -q md 2>/dev/null || :
- fi
- if [ ! -f /proc/mdstat ]; then
- log_problem "failed to load MD subsystem"
- exit 0
- fi
-
- if [ ! -f $CONFIG -a ! -f $ALTCONFIG ]; then
- log_problem "no $CONFIG file"
- exit 0
- fi
-
- # handle devfs-style names and version-1 devices
- # fail gracefully in case we're on a read-only filesystem, in which
- # case it's safe to assume that the admin knows what s/he's doing.
- # See (#382876).
- mkdir --parent /dev/md || :
-
- # ugly hack because shell sucks
- IFSOLD=${IFS:-}
- IFS='
-'
- for line in $($MDADM --assemble --scan --auto=yes --symlink=no 2>&1); do
- IFS=$IFSOLD
- set -- $line
- shift
-
- case "$@" in
-
- 'No arrays found in config file'*)
- # no point in carrying on.
- shift
- log_notice "no $*"
- exit 0
- ;;
-
- 'Unknown keyword'*)
- # warn only
- if [ -x $(command -v logger >/dev/null) ]; then
- logger -t mdadm -p syslog.warning -- "$*"
- elif [ -w /dev/console ]; then
- echo "mdadm: $*" > /dev/console
- else
- echo "mdadm: $*" >&2
- fi
- ;;
-
- *' is already active.')
- log_dev 0 $1 "already running"
- ;;
-
- *'has been started with '[[:digit:]]*' drive'*' (out of '[[:digit:]]*') and '[[:digit:]]*' spare'*'.')
- log_dev 0 $1 "initialising [$6/${10%).}]"
- ;;
-
- *'has been started with '[[:digit:]]*' drive'*' (out of '[[:digit:]]*').')
- log_dev 0 $1 "degraded [$6/${10%).}]"
- ;;
-
- *'has been started with '[[:digit:]]*' drive'*'.')
- log_dev 0 $1 "started [$6/$6]"
- ;;
-
- *'assembled from '[[:digit:]]*' drive'*' - not enough to start the array.')
- log_dev 1 $1 "not enough devices"
- ;;
-
- 'no devices found for '*)
- log_dev 1 $5 "no devices found"
- ;;
-
- 'failed to RUN_ARRAY '*': Input/output error')
- log_dev 1 ${4%:} "RUN_ARRAY input/output error"
- ;;
-
- *) :;;
- esac
- done
- ret=$?
-
- log_action_begin_msg "Generating udev events for MD arrays"
- [ -d $STATEDIR ] || mkdir -p $STATEDIR
- for uevent in /sys/block/md*/uevent; do
- test -e $uevent || break
- sentinel=${uevent#/sys/block/}; sentinel=${sentinel%/uevent}-uevent
- test -e $STATEDIR/$sentinel && continue
- test -w $uevent || continue
- echo add > $uevent
- test -d $STATEDIR && : > $STATEDIR/$sentinel
- done
- log_action_end_msg 0
-
- exit $ret
- ;;
-
- stop)
- PREFIX="Stopping MD array"
-
- if [ ! -f /proc/mdstat ]; then
- log_problem "no MD subsystem loaded"
- exit 0
- fi
-
- # ugly hack because shell sucks
- IFSOLD=${IFS:-}
- IFS='
-'
- set +e
- for line in $($MDADM --stop --scan 2>&1); do
- set -e
- IFS=$IFSOLD
- set -- $line
- shift
- case "$@" in
-
- 'Unknown keyword'*)
- # warn only
- if [ -x $(command -v logger >/dev/null) ]; then
- logger -t mdadm -p syslog.warning -- "$*"
- elif [ -w /dev/console ]; then
- echo "mdadm: $*" > /dev/console
- else
- echo "mdadm: $*" >&2
- fi
- ;;
-
- 'stopped '*)
- log_dev 0 $2 stopped
- ;;
-
- 'fail to stop array '*': Device or resource busy')
- log_dev 1 ${5%:} busy
- ;;
-
- *) :;;
- esac
- done || exit $?
-
- rm -f $STATEDIR/md*-uevent
- ;;
-
- restart|force-reload)
- ${0:-} stop
- ${0:-} start
- ;;
-
- reload)
- PREFIX="Reloading MD array"
- log_notice "never anything to do"
- ;;
-
- status)
- if [ ! -f /proc/mdstat ]; then
- log_problem "no MD subsystem loaded"
- exit 1
- else
- cat /proc/mdstat
- fi
- ;;
-
- *)
- echo "Usage: ${0:-} {start|stop|restart}" >&2
- exit 1;;
-
-esac
-
-exit 0
diff --git a/debian/mdadm.config b/debian/mdadm.config
index 97352662..b9d4e246 100644
--- a/debian/mdadm.config
+++ b/debian/mdadm.config
@@ -13,9 +13,6 @@ ALTCONFIG=/etc/mdadm.conf
DEBIANCONFIG=/etc/default/mdadm
-db_get mdadm/initrdstart || :
-INITRDSTART="$RET"
-
if [ -s $DEBIANCONFIG ] ; then
AUTOCHECK=true
START_DAEMON=true
@@ -31,136 +28,8 @@ if [ -s $DEBIANCONFIG ] ; then
[ -n "$MAILADDR" ] && db_set mdadm/mail_to "$MAILADDR"
fi
-chrooted() {
- test "$(stat -c "%d/%i" /)" != "$(stat -Lc "%d/%i" /proc/1/root 2>/dev/null)"
-}
-
-get_root_raiddev() {
- local rootraiddev;
- rootraiddev="$(df --portability / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')"
- if ! mdadm --detail $rootraiddev >/dev/null 2>&1; then
- return 1
- fi
- echo ${rootraiddev%p[0-9]*}
- return 0
-}
-
-get_initrdstart() {
- db_fget mdadm/initrdstart seen
- if chrooted || [ "$RET $INITRDSTART" = "false all" ]; then
- echo all
- return 1
- fi
-
- get_root_raiddev || echo all
-}
-
-[ -z "$INITRDSTART" ] && INITRDSTART="$(get_initrdstart)" || :
-[ -n "$INITRDSTART" ] && db_set mdadm/initrdstart "$INITRDSTART"
-
-INITRDSTART_PRIORITY=high
-if chrooted; then
- INITRDSTART_PRIORITY=medium
-fi
-
db_capb escape
-msg=intro; suffix=''; error=0
-while true; do
- db_metaget mdadm/initrdstart_msg_${msg} extended_description || :
- db_subst mdadm/initrdstart msg "$(echo -n "${RET}${suffix}" | debconf-escape -e)"
- ret=0; db_input $INITRDSTART_PRIORITY mdadm/initrdstart || ret=$?
- db_go
-
- if [ $error -ne 0 ] && [ $ret -eq 30 ]; then
- # there was an error in a previous run of this loop, but the above question
- # was not asked, so we better exit the endless loop...
- echo "W: mdadm: unable to determine MD arrays needed for boot." >&2
- echo "W: mdadm: falling back to starting all of them..." >&2
- INITRDSTART=all
- break
- fi
-
- db_get mdadm/initrdstart
- INITRDSTART="$(echo $RET | tr , ' ')"
-
- case "$INITRDSTART" in
- ''|none) INITRDSTART=none; break;;
- all) break;;
-
- *)
- arrays=''
- for i in $INITRDSTART; do
-
- # standardise by prefixing /dev/
- i="/dev/${i#/dev/}"
-
- # remove partition from partitionable array
- i="${i%p[0-9]*}"
-
- if [ ! -e "$i" ]; then
- error=1; msg=errexist; suffix=": $i"; break
- fi
-
- if [ ! -b "$i" ]; then
- t="$(readlink -nf "$i")"
- if [ ! -b "$t" ]; then
- suffix=": $t"
- else
- suffix=": $i"
- fi
- error=1; msg=errblock; break
- fi
-
- if ! mdadm --detail "$i" >/dev/null 2>&1; then
- error=1; msg=errmd; suffix=": $i"; break
- fi
-
- if [ -f $CONFIG ]; then
- if ! egrep -q "^(ARRAY)?[[:space:]]+$i([[:space:]]+|$)" $CONFIG; then
- t="$(readlink -nf "$i")"
- if [ -L "$i" ] \
- && egrep -q "^(ARRAY)?[[:space:]]+$t([[:space:]]|$)+" $CONFIG; then
- i="$t"
- else
- db_set mdadm/initrdstart_notinconf false
- db_fset mdadm/initrdstart_notinconf seen false
- db_subst mdadm/initrdstart_notinconf array "$i"
- db_subst mdadm/initrdstart_notinconf config "$CONFIG"
- db_input high mdadm/initrdstart_notinconf || :
- db_go
- db_get mdadm/initrdstart_notinconf
- if [ "$RET" = true ]; then
- error=0
- else
- db_fset mdadm/initrdstart seen false
- db_set mdadm/initrdstart all
- error=1; msg=errconf; suffix=": $i"; break
- fi
- fi
- fi
- fi
-
- # uniquely add device name
- echo $arrays | egrep -q "\b${i}\b" || arrays="${arrays:+$arrays }$i"
- done
-
- if [ $error -eq 0 ]; then
- INITRDSTART="$arrays"
- # exit the while true loop
- break
- fi
- ;;
- esac
-done
-
-db_set mdadm/initrdstart "$INITRDSTART"
-
-if [ "$INITRDSTART" != all ]; then
- db_input high mdadm/autostart || :
- db_go
-fi
-
db_input medium mdadm/autocheck || :
db_go
diff --git a/debian/mdadm.init b/debian/mdadm.init
index 8b603796..0a9004f0 100644
--- a/debian/mdadm.init
+++ b/debian/mdadm.init
@@ -9,8 +9,8 @@
#
### BEGIN INIT INFO
# Provides: mdadm
-# Required-Start: $local_fs $syslog mdadm-raid
-# Required-Stop: $local_fs $syslog sendsigs mdadm-raid
+# Required-Start: $local_fs $syslog
+# Required-Stop: $local_fs $syslog sendsigs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: MD monitoring daemon
@@ -47,6 +47,12 @@ is_true()
case "${1:-}" in
start)
+ if [ -x /usr/bin/systemd-detect-virt ] && /usr/bin/systemd-detect-virt --quiet --container; then
+ log_daemon_msg "Not starting MD monitoring service in container"
+ log_end_msg 0
+ exit 0
+ fi
+
if is_true $START_DAEMON; then
log_daemon_msg "Starting MD monitoring service" "mdadm --monitor"
mkdir -p $RUNDIR
diff --git a/debian/mdadm.maintscript b/debian/mdadm.maintscript
new file mode 100644
index 00000000..17290594
--- /dev/null
+++ b/debian/mdadm.maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/init.d/mdadm-raid 3.4-2~
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
index a603376d..fbe1f362 100644
--- a/debian/mdadm.postinst
+++ b/debian/mdadm.postinst
@@ -51,8 +51,6 @@ case "${1:-}" in
fi
unset MDADM_MAILADDR__
- db_get mdadm/initrdstart
- INITRDSTART="${RET:-all}"
db_get mdadm/autocheck
AUTOCHECK="${RET:-true}"
db_get mdadm/start_daemon
@@ -69,12 +67,6 @@ case "${1:-}" in
# rewritten.
#
-# INITRDSTART:
-# list of arrays (or 'all') to start automatically when the initial ramdisk
-# loads. This list *must* include the array holding your root filesystem. Use
-# 'none' to prevent any array from being started from the initial ramdisk.
-INITRDSTART='$INITRDSTART'
-
# AUTOCHECK:
# should mdadm run periodic redundancy checks over your arrays? See
# /etc/cron.d/mdadm.
@@ -96,6 +88,9 @@ _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 dpkg --compare-versions "$2" le 3.3.2-3; then
diff --git a/debian/mdadm.postrm b/debian/mdadm.postrm
index 30309626..eaa62ad3 100644
--- a/debian/mdadm.postrm
+++ b/debian/mdadm.postrm
@@ -6,12 +6,12 @@
set -e
case "${1:-}" in
- remove)
- if command -v update-initramfs >/dev/null 2>&1; then
- echo "W: mdadm: I'll update the initramfs, but if you need MD to boot" >&2
- echo "W: mdadm: with initramfs, your system may be left unbootable!" >&2
- update-initramfs -u
- fi
+ remove)
+ if command -v update-initramfs >/dev/null 2>&1; then
+ echo "W: mdadm: I'll update the initramfs, but if you need MD to boot" >&2
+ echo "W: mdadm: with initramfs, your system may be left unbootable!" >&2
+ update-initramfs -u
+ fi
;;
purge)
diff --git a/debian/mdadm.preinst b/debian/mdadm.preinst
deleted file mode 100644
index b90ffb87..00000000
--- a/debian/mdadm.preinst
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-# Copyright © martin f. krafft <madduck@debian.org>
-# Distributed under the terms of the Artistic Licence 2.0
-#
-set -e
-
-# based on idea from http://www.dpkg.org/dpkg/ConffileHandling
-rm_conffile() {
- local conffile md5sum package old_md5sum
-
- conffile="$1"
- if [ -e "$conffile" ]; then
- md5sum=$(md5sum "$conffile" | cut -d' ' -f1)
- package=$(dpkg -S "$conffile" | cut -d: -f1)
- old_md5sum=$(dpkg -s $package | sed -rne "s,[[:space:]]+${conffile}[[:space:]]+,,p")
- if [ "$md5sum" != "$old_md5sum" ]; then
- echo "Obsolete conffile $conffile has been modified by you."
- echo "Saving as ${conffile}.dpkg-bak ..."
- mv -f "$conffile" "$conffile".dpkg-bak
- else
- echo "Removing obsolete conffile $conffile ..."
- rm -f "$conffile"
- fi
- fi
-}
-
-case "$1" in
-
- upgrade|install)
-
- # migrate old configuration from *way back then*
- DEBIANCONFIG=/etc/default/mdadm
- OLDCONFIG=/etc/mdadm/debian.conf
- if [ -s $OLDCONFIG ] && [ ! -f $DEBIANCONFIG ]; then
- mv $OLDCONFIG $DEBIANCONFIG
- fi
-
- # Used incorrect name s/_/-/, keep all throughout until after jessie is released.
- rm_conffile /etc/udev/rules.d/65-mdadm.vol_id.rules
- ;;
-
- *) :;;
-esac
-
-#DEBHELPER#
diff --git a/debian/mdadm.templates b/debian/mdadm.templates
index ddf63c76..5a797c55 100644
--- a/debian/mdadm.templates
+++ b/debian/mdadm.templates
@@ -7,67 +7,6 @@
# Even minor modifications require translation updates and such
# changes should be coordinated with translators and reviewers.
-Template: mdadm/initrdstart
-Type: string
-Default: all
-#flag:translate!:2
-_Description: MD arrays needed for the root file system:
- ${msg}
- .
- 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).
-
-Template: mdadm/initrdstart_msg_intro
-Type: text
-_Description: for internal use - only the long description is needed.
- 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.
- .
- 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.
- .
- 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.
-
-Template: mdadm/initrdstart_msg_errexist
-Type: text
-_Description:
- An error occurred: device node does not exist
-
-Template: mdadm/initrdstart_msg_errblock
-Type: text
-_Description:
- An error occurred: not a block device
-
-Template: mdadm/initrdstart_msg_errmd
-Type: text
-_Description:
- An error occurred: not an MD array
-
-Template: mdadm/initrdstart_msg_errconf
-Type: text
-_Description:
- An error occurred: array not listed in mdadm.conf file
-
-Template: mdadm/initrdstart_notinconf
-Type: boolean
-Default: false
-_Description: Start arrays not listed in mdadm.conf?
- 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.
- .
- 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.
-
Template: mdadm/autocheck
Type: boolean
Default: true
diff --git a/debian/mkconf b/debian/mkconf
index a580f5b3..632c9120 100644
--- a/debian/mkconf
+++ b/debian/mkconf
@@ -13,7 +13,7 @@ DEBIANCONFIG=/etc/default/mdadm
CONFIG=/etc/mdadm/mdadm.conf
# initialise config variables in case the environment leaks
-MAILADDR= DEVICE= CREATE= HOMEHOST= PROGRAM=
+MAILADDR= DEVICE= HOMEHOST= PROGRAM=
test -r $DEBIANCONFIG && . $DEBIANCONFIG
@@ -28,7 +28,6 @@ fi
# save existing values as defaults
if [ -r "$CONFIG" ]; then
DEVICE="$(sed -ne 's/^DEVICE //p' $CONFIG)"
- CREATE="$(sed -ne 's/^CREATE //p' $CONFIG)"
HOMEHOST="$(sed -ne 's/^HOMEHOST //p' $CONFIG)"
PROGRAM="$(sed -ne 's/^PROGRAM //p' $CONFIG)"
fi
@@ -59,9 +58,6 @@ cat <<_eof
# wildcards if desired.
#DEVICE ${DEVICE:-partitions containers}
-# auto-create devices with Debian standard permissions
-CREATE ${CREATE:-owner=root group=disk mode=0660 auto=yes}
-
# automatically tag new arrays as belonging to the local system
HOMEHOST ${HOMEHOST:-<system>}
diff --git a/debian/patches/build-sys-no-check_rundir.patch b/debian/patches/build-sys-no-check_rundir.patch
deleted file mode 100644
index 61f3a6f0..00000000
--- a/debian/patches/build-sys-no-check_rundir.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Subject: build-sys: do not depend on check_rundir for executables
-From: Michael Tokarev <mjt@tls.msk.ru>
-To: linux-raid@vger.kernel.org
-
-The problem is that the link lines will always be executed
-even if the executables are up to date.
-
-If anything, this check_rundir should be a dependency of
-install target, or some other "phony" target like this,
-since check_rundir is phony by itself.
-
-Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-
---- a/Makefile
-+++ b/Makefile
-@@ -172,7 +172,7 @@ everything-test: all mdadm.static swap_super test_stripe \
- # mdadm.uclibc and mdassemble.uclibc don't work on x86-64
- # mdadm.tcc doesn't work..
-
--mdadm : check_rundir $(OBJS)
-+mdadm : $(OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
-
- mdadm.static : $(OBJS) $(STATICOBJS)
-@@ -195,7 +195,7 @@ mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
- $(CC) -o mdmon.O2 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
-
- # use '-z now' to guarantee no dynamic linker interactions with the monitor thread
--mdmon : check_rundir $(MON_OBJS)
-+mdmon : $(MON_OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
- msg.o: msg.c msg.h
-
diff --git a/debian/patches/rebuildmap-strip-local-host-name-from-device-name.patch b/debian/patches/rebuildmap-strip-local-host-name-from-device-name.patch
deleted file mode 100644
index f7c9b1b7..00000000
--- a/debian/patches/rebuildmap-strip-local-host-name-from-device-name.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 628cdf19ea35daad22e409e51c0abc7ffb19d6aa Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Mon, 3 Nov 2014 12:49:05 +1100
-Subject: Rebuildmap: strip local host name from device name.
-
-When /run/mdadm/map is being rebuilt, e.g. by "mdadm -Ir",
-if the device doesn't exist in /dev, we have to choose
-a name.
-Currently we don't strip the hostname which is wrong if
-it is the local host.
-
-Reported-by: Stephen Kent <smkent@smkent.net>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- mapfile.c | 13 ++++++++++---
- 1 file changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/mapfile.c b/mapfile.c
-index 4e7f242..41599df 100644
---- a/mapfile.c
-+++ b/mapfile.c
-@@ -455,12 +455,19 @@ void RebuildMap(void)
- sep = "";
- }
- }
-- if (strchr(name, ':'))
-- /* probably a uniquifying
-+ if (strchr(name, ':')) {
-+ /* Probably a uniquifying
- * hostname prefix. Allow
-- * without a suffix
-+ * without a suffix, and strip
-+ * hostname if it is us.
- */
-+ if (homehost && unum == -1 &&
-+ strncmp(name, homehost,
-+ strlen(homehost)) == 0 &&
-+ name[strlen(homehost)] == ':')
-+ name += strlen(homehost)+1;
- unum = -1;
-+ }
-
- while (conflict) {
- if (unum >= 0)
---
-1.7.10.4
-
diff --git a/debian/patches/series b/debian/patches/series
index c13a5c88..728fabf4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,5 @@
debian-conffile-location.diff
debian-no-Werror.diff
sha1-includes.diff
-use-external-blkid.diff
-use-tempnode-not-devnode.patch
-build-sys-no-check_rundir.patch
-rebuildmap-strip-local-host-name-from-device-name.patch
readlink-path.patch
mdmonitor-service-simplify.diff
diff --git a/debian/patches/use-external-blkid.diff b/debian/patches/use-external-blkid.diff
deleted file mode 100644
index 637f7c3a..00000000
--- a/debian/patches/use-external-blkid.diff
+++ /dev/null
@@ -1,16 +0,0 @@
-From: Michael Tokarev <mjt@tls.msk.ru>
-Subject: blkid is not udev builtin, use /sbin/blkid
-
---- a/udev-md-raid-arrays.rules
-+++ b/udev-md-raid-arrays.rules
-@@ -26,9 +26,7 @@ ENV{DEVTYPE}=="partition", ENV{MD_UUID}=
- 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"
-+IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
- 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_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
-
diff --git a/debian/patches/use-tempnode-not-devnode.patch b/debian/patches/use-tempnode-not-devnode.patch
deleted file mode 100644
index 38a55044..00000000
--- a/debian/patches/use-tempnode-not-devnode.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Michael Tokarev <mjt@tls.msk.ru>
-Subject: use tempnode not devnode in udev rules
-Bug-Debian: http://bugs.debian.org/770883
-Forwarded: no
-
-udev in wheezy does not understand $devnode construct
-in rules file, while upstream uses it in mdadm rules
-files. udev in jessie has $devnode and it also supports
-old $tempnode which is the way it worked in wheezy and
-before, even if $tempnode in jessie's udev is not documented.
-So on jessie, both $tempnode and $devnode works fine, while
-in wheezy, only $tempnode works.
-
-Use $tempnode instead of $devnode. Since mdadm is important
-enough for system functionality and easily can break system
-by making it unbootable, and this is the only incompatibility
-between wheezy's and jessie's udev wrt mdadm, it is better than
-having a versioned dependency on udev.
-
-This patch is debian-specific and should be dropped for jessie+1.
-
---- a/udev-md-raid-arrays.rules
-+++ b/udev-md-raid-arrays.rules
-@@ -20 +20 @@
--IMPORT{program}="BINDIR/mdadm --detail --export $devnode"
-+IMPORT{program}="BINDIR/mdadm --detail --export $tempnode"
---- a/udev-md-raid-assembly.rules
-+++ b/udev-md-raid-assembly.rules
-@@ -30 +30 @@
--ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
-+ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $tempnode --offroot ${DEVLINKS}"
diff --git a/debian/po/ca.po b/debian/po/ca.po
index 0710fd90..a58c3ffd 100644
--- a/debian/po/ca.po
+++ b/debian/po/ca.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 3.1.4-1+8efb9d1\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+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"
@@ -18,134 +18,9 @@ msgstr ""
"X-Poedit-Language: Catalan\n"
"X-Poedit-Country: SPAIN\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Les matrius MD necessaris per al sistema de fitxers arrel:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "per a ús intern, només és necessària la descripció llarga. "
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "S'ha produït un error: el node de dispositiu no existeix."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "S'ha produït un error: no és un dispositiu de blocs."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "S'ha produït un error: no és un conjunt («array») MD."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-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»."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Voleu arrencar les matrius no llistats en el fitxer «mdadm.conf»?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
"Voleu que «mdadm» executi comprovacions de redundància mensuals de les "
@@ -153,7 +28,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -172,7 +47,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -182,13 +57,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Desitjau arrencar el dimoni monitor MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -199,22 +74,111 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Es recomana l'activació d'aquesta opció."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinatari de les notificacions de correu electrònic:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index 40e8668c..d44601d3 100644
--- a/debian/po/cs.po
+++ b/debian/po/cs.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-02-17 21:10+0100\n"
"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
@@ -24,137 +24,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "MD pole vyžadovaná pro kořenový souborový systém:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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“."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "pro vnitřní použití - pouze kvůli zobrazení dlouhého popisu."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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“."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Vyskytla se chyba: uzel zařízení neexistuje"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Vyskytla se chyba: není blokovým zařízením"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Vyskytla se chyba: není MD polem"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Vyskytla se chyba: pole není uvedeno v souboru mdadm.conf"
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Spustit pole neuvedená v mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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'."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -172,7 +50,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -182,13 +60,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Chcete spustit daemon pro monitorování MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -198,19 +76,19 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Povolení této možnosti je doporučeno."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Příjemce emailových upozornění:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
@@ -218,6 +96,91 @@ 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"
diff --git a/debian/po/da.po b/debian/po/da.po
index 47294504..c6bdffed 100644
--- a/debian/po/da.po
+++ b/debian/po/da.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+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"
@@ -16,135 +16,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "MD arrays krævet for rodfilsystemet:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "for intern brug - kun den lange beskrivelse er krævet."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Der opstod en fejl: Enhedsknude findes ikke"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Der opstod en fejl: Ikke en blokenhed"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Der opstod en fejl: Ikke en MD array"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-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"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Start arrays er ikke anført i mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -163,7 +43,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -173,13 +53,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Ønsker du at starte MD-overvågningsdæmonen?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -189,22 +69,107 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Aktivering af denne indstilling anbefales."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Modtager af e-post-påmindelser:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index e1191e21..140cc0bd 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm 2.6.9-3\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2009-06-24 17:35+0200\n"
"Last-Translator: Mario Joussen <joussen@debian.org>\n"
"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
@@ -22,137 +22,9 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Fr das Wurzeldateisystem bentigte MD folgende Verbnde:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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 ""
-"Bitte geben Sie all, none oder eine leerzeichenseparierte Gerteliste "
-"wie zum Beispiel md0 md1 oder md/1 md/d0 ein (das fhrende /dev kann "
-"weggelassen werden)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr ""
-"fr internen Gebrauch - es wird nur die ausfhrliche Beschreibung bentigt."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Wenn das Wurzeldateisystem Ihres Systems auf einem MD-Verbund (RAID) liegt, "
-"muss es frhzeitig whrend des Bootvorgangs gestartet werden. Wenn sich Ihr "
-"Wurzeldateisystem auf einem logischen Laufwerk (LVM) befindet, das sich "
-"wiederum auf einem MD Verbund befindet, mssen alle zugehrigen Verbnde "
-"gestartet werden."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Wenn Sie genau wissen, welche Verbnde bentigt werden, um das "
-"Wurzeldateisystem zu starten, und Sie den Start der anderen Verbnde auf "
-"einen spteren Zeitpunkt in der Bootreihenfolge verschieben wollen, geben "
-"Sie die zu startenden Verbnde hier ein. Alternativ geben Sie all ein, um "
-"alle verfgbaren Verbnde zu starten."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Falls Sie keine RAID-Verbnde fr das Wurzeldateisystem bentigen oder "
-"starten wollen, lassen Sie die Antwort leer (oder geben none ein). Dies "
-"knnte der Fall sein, wenn Sie entweder die Autostartfunktion des Kernels "
-"verwenden oder keine Verbnde zum Booten bentigen."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Ein Fehler ist aufgetreten: Gerteknoten existiert nicht"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Ein Fehler ist aufgetreten: kein Blockgert"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Ein Fehler ist aufgetreten: kein RAID-Verbund"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr ""
-"Ein Fehler ist aufgetreten: Verbund nicht in der Datei mdadm.conf aufgefhrt"
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Nicht in mdadm.conf aufgefhrte Verbnde starten?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 ""
-"Der angegebene Verbund (${array}) ist in der Konfigurationsdatei ${config} "
-"nicht aufgefhrt. Deshalb kann er whrend des Bootvorgangs nicht gestartet "
-"werden, es sei denn, Sie korrigieren die Konfigurationsdatei und erzeugen "
-"die initiale Ramdisk neu."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 ""
-"Diese Warnung ist nur von Bedeutung, wenn Sie RAID-Verbnde, die von der "
-"initialen Ramdisk gestartet werden, bentigen, um booten zu knnen. Falls "
-"Sie die Autostartfunktion des Kernels verwenden oder kein RAID-Verbund zum "
-"frhen Zeitpunkt des Ladens der initialen Ramdisk gestartet werden muss, "
-"knnen Sie einfach fortfahren. Alternativ whlen Sie, nicht fortzufahren und "
-"geben none ein, wenn Sie gefragt werden, welche RAID-Verbnde von der "
-"initialen Ramdisk gestartet werden sollen."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
"Soll mdadm monatlich die Redundanzberprfung auf den RAID-Verbnden "
@@ -160,7 +32,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -179,7 +51,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -189,13 +61,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Mchten Sie den RAID-berwachungsdmon starten?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -205,19 +77,19 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Das Aktivieren dieser Option ist empfohlen."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Empfnger der E-Mail-Benachrichtungen:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
@@ -225,6 +97,99 @@ msgstr ""
"Geben Sie bitte die E-Mail-Adresse des Benutzers an, der die E-Mail-"
"Benachrichtigung fr wichtigen MD-Ereignisse erhalten soll."
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Fr das Wurzeldateisystem bentigte MD folgende Verbnde:"
+
+#~ 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 ""
+#~ "Bitte geben Sie all, none oder eine leerzeichenseparierte Gerteliste "
+#~ "wie zum Beispiel md0 md1 oder md/1 md/d0 ein (das fhrende /dev "
+#~ "kann weggelassen werden)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr ""
+#~ "fr internen Gebrauch - es wird nur die ausfhrliche Beschreibung "
+#~ "bentigt."
+
+#~ 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 ""
+#~ "Wenn das Wurzeldateisystem Ihres Systems auf einem MD-Verbund (RAID) "
+#~ "liegt, muss es frhzeitig whrend des Bootvorgangs gestartet werden. Wenn "
+#~ "sich Ihr Wurzeldateisystem auf einem logischen Laufwerk (LVM) befindet, "
+#~ "das sich wiederum auf einem MD Verbund befindet, mssen alle zugehrigen "
+#~ "Verbnde gestartet werden."
+
+#~ 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 ""
+#~ "Wenn Sie genau wissen, welche Verbnde bentigt werden, um das "
+#~ "Wurzeldateisystem zu starten, und Sie den Start der anderen Verbnde auf "
+#~ "einen spteren Zeitpunkt in der Bootreihenfolge verschieben wollen, geben "
+#~ "Sie die zu startenden Verbnde hier ein. Alternativ geben Sie all ein, "
+#~ "um alle verfgbaren Verbnde zu starten."
+
+#~ 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 ""
+#~ "Falls Sie keine RAID-Verbnde fr das Wurzeldateisystem bentigen oder "
+#~ "starten wollen, lassen Sie die Antwort leer (oder geben none ein). Dies "
+#~ "knnte der Fall sein, wenn Sie entweder die Autostartfunktion des Kernels "
+#~ "verwenden oder keine Verbnde zum Booten bentigen."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Ein Fehler ist aufgetreten: Gerteknoten existiert nicht"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Ein Fehler ist aufgetreten: kein Blockgert"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Ein Fehler ist aufgetreten: kein RAID-Verbund"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "Ein Fehler ist aufgetreten: Verbund nicht in der Datei mdadm.conf "
+#~ "aufgefhrt"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Nicht in mdadm.conf aufgefhrte Verbnde starten?"
+
+#~ 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 ""
+#~ "Der angegebene Verbund (${array}) ist in der Konfigurationsdatei "
+#~ "${config} nicht aufgefhrt. Deshalb kann er whrend des Bootvorgangs "
+#~ "nicht gestartet werden, es sei denn, Sie korrigieren die "
+#~ "Konfigurationsdatei und erzeugen die initiale Ramdisk neu."
+
+#~ 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 ""
+#~ "Diese Warnung ist nur von Bedeutung, wenn Sie RAID-Verbnde, die von der "
+#~ "initialen Ramdisk gestartet werden, bentigen, um booten zu knnen. Falls "
+#~ "Sie die Autostartfunktion des Kernels verwenden oder kein RAID-Verbund "
+#~ "zum frhen Zeitpunkt des Ladens der initialen Ramdisk gestartet werden "
+#~ "muss, knnen Sie einfach fortfahren. Alternativ whlen Sie, nicht "
+#~ "fortzufahren und geben none ein, wenn Sie gefragt werden, welche RAID-"
+#~ "Verbnde von der initialen Ramdisk gestartet werden sollen."
+
#~ msgid "Initialise the superblock if you reuse hard disks"
#~ msgstr ""
#~ "Initialisieren Sie den Superblock, wenn Sie Festplatten wieder verwenden."
diff --git a/debian/po/es.po b/debian/po/es.po
index d8809892..626b144e 100644
--- a/debian/po/es.po
+++ b/debian/po/es.po
@@ -39,7 +39,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm 2.5.6-6\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-04-25 17:47+0200\n"
"Last-Translator: Javier Fernndez-Sanguino <jfs@debian.org>\n"
"Language-Team: Debian Spanish <debian-l10n-spanish@lists.debian.org>\n"
@@ -48,136 +48,9 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Arrays MD necesarios para el sistema de ficheros raz:"
-
-# No se traduce all y none porque no aparecen en la plantilla para traducir los elementos individuales
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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 slo introducir md0 md1 o "
-"md/1 md/d0 (no tiene que preceder los nombres de dispositivos con /dev)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "para uso interno. Slo se utiliza la descripcin larga."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 raz de su sistema est en un array MD (RAID) "
-"tiene que inicializarse antes durante de la secuencia de arranque. Si est "
-"en un volumen lgico (LVM), que est definido sobre un MD, todos los arrays "
-"que lo forman tienen que haberse inicializado."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 cules son "
-"necesarios para arrancar el sistema de ficheros raz y quiere posponer el "
-"arranque de todos los dems arrays a un punto posterior de la secuencia de "
-"arranque. Tambin puede introducir all (todos) para, sencillamente, "
-"iniciar todos los arrays disponibles."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 raz. Este puede ser "
-"su caso si est utilizando el autoarranque del ncleo o no necesita ningn "
-"array para el arranque."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Se produjo un error: el nodo de dispositivo no existe"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Se produjo un error: no es un dispositivo de bloques"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Se produjo un error: no es un array MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-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"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Desea arrancar los arrays no listados en mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 "
-"configuracin ${config}. Este array no podr iniciarse durante el arranque "
-"del sistema a no ser que corrija el fichero de configuracin y regenere el "
-"disco de ram inicial."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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 slo 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 ncleo o no necesita que los arrays estn arrancados tan "
-"pronto como se cargue el disco de RAM, puede continuar simplemente. Tambin "
-"puede decidir no continuar e introducir none cuando se le pregunte qu "
-"arrays deberan arrancarse del disco de RAM inicial."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
"Debera mdadm ejecutar comprobaciones de redundancia mensuales de los "
@@ -185,7 +58,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -205,7 +78,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -215,13 +88,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Desea arrancar el demonio de monitorizacin MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -232,19 +105,19 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Es opcional habilitar esta opcin."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinatario de las notificaciones por correo:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
@@ -252,3 +125,94 @@ msgstr ""
"Introduzca la direccin de correo electrnico del usuario que debera "
"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 raz:"
+
+# 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 slo 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. Slo se utiliza la descripcin 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 raz de su sistema est en un array MD (RAID) "
+#~ "tiene que inicializarse antes durante de la secuencia de arranque. Si "
+#~ "est en un volumen lgico (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 cules son "
+#~ "necesarios para arrancar el sistema de ficheros raz y quiere posponer el "
+#~ "arranque de todos los dems arrays a un punto posterior de la secuencia "
+#~ "de arranque. Tambin 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 raz. Este puede "
+#~ "ser su caso si est utilizando el autoarranque del ncleo o no necesita "
+#~ "ningn 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 "
+#~ "configuracin ${config}. Este array no podr iniciarse durante el "
+#~ "arranque del sistema a no ser que corrija el fichero de configuracin 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 slo 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 ncleo o no necesita que los arrays estn arrancados tan "
+#~ "pronto como se cargue el disco de RAM, puede continuar simplemente. "
+#~ "Tambin puede decidir no continuar e introducir none cuando se le "
+#~ "pregunte qu arrays deberan arrancarse del disco de RAM inicial."
diff --git a/debian/po/eu.po b/debian/po/eu.po
index 06d8e537..259dce2b 100644
--- a/debian/po/eu.po
+++ b/debian/po/eu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm-debconf\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: Y2008-04-30 11:00+0100\n"
"Last-Translator: Piarres Beobide <pi@beobide.net>\n"
"Language-Team: Euskara <debian-l10n-basque@lists.debian.org>\n"
@@ -16,136 +16,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Erro fitxategi-sistemarentzat beharrezko MD array-ak:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "barne erabilerako - deskribapen luzea bakarrik behar da."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Errore bat gertatu da: gailu nodoa ez dago"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Errore bat gertatu da: ez da bloke gailu bat"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Errore bat gertatu da: ez da MD array bat"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr ""
-"Errore bat gertatu da: array-a ez dago mdadm.conf fitxategian zerrendaturik"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Abiarazi mdadm.conf fitxategian ez dauden array-ak?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
"Mdadm-ek hilabetero egin behar al du MD array-en erredundantzia egiaztapena?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -164,7 +44,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -174,13 +54,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "MD monitorizazio deabrua abiarazi nahi al duzu?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -190,22 +70,107 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Aukera hau gaitzea gomendagarria da."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Eposta berri-emateen hartzailea:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
msgstr ""
"Mesedez idatzi MD gertaera garrantzitsuen berri emate mezuak jaso behar "
"dituen erabiltzailearen eposta helbidea."
+
+#~ 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
index 688baef0..759d3b37 100644
--- a/debian/po/fi.po
+++ b/debian/po/fi.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-02-14 11:24+0200\n"
"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
@@ -13,136 +13,15 @@ msgstr ""
"X-Poedit-Language: Finnish\n"
"X-Poedit-Country: FINLAND\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Juuritiedostojärjestelmän tarvitsemat MD-pakat:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "vain sisäiseen käyttöön - vain pitkä kuvaus on tarpeellinen."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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ää."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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”."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Tapahtui virhe: laitetiedostoa ei ole olemassa"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Tapahtui virhe: ei lohkolaite"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Tapahtui virhe: ei MD-pakka"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Tapahtui virhe: pakkaa ei ole listattu tiedostossa mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Käynnistetäänkö pakat, joita ei ole listattu tiedostossa mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -161,7 +40,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -171,13 +50,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Haluatko käynnistää MD-seurannan?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -187,22 +66,108 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Tämän valitseminen on suositeltavaa."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Sähköpostiviestien vastaanottaja:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index ce2459c4..df033b3c 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-02-15 20:42+0100\n"
"Last-Translator: Florentin Duneau <fduneau@gmail.com>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -21,142 +21,15 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: KBabel 1.11.4\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Ensembles MD requis par le système de fichiers racine :"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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/ »)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr ""
-"Pour une utilisation interne - seule la description longue est nécessaire"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Erreur : périphérique inconnu"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Erreur : ce n'est pas un périphérique en mode bloc"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Erreur : ce n'est pas un ensemble RAID"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Erreur : ensemble non mentionné dans le fichier mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Faut-il démarrer les ensembles RAID non mentionnés dans mdadm.conf ?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 »)."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -175,7 +48,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -185,13 +58,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
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:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -201,22 +74,113 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Il est recommandé d'activer cette option."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinataire des notifications par courriel :"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index b454e818..85e76e3c 100644
--- a/debian/po/gl.po
+++ b/debian/po/gl.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+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"
@@ -15,136 +15,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Arrays MD necesarios para o sistema de ficheiros raíz"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "para uso interno - só se precisa da descrición longa."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Houbo un erro: o nodo do dispositivo non existe"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Houbo un erro: non é un dispositivo de bloques"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Houbo un erro: non é un array MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Houbo un erro: o array non figura no ficheiro mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "¿Iniciar os arrays que non figuran en mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -163,7 +43,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -173,13 +53,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
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:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -189,22 +69,109 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Recoméndase activar esta opción."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinatario para os avisos por email:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index c2d5285e..62d6cf0f 100644
--- a/debian/po/it.po
+++ b/debian/po/it.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm italian debconf\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-11-19 11:02+0100\n"
"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
@@ -16,138 +16,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Array MD necessari per il file system di root:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "uso interno - è necessaria solo la descrizione lunga."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Errore: il nodo del device non esiste"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Errore: non è un device a blocchi"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Errore: non è un array MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Errore: array non elencato nel file mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Avviare gli array non elencati in mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -166,7 +43,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -176,13 +53,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Avviare il demone di monitoraggio MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -192,22 +69,109 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Si raccomanda l'attivazione di questa funzione."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinatario delle email di notifica:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index eeefe8ed..7f9c4fb6 100644
--- a/debian/po/ja.po
+++ b/debian/po/ja.po
@@ -16,7 +16,7 @@ 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: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+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"
@@ -25,135 +25,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "ルートファイルシステムに必要な MD アレイ:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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/' は省略可能です)。"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "内部での利用について - でも、長い説明が必要です。"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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) 上にある場合は、構成"
-"しているアレイ全ての開始が必要です。"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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' と入"
-"力して単に全ての利用可能なアレイを最初に立ち上げてください。"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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' と入力) してくださ"
-"い。これは、カーネルで自動的に起動される場合や起動時にはアレイは不要であると"
-"いう場合です。"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "エラーが発生しました: デバイスノードが存在しません"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "エラーが発生しました: ブロックデバイスではありません"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "エラーが発生しました: MD アレイではありません"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "エラーが発生しました: mdadm.conf ファイルに記述されていないアレイです"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "mdadm.conf に記述されていないアレイを起動しますか?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 を再生成しなければブート時に起動できま"
-"せん。"
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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' と入力します。"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr "mdadm は、毎月 MD アレイの冗長性チェックを行いますか?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -171,7 +51,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -180,13 +60,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "MD 監視デーモンを起動しますか?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -196,19 +76,19 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "この機能を有効にするのをお勧めします。"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "メール通知の宛先:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
@@ -216,6 +96,91 @@ 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 "
diff --git a/debian/po/nl.po b/debian/po/nl.po
index d3e5f3da..34f473e6 100644
--- a/debian/po/nl.po
+++ b/debian/po/nl.po
@@ -16,7 +16,7 @@ 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: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-02-19 14:04+0100\n"
"Last-Translator: Frans Pop <elendil@planet.nl>\n"
"Language-Team: Dutch <debian-l10n-dutch@lists.debian.org>\n"
@@ -26,138 +26,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Voor het basisbestandssysteem benodigde RAID-reeksen:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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 ""
-"Geef in 'all' (alle), 'none' (geen) of één of meerdere apparaatbestanden "
-"(gescheiden door spaties), bijvoorbeeld \"md0 md1\" of \"md/1 md/d0\" (de "
-"prefix '/dev/' kan dus worden weggelaten)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "Voor intern gebruik - alleen de lange omschrijving wordt gebruikt."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Als het basisbestandssysteem van uw systeem zich op een RAID-volume bevindt, "
-"dient dit vroeg in de opstartcyclus geactiveerd te worden. Als het zich op "
-"een logisch volume (LVM) op RAID bevindt, dienen alle betrokken reeksen "
-"geactiveerd te worden."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Als u precies weet welke reeksen benodigd zijn voor het basisbestandssysteem "
-"en u het activeren van alle overige reeksen wilt uitstellen tot later in de "
-"opstartprocedure, geef dan hier de te activeren reeksen in. Anders kunt u "
-"'all' ingeven om alle beschikbare reeksen te activeren."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Als u geen reeksen hoeft of wenst te activeren voor het "
-"basisbestandssysteem, laat dan het antwoord leeg (of geef 'none' in). Dit "
-"kan het geval zijn als u \"kernel autostart\" gebruikt of geen reeksen nodig "
-"heeft om uw systeem op te starten."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Er is een fout opgetreden: apparaatbestand bestaat niet"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Er is een fout opgetreden: geen blokapparaat"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Er is een fout opgetreden: geen RAID reeks"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Er is een fout opgetreden: reeks komt niet voor in bestand mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Reeksen activeren die niet in mdadm.conf voorkomen?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 ""
-"De reeks die u heeft opgegeven (${array}) komt niet voor in het "
-"configuratiebestand (${config}). Tenzij u het configuratiebestand corrigeert "
-"en de initiële ramdisk opnieuw aanmaakt, kan deze reeks tijdens het "
-"opstarten van het systeem niet worden geactiveerd."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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 ""
-"Deze waarschuwing is alleen relevant als de reeksen geactiveerd moeten "
-"worden vanuit een initiële ramdisk om het systeem te kunnen opstarten. Als u "
-"\"kernel autostart\" gebruikt of er geen reeksen zijn die vanuit de initiële "
-"ramdisk gestart moeten worden, kunt u gewoon doorgaan. Kies anders nu om "
-"niet door te gaan en geef 'none' in bij de vraag welke reeksen vanuit de "
-"initiële ramdisk gestart moeten worden."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr "Maandelijkse redundantiecontrole van RAID-reeksen uitvoeren?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -175,7 +52,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -185,13 +62,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Wilt u de achtergronddienst voor de RAID-monitor starten?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -202,22 +79,110 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Gebruik van deze optie wordt aanbevolen."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Adres voor e-mailberichten:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
msgstr ""
"Wat is het e-mailadres van de gebruiker die de e-mailberichten voor "
"belangrijke gebeurtenissen met betrekking tot RAID dient te ontvangen."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "Voor het basisbestandssysteem benodigde RAID-reeksen:"
+
+#~ 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 ""
+#~ "Geef in 'all' (alle), 'none' (geen) of één of meerdere apparaatbestanden "
+#~ "(gescheiden door spaties), bijvoorbeeld \"md0 md1\" of \"md/1 md/d0\" (de "
+#~ "prefix '/dev/' kan dus worden weggelaten)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "Voor intern gebruik - alleen de lange omschrijving wordt gebruikt."
+
+#~ 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 ""
+#~ "Als het basisbestandssysteem van uw systeem zich op een RAID-volume "
+#~ "bevindt, dient dit vroeg in de opstartcyclus geactiveerd te worden. Als "
+#~ "het zich op een logisch volume (LVM) op RAID bevindt, dienen alle "
+#~ "betrokken reeksen geactiveerd te worden."
+
+#~ 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 ""
+#~ "Als u precies weet welke reeksen benodigd zijn voor het "
+#~ "basisbestandssysteem en u het activeren van alle overige reeksen wilt "
+#~ "uitstellen tot later in de opstartprocedure, geef dan hier de te "
+#~ "activeren reeksen in. Anders kunt u 'all' ingeven om alle beschikbare "
+#~ "reeksen te activeren."
+
+#~ 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 ""
+#~ "Als u geen reeksen hoeft of wenst te activeren voor het "
+#~ "basisbestandssysteem, laat dan het antwoord leeg (of geef 'none' in). Dit "
+#~ "kan het geval zijn als u \"kernel autostart\" gebruikt of geen reeksen "
+#~ "nodig heeft om uw systeem op te starten."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Er is een fout opgetreden: apparaatbestand bestaat niet"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Er is een fout opgetreden: geen blokapparaat"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Er is een fout opgetreden: geen RAID reeks"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr ""
+#~ "Er is een fout opgetreden: reeks komt niet voor in bestand mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Reeksen activeren die niet in mdadm.conf voorkomen?"
+
+#~ 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 ""
+#~ "De reeks die u heeft opgegeven (${array}) komt niet voor in het "
+#~ "configuratiebestand (${config}). Tenzij u het configuratiebestand "
+#~ "corrigeert en de initiële ramdisk opnieuw aanmaakt, kan deze reeks "
+#~ "tijdens het opstarten van het systeem niet worden geactiveerd."
+
+#~ 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 ""
+#~ "Deze waarschuwing is alleen relevant als de reeksen geactiveerd moeten "
+#~ "worden vanuit een initiële ramdisk om het systeem te kunnen opstarten. "
+#~ "Als u \"kernel autostart\" gebruikt of er geen reeksen zijn die vanuit de "
+#~ "initiële ramdisk gestart moeten worden, kunt u gewoon doorgaan. Kies "
+#~ "anders nu om niet door te gaan en geef 'none' in bij de vraag welke "
+#~ "reeksen vanuit de initiële ramdisk gestart moeten worden."
diff --git a/debian/po/pt.po b/debian/po/pt.po
index e450997a..2b549e98 100644
--- a/debian/po/pt.po
+++ b/debian/po/pt.po
@@ -7,7 +7,7 @@ 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: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-02-21 00:15+0000\n"
"Last-Translator: Pedro Ribeiro <p.m42.ribeiro@gmail.com>\n"
"Language-Team: Portuguese <traduz@debianpt.org>\n"
@@ -16,138 +16,16 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Grupos MD necessários para o sistema de ficheiros raiz:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "para uso interno - apenas a descrição longa é necessária"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Ocorreu um erro: o nó do dispositivo não existe"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Ocorreu um erro: não é um dispositivo de bloco"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Ocorreu um erro: não é um grupo MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-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"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Iniciar grupos não listados no mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -166,7 +44,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -176,13 +54,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
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:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -193,22 +71,109 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "É recomendado activar esta opção."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinatário de email para notificações:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index 118538b8..3f6df2fc 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2006-09-24 19:22-0300\n"
"Last-Translator: Felipe Augusto van de Wiel (faw) <faw@cathedrallabs.org>\n"
"Language-Team: l10n portuguese <debian-l10n-portuguese@lists.debian.org>\n"
@@ -25,166 +25,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"pt_BR utf-8\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-#, 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:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-#, 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\"."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "para uso interno - apenas a descrição longa é necessária."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-#, 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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-#, 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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-#, 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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Um erro ocorreu: o dispositivo (\"device node\") não existe"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Um erro ocorreu: não é um dispositivo de blocos"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Um erro ocorreu: não é um dispositivo MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Um erro ocorreu: dispositivo não listado no arquivo mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-#, 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?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-#, 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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
"O mdadm deve, mensalmente, executar checagens de redundância dos "
@@ -192,7 +35,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
#, fuzzy
#| msgid ""
#| "If your kernel supports it (>> 2.6.14), mdadm can periodically check the "
@@ -219,7 +62,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
#, fuzzy
#| msgid ""
#| "The default, if turned on, is to run the checks on the first Sunday of "
@@ -233,13 +76,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Você deseja iniciar o \"daemon\" de monitoramento MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
#, fuzzy
#| msgid ""
#| "The MD (RAID) monitor daemon sends email notifications in response to "
@@ -255,19 +98,19 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr ""
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Destinatário para os e-mails de notificações:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
#, fuzzy
#| msgid ""
#| "Please enter the email address of the user who should get the email "
@@ -279,6 +122,127 @@ 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"
diff --git a/debian/po/ru.po b/debian/po/ru.po
index a4aff77d..8bf8c5c2 100644
--- a/debian/po/ru.po
+++ b/debian/po/ru.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 2.6.3+200709292116+4450e59-4\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-02-07 21:02+0300\n"
"Last-Translator: Yuri Kozlov <kozlov.y@gmail.com>\n"
"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
@@ -27,139 +27,16 @@ msgstr ""
"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: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "MD-массивы, необходимые для корневой файловой системы:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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'."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr ""
-"для внутреннего пользования - нужно использовать только длинное описание."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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, то должны быть запущены все составляющие массивы."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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', чтобы просто запустить все доступные массивы."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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'). Этот "
-"вариант подходит, если вы используете автоматический запуск из ядра или если "
-"для загрузки массивы ненужны."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Произошла ошибка: нода устройства не существует"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Произошла ошибка: устройство не является блочным"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Произошла ошибка: это не MD-массив"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Произошла ошибка: массив не описан в файле mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Запустить массивы, неописанные в mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
"Должен ли mdadm запускать ежемесячную проверку избыточности на MD-массивах?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -177,7 +54,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -187,13 +64,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Запускать демон-монитор MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -203,22 +80,110 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Рекомендуется ответить утвердительно."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Получатель уведомительных писем:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index 5d6d5a50..c84247ba 100644
--- a/debian/po/sk.po
+++ b/debian/po/sk.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm 3.2.2-1\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2011-09-18 11:22+0200\n"
"Last-Translator: Slavko <linux@slavino.sk>\n"
"Language-Team: Slovak <debian-l10n-slovak@lists.debian.org>\n"
@@ -19,135 +19,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "Polia MD, potrebné pre koreň súborového systému:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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é)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "na interné použitie – potrebný je len dlhý popis."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Nastala chyba: uzol zariadenia neexistuje"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Nastala chyba: nie je blokové zariadenie"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Nastala chyba: nie je pole MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Nastala chyba: pole nie je uvedené v súbore mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Spustiť polia, ktoré nie sú uvedené v mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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)."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -165,7 +45,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -175,13 +55,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Chcete spustiť démona monitorovania MD?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -191,22 +71,106 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Povolenie tejto možnosti je odporúčané."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Príjemca emailových upozornení:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index 8257c8dd..ed9f1f21 100644
--- a/debian/po/sv.po
+++ b/debian/po/sv.po
@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm_2.6.7-3_sv\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+0200\n"
"PO-Revision-Date: 2008-07-23 18:34+0200\n"
"Last-Translator: Martin gren <martin.agren@gmail.com>\n"
"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
@@ -25,135 +25,15 @@ msgstr ""
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr "MD-kedjor som behvs fr rotfilsystemet:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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 ""
-"Ange \"all\", \"none\" eller en blankstegsseparerad lista p enheter, ssom "
-"\"md0 md1\" eller \"md/1 md/0\" (det inledande \"/dev\" kan uteslutas)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr "fr intern anvndning - endast den lnga beskrivningen behvs."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Om ditt system har sitt rotfilsystem p en MD-kedja (RAID) behver den "
-"startas upp tidigt under uppstartssekvensen. Om ditt rotfilsystem finns p "
-"en logisk volym (LVM), vilket r p MD, behver alla bestende kedjor "
-"startas."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Om du vet exakt vilka kedjor som behvs fr att ta upp rotfilsystemet, och "
-"du vill skjuta upp uppstarten fr alla andra kedjor till en senare tidspunkt "
-"i uppstartssekvensen, ange vilka kedjor som ska starta hr. Alternativt, "
-"ange \"all\" fr att helt enkelt starta alla tillgngliga kedjor."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-"Om du inte behver eller vill starta ngra kedjor fr rotfilsystemet, lmna "
-"svaret blankt (eller ange \"none\"). Detta kan vara fallet om du anvnder "
-"krnans automatstart eller inte behver ngra kedjor fr att starta upp."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr "Ett fel intrffade: enhetsnoden finns inte"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr "Ett fel intrffade: inte en blockenhet"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Ett fel intrffade: inte en MD-kedja"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr "Ett fel intrffade: kedjan r inte listad i filen mdadm.conf"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr "Starta kedjor som inte r listade i mdadm.conf?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 ""
-"Kedjan du har angivit (${array}) r inte listad i konfigurationsfilen "
-"(${config}). Drfr kan den inte startas under systemets uppstart, svida du "
-"inte rttar till konfigurationsfilen och terskapar den initiala ramdisken."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:8001
-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 ""
-"Den hr varningen r endast relevant om du behver kedjor som ska startas "
-"frn den initiala ramdisken fr att kunna starta upp systemet. Om du "
-"anvnder krnans automatstart, eller inte behver starta ngra kedjor s "
-"tidigt som nr de initiala ramdisken lses in, kan du helt enkelt fortstta. "
-"Alternativt, vlj att inte fortstta och ange \"none\" nr frgan om vilka "
-"kedjor som ska startas frn den initiala ramdisken stlls."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr "Ska mdadm kra mnatliga redundanskontroller av MD-kedjorna?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -172,7 +52,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -182,13 +62,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr "Vill du starta MD-vervakningsdemonen?"
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -198,22 +78,109 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr "Att aktivera denna funktion rekommenderas."
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Mottagare av e-postnotifieringar:"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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 anvndare som ska ta emot e-postnotifieringar "
"fr dessa viktiga MD-hndelser."
+
+#~ msgid "MD arrays needed for the root file system:"
+#~ msgstr "MD-kedjor som behvs fr rotfilsystemet:"
+
+#~ 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 ""
+#~ "Ange \"all\", \"none\" eller en blankstegsseparerad lista p enheter, "
+#~ "ssom \"md0 md1\" eller \"md/1 md/0\" (det inledande \"/dev\" kan "
+#~ "uteslutas)."
+
+#~ msgid "for internal use - only the long description is needed."
+#~ msgstr "fr intern anvndning - endast den lnga beskrivningen behvs."
+
+#~ 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 ""
+#~ "Om ditt system har sitt rotfilsystem p en MD-kedja (RAID) behver den "
+#~ "startas upp tidigt under uppstartssekvensen. Om ditt rotfilsystem finns "
+#~ "p en logisk volym (LVM), vilket r p MD, behver alla bestende kedjor "
+#~ "startas."
+
+#~ 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 ""
+#~ "Om du vet exakt vilka kedjor som behvs fr att ta upp rotfilsystemet, "
+#~ "och du vill skjuta upp uppstarten fr alla andra kedjor till en senare "
+#~ "tidspunkt i uppstartssekvensen, ange vilka kedjor som ska starta hr. "
+#~ "Alternativt, ange \"all\" fr att helt enkelt starta alla tillgngliga "
+#~ "kedjor."
+
+#~ 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 ""
+#~ "Om du inte behver eller vill starta ngra kedjor fr rotfilsystemet, "
+#~ "lmna svaret blankt (eller ange \"none\"). Detta kan vara fallet om du "
+#~ "anvnder krnans automatstart eller inte behver ngra kedjor fr att "
+#~ "starta upp."
+
+#~ msgid "An error occurred: device node does not exist"
+#~ msgstr "Ett fel intrffade: enhetsnoden finns inte"
+
+#~ msgid "An error occurred: not a block device"
+#~ msgstr "Ett fel intrffade: inte en blockenhet"
+
+#~ msgid "An error occurred: not an MD array"
+#~ msgstr "Ett fel intrffade: inte en MD-kedja"
+
+#~ msgid "An error occurred: array not listed in mdadm.conf file"
+#~ msgstr "Ett fel intrffade: kedjan r inte listad i filen mdadm.conf"
+
+#~ msgid "Start arrays not listed in mdadm.conf?"
+#~ msgstr "Starta kedjor som inte r listade 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 ""
+#~ "Kedjan du har angivit (${array}) r inte listad i konfigurationsfilen "
+#~ "(${config}). Drfr kan den inte startas under systemets uppstart, svida "
+#~ "du inte rttar till konfigurationsfilen och terskapar den initiala "
+#~ "ramdisken."
+
+#~ 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 ""
+#~ "Den hr varningen r endast relevant om du behver kedjor som ska startas "
+#~ "frn den initiala ramdisken fr att kunna starta upp systemet. Om du "
+#~ "anvnder krnans automatstart, eller inte behver starta ngra kedjor s "
+#~ "tidigt som nr de initiala ramdisken lses in, kan du helt enkelt "
+#~ "fortstta. Alternativt, vlj att inte fortstta och ange \"none\" nr "
+#~ "frgan om vilka kedjor som ska startas frn den initiala ramdisken stlls."
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index beb000aa..3860e909 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -1,6 +1,6 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
+# This file is distributed under the same license as the mdadm package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mdadm\n"
"Report-Msgid-Bugs-To: mdadm@packages.debian.org\n"
-"POT-Creation-Date: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+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"
@@ -17,113 +17,15 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-msgid "MD arrays needed for the root file system:"
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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 ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-msgid "for internal use - only the long description is needed."
-msgstr ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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 ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-msgid "An error occurred: device node does not exist"
-msgstr ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-msgid "An error occurred: not a block device"
-msgstr ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr ""
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-msgid "An error occurred: array not listed in mdadm.conf file"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-msgid "Start arrays not listed in mdadm.conf?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 ""
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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 ""
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid "Should mdadm run monthly redundancy checks of the MD arrays?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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 "
@@ -135,7 +37,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -143,13 +45,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Do you want to start the MD monitoring daemon?"
msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -157,19 +59,19 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
msgid "Enabling this option is recommended."
msgstr ""
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr ""
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
msgid ""
"Please enter the email address of the user who should get the email "
"notifications for important MD events."
diff --git a/debian/po/vi.po b/debian/po/vi.po
index 0e4933ca..cf6c4b17 100644
--- a/debian/po/vi.po
+++ b/debian/po/vi.po
@@ -6,7 +6,7 @@ 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: 2012-05-22 00:50+0100\n"
+"POT-Creation-Date: 2016-07-05 14:12+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"
@@ -17,140 +17,16 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: LocFactoryEditor 1.7b3\n"
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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:"
-
-#. Type: string
-#. Description
-#: ../mdadm.templates:2001
-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)."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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. "
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:3001
-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."
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:4001
-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"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:5001
-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"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:6001
-msgid "An error occurred: not an MD array"
-msgstr "Gặp lỗi: không phải là một mảng MD"
-
-#. Type: text
-#. Description
-#: ../mdadm.templates:7001
-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 »"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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?"
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
-#. Type: boolean
-#. Description
-#: ../mdadm.templates:8001
-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."
-
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
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:10001
+#: ../mdadm.templates:2001
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 "
@@ -168,7 +44,7 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:10001
+#: ../mdadm.templates:2001
msgid ""
"The default, if turned on, is to check on the first Sunday of every month at "
"01:06."
@@ -178,13 +54,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
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:11001
+#: ../mdadm.templates:3001
msgid ""
"The MD (RAID) monitor daemon sends email notifications in response to "
"important MD events (such as a disk failure)."
@@ -194,22 +70,110 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../mdadm.templates:11001
+#: ../mdadm.templates:3001
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:12001
+#: ../mdadm.templates:4001
msgid "Recipient for email notifications:"
msgstr "Người nhận thư thông báo :"
#. Type: string
#. Description
-#: ../mdadm.templates:12001
+#: ../mdadm.templates:4001
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
index 7b21d228..3a1b5a6f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,7 @@
#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)
@@ -45,7 +46,7 @@ clean:
install-arch: build-arch
dh_testdir
- dh_clean -k
+ dh_prep
dh_installdirs
$(MAKE) install install-systemd DESTDIR=$(DESTDIR)
@@ -53,8 +54,10 @@ install-arch: build-arch
mkdir -p $(DESTDIR)/etc/mdadm
install -Dm0755 debian/initramfs/hook \
$(DESTDIR)/usr/share/initramfs-tools/hooks/mdadm
- install -Dm0755 debian/initramfs/script.local-top \
- $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/mdadm
+ install -Dm0755 debian/initramfs/script.local-block \
+ $(DESTDIR)/usr/share/initramfs-tools/scripts/local-block/mdadm
+ install -Dm0755 debian/initramfs/script.local-bottom \
+ $(DESTDIR)/usr/share/initramfs-tools/scripts/local-bottom/mdadm
install -Dm0644 debian/mdadm.modules \
$(DESTDIR)/etc/modprobe.d/mdadm.conf
@@ -73,7 +76,6 @@ binary-arch: install-arch
dh_installdebconf
dh_installdocs
dh_installexamples -pmdadm mdadm.conf-example misc/syslog-events
- dh_installinit --init-script=mdadm-raid --no-restart-on-upgrade -- start 25 S . start 60 0 6 .
dh_installinit --init-script=mdadm-waitidle --no-start -- stop 98 0 6 .
dh_link -pmdadm /dev/null /lib/systemd/system/mdadm-waitidle.service
dh_installinit -- defaults 25
diff --git a/external-reshape-design.txt b/external-reshape-design.txt
index 4eb04a2f..10c57ccb 100644
--- a/external-reshape-design.txt
+++ b/external-reshape-design.txt
@@ -166,7 +166,7 @@ sync_action
monitor.
8/ mdadm::Grow_reshape() calls ->manage_reshape to oversee the
rest of the reshape.
-
+
9/ mdadm::<format>->manage_reshape(): saves data that will be overwritten by
the kernel to either the backup file or the metadata specific location,
advances sync_max, waits for reshape, ping mdmon, repeat.
@@ -194,7 +194,7 @@ sync_action
kernel-managed-metadata this protection is provided by
->reshape_safe, but that does not protect us in the case
of user-space-managed-metadata.
-
+
10/ mdadm::<format>->manage_reshape(): Once reshape completes changes the raid
level back to the nominal raid level (if necessary)
@@ -272,9 +272,9 @@ sync_action
->set_array_state to record the the reshape is complete.
For container-wide reshape, this happens once for each
member array.
-
-
-
+
+
+
...
[1]: Linux kernel design patterns - part 3, Neil Brown http://lwn.net/Articles/336262/
diff --git a/inventory b/inventory
index 40598cee..ace5df04 100755
--- a/inventory
+++ b/inventory
@@ -20,6 +20,9 @@ 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
Assemble.c
Build.c
COPYING
@@ -44,6 +47,7 @@ bitmap.h
config.c
crc32.c
crc32.h
+crc32c.c
dlink.c
dlink.h
external-reshape-design.txt
@@ -234,8 +238,10 @@ 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/ToTest
tests/check
tests/env-ddf-template
diff --git a/managemon.c b/managemon.c
index 1c9eccc4..6d1b3d85 100644
--- a/managemon.c
+++ b/managemon.c
@@ -134,7 +134,7 @@ static void free_aa(struct active_array *aa)
/* Note that this doesn't close fds if they are being used
* by a clone. ->container will be set for a clone
*/
- dprintf("%s: sys_name: %s\n", __func__, aa->info.sys_name);
+ dprintf("sys_name: %s\n", aa->info.sys_name);
if (!aa->container)
close_aa(aa);
while (aa->info.devs) {
@@ -273,8 +273,7 @@ static void add_disk_to_container(struct supertype *st, struct mdinfo *sd)
.state = 0,
};
- dprintf("%s: add %d:%d to container\n",
- __func__, sd->disk.major, sd->disk.minor);
+ dprintf("add %d:%d to container\n", sd->disk.major, sd->disk.minor);
sd->next = st->devs;
st->devs = sd;
@@ -325,8 +324,8 @@ static void remove_disk_from_container(struct supertype *st, struct mdinfo *sd)
.raid_disk = -1,
.state = 0,
};
- dprintf("%s: remove %d:%d from container\n",
- __func__, sd->disk.major, sd->disk.minor);
+ dprintf("remove %d:%d from container\n",
+ sd->disk.major, sd->disk.minor);
st->update_tail = &update;
st->ss->remove_from_super(st, &dk);
@@ -402,6 +401,22 @@ static void manage_container(struct mdstat_ent *mdstat,
}
}
+static int sysfs_open2(char *devnum, char *name, char *attr)
+{
+ int fd = sysfs_open(devnum, name, attr);
+ if (fd >= 0) {
+ /* seq_file in the kernel allocates buffer space
+ * on the first read. Do that now so 'monitor'
+ * never needs too.
+ */
+ char buf[200];
+ if (read(fd, buf, sizeof(buf)) < 0)
+ /* pretend not to ignore return value */
+ return fd;
+ }
+ return fd;
+}
+
static int disk_init_and_add(struct mdinfo *disk, struct mdinfo *clone,
struct active_array *aa)
{
@@ -409,10 +424,11 @@ static int disk_init_and_add(struct mdinfo *disk, struct mdinfo *clone,
return -1;
*disk = *clone;
- disk->recovery_fd = sysfs_open(aa->info.sys_name, disk->sys_name, "recovery_start");
+ disk->recovery_fd = sysfs_open2(aa->info.sys_name, disk->sys_name,
+ "recovery_start");
if (disk->recovery_fd < 0)
return -1;
- disk->state_fd = sysfs_open(aa->info.sys_name, disk->sys_name, "state");
+ disk->state_fd = sysfs_open2(aa->info.sys_name, disk->sys_name, "state");
if (disk->state_fd < 0) {
close(disk->recovery_fd);
return -1;
@@ -525,7 +541,7 @@ static void manage_member(struct mdstat_ent *mdstat,
/* prevent the kernel from activating the disk(s) before we
* finish adding them
*/
- dprintf("%s: freezing %s\n", __func__, a->info.sys_name);
+ dprintf("freezing %s\n", a->info.sys_name);
sysfs_set_str(&a->info, NULL, "sync_action", "frozen");
/* Add device to array and set offset/size/slot.
@@ -550,8 +566,7 @@ static void manage_member(struct mdstat_ent *mdstat,
if (sysfs_set_str(&a->info, NULL, "sync_action", "recover")
== 0)
newa->prev_action = recover;
- dprintf("%s: recovery started on %s\n", __func__,
- a->info.sys_name);
+ dprintf("recovery started on %s\n", a->info.sys_name);
out:
while (newdev) {
d = newdev->next;
@@ -692,12 +707,13 @@ static void manage_new(struct mdstat_ent *mdstat,
}
}
- new->action_fd = sysfs_open(new->info.sys_name, NULL, "sync_action");
- new->info.state_fd = sysfs_open(new->info.sys_name, NULL, "array_state");
- new->resync_start_fd = sysfs_open(new->info.sys_name, NULL, "resync_start");
- new->metadata_fd = sysfs_open(new->info.sys_name, NULL, "metadata_version");
- new->sync_completed_fd = sysfs_open(new->info.sys_name, NULL, "sync_completed");
- dprintf("%s: inst: %s action: %d state: %d\n", __func__, inst,
+ new->action_fd = sysfs_open2(new->info.sys_name, NULL, "sync_action");
+ new->info.state_fd = sysfs_open2(new->info.sys_name, NULL, "array_state");
+ new->resync_start_fd = sysfs_open2(new->info.sys_name, NULL, "resync_start");
+ new->metadata_fd = sysfs_open2(new->info.sys_name, NULL, "metadata_version");
+ new->sync_completed_fd = sysfs_open2(new->info.sys_name, NULL, "sync_completed");
+
+ dprintf("inst: %s action: %d state: %d\n", inst,
new->action_fd, new->info.state_fd);
if (sigterm)
diff --git a/mapfile.c b/mapfile.c
index 4e7f2421..243ded18 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -176,7 +176,7 @@ void map_read(struct map_ent **melp)
{
FILE *f;
char buf[8192];
- char path[200];
+ char path[201];
int uuid[4];
char devnm[32];
char metadata[30];
@@ -455,12 +455,19 @@ void RebuildMap(void)
sep = "";
}
}
- if (strchr(name, ':'))
- /* probably a uniquifying
+ if (strchr(name, ':')) {
+ /* Probably a uniquifying
* hostname prefix. Allow
- * without a suffix
+ * without a suffix, and strip
+ * hostname if it is us.
*/
+ if (homehost && unum == -1 &&
+ strncmp(name, homehost,
+ strlen(homehost)) == 0 &&
+ name[strlen(homehost)] == ':')
+ name += strlen(homehost)+1;
unum = -1;
+ }
while (conflict) {
if (unum >= 0)
diff --git a/md.4 b/md.4
index e222237d..f1b88ee6 100644
--- a/md.4
+++ b/md.4
@@ -40,7 +40,7 @@ MULTIPATH (a set of different interfaces to the same device),
and FAULTY (a layer over a single device into which errors can be injected).
.SS MD METADATA
-Each device in an array may have some
+Each device in an array may have some
.I metadata
stored in the device. This metadata is sometimes called a
.BR superblock .
@@ -176,7 +176,7 @@ device is rounded down to a multiple of this chunksize.
A RAID0 array (which has zero redundancy) is also known as a
striped array.
A RAID0 array is configured at creation with a
-.B "Chunk Size"
+.B "Chunk Size"
which must be a power of two (prior to Linux 2.6.31), and at least 4
kibibytes.
@@ -874,6 +874,26 @@ The list is particularly useful when recovering to a spare. If a few blocks
cannot be read from the other devices, the bulk of the recovery can
complete and those few bad blocks will be recorded in the bad block list.
+.SS RAID456 WRITE JOURNAL
+
+Due to non-atomicity nature of RAID write operations, interruption of
+write operations (system crash, etc.) to RAID456 array can lead to
+inconsistent parity and data loss (so called RAID-5 write hole).
+
+To plug the write hole, from Linux 4.4 (to be confirmed),
+.I md
+supports write ahead journal for RAID456. When the array is created,
+an additional journal device can be added to the array through
+.IR write-journal
+option. The RAID write journal works similar to file system journals.
+Before writing to the data disks, md persists data AND parity of the
+stripe to the journal device. After crashes, md searches the journal
+device for incomplete write operations, and replay them to the data
+disks.
+
+When the journal device fails, the RAID array is forced to run in
+read-only mode.
+
.SS WRITE-BEHIND
From Linux 2.6.14,
@@ -1024,7 +1044,7 @@ number of times MD will service a full-stripe-write before servicing a
stripe that requires some "prereading". For fairness this defaults to
1. Valid values are 0 to stripe_cache_size. Setting this to 0
maximizes sequential-write throughput at the cost of fairness to threads
-doing small or random writes.
+doing small or random writes.
.SS KERNEL PARAMETERS
diff --git a/md_p.h b/md_p.h
index c4846bab..0d691fbc 100644
--- a/md_p.h
+++ b/md_p.h
@@ -78,6 +78,12 @@
#define MD_DISK_ACTIVE 1 /* disk is running but may not be in sync */
#define MD_DISK_SYNC 2 /* disk is in sync with the raid set */
#define MD_DISK_REMOVED 3 /* disk is in sync with the raid set */
+#define MD_DISK_CLUSTER_ADD 4 /* Initiate a disk add across the cluster
+ * For clustered enviroments only.
+ */
+#define MD_DISK_CANDIDATE 5 /* disk is added as spare (local) until confirmed
+ * For clustered enviroments only.
+ */
#define MD_DISK_WRITEMOSTLY 9 /* disk is "write-mostly" is RAID1 config.
* read requests will only be sent here in
@@ -85,6 +91,12 @@
*/
#define MD_DISK_REPLACEMENT 17
+#define MD_DISK_JOURNAL 18 /* disk is used as the write journal in RAID-5/6 */
+
+#define MD_DISK_ROLE_SPARE 0xffff
+#define MD_DISK_ROLE_FAULTY 0xfffe
+#define MD_DISK_ROLE_JOURNAL 0xfffd
+#define MD_DISK_ROLE_MAX 0xff00 /* max value of regular disk role */
typedef struct mdp_device_descriptor_s {
__u32 number; /* 0 Device number in the entire set */
@@ -106,6 +118,7 @@ typedef struct mdp_device_descriptor_s {
#define MD_SB_BLOCK_CONTAINER_RESHAPE 3 /* block container wide reshapes */
#define MD_SB_BLOCK_VOLUME 4 /* block activation of array, other arrays
* in container can be activated */
+#define MD_SB_CLUSTERED 5 /* MD is clustered */
#define MD_SB_BITMAP_PRESENT 8 /* bitmap may be present nearby */
typedef struct mdp_superblock_s {
@@ -195,4 +208,62 @@ static inline __u64 md_event(mdp_super_t *sb) {
return (ev<<32)| sb->events_lo;
}
+struct r5l_payload_header {
+ __u16 type;
+ __u16 flags;
+} __attribute__ ((__packed__));
+
+enum r5l_payload_type {
+ R5LOG_PAYLOAD_DATA = 0,
+ R5LOG_PAYLOAD_PARITY = 1,
+ R5LOG_PAYLOAD_FLUSH = 2,
+};
+
+struct r5l_payload_data_parity {
+ struct r5l_payload_header header;
+ __u32 size; /* sector. data/parity size. each 4k has a checksum */
+ __u64 location; /* sector. For data, it's raid sector. For
+ parity, it's stripe sector */
+ __u32 checksum[];
+} __attribute__ ((__packed__));
+
+enum r5l_payload_data_parity_flag {
+ R5LOG_PAYLOAD_FLAG_DISCARD = 1, /* payload is discard */
+ /*
+ * RESHAPED/RESHAPING is only set when there is reshape activity. Note,
+ * both data/parity of a stripe should have the same flag set
+ *
+ * RESHAPED: reshape is running, and this stripe finished reshape
+ * RESHAPING: reshape is running, and this stripe isn't reshaped
+ * */
+ R5LOG_PAYLOAD_FLAG_RESHAPED = 2,
+ R5LOG_PAYLOAD_FLAG_RESHAPING = 3,
+};
+
+struct r5l_payload_flush {
+ struct r5l_payload_header header;
+ __u32 size; /* flush_stripes size, bytes */
+ __u64 flush_stripes[];
+} __attribute__ ((__packed__));
+
+enum r5l_payload_flush_flag {
+ R5LOG_PAYLOAD_FLAG_FLUSH_STRIPE = 1, /* data represents whole stripe */
+};
+
+struct r5l_meta_block {
+ __u32 magic;
+ __u32 checksum;
+ __u8 version;
+ __u8 __zero_pading_1;
+ __u16 __zero_pading_2;
+ __u32 meta_size; /* whole size of the block */
+
+ __u64 seq;
+ __u64 position; /* sector, start from rdev->data_offset, current position */
+ struct r5l_payload_header payloads[];
+} __attribute__ ((__packed__));
+
+#define R5LOG_VERSION 0x1
+#define R5LOG_MAGIC 0x6433c509
+
#endif
diff --git a/md_u.h b/md_u.h
index be9868a7..f570a346 100644
--- a/md_u.h
+++ b/md_u.h
@@ -44,6 +44,7 @@
#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
+#define CLUSTERED_DISK_NACK _IO (MD_MAJOR, 0x35)
typedef struct mdu_version_s {
int major;
@@ -58,7 +59,7 @@ typedef struct mdu_array_info_s {
int major_version;
int minor_version;
int patch_version;
- int ctime;
+ unsigned int ctime;
int level;
int size;
int nr_disks;
@@ -69,7 +70,7 @@ typedef struct mdu_array_info_s {
/*
* Generic state information
*/
- int utime; /* 0 Superblock update time */
+ unsigned int utime; /* 0 Superblock update time */
int state; /* 1 State bits (clean, ...) */
int active_disks; /* 2 Number of currently active disks */
int working_disks; /* 3 Number of working disks */
diff --git a/mdadm.8.in b/mdadm.8.in
index a6303107..7bae49d8 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -5,7 +5,7 @@
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\" See file COPYING in distribution for details.
-.TH MDADM 8 "" v3.3.2
+.TH MDADM 8 "" v3.4
.SH NAME
mdadm \- manage MD devices
.I aka
@@ -214,7 +214,7 @@ to detect and assemble arrays \(em possibly in an
.P
If a device is given before any options, or if the first option is
-and of
+one of
.BR \-\-add ,
.BR \-\-re\-add ,
.BR \-\-add\-spare ,
@@ -267,13 +267,13 @@ the exact meaning of this option in different contexts.
.TP
.BR \-c ", " \-\-config=
Specify the config file or directory. Default is to use
-.B /etc/mdadm.conf
+.B /etc/mdadm/mdadm.conf
and
-.BR /etc/mdadm.conf.d ,
+.BR /etc/mdadm/mdadm.conf.d ,
or if those are missing then
-.B /etc/mdadm/mdadm.conf
+.B /etc/mdadm.conf
and
-.BR /etc/mdadm/mdadm.conf.d .
+.BR /etc/mdadm.conf.d .
If the config file given is
.B "partitions"
then nothing will be read, but
@@ -393,6 +393,13 @@ will be allowed to use 'local' names (i.e. not ending in '_' followed
by a digit string). See below under
.BR "Auto Assembly" .
+The special name "\fBany\fP" can be used as a wild card. If an array
+is created with
+.B --homehost=any
+then the name "\fBany\fP" will be stored in the array and it can be
+assembled in the same way on any host. If an array is assembled with
+this option, then the homehost recorded on the array will be ignored.
+
.TP
.B \-\-prefer=
When
@@ -415,6 +422,12 @@ This functionality is currently only provided by
and
.BR \-\-monitor .
+.TP
+.B \-\-home\-cluster=
+specifies the cluster name for the md device. The md device can be assembled
+only on the cluster which matches the name specified. If this option is not
+provided, mdadm tries to detect the cluster name automatically.
+
.SH For create, build, or grow:
.TP
@@ -694,7 +707,12 @@ and so is replicated on all devices. If the word
.B "none"
is given with
.B \-\-grow
-mode, then any bitmap that is present is removed.
+mode, then any bitmap that is present is removed. If the word
+.B "clustered"
+is given, the array is created for a clustered environment. One bitmap
+is created for each node as defined by the
+.B \-\-nodes
+parameter and are stored internally.
To help catch typing errors, the filename must contain at least one
slash ('/') if it is a real file (not 'internal' or 'none').
@@ -966,6 +984,18 @@ However for RAID0, it is not possible to add spares. So to increase
the number of devices in a RAID0, it is necessary to set the new
number of devices, and to add the new devices, in the same command.
+.TP
+.BR \-\-nodes
+Only works when the array is for clustered environment. It specifies
+the maximum number of nodes in the cluster that will use this device
+simultaneously. If not specified, this defaults to 4.
+
+.TP
+.BR \-\-write-journal
+Specify journal device for the RAID-4/5/6 array. The journal device
+should be a SSD with reasonable lifetime.
+
+
.SH For assemble:
.TP
@@ -1080,7 +1110,9 @@ argument given to this flag can be one of
.BR summaries ,
.BR uuid ,
.BR name ,
+.BR nodes ,
.BR homehost ,
+.BR home-cluster ,
.BR resync ,
.BR byteorder ,
.BR devicesize ,
@@ -1135,6 +1167,13 @@ of the array as stored in the superblock. This is only supported for
version-1 superblocks.
The
+.B nodes
+option will change the
+.I nodes
+of the array as stored in the bitmap superblock. This option only
+works for a clustered environment.
+
+The
.B homehost
option will change the
.I homehost
@@ -1143,6 +1182,11 @@ same as updating the UUID.
For version-1 superblocks, this involves updating the name.
The
+.B home\-cluster
+option will change the cluster name as recorded in the superblock and
+bitmap. This option only works for clustered environment.
+
+The
.B resync
option will cause the array to be marked
.I dirty
@@ -1389,6 +1433,15 @@ will avoid reading from these devices if possible.
.BR \-\-readwrite
Subsequent devices that are added or re\-added will have the 'write-mostly'
flag cleared.
+.TP
+.BR \-\-cluster\-confirm
+Confirm the existence of the device. This is issued in response to an \-\-add
+request by a node in a cluster. When a node adds a device it sends a message
+to all nodes in the cluster to look for a device with a UUID. This translates
+to a udev notification with the UUID of the device to be added and the slot
+number. The receiving node must acknowledge this message
+with \-\-cluster\-confirm. Valid arguments are <slot>:<devicename> in case
+the device is found or <slot>:missing in case the device is not found.
.P
Each of these options requires that the first device listed is the array
@@ -1796,9 +1849,9 @@ The config file is only used if explicitly named with
or requested with (a possibly implicit)
.BR \-\-scan .
In the later case,
-.B /etc/mdadm.conf
-or
.B /etc/mdadm/mdadm.conf
+or
+.B /etc/mdadm.conf
is used.
If
@@ -2196,11 +2249,11 @@ option. Currently only
.B name
is supported.
-The
+The
.B name
option updates the subarray name in the metadata, it may not affect the
device node name or the device node symlink until the subarray is
-re\-assembled. If updating
+re\-assembled. If updating
.B name
would change the UUID of an active subarray this operation is blocked,
and the command will end in an error.
@@ -3092,7 +3145,7 @@ uses this to find arrays when
is given in Misc mode, and to monitor array reconstruction
on Monitor mode.
-.SS /etc/mdadm.conf
+.SS /etc/mdadm/mdadm.conf (or /etc/mdadm.conf)
The config file lists which devices may be scanned to see if
they contain MD super block, and gives identifying information
@@ -3100,7 +3153,7 @@ they contain MD super block, and gives identifying information
.BR mdadm.conf (5)
for more details.
-.SS /etc/mdadm.conf.d
+.SS /etc/mdadm/mdadm.conf.d (or /etc/mdadm.conf.d)
A directory containing configuration files which are read in lexical
order.
diff --git a/mdadm.c b/mdadm.c
index be990b8a..51e16f3f 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -38,6 +38,7 @@ static int misc_list(struct mddev_dev *devlist,
struct mddev_ident *ident,
char *dump_directory,
struct supertype *ss, struct context *c);
+const char Name[] = "mdadm";
int main(int argc, char *argv[])
{
@@ -73,6 +74,7 @@ int main(int argc, char *argv[])
.require_homehost = 1,
};
struct shape s = {
+ .journaldisks = 0,
.level = UnSet,
.layout = UnSet,
.bitmap_chunk = UnSet,
@@ -188,6 +190,7 @@ int main(int argc, char *argv[])
case 'a':
case Add:
case AddSpare:
+ case AddJournal:
case 'r':
case Remove:
case Replace:
@@ -195,6 +198,7 @@ int main(int argc, char *argv[])
case 'f':
case Fail:
case ReAdd: /* re-add */
+ case ClusterConfirm:
if (!mode) {
newmode = MANAGE;
shortopt = short_bitmap_options;
@@ -336,13 +340,11 @@ int main(int argc, char *argv[])
}
if (devs_found > 0 && mode == MANAGE && !devmode) {
- pr_err("Must give one of -a/-r/-f"
- " for subsequent devices at %s\n", optarg);
+ pr_err("Must give one of -a/-r/-f for subsequent devices at %s\n", optarg);
exit(2);
}
if (devs_found > 0 && mode == GROW && !devmode) {
- pr_err("Must give -a/--add for"
- " devices to add: %s\n", optarg);
+ pr_err("Must give -a/--add for devices to add: %s\n", optarg);
exit(2);
}
dv = xmalloc(sizeof(*dv));
@@ -369,8 +371,7 @@ int main(int argc, char *argv[])
case O(BUILD,'c'): /* chunk or rounding */
case O(BUILD,ChunkSize): /* chunk or rounding */
if (s.chunk) {
- pr_err("chunk/rounding may only be specified once. "
- "Second value is %s.\n", optarg);
+ pr_err("chunk/rounding may only be specified once. Second value is %s.\n", optarg);
exit(2);
}
s.chunk = parse_size(optarg);
@@ -420,8 +421,7 @@ int main(int argc, char *argv[])
case O(CREATE,'z'):
case O(BUILD,'z'): /* size */
if (s.size > 0) {
- pr_err("size may only be specified once. "
- "Second value is %s.\n", optarg);
+ pr_err("size may only be specified once. Second value is %s.\n", optarg);
exit(2);
}
if (strcmp(optarg, "max")==0)
@@ -441,8 +441,7 @@ int main(int argc, char *argv[])
case O(GROW,'Z'): /* array size */
if (array_size > 0) {
- pr_err("array-size may only be specified once. "
- "Second value is %s.\n", optarg);
+ pr_err("array-size may only be specified once. Second value is %s.\n", optarg);
exit(2);
}
if (strcmp(optarg, "max") == 0)
@@ -461,8 +460,7 @@ int main(int argc, char *argv[])
case O(CREATE,DataOffset):
case O(GROW,DataOffset):
if (data_offset != INVALID_SECTORS) {
- pr_err("data-offset may only be specified one. "
- "Second value is %s.\n", optarg);
+ pr_err("data-offset may only be specified one. Second value is %s.\n", optarg);
exit(2);
}
if (mode == CREATE &&
@@ -481,8 +479,7 @@ int main(int argc, char *argv[])
case O(CREATE,'l'):
case O(BUILD,'l'): /* set raid level*/
if (s.level != UnSet) {
- pr_err("raid level may only be set once. "
- "Second value is %s.\n", optarg);
+ pr_err("raid level may only be set once. Second value is %s.\n", optarg);
exit(2);
}
s.level = map_name(pers, optarg);
@@ -510,8 +507,7 @@ int main(int argc, char *argv[])
case O(GROW, 'p'): /* new layout */
case O(GROW, Layout):
if (s.layout_str) {
- pr_err("layout may only be sent once. "
- "Second value was %s\n", optarg);
+ pr_err("layout may only be sent once. Second value was %s\n", optarg);
exit(2);
}
s.layout_str = optarg;
@@ -523,8 +519,7 @@ int main(int argc, char *argv[])
case O(BUILD,'p'): /* faulty layout */
case O(BUILD,Layout):
if (s.layout != UnSet) {
- pr_err("layout may only be sent once. "
- "Second value was %s\n", optarg);
+ pr_err("layout may only be sent once. Second value was %s\n", optarg);
exit(2);
}
switch(s.level) {
@@ -596,7 +591,23 @@ int main(int argc, char *argv[])
}
ident.raid_disks = s.raiddisks;
continue;
-
+ case O(ASSEMBLE, Nodes):
+ case O(CREATE, Nodes):
+ c.nodes = parse_num(optarg);
+ if (c.nodes <= 0) {
+ pr_err("invalid number for the number of cluster nodes: %s\n",
+ optarg);
+ exit(2);
+ }
+ continue;
+ case O(CREATE, ClusterName):
+ case O(ASSEMBLE, ClusterName):
+ c.homecluster = optarg;
+ if (strlen(c.homecluster) > 64) {
+ pr_err("Cluster name too big.\n");
+ exit(ERANGE);
+ }
+ continue;
case O(CREATE,'x'): /* number of spare (eXtra) disks */
if (s.sparedisks) {
pr_err("spare-devices set twice: %d and %s\n",
@@ -655,8 +666,7 @@ int main(int argc, char *argv[])
case O(CREATE,'u'): /* uuid of array */
case O(ASSEMBLE,'u'): /* uuid of array */
if (ident.uuid_set) {
- pr_err("uuid cannot be set twice. "
- "Second value %s.\n", optarg);
+ pr_err("uuid cannot be set twice. Second value %s.\n", optarg);
exit(2);
}
if (parse_uuid(optarg, ident.uuid))
@@ -671,8 +681,7 @@ int main(int argc, char *argv[])
case O(ASSEMBLE,'N'):
case O(MISC,'N'):
if (ident.name[0]) {
- pr_err("name cannot be set twice. "
- "Second value %s.\n", optarg);
+ pr_err("name cannot be set twice. Second value %s.\n", optarg);
exit(2);
}
if (mode == MISC && !c.subarray) {
@@ -690,8 +699,7 @@ int main(int argc, char *argv[])
case O(ASSEMBLE,'m'): /* super-minor for array */
case O(ASSEMBLE,SuperMinor):
if (ident.super_minor != UnSet) {
- pr_err("super-minor cannot be set twice. "
- "Second value: %s.\n", optarg);
+ pr_err("super-minor cannot be set twice. Second value: %s.\n", optarg);
exit(2);
}
if (strcmp(optarg, "dev")==0)
@@ -714,14 +722,12 @@ int main(int argc, char *argv[])
case O(ASSEMBLE,'U'): /* update the superblock */
case O(MISC,'U'):
if (c.update) {
- pr_err("Can only update one aspect"
- " of superblock, both %s and %s given.\n",
+ pr_err("Can only update one aspect of superblock, both %s and %s given.\n",
c.update, optarg);
exit(2);
}
if (mode == MISC && !c.subarray) {
- pr_err("Only subarrays can be"
- " updated in misc mode\n");
+ pr_err("Only subarrays can be updated in misc mode\n");
exit(2);
}
c.update = optarg;
@@ -739,6 +745,10 @@ int main(int argc, char *argv[])
continue;
if (strcmp(c.update, "homehost")==0)
continue;
+ if (strcmp(c.update, "home-cluster")==0)
+ continue;
+ if (strcmp(c.update, "nodes")==0)
+ continue;
if (strcmp(c.update, "devicesize")==0)
continue;
if (strcmp(c.update, "no-bitmap")==0)
@@ -747,22 +757,22 @@ int main(int argc, char *argv[])
continue;
if (strcmp(c.update, "no-bbl") == 0)
continue;
+ if (strcmp(c.update, "force-no-bbl") == 0)
+ continue;
if (strcmp(c.update, "metadata") == 0)
continue;
if (strcmp(c.update, "revert-reshape") == 0)
continue;
if (strcmp(c.update, "byteorder")==0) {
if (ss) {
- pr_err("must not set metadata"
- " type with --update=byteorder.\n");
+ pr_err("must not set metadata type with --update=byteorder.\n");
exit(2);
}
for(i=0; !ss && superlist[i]; i++)
ss = superlist[i]->match_metadata_desc(
"0.swap");
if (!ss) {
- pr_err("INTERNAL ERROR"
- " cannot find 0.swap\n");
+ pr_err("INTERNAL ERROR cannot find 0.swap\n");
exit(2);
}
@@ -771,38 +781,38 @@ int main(int argc, char *argv[])
if (strcmp(c.update,"?") == 0 ||
strcmp(c.update, "help") == 0) {
outf = stdout;
- fprintf(outf, Name ": ");
+ fprintf(outf, "%s: ", Name);
} else {
outf = stderr;
fprintf(outf,
- Name ": '--update=%s' is invalid. ",
- c.update);
+ "%s: '--update=%s' is invalid. ",
+ Name, c.update);
}
fprintf(outf, "Valid --update options are:\n"
- " 'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',\n"
- " 'summaries', 'homehost', 'byteorder', 'devicesize',\n"
- " 'no-bitmap', 'metadata', 'revert-reshape'\n");
+ " 'sparc2.2', 'super-minor', 'uuid', 'name', 'nodes', 'resync',\n"
+ " 'summaries', 'homehost', 'home-cluster', 'byteorder', 'devicesize',\n"
+ " 'no-bitmap', 'metadata', 'revert-reshape'\n"
+ " 'bbl', 'no-bbl', 'force-no-bbl'\n"
+ );
exit(outf == stdout ? 0 : 2);
case O(MANAGE,'U'):
/* update=devicesize is allowed with --re-add */
if (devmode != 'A') {
- pr_err("--update in Manage mode only"
- " allowed with --re-add.\n");
+ pr_err("--update in Manage mode only allowed with --re-add.\n");
exit(1);
}
if (c.update) {
- pr_err("Can only update one aspect"
- " of superblock, both %s and %s given.\n",
+ pr_err("Can only update one aspect of superblock, both %s and %s given.\n",
c.update, optarg);
exit(2);
}
c.update = optarg;
if (strcmp(c.update, "devicesize") != 0 &&
strcmp(c.update, "bbl") != 0 &&
+ strcmp(c.update, "force-no-bbl") != 0 &&
strcmp(c.update, "no-bbl") != 0) {
- pr_err("only 'devicesize', 'bbl' and 'no-bbl' can be"
- " updated with --re-add\n");
+ pr_err("only 'devicesize', 'bbl', 'no-bbl', and 'force-no-bbl' can be updated with --re-add\n");
exit(2);
}
continue;
@@ -824,8 +834,7 @@ int main(int argc, char *argv[])
case O(MONITOR,ConfigFile):
case O(CREATE,ConfigFile):
if (configfile) {
- pr_err("configfile cannot be set twice. "
- "Second value is %s.\n", optarg);
+ pr_err("configfile cannot be set twice. Second value is %s.\n", optarg);
exit(2);
}
configfile = optarg;
@@ -920,6 +929,13 @@ int main(int argc, char *argv[])
case O(MANAGE,AddSpare): /* add drive - never re-add */
devmode = 'S';
continue;
+ case O(MANAGE,AddJournal): /* add journal */
+ if (s.journaldisks && (s.level < 4 || s.level > 6)) {
+ pr_err("--add-journal is only supported for RAID level 4/5/6.\n");
+ exit(2);
+ }
+ devmode = 'j';
+ continue;
case O(MANAGE,ReAdd):
devmode = 'A';
continue;
@@ -936,6 +952,9 @@ int main(int argc, char *argv[])
* remove the device */
devmode = 'f';
continue;
+ case O(MANAGE, ClusterConfirm):
+ devmode = 'c';
+ continue;
case O(MANAGE,Replace):
/* Mark these devices for replacement */
devmode = 'R';
@@ -991,8 +1010,7 @@ int main(int argc, char *argv[])
case O(MISC ,Action):
if (opt == KillSubarray || opt == UpdateSubarray) {
if (c.subarray) {
- pr_err("subarray can only"
- " be specified once\n");
+ pr_err("subarray can only be specified once\n");
exit(2);
}
c.subarray = optarg;
@@ -1039,12 +1057,10 @@ int main(int argc, char *argv[])
continue;
case O(MISC, UdevRules):
if (devmode && devmode != opt) {
- pr_err("--udev-rules must"
- " be the only option.\n");
+ pr_err("--udev-rules must be the only option.\n");
} else {
if (udev_filename)
- pr_err("only specify one udev "
- "rule filename. %s ignored.\n",
+ pr_err("only specify one udev rule filename. %s ignored.\n",
optarg);
else
udev_filename = optarg;
@@ -1117,6 +1133,15 @@ int main(int argc, char *argv[])
s.bitmap_file = optarg;
continue;
}
+ if (strcmp(optarg, "clustered")== 0) {
+ s.bitmap_file = optarg;
+ /* Set the default number of cluster nodes
+ * to 4 if not already set by user
+ */
+ if (c.nodes < 1)
+ c.nodes = 4;
+ continue;
+ }
/* probable typo */
pr_err("bitmap file must contain a '/', or be 'internal', or 'none'\n"
" not '%s'\n", optarg);
@@ -1157,6 +1182,23 @@ int main(int argc, char *argv[])
case O(INCREMENTAL, IncrementalPath):
remove_path = optarg;
continue;
+ case O(CREATE, WriteJournal):
+ if (s.journaldisks) {
+ pr_err("Please specify only one journal device for the array.\n");
+ pr_err("Ignoring --write-journal %s...\n", optarg);
+ continue;
+ }
+ dv = xmalloc(sizeof(*dv));
+ dv->devname = optarg;
+ dv->disposition = 'j'; /* WriteJournal */
+ dv->used = 0;
+ dv->next = NULL;
+ *devlistend = dv;
+ devlistend = &dv->next;
+ devs_found++;
+
+ s.journaldisks = 1;
+ continue;
}
/* We have now processed all the valid options. Anything else is
* an error
@@ -1184,6 +1226,11 @@ int main(int argc, char *argv[])
exit(0);
}
+ if (s.journaldisks && (s.level < 4 || s.level > 6)) {
+ pr_err("--write-journal is only supported for RAID level 4/5/6.\n");
+ exit(2);
+ }
+
if (!mode && devs_found) {
mode = MISC;
devmode = 'Q';
@@ -1236,15 +1283,13 @@ int main(int argc, char *argv[])
/* non-existent device is OK */
mdfd = open_mddev(devlist->devname, 0);
if (mdfd == -2) {
- pr_err("device %s exists but is not an "
- "md array.\n", devlist->devname);
+ pr_err("device %s exists but is not an md array.\n", devlist->devname);
exit(1);
}
if ((int)ident.super_minor == -2) {
struct stat stb;
if (mdfd < 0) {
- pr_err("--super-minor=dev given, and "
- "listed device %s doesn't exist.\n",
+ pr_err("--super-minor=dev given, and listed device %s doesn't exist.\n",
devlist->devname);
exit(1);
}
@@ -1269,7 +1314,7 @@ int main(int argc, char *argv[])
}
}
- if (c.homehost == NULL)
+ if (c.homehost == NULL && c.require_homehost)
c.homehost = conf_get_homehost(&c.require_homehost);
if (c.homehost == NULL || strcasecmp(c.homehost, "<system>")==0) {
if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0) {
@@ -1282,6 +1327,20 @@ int main(int argc, char *argv[])
c.require_homehost = 0;
}
+ rv = 0;
+
+ set_hooks(); /* set hooks from libs */
+
+ if (c.homecluster == NULL && (c.nodes > 0)) {
+ c.homecluster = conf_get_homecluster();
+ if (c.homecluster == NULL)
+ rv = get_cluster_name(&c.homecluster);
+ if (rv) {
+ pr_err("The md can't get cluster name\n");
+ exit(1);
+ }
+ }
+
if (c.backup_file && data_offset != INVALID_SECTORS) {
pr_err("--backup-file and --data-offset are incompatible\n");
exit(2);
@@ -1301,7 +1360,6 @@ int main(int argc, char *argv[])
/* --scan implied --brief unless -vv */
c.brief = 1;
- rv = 0;
switch(mode) {
case MANAGE:
/* readonly, add/remove, readwrite, runstop */
@@ -1388,8 +1446,9 @@ int main(int argc, char *argv[])
}
if (s.bitmap_file) {
- if (strcmp(s.bitmap_file, "internal")==0) {
- pr_err("'internal' bitmaps not supported with --build\n");
+ if (strcmp(s.bitmap_file, "internal")==0 ||
+ strcmp(s.bitmap_file, "clustered") == 0) {
+ pr_err("'internal' and 'clustered' bitmaps not supported with --build\n");
rv |= 1;
break;
}
@@ -1399,6 +1458,21 @@ int main(int argc, char *argv[])
case CREATE:
if (c.delay == 0)
c.delay = DEFAULT_BITMAP_DELAY;
+
+ if (c.nodes) {
+ if (!s.bitmap_file || strcmp(s.bitmap_file, "clustered") != 0) {
+ pr_err("--nodes argument only compatible with --bitmap=clustered\n");
+ rv = 1;
+ break;
+ }
+
+ if (s.level != 1) {
+ pr_err("--bitmap=clustered is currently supported with RAID mirror only\n");
+ rv = 1;
+ break;
+ }
+ }
+
if (s.write_behind && !s.bitmap_file) {
pr_err("write-behind mode requires a bitmap.\n");
rv = 1;
@@ -1464,8 +1538,6 @@ int main(int argc, char *argv[])
else
c.delay = 60;
}
- if (c.delay == 0)
- c.delay = 60;
rv= Monitor(devlist, mailaddr, program,
&c, daemonise, oneshot,
dosyslog, pidfile, increments,
@@ -1482,8 +1554,7 @@ int main(int argc, char *argv[])
struct mdinfo sra;
int err;
if (s.raiddisks || s.level != UnSet) {
- pr_err("cannot change array size in same operation "
- "as changing raiddisks or level.\n"
+ pr_err("cannot change array size in same operation as changing raiddisks or level.\n"
" Change size first, then check that data is still intact.\n");
rv = 1;
break;
@@ -1495,11 +1566,9 @@ int main(int argc, char *argv[])
err = sysfs_set_num(&sra, NULL, "array_size", array_size / 2);
if (err < 0) {
if (errno == E2BIG)
- pr_err("--array-size setting"
- " is too large.\n");
+ pr_err("--array-size setting is too large.\n");
else
- pr_err("current kernel does"
- " not support setting --array-size\n");
+ pr_err("current kernel does not support setting --array-size\n");
rv = 1;
break;
}
@@ -1507,8 +1576,7 @@ int main(int argc, char *argv[])
if (devs_found > 1 && s.raiddisks == 0 && s.level == UnSet) {
/* must be '-a'. */
if (s.size > 0 || s.chunk || s.layout_str != NULL || s.bitmap_file) {
- pr_err("--add cannot be used with "
- "other geometry changes in --grow mode\n");
+ pr_err("--add cannot be used with other geometry changes in --grow mode\n");
rv = 1;
break;
}
@@ -1521,9 +1589,7 @@ int main(int argc, char *argv[])
} else if (s.bitmap_file) {
if (s.size > 0 || s.raiddisks || s.chunk ||
s.layout_str != NULL || devs_found > 1) {
- pr_err("--bitmap changes cannot be "
- "used with other geometry changes "
- "in --grow mode\n");
+ pr_err("--bitmap changes cannot be used with other geometry changes in --grow mode\n");
rv = 1;
break;
}
@@ -1600,8 +1666,7 @@ static int scan_assemble(struct supertype *ss,
int failures, successes;
if (conf_verify_devnames(array_list)) {
- pr_err("Duplicate MD device names in "
- "conf file were found.\n");
+ pr_err("Duplicate MD device names in conf file were found.\n");
return 1;
}
if (devlist == NULL) {
@@ -1614,9 +1679,7 @@ static int scan_assemble(struct supertype *ss,
a->autof = c->autof;
}
if (map_lock(&map))
- pr_err("%s: failed to get "
- "exclusive lock on mapfile\n",
- __func__);
+ pr_err("failed to get exclusive lock on mapfile\n");
do {
failures = 0;
successes = 0;
@@ -1706,7 +1769,7 @@ static int misc_scan(char devmode, struct context *c)
if (!name) {
pr_err("cannot find device file for %s\n",
- e->dev);
+ e->devnm);
continue;
}
if (devmode == 'D')
@@ -1741,7 +1804,7 @@ static int stop_scan(int verbose)
if (!name) {
pr_err("cannot find device file for %s\n",
- e->dev);
+ e->devnm);
continue;
}
mdfd = open_mddev(name, 1);
diff --git a/mdadm.conf-example b/mdadm.conf-example
index d9d8d396..35a75d12 100644
--- a/mdadm.conf-example
+++ b/mdadm.conf-example
@@ -15,9 +15,9 @@
# ARRAY lines specify information about how to identify arrays so
# so that they can be activated
#
-# You can have more than one device line and use wild cards. The first
+# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
-# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
+# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE /dev/sd[bcdjkl]1
diff --git a/mdadm.conf.5 b/mdadm.conf.5
index 18512cb0..542e2635 100644
--- a/mdadm.conf.5
+++ b/mdadm.conf.5
@@ -8,7 +8,7 @@
.SH NAME
mdadm.conf \- configuration for management of Software RAID with mdadm
.SH SYNOPSIS
-/etc/mdadm.conf
+/etc/mdadm/mdadm.conf
.SH DESCRIPTION
.PP
.I mdadm
diff --git a/mdadm.h b/mdadm.h
index fc1fd318..dd02be71 100644..100755
--- a/mdadm.h
+++ b/mdadm.h
@@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#include <sys/types.h>
#include <sys/stat.h>
+#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
@@ -51,6 +52,32 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#define srandom srand
#endif
+#ifdef NO_COROSYNC
+#define CS_OK 1
+typedef uint64_t cmap_handle_t;
+#else
+#include <corosync/cmap.h>
+#endif
+
+#ifndef NO_DLM
+#include <libdlm.h>
+#include <errno.h>
+#else
+#define LKF_NOQUEUE 0x00000001
+#define LKF_CONVERT 0x00000004
+#define LKM_PWMODE 4
+#define EUNLOCK 0x10002
+
+typedef void *dlm_lshandle_t;
+
+struct dlm_lksb {
+ int sb_status;
+ uint32_t sb_lkid;
+ char sb_flags;
+ char *sb_lvbptr;
+};
+#endif
+
#include <linux/kdev_t.h>
/*#include <linux/fs.h> */
#include <sys/mount.h>
@@ -162,6 +189,31 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#endif /* __KLIBC__ */
/*
+ * Check at compile time that something is of a particular type.
+ * Always evaluates to 1 so you may use it easily in comparisons.
+*/
+
+#define typecheck(type,x) \
+({ type __dummy; \
+ typeof(x) __dummy2; \
+ (void)(&__dummy == &__dummy2); \
+ 1; \
+})
+
+/*
+ * These inlines deal with timer wrapping correctly.
+ *
+ * time_after(a,b) returns true if the time a is after time b.
+*/
+
+#define time_after(a,b) \
+ (typecheck(unsigned int, a) && \
+ typecheck(unsigned int, b) && \
+ ((int)((b) - (a)) < 0))
+
+#define time_before(a,b) time_after(b,a)
+
+/*
* min()/max()/clamp() macros that also do
* strict type-checking.. See the
* "unnecessary" pointer comparison.
@@ -180,6 +232,8 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+extern const char Name[];
+
/* general information that might be extracted from a superblock */
struct mdinfo {
mdu_array_info_t array;
@@ -208,6 +262,9 @@ struct mdinfo {
* for native metadata it is
* reshape_active field mirror
*/
+ int journal_device_required;
+ int journal_clean;
+
/* During reshape we can sometimes change the data_offset to avoid
* over-writing still-valid data. We need to know if there is space.
* So getinfo_super will fill in space_before and space_after in sectors.
@@ -249,6 +306,8 @@ struct mdinfo {
#define DS_UNBLOCK 2048
int prev_state, curr_state, next_state;
+ /* info read from sysfs */
+ char sysfs_array_state[20];
};
struct createinfo {
@@ -262,8 +321,6 @@ struct createinfo {
struct supertype *supertype;
};
-#define Name "mdadm"
-
enum mode {
ASSEMBLE=1,
BUILD,
@@ -313,6 +370,7 @@ enum special_options {
ManageOpt,
Add,
AddSpare,
+ AddJournal,
Remove,
Fail,
Replace,
@@ -344,6 +402,10 @@ enum special_options {
Dump,
Restore,
Action,
+ Nodes,
+ ClusterName,
+ ClusterConfirm,
+ WriteJournal,
};
enum prefix_standard {
@@ -351,6 +413,12 @@ enum prefix_standard {
IEC
};
+enum bitmap_update {
+ NoUpdate,
+ NameUpdate,
+ NodeNumUpdate,
+};
+
/* structures read from config file */
/* List of mddevice names and identifiers
* Identifiers can be:
@@ -418,11 +486,14 @@ struct context {
char *backup_file;
int invalid_backup;
char *action;
+ int nodes;
+ char *homecluster;
};
struct shape {
int raiddisks;
int sparedisks;
+ int journaldisks;
int level;
int layout;
char *layout_str;
@@ -453,7 +524,6 @@ typedef struct mapping {
} mapping_t;
struct mdstat_ent {
- char *dev;
char devnm[32];
int active;
char *level;
@@ -491,18 +561,8 @@ extern int map_update(struct map_ent **mpp, char *devnm, char *metadata,
int uuid[4], char *path);
extern void map_remove(struct map_ent **map, char *devnm);
extern struct map_ent *map_by_uuid(struct map_ent **map, int uuid[4]);
-#ifdef MDASSEMBLE
-static inline struct map_ent *map_by_devnm(struct map_ent **map, char *name)
-{
- return NULL;
-}
-static inline void map_free(struct map_ent *map)
-{
-}
-#else
extern struct map_ent *map_by_devnm(struct map_ent **map, char *devnm);
extern void map_free(struct map_ent *map);
-#endif
extern struct map_ent *map_by_name(struct map_ent **map, char *name);
extern void map_read(struct map_ent **melp);
extern int map_write(struct map_ent *mel);
@@ -532,6 +592,7 @@ enum sysfs_read_flags {
GET_SIZE = (1 << 22),
GET_STATE = (1 << 23),
GET_ERROR = (1 << 24),
+ GET_ARRAY_STATE = (1 << 25),
};
/* If fd >= 0, get the array it is open on,
@@ -539,6 +600,7 @@ enum sysfs_read_flags {
*/
extern int sysfs_open(char *devnm, char *devname, char *attr);
extern void sysfs_init(struct mdinfo *mdi, int fd, char *devnm);
+extern void sysfs_init_dev(struct mdinfo *mdi, unsigned long devid);
extern void sysfs_free(struct mdinfo *sra);
extern struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options);
extern int sysfs_attr_match(const char *attr, const char *str);
@@ -758,7 +820,8 @@ extern struct superswitch {
* readwrite - clear the WriteMostly1 bit in the superblock devflags
* no-bitmap - clear any record that a bitmap is present.
* bbl - add a bad-block-log if possible
- * no-bbl - remove and bad-block-log is it is empty.
+ * no-bbl - remove any bad-block-log is it is empty.
+ * force-no-bbl - remove any bad-block-log even if empty.
* revert-reshape - If a reshape is in progress, modify metadata so
* it will resume going in the opposite direction.
*/
@@ -841,11 +904,11 @@ extern struct superswitch {
/* Seek 'fd' to start of write-intent-bitmap. Must be an
* md-native format bitmap
*/
- void (*locate_bitmap)(struct supertype *st, int fd);
+ int (*locate_bitmap)(struct supertype *st, int fd);
/* if add_internal_bitmap succeeded for existing array, this
* writes it out.
*/
- int (*write_bitmap)(struct supertype *st, int fd);
+ int (*write_bitmap)(struct supertype *st, int fd, enum bitmap_update update);
/* Free the superblock and any other allocated data */
void (*free_super)(struct supertype *st);
@@ -1029,6 +1092,8 @@ struct supertype {
*/
int devcnt;
int retry_soon;
+ int nodes;
+ char *cluster_name;
struct mdinfo *devs;
@@ -1275,6 +1340,7 @@ extern int parse_uuid(char *str, int uuid[4]);
extern int parse_layout_10(char *layout);
extern int parse_layout_faulty(char *layout);
extern long parse_num(char *num);
+extern int parse_cluster_confirm_arg(char *inp, char **devname, int *slot);
extern int check_ext2(int fd, char *name);
extern int check_reiser(int fd, char *name);
extern int check_raid(int fd, char *name);
@@ -1305,6 +1371,7 @@ extern char *conf_get_mailaddr(void);
extern char *conf_get_mailfrom(void);
extern char *conf_get_program(void);
extern char *conf_get_homehost(int *require_homehostp);
+extern char *conf_get_homecluster(void);
extern char *conf_line(FILE *file);
extern char *conf_word(FILE *file, int allow_key);
extern void print_quoted(char *str);
@@ -1414,6 +1481,45 @@ extern char *fd2devnm(int fd);
extern int in_initrd(void);
+struct cmap_hooks {
+ void *cmap_handle; /* corosync lib related */
+
+ int (*initialize)(cmap_handle_t *handle);
+ int (*get_string)(cmap_handle_t handle,
+ const char *string,
+ char **name);
+ int (*finalize)(cmap_handle_t handle);
+};
+
+extern void set_cmap_hooks(void);
+extern void set_hooks(void);
+
+struct dlm_hooks {
+ void *dlm_handle; /* dlm lib related */
+
+ dlm_lshandle_t (*create_lockspace)(const char *name,
+ unsigned int mode);
+ int (*release_lockspace)(const char *name, dlm_lshandle_t ls,
+ int force);
+ int (*ls_lock)(dlm_lshandle_t lockspace, uint32_t mode,
+ struct dlm_lksb *lksb, uint32_t flags,
+ const void *name, unsigned int namelen,
+ uint32_t parent, void (*astaddr) (void *astarg),
+ void *astarg, void (*bastaddr) (void *astarg),
+ void *range);
+ int (*ls_unlock)(dlm_lshandle_t lockspace, uint32_t lkid,
+ uint32_t flags, struct dlm_lksb *lksb,
+ void *astarg);
+ int (*ls_get_fd)(dlm_lshandle_t ls);
+ int (*dispatch)(int fd);
+};
+
+extern int get_cluster_name(char **name);
+extern int dlm_funs_ready(void);
+extern int cluster_get_dlmlock(int *lockid);
+extern int cluster_release_dlmlock(int lockid);
+extern void set_dlm_hooks(void);
+
#define _ROUND_UP(val, base) (((val) + (base) - 1) & ~(base - 1))
#define ROUND_UP(val, base) _ROUND_UP(val, (typeof(val))(base))
#define ROUND_UP_PTR(ptr, base) ((typeof(ptr)) \
@@ -1440,9 +1546,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container)
#ifdef DEBUG
#define dprintf(fmt, arg...) \
+ fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##arg)
+#define dprintf_cont(fmt, arg...) \
fprintf(stderr, fmt, ##arg)
#else
#define dprintf(fmt, arg...) \
+ ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; })
+#define dprintf_cont(fmt, arg...) \
({ if (0) fprintf(stderr, fmt, ##arg); 0; })
#endif
#include <assert.h>
@@ -1457,7 +1567,11 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
return ret;
}
-#define pr_err(fmt ...) fprintf(stderr, Name ": " fmt)
+#ifdef DEBUG
+#define pr_err(fmt, args...) fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##args)
+#else
+#define pr_err(fmt, args...) fprintf(stderr, "%s: "fmt, Name, ##args)
+#endif
#define cont_err(fmt ...) fprintf(stderr, " " fmt)
void *xmalloc(size_t len);
diff --git a/mdadm.spec b/mdadm.spec
index 384a1d89..685a5642 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -1,6 +1,6 @@
Summary: mdadm is used for controlling Linux md devices (aka RAID arrays)
Name: mdadm
-Version: 3.3.2
+Version: 3.4
Release: 1
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.gz
URL: http://neil.brown.name/blog/mdadm
diff --git a/mdassemble.8 b/mdassemble.8
index ae6f6d45..6cb005c5 100644
--- a/mdassemble.8
+++ b/mdassemble.8
@@ -1,5 +1,5 @@
.\" -*- nroff -*-
-.TH MDASSEMBLE 8 "" v3.3.2
+.TH MDASSEMBLE 8 "" v3.4
.SH NAME
mdassemble \- assemble MD devices
.I aka
@@ -40,7 +40,7 @@ There are no options to
.SH FILES
-.SS /etc/mdadm.conf
+.SS /etc/mdadm/mdadm.conf
The config file lists which devices may be scanned to see if
they contain MD super block, and gives identifying information
@@ -53,7 +53,7 @@ supports all configuration parameters defined in
.B mdadm.conf
with the exception of
.B auto=
-which is supported only if mdadm was built with the
+which is supported only if mdadm was built with the
.B \-DMDASSEMBLE_AUTO
define.
diff --git a/mdassemble.c b/mdassemble.c
index 674be11f..78d363a3 100644
--- a/mdassemble.c
+++ b/mdassemble.c
@@ -26,6 +26,8 @@
#include "mdadm.h"
#include "md_p.h"
+char const Name[] = "mdassemble";
+
#ifndef MDASSEMBLE_AUTO
/* from mdopen.c */
int open_mddev(char *dev, int report_errors/*unused*/)
@@ -48,18 +50,6 @@ int create_mddev(char *dev, char *name, int autof/*unused*/, int trustworthy,
return open_mddev(dev, 0);
}
#endif
-int map_update(struct map_ent **mpp, char *devnm, char *metadata,
- int *uuid, char *path)
-{
- return 0;
-}
-struct map_ent *map_by_name(struct map_ent **mpp, char *name)
-{
- return NULL;
-}
-int map_lock(struct map_ent **melp){return 0;}
-void map_unlock(struct map_ent **melp){}
-struct map_ent *map_by_uuid(struct map_ent **map, int uuid[4]){return NULL;}
int rv;
int mdfd = -1;
diff --git a/mdmon.8 b/mdmon.8
index 4f9a439a..cc6add8f 100644
--- a/mdmon.8
+++ b/mdmon.8
@@ -1,5 +1,5 @@
.\" See file COPYING in distribution for details.
-.TH MDMON 8 "" v3.3.2
+.TH MDMON 8 "" v3.4
.SH NAME
mdmon \- monitor MD external metadata arrays
diff --git a/mdmon.c b/mdmon.c
index 27045a12..e4b73d96 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -67,6 +67,8 @@
#include "mdadm.h"
#include "mdmon.h"
+char const Name[] = "mdmon";
+
struct active_array *discard_this;
struct active_array *pending_discard;
@@ -233,7 +235,7 @@ static int make_control_sock(char *devname)
addr.sun_family = PF_LOCAL;
strcpy(addr.sun_path, path);
umask(077); /* ensure no world write access */
- if (bind(sfd, &addr, sizeof(addr)) < 0) {
+ if (bind(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
close(sfd);
return -1;
}
diff --git a/mdmon.h b/mdmon.h
index 5a8e1209..aa750c68 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -18,8 +18,7 @@
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#undef pr_err
-#define pr_err(fmt ...) fprintf(stderr, "mdmon: " fmt)
+extern const char Name[];
enum array_state { clear, inactive, suspended, readonly, read_auto,
clean, active, write_pending, active_idle, bad_word};
diff --git a/mdopen.c b/mdopen.c
index 2c9d7455..28410f46 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -173,8 +173,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
/* name *must* be mdXX or md_dXX in this context */
if (num < 0 ||
(strcmp(cname, "md") != 0 && strcmp(cname, "md_d") != 0)) {
- pr_err("%s is an invalid name "
- "for an md device. Try /dev/md/%s\n",
+ pr_err("%s is an invalid name for an md device. Try /dev/md/%s\n",
dev, dev+5);
return -1;
}
@@ -191,13 +190,11 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
* empty.
*/
if (strchr(cname, '/') != NULL) {
- pr_err("%s is an invalid name "
- "for an md device.\n", dev);
+ pr_err("%s is an invalid name for an md device.\n", dev);
return -1;
}
if (cname[0] == 0) {
- pr_err("%s is an invalid name "
- "for an md device (empty!).", dev);
+ pr_err("%s is an invalid name for an md device (empty!).", dev);
return -1;
}
if (num < 0) {
@@ -226,8 +223,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
if (name && name[0] == 0)
name = NULL;
if (name && trustworthy == METADATA && use_mdp == 1) {
- pr_err("%s is not allowed for a %s container. "
- "Consider /dev/md%d.\n", dev, name, num);
+ pr_err("%s is not allowed for a %s container. Consider /dev/md%d.\n", dev, name, num);
return -1;
}
if (name && trustworthy == METADATA)
@@ -432,8 +428,7 @@ int open_mddev(char *dev, int report_errors)
if (md_get_version(mdfd) <= 0) {
close(mdfd);
if (report_errors)
- pr_err("%s does not appear to be "
- "an md device\n", dev);
+ pr_err("%s does not appear to be an md device\n", dev);
return -2;
}
return mdfd;
diff --git a/mdstat.c b/mdstat.c
index 8b16d3e8..2972cdf6 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -114,7 +114,6 @@ void free_mdstat(struct mdstat_ent *ms)
{
while (ms) {
struct mdstat_ent *t;
- free(ms->dev);
free(ms->level);
free(ms->pattern);
free(ms->metadata_version);
@@ -169,7 +168,7 @@ struct mdstat_ent *mdstat_read(int hold, int start)
strcpy(devnm, line);
ent = xmalloc(sizeof(*ent));
- ent->dev = ent->level = ent->pattern= NULL;
+ ent->level = ent->pattern= NULL;
ent->next = NULL;
ent->percent = RESYNC_NONE;
ent->active = -1;
@@ -179,7 +178,6 @@ struct mdstat_ent *mdstat_read(int hold, int start)
ent->devcnt = 0;
ent->members = NULL;
- ent->dev = xstrdup(line);
strcpy(ent->devnm, devnm);
for (w=dl_next(line); w!= line ; w=dl_next(w)) {
diff --git a/misc/mdcheck b/misc/mdcheck
index 33570b97..2c8f54d6 100644
--- a/misc/mdcheck
+++ b/misc/mdcheck
@@ -77,6 +77,7 @@ find /var/lib/mdcheck -name "MD_UUID*" -type f -mtime +180 -exec rm {} \;
cnt=0
for dev in /dev/md?*
do
+ [ -e "$dev" ] || continue
sys=`sysname $dev`
if [ ! -f "$sys/md/sync_action" ]
then # cannot check this array
@@ -87,7 +88,7 @@ do
continue
fi
- mdadm --detail --export "$dev" > $tmp || continue
+ mdadm --detail --export "$dev" | grep '^MD_UUID=' > $tmp || continue
source $tmp
fl="/var/lib/mdcheck/MD_UUID_$MD_UUID"
if [ -z "$cont" ]
diff --git a/monitor.c b/monitor.c
index f81e7075..870cc1a7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -42,11 +42,11 @@ static void add_fd(fd_set *fds, int *maxfd, int fd)
if (fd < 0)
return;
if (fstat(fd, &st) == -1) {
- dprintf("%s: Invalid fd %d\n", __func__, fd);
+ dprintf("Invalid fd %d\n", fd);
return;
}
if (st.st_nlink == 0) {
- dprintf("%s: fd %d was deleted\n", __func__, fd);
+ dprintf("fd %d was deleted\n", fd);
return;
}
if (fd > *maxfd)
@@ -82,8 +82,7 @@ static void read_resync_start(int fd, unsigned long long *v)
n = read_attr(buf, 30, fd);
if (n <= 0) {
- dprintf("%s: Failed to read resync_start (%d)\n",
- __func__, fd);
+ dprintf("Failed to read resync_start (%d)\n", fd);
return;
}
if (strncmp(buf, "none", 4) == 0)
@@ -260,8 +259,8 @@ static int read_and_act(struct active_array *a)
}
gettimeofday(&tv, NULL);
- dprintf("%s(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
- __func__, a->info.container_member,
+ dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
+ a->info.container_member,
tv.tv_sec, tv.tv_usec,
array_states[a->curr_state],
array_states[a->prev_state],
@@ -422,21 +421,21 @@ static int read_and_act(struct active_array *a)
a->last_checkpoint = sync_completed;
a->container->ss->sync_metadata(a->container);
- dprintf("%s(%d): state:%s action:%s next(", __func__, a->info.container_member,
+ dprintf("(%d): state:%s action:%s next(", a->info.container_member,
array_states[a->curr_state], sync_actions[a->curr_action]);
/* Effect state changes in the array */
if (a->next_state != bad_word) {
- dprintf(" state:%s", array_states[a->next_state]);
+ dprintf_cont(" state:%s", array_states[a->next_state]);
write_attr(array_states[a->next_state], a->info.state_fd);
}
if (a->next_action != bad_action) {
write_attr(sync_actions[a->next_action], a->action_fd);
- dprintf(" action:%s", sync_actions[a->next_action]);
+ dprintf_cont(" action:%s", sync_actions[a->next_action]);
}
for (mdi = a->info.devs; mdi ; mdi = mdi->next) {
if (mdi->next_state & DS_UNBLOCK) {
- dprintf(" %d:-blocked", mdi->disk.raid_disk);
+ dprintf_cont(" %d:-blocked", mdi->disk.raid_disk);
write_attr("-blocked", mdi->state_fd);
}
@@ -449,7 +448,7 @@ static int read_and_act(struct active_array *a)
*/
remove_result = write_attr("remove", mdi->state_fd);
if (remove_result > 0) {
- dprintf(" %d:removed", mdi->disk.raid_disk);
+ dprintf_cont(" %d:removed", mdi->disk.raid_disk);
close(mdi->state_fd);
close(mdi->recovery_fd);
mdi->state_fd = -1;
@@ -458,10 +457,10 @@ static int read_and_act(struct active_array *a)
}
if (mdi->next_state & DS_INSYNC) {
write_attr("+in_sync", mdi->state_fd);
- dprintf(" %d:+in_sync", mdi->disk.raid_disk);
+ dprintf_cont(" %d:+in_sync", mdi->disk.raid_disk);
}
}
- dprintf(" )\n");
+ dprintf_cont(" )\n");
/* move curr_ to prev_ */
a->prev_state = a->curr_state;
diff --git a/msg.c b/msg.c
index 2e64589b..45cd4504 100644
--- a/msg.c
+++ b/msg.c
@@ -170,7 +170,7 @@ int connect_monitor(char *devname)
addr.sun_family = PF_LOCAL;
strcpy(addr.sun_path, path);
- if (connect(sfd, &addr, sizeof(addr)) < 0) {
+ if (connect(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
close(sfd);
return -1;
}
@@ -395,7 +395,7 @@ int block_monitor(char *container, const int freeze)
sysfs_free(sra);
sra = sysfs_read(-1, e2->devnm, GET_VERSION);
if (unblock_subarray(sra, freeze))
- pr_err("Failed to unfreeze %s\n", e2->dev);
+ pr_err("Failed to unfreeze %s\n", e2->devnm);
}
ping_monitor(container); /* cleared frozen */
@@ -431,7 +431,7 @@ void unblock_monitor(char *container, const int unfreeze)
if (sra->array.level > 0)
to_ping++;
if (unblock_subarray(sra, unfreeze))
- pr_err("Failed to unfreeze %s\n", e->dev);
+ pr_err("Failed to unfreeze %s\n", e->devnm);
}
if (to_ping)
ping_monitor(container);
diff --git a/platform-intel.c b/platform-intel.c
index f347382a..88818f34 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -33,8 +33,6 @@
static int devpath_to_ll(const char *dev_path, const char *entry,
unsigned long long *val);
-static __u16 devpath_to_vendor(const char *dev_path);
-
static void free_sys_dev(struct sys_dev **list)
{
while (*list) {
@@ -57,22 +55,34 @@ struct sys_dev *find_driver_devices(const char *bus, const char *driver)
struct dirent *de;
struct sys_dev *head = NULL;
struct sys_dev *list = NULL;
+ struct sys_dev *vmd = NULL;
enum sys_dev_type type;
unsigned long long dev_id;
+ unsigned long long class;
if (strcmp(driver, "isci") == 0)
type = SYS_DEV_SAS;
else if (strcmp(driver, "ahci") == 0)
type = SYS_DEV_SATA;
+ else if (strcmp(driver, "nvme") == 0) {
+ /* if looking for nvme devs, first look for vmd */
+ vmd = find_driver_devices("pci", "vmd");
+ type = SYS_DEV_NVME;
+ } else if (strcmp(driver, "vmd") == 0)
+ type = SYS_DEV_VMD;
else
type = SYS_DEV_UNKNOWN;
sprintf(path, "/sys/bus/%s/drivers/%s", bus, driver);
driver_dir = opendir(path);
- if (!driver_dir)
+ if (!driver_dir) {
+ if (vmd)
+ free_sys_dev(&vmd);
return NULL;
+ }
for (de = readdir(driver_dir); de; de = readdir(driver_dir)) {
int n;
+ int skip = 0;
/* is 'de' a device? check that the 'subsystem' link exists and
* that its target matches 'bus'
@@ -92,13 +102,27 @@ struct sys_dev *find_driver_devices(const char *bus, const char *driver)
sprintf(path, "/sys/bus/%s/drivers/%s/%s",
bus, driver, de->d_name);
- /* if it's not Intel device skip it. */
- if (devpath_to_vendor(path) != 0x8086)
+ /* if searching for nvme - skip vmd connected one */
+ if (type == SYS_DEV_NVME) {
+ struct sys_dev *dev;
+ char *rp = realpath(path, NULL);
+ for (dev = vmd; dev; dev = dev->next) {
+ if ((strncmp(dev->path, rp, strlen(dev->path)) == 0))
+ skip = 1;
+ }
+ free(rp);
+ }
+
+ /* if it's not Intel device or mark as VMD connected - skip it. */
+ if (devpath_to_vendor(path) != 0x8086 || skip == 1)
continue;
if (devpath_to_ll(path, "device", &dev_id) != 0)
continue;
+ if (devpath_to_ll(path, "class", &class) != 0)
+ continue;
+
/* start / add list entry */
if (!head) {
head = xmalloc(sizeof(*head));
@@ -114,27 +138,44 @@ struct sys_dev *find_driver_devices(const char *bus, const char *driver)
}
list->dev_id = (__u16) dev_id;
+ list->class = (__u32) class;
list->type = type;
+ /* Each VMD device (domain) adds separate PCI bus, it is better to
+ * store path as a path to that bus (easier further determination which
+ * NVMe dev is connected to this particular VMD domain).
+ */
+ if (type == SYS_DEV_VMD) {
+ sprintf(path, "/sys/bus/%s/drivers/%s/%s/domain/device",
+ bus, driver, de->d_name);
+ }
list->path = realpath(path, NULL);
list->next = NULL;
if ((list->pci_id = strrchr(list->path, '/')) != NULL)
list->pci_id++;
}
closedir(driver_dir);
+
+ if (vmd) {
+ if (list)
+ list->next = vmd;
+ else
+ head = vmd;
+ }
+
return head;
}
static struct sys_dev *intel_devices=NULL;
static time_t valid_time = 0;
-static enum sys_dev_type device_type_by_id(__u16 device_id)
+struct sys_dev *device_by_id(__u16 device_id)
{
struct sys_dev *iter;
- for(iter = intel_devices; iter != NULL; iter = iter->next)
+ for (iter = intel_devices; iter != NULL; iter = iter->next)
if (iter->dev_id == device_id)
- return iter->type;
- return SYS_DEV_UNKNOWN;
+ return iter;
+ return NULL;
}
static int devpath_to_ll(const char *dev_path, const char *entry, unsigned long long *val)
@@ -153,7 +194,7 @@ static int devpath_to_ll(const char *dev_path, const char *entry, unsigned long
return n;
}
-static __u16 devpath_to_vendor(const char *dev_path)
+__u16 devpath_to_vendor(const char *dev_path)
{
char path[strlen(dev_path) + strlen("/vendor") + 1];
char vendor[7];
@@ -179,7 +220,7 @@ static __u16 devpath_to_vendor(const char *dev_path)
struct sys_dev *find_intel_devices(void)
{
- struct sys_dev *ahci, *isci;
+ struct sys_dev *ahci, *isci, *nvme;
if (valid_time > time(0) - 10)
return intel_devices;
@@ -189,14 +230,25 @@ struct sys_dev *find_intel_devices(void)
isci = find_driver_devices("pci", "isci");
ahci = find_driver_devices("pci", "ahci");
+ /* Searching for NVMe will return list of NVMe and VMD controllers */
+ nvme = find_driver_devices("pci", "nvme");
- if (!ahci) {
+ if (!isci && !ahci) {
+ ahci = nvme;
+ } else if (!ahci) {
ahci = isci;
+ struct sys_dev *elem = ahci;
+ while (elem->next)
+ elem = elem->next;
+ elem->next = nvme;
} else {
struct sys_dev *elem = ahci;
while (elem->next)
elem = elem->next;
elem->next = isci;
+ while (elem->next)
+ elem = elem->next;
+ elem->next = nvme;
}
intel_devices = ahci;
valid_time = time(0);
@@ -209,16 +261,82 @@ struct pciExpDataStructFormat {
__u8 ver[4];
__u16 vendorID;
__u16 deviceID;
+ __u16 devListOffset;
+ __u16 pciDataStructLen;
+ __u8 pciDataStructRev;
} __attribute__ ((packed));
-static struct imsm_orom imsm_orom[SYS_DEV_MAX];
-static int populated_orom[SYS_DEV_MAX];
+struct orom_entry *orom_entries;
+
+const struct orom_entry *get_orom_entry_by_device_id(__u16 dev_id)
+{
+ struct orom_entry *entry;
+ struct devid_list *devid;
+
+ for (entry = orom_entries; entry; entry = entry->next) {
+ for (devid = entry->devid_list; devid; devid = devid->next) {
+ if (devid->devid == dev_id)
+ return entry;
+ }
+ }
+
+ return NULL;
+}
+
+const struct imsm_orom *get_orom_by_device_id(__u16 dev_id)
+{
+ const struct orom_entry *entry = get_orom_entry_by_device_id(dev_id);
+
+ if (entry)
+ return &entry->orom;
+
+ return NULL;
+}
+
+static struct orom_entry *add_orom(const struct imsm_orom *orom)
+{
+ struct orom_entry *list;
+ struct orom_entry *prev = NULL;
+
+ for (list = orom_entries; list; prev = list, list = list->next)
+ ;
+
+ list = xmalloc(sizeof(struct orom_entry));
+ list->orom = *orom;
+ list->devid_list = NULL;
+ list->next = NULL;
+
+ if (prev == NULL)
+ orom_entries = list;
+ else
+ prev->next = list;
+
+ return list;
+}
+
+static void add_orom_device_id(struct orom_entry *entry, __u16 dev_id)
+{
+ struct devid_list *list;
+ struct devid_list *prev = NULL;
+
+ for (list = entry->devid_list; list; prev = list, list = list->next) {
+ if (list->devid == dev_id)
+ return;
+ }
+ list = xmalloc(sizeof(struct devid_list));
+ list->devid = dev_id;
+ list->next = NULL;
+
+ if (prev == NULL)
+ entry->devid_list = list;
+ else
+ prev->next = list;
+}
static int scan(const void *start, const void *end, const void *data)
{
int offset;
- const struct imsm_orom *imsm_mem;
- int dev;
+ const struct imsm_orom *imsm_mem = NULL;
int len = (end - start);
struct pciExpDataStructFormat *ptr= (struct pciExpDataStructFormat *)data;
@@ -231,81 +349,84 @@ static int scan(const void *start, const void *end, const void *data)
(ulong) __le16_to_cpu(ptr->vendorID),
(ulong) __le16_to_cpu(ptr->deviceID));
- if (__le16_to_cpu(ptr->vendorID) == 0x8086) {
- /* serach attached intel devices by device id from OROM */
- dev = device_type_by_id(__le16_to_cpu(ptr->deviceID));
- if (dev == SYS_DEV_UNKNOWN)
- return 0;
- }
- else
+ if (__le16_to_cpu(ptr->vendorID) != 0x8086)
return 0;
for (offset = 0; offset < len; offset += 4) {
- imsm_mem = start + offset;
- if ((memcmp(imsm_mem->signature, "$VER", 4) == 0)) {
- imsm_orom[dev] = *imsm_mem;
- populated_orom[dev] = 1;
- return populated_orom[SYS_DEV_SATA] && populated_orom[SYS_DEV_SAS];
+ const void *mem = start + offset;
+
+ if ((memcmp(mem, IMSM_OROM_SIGNATURE, 4) == 0)) {
+ imsm_mem = mem;
+ break;
}
}
+
+ if (!imsm_mem)
+ return 0;
+
+ struct orom_entry *orom = add_orom(imsm_mem);
+
+ /* only PciDataStructure with revision 3 and above supports devices list. */
+ if (ptr->pciDataStructRev >= 3 && ptr->devListOffset) {
+ const __u16 *dev_list = (void *)ptr + ptr->devListOffset;
+ int i;
+
+ for (i = 0; dev_list[i] != 0; i++)
+ add_orom_device_id(orom, dev_list[i]);
+ } else {
+ add_orom_device_id(orom, __le16_to_cpu(ptr->deviceID));
+ }
+
return 0;
}
-const struct imsm_orom *imsm_platform_test(enum sys_dev_type hba_id, int *populated,
- struct imsm_orom *imsm_orom)
+const struct imsm_orom *imsm_platform_test(struct sys_dev *hba)
{
- memset(imsm_orom, 0, sizeof(*imsm_orom));
- imsm_orom->rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
- IMSM_OROM_RLC_RAID10 | IMSM_OROM_RLC_RAID5;
- imsm_orom->sss = IMSM_OROM_SSS_4kB | IMSM_OROM_SSS_8kB |
- IMSM_OROM_SSS_16kB | IMSM_OROM_SSS_32kB |
- IMSM_OROM_SSS_64kB | IMSM_OROM_SSS_128kB |
- IMSM_OROM_SSS_256kB | IMSM_OROM_SSS_512kB |
- IMSM_OROM_SSS_1MB | IMSM_OROM_SSS_2MB;
- imsm_orom->dpa = IMSM_OROM_DISKS_PER_ARRAY;
- imsm_orom->tds = IMSM_OROM_TOTAL_DISKS;
- imsm_orom->vpa = IMSM_OROM_VOLUMES_PER_ARRAY;
- imsm_orom->vphba = IMSM_OROM_VOLUMES_PER_HBA;
- imsm_orom->attr = imsm_orom->rlc | IMSM_OROM_ATTR_ChecksumVerify;
- *populated = 1;
+ struct imsm_orom orom = {
+ .signature = IMSM_OROM_SIGNATURE,
+ .rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
+ IMSM_OROM_RLC_RAID10 | IMSM_OROM_RLC_RAID5,
+ .sss = IMSM_OROM_SSS_4kB | IMSM_OROM_SSS_8kB |
+ IMSM_OROM_SSS_16kB | IMSM_OROM_SSS_32kB |
+ IMSM_OROM_SSS_64kB | IMSM_OROM_SSS_128kB |
+ IMSM_OROM_SSS_256kB | IMSM_OROM_SSS_512kB |
+ IMSM_OROM_SSS_1MB | IMSM_OROM_SSS_2MB,
+ .dpa = IMSM_OROM_DISKS_PER_ARRAY,
+ .tds = IMSM_OROM_TOTAL_DISKS,
+ .vpa = IMSM_OROM_VOLUMES_PER_ARRAY,
+ .vphba = IMSM_OROM_VOLUMES_PER_HBA
+ };
+ orom.attr = orom.rlc | IMSM_OROM_ATTR_ChecksumVerify;
if (check_env("IMSM_TEST_OROM_NORAID5")) {
- imsm_orom->rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
+ orom.rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
IMSM_OROM_RLC_RAID10;
}
- if (check_env("IMSM_TEST_AHCI_EFI_NORAID5") && (hba_id == SYS_DEV_SAS)) {
- imsm_orom->rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
+ if (check_env("IMSM_TEST_AHCI_EFI_NORAID5") && (hba->type == SYS_DEV_SAS)) {
+ orom.rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
IMSM_OROM_RLC_RAID10;
}
- if (check_env("IMSM_TEST_SCU_EFI_NORAID5") && (hba_id == SYS_DEV_SATA)) {
- imsm_orom->rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
+ if (check_env("IMSM_TEST_SCU_EFI_NORAID5") && (hba->type == SYS_DEV_SATA)) {
+ orom.rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
IMSM_OROM_RLC_RAID10;
}
- return imsm_orom;
+ struct orom_entry *ret = add_orom(&orom);
+
+ add_orom_device_id(ret, hba->dev_id);
+
+ return &ret->orom;
}
-static const struct imsm_orom *find_imsm_hba_orom(enum sys_dev_type hba_id)
+static const struct imsm_orom *find_imsm_hba_orom(struct sys_dev *hba)
{
unsigned long align;
- if (hba_id >= SYS_DEV_MAX)
- return NULL;
+ if (check_env("IMSM_TEST_OROM"))
+ return imsm_platform_test(hba);
- /* it's static data so we only need to read it once */
- if (populated_orom[hba_id]) {
- dprintf("OROM CAP: %p, pid: %d pop: %d\n",
- &imsm_orom[hba_id], (int) getpid(), populated_orom[hba_id]);
- return &imsm_orom[hba_id];
- }
- if (check_env("IMSM_TEST_OROM")) {
- dprintf("OROM CAP: %p, pid: %d pop: %d\n",
- &imsm_orom[hba_id], (int) getpid(), populated_orom[hba_id]);
- return imsm_platform_test(hba_id, &populated_orom[hba_id], &imsm_orom[hba_id]);
- }
/* return empty OROM capabilities in EFI test mode */
- if (check_env("IMSM_TEST_AHCI_EFI") ||
- check_env("IMSM_TEST_SCU_EFI"))
+ if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI"))
return NULL;
find_intel_devices();
@@ -325,9 +446,7 @@ static const struct imsm_orom *find_imsm_hba_orom(enum sys_dev_type hba_id)
scan_adapter_roms(scan);
probe_roms_exit();
- if (populated_orom[hba_id])
- return &imsm_orom[hba_id];
- return NULL;
+ return get_orom_by_device_id(hba->dev_id);
}
#define GUID_STR_MAX 37 /* according to GUID format:
@@ -341,23 +460,59 @@ static const struct imsm_orom *find_imsm_hba_orom(enum sys_dev_type hba_id)
(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
#define SYS_EFI_VAR_PATH "/sys/firmware/efi/vars"
+#define SYS_EFIVARS_PATH "/sys/firmware/efi/efivars"
#define SCU_PROP "RstScuV"
#define AHCI_PROP "RstSataV"
+#define AHCI_SSATA_PROP "RstsSatV"
+#define AHCI_CSATA_PROP "RstCSatV"
+#define VMD_PROP "RstUefiV"
#define VENDOR_GUID \
EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, 0x1a, 0x04, 0xc6)
-int populated_efi[SYS_DEV_MAX] = { 0, 0 };
+#define PCI_CLASS_RAID_CNTRL 0x010400
+
+static int read_efi_var(void *buffer, ssize_t buf_size, char *variable_name, struct efi_guid guid)
+{
+ char path[PATH_MAX];
+ char buf[GUID_STR_MAX];
+ int fd;
+ ssize_t n;
+
+ snprintf(path, PATH_MAX, "%s/%s-%s", SYS_EFIVARS_PATH, variable_name, guid_str(buf, guid));
+
+ fd = open(path, O_RDONLY);
+ if (fd < 0)
+ return 1;
-static struct imsm_orom imsm_efi[SYS_DEV_MAX];
+ /* read the variable attributes and ignore it */
+ n = read(fd, buf, sizeof(__u32));
+ if (n < 0) {
+ close(fd);
+ return 1;
+ }
-int read_efi_variable(void *buffer, ssize_t buf_size, char *variable_name, struct efi_guid guid)
+ /* read the variable data */
+ n = read(fd, buffer, buf_size);
+ close(fd);
+ if (n < buf_size)
+ return 1;
+
+ return 0;
+}
+
+static int read_efi_variable(void *buffer, ssize_t buf_size, char *variable_name, struct efi_guid guid)
{
char path[PATH_MAX];
char buf[GUID_STR_MAX];
int dfd;
ssize_t n, var_data_len;
+ /* Try to read the variable using the new efivarfs interface first.
+ * If that fails, fall back to the old sysfs-efivars interface. */
+ if (!read_efi_var(buffer, buf_size, variable_name, guid))
+ return 0;
+
snprintf(path, PATH_MAX, "%s/%s-%s/size", SYS_EFI_VAR_PATH, variable_name, guid_str(buf, guid));
dprintf("EFI VAR: path=%s\n", path);
@@ -395,55 +550,99 @@ int read_efi_variable(void *buffer, ssize_t buf_size, char *variable_name, struc
return 0;
}
-const struct imsm_orom *find_imsm_efi(enum sys_dev_type hba_id)
+const struct imsm_orom *find_imsm_efi(struct sys_dev *hba)
{
- if (hba_id >= SYS_DEV_MAX)
- return NULL;
+ struct imsm_orom orom;
+ struct orom_entry *ret;
+ int err;
- dprintf("EFI CAP: %p, pid: %d pop: %d\n",
- &imsm_efi[hba_id], (int) getpid(), populated_efi[hba_id]);
+ if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI"))
+ return imsm_platform_test(hba);
- /* it's static data so we only need to read it once */
- if (populated_efi[hba_id]) {
- dprintf("EFI CAP: %p, pid: %d pop: %d\n",
- &imsm_efi[hba_id], (int) getpid(), populated_efi[hba_id]);
- return &imsm_efi[hba_id];
- }
- if (check_env("IMSM_TEST_AHCI_EFI") ||
- check_env("IMSM_TEST_SCU_EFI")) {
- dprintf("OROM CAP: %p, pid: %d pop: %d\n",
- &imsm_efi[hba_id], (int) getpid(), populated_efi[hba_id]);
- return imsm_platform_test(hba_id, &populated_efi[hba_id], &imsm_efi[hba_id]);
- }
/* OROM test is set, return that there is no EFI capabilities */
if (check_env("IMSM_TEST_OROM"))
return NULL;
- if (read_efi_variable(&imsm_efi[hba_id], sizeof(imsm_efi[0]), hba_id == SYS_DEV_SAS ? SCU_PROP : AHCI_PROP, VENDOR_GUID)) {
- populated_efi[hba_id] = 0;
+ if (hba->type == SYS_DEV_SATA && hba->class != PCI_CLASS_RAID_CNTRL)
return NULL;
+
+ err = read_efi_variable(&orom, sizeof(orom), hba->type == SYS_DEV_SAS ? SCU_PROP : AHCI_PROP, VENDOR_GUID);
+
+ /* try to read variable for second AHCI controller */
+ if (err && hba->type == SYS_DEV_SATA)
+ err = read_efi_variable(&orom, sizeof(orom), AHCI_SSATA_PROP, VENDOR_GUID);
+
+ /* try to read variable for combined AHCI controllers */
+ if (err && hba->type == SYS_DEV_SATA) {
+ static struct orom_entry *csata;
+
+ err = read_efi_variable(&orom, sizeof(orom), AHCI_CSATA_PROP, VENDOR_GUID);
+ if (!err) {
+ if (!csata)
+ csata = add_orom(&orom);
+ add_orom_device_id(csata, hba->dev_id);
+ csata->type = hba->type;
+ return &csata->orom;
+ }
+ }
+
+ if (hba->type == SYS_DEV_VMD) {
+ err = read_efi_variable(&orom, sizeof(orom), VMD_PROP, VENDOR_GUID);
}
- populated_efi[hba_id] = 1;
- return &imsm_efi[hba_id];
+ if (err)
+ return NULL;
+
+ ret = add_orom(&orom);
+ add_orom_device_id(ret, hba->dev_id);
+ ret->type = hba->type;
+
+ return &ret->orom;
}
-/*
- * backward interface compatibility
- */
-const struct imsm_orom *find_imsm_orom(void)
+const struct imsm_orom *find_imsm_nvme(struct sys_dev *hba)
{
- return find_imsm_hba_orom(SYS_DEV_SATA);
+ static struct orom_entry *nvme_orom;
+
+ if (hba->type != SYS_DEV_NVME)
+ return NULL;
+
+ if (!nvme_orom) {
+ struct imsm_orom nvme_orom_compat = {
+ .signature = IMSM_NVME_OROM_COMPAT_SIGNATURE,
+ .rlc = IMSM_OROM_RLC_RAID0 | IMSM_OROM_RLC_RAID1 |
+ IMSM_OROM_RLC_RAID10 | IMSM_OROM_RLC_RAID5,
+ .sss = IMSM_OROM_SSS_4kB | IMSM_OROM_SSS_8kB |
+ IMSM_OROM_SSS_16kB | IMSM_OROM_SSS_32kB |
+ IMSM_OROM_SSS_64kB | IMSM_OROM_SSS_128kB,
+ .dpa = IMSM_OROM_DISKS_PER_ARRAY_NVME,
+ .tds = IMSM_OROM_TOTAL_DISKS_NVME,
+ .vpa = IMSM_OROM_VOLUMES_PER_ARRAY,
+ .vphba = IMSM_OROM_TOTAL_DISKS_NVME / 2 * IMSM_OROM_VOLUMES_PER_ARRAY,
+ .attr = IMSM_OROM_ATTR_2TB | IMSM_OROM_ATTR_2TB_DISK,
+ .driver_features = IMSM_OROM_CAPABILITIES_EnterpriseSystem
+ };
+ nvme_orom = add_orom(&nvme_orom_compat);
+ }
+ add_orom_device_id(nvme_orom, hba->dev_id);
+ nvme_orom->type = SYS_DEV_NVME;
+ return &nvme_orom->orom;
}
-const struct imsm_orom *find_imsm_capability(enum sys_dev_type hba_id)
+const struct imsm_orom *find_imsm_capability(struct sys_dev *hba)
{
- const struct imsm_orom *cap=NULL;
+ const struct imsm_orom *cap = get_orom_by_device_id(hba->dev_id);
- if ((cap = find_imsm_efi(hba_id)) != NULL)
+ if (cap)
return cap;
- if ((cap = find_imsm_hba_orom(hba_id)) != NULL)
+
+ if (hba->type == SYS_DEV_NVME)
+ return find_imsm_nvme(hba);
+ if ((cap = find_imsm_efi(hba)) != NULL)
+ return cap;
+ if ((cap = find_imsm_hba_orom(hba)) != NULL)
return cap;
+
return NULL;
}
@@ -511,3 +710,32 @@ int disk_attached_to_hba(int fd, const char *hba_path)
return rc;
}
+
+char *vmd_domain_to_controller(struct sys_dev *hba, char *buf)
+{
+ struct dirent *ent;
+ DIR *dir;
+ char path[PATH_MAX];
+
+ if (!hba)
+ return NULL;
+
+ if (hba->type != SYS_DEV_VMD)
+ return NULL;
+
+ dir = opendir("/sys/bus/pci/drivers/vmd");
+
+ for (ent = dir ? readdir(dir) : NULL; ent; ent = readdir(dir)) {
+ sprintf(path, "/sys/bus/pci/drivers/vmd/%s/domain/device",
+ ent->d_name);
+
+ if (!realpath(path, buf))
+ continue;
+
+ if (strncmp(buf, hba->path, strlen(buf)) == 0) {
+ sprintf(path, "/sys/bus/pci/drivers/vmd/%s", ent->d_name);
+ return realpath(path, buf);
+ }
+ }
+ return NULL;
+}
diff --git a/platform-intel.h b/platform-intel.h
index 8226be35..a8ae85f4 100644
--- a/platform-intel.h
+++ b/platform-intel.h
@@ -22,6 +22,8 @@
/* The IMSM Capability (IMSM AHCI and ISCU OROM/EFI variable) Version Table definition */
struct imsm_orom {
__u8 signature[4];
+ #define IMSM_OROM_SIGNATURE "$VER"
+ #define IMSM_NVME_OROM_COMPAT_SIGNATURE "$NVM"
__u8 table_ver_major; /* Currently 2 (can change with future revs) */
__u8 table_ver_minor; /* Currently 2 (can change with future revs) */
__u16 major_ver; /* Example: 8 as in 8.6.0.1020 */
@@ -59,12 +61,15 @@ struct imsm_orom {
#define IMSM_OROM_SSS_64MB (1 << 15)
__u16 dpa; /* Disks Per Array supported */
#define IMSM_OROM_DISKS_PER_ARRAY 6
+ #define IMSM_OROM_DISKS_PER_ARRAY_NVME 12
__u16 tds; /* Total Disks Supported */
#define IMSM_OROM_TOTAL_DISKS 6
+ #define IMSM_OROM_TOTAL_DISKS_NVME 12
__u8 vpa; /* # Volumes Per Array supported */
#define IMSM_OROM_VOLUMES_PER_ARRAY 2
__u8 vphba; /* # Volumes Per Host Bus Adapter supported */
#define IMSM_OROM_VOLUMES_PER_HBA 4
+ #define IMSM_OROM_VOLUMES_PER_HBA_NVME 4
/* Attributes supported. This should map to the
* attributes in the MPB. Also, lower 16 bits
* should match/duplicate RLC bits above.
@@ -168,10 +173,23 @@ static inline int fls(int x)
return r;
}
+static inline int imsm_orom_is_enterprise(const struct imsm_orom *orom)
+{
+ return !!(orom->driver_features & IMSM_OROM_CAPABILITIES_EnterpriseSystem);
+}
+
+static inline int imsm_orom_is_nvme(const struct imsm_orom *orom)
+{
+ return memcmp(orom->signature, IMSM_NVME_OROM_COMPAT_SIGNATURE,
+ sizeof(orom->signature)) == 0;
+}
+
enum sys_dev_type {
SYS_DEV_UNKNOWN = 0,
SYS_DEV_SAS,
SYS_DEV_SATA,
+ SYS_DEV_NVME,
+ SYS_DEV_VMD,
SYS_DEV_MAX
};
@@ -180,6 +198,7 @@ struct sys_dev {
char *path;
char *pci_id;
__u16 dev_id;
+ __u32 class;
struct sys_dev *next;
};
@@ -187,10 +206,23 @@ struct efi_guid {
__u8 b[16];
};
+struct devid_list {
+ __u16 devid;
+ struct devid_list *next;
+};
+
+struct orom_entry {
+ struct imsm_orom orom;
+ struct devid_list *devid_list;
+ enum sys_dev_type type;
+ struct orom_entry *next;
+};
+
+extern struct orom_entry *orom_entries;
+
static inline char *guid_str(char *buf, struct efi_guid guid)
{
- sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x-%02x%02x%02x%02x%02x%02x",
+ sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
guid.b[3], guid.b[2], guid.b[1], guid.b[0],
guid.b[5], guid.b[4], guid.b[7], guid.b[6],
guid.b[8], guid.b[9], guid.b[10], guid.b[11],
@@ -199,12 +231,17 @@ static inline char *guid_str(char *buf, struct efi_guid guid)
}
char *diskfd_to_devpath(int fd);
+__u16 devpath_to_vendor(const char *dev_path);
struct sys_dev *find_driver_devices(const char *bus, const char *driver);
struct sys_dev *find_intel_devices(void);
-const struct imsm_orom *find_imsm_capability(enum sys_dev_type hba_id);
+const struct imsm_orom *find_imsm_capability(struct sys_dev *hba);
const struct imsm_orom *find_imsm_orom(void);
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 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);
+char *vmd_domain_to_controller(struct sys_dev *hba, char *buf);
diff --git a/policy.c b/policy.c
index ef83621a..064d3491 100644
--- a/policy.c
+++ b/policy.c
@@ -727,16 +727,14 @@ void policy_save_path(char *id_path, struct map_ent *array)
FILE *f = NULL;
if (mkdir(FAILED_SLOTS_DIR, S_IRWXU) < 0 && errno != EEXIST) {
- pr_err("can't create file to save path "
- "to old disk: %s\n", strerror(errno));
+ pr_err("can't create file to save path to old disk: %s\n", strerror(errno));
return;
}
snprintf(path, PATH_MAX, FAILED_SLOTS_DIR "/%s", id_path);
f = fopen(path, "w");
if (!f) {
- pr_err("can't create file to"
- " save path to old disk: %s\n",
+ pr_err("can't create file to save path to old disk: %s\n",
strerror(errno));
return;
}
@@ -745,8 +743,7 @@ void policy_save_path(char *id_path, struct map_ent *array)
array->metadata,
array->uuid[0], array->uuid[1],
array->uuid[2], array->uuid[3]) <= 0)
- pr_err("Failed to write to "
- "<id_path> cookie\n");
+ pr_err("Failed to write to <id_path> cookie\n");
fclose(f);
}
diff --git a/raid6check.c b/raid6check.c
index 1d8ac40d..ad7ffe7e 100644
--- a/raid6check.c
+++ b/raid6check.c
@@ -30,6 +30,8 @@
#define CHECK_PAGE_BITS (12)
#define CHECK_PAGE_SIZE (1 << CHECK_PAGE_BITS)
+char const Name[] = "raid6check";
+
enum repair {
NO_REPAIR = 0,
MANUAL_REPAIR,
@@ -38,12 +40,14 @@ enum repair {
int geo_map(int block, unsigned long long stripe, int raid_disks,
int level, int layout);
+int is_ddf(int layout);
void qsyndrome(uint8_t *p, uint8_t *q, uint8_t **sources, int disks, int size);
void make_tables(void);
void ensure_zero_has_size(int chunk_size);
-void raid6_datap_recov(int disks, size_t bytes, int faila, uint8_t **ptrs);
+void raid6_datap_recov(int disks, size_t bytes, int faila, uint8_t **ptrs,
+ int neg_offset);
void raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
- uint8_t **ptrs);
+ uint8_t **ptrs, int neg_offset);
void xor_blocks(char *target, char **sources, int disks, int size);
/* Collect per stripe consistency information */
@@ -157,38 +161,39 @@ int unlock_all_stripes(struct mdinfo *info, sighandler_t *sig) {
}
/* Autorepair */
-int autorepair(int *disk, int diskP, int diskQ, unsigned long long start, int chunk_size,
- char *name[], int raid_disks, int data_disks, char **blocks_page,
- char **blocks, uint8_t *p, char **stripes, int *block_index_for_slot,
+int autorepair(int *disk, unsigned long long start, int chunk_size,
+ char *name[], int raid_disks, int syndrome_disks, char **blocks_page,
+ char **blocks, uint8_t *p, int *block_index_for_slot,
int *source, unsigned long long *offsets)
{
int i, j;
int pages_to_write_count = 0;
int page_to_write[chunk_size >> CHECK_PAGE_BITS];
for(j = 0; j < (chunk_size >> CHECK_PAGE_BITS); j++) {
- if (disk[j] >= 0) {
- printf("Auto-repairing slot %d (%s)\n", disk[j], name[disk[j]]);
+ if (disk[j] >= -2 && block_index_for_slot[disk[j]] >= 0) {
+ int slot = block_index_for_slot[disk[j]];
+ printf("Auto-repairing slot %d (%s)\n", slot, name[slot]);
pages_to_write_count++;
page_to_write[j] = 1;
- for(i = 0; i < raid_disks; i++) {
+ for(i = -2; i < syndrome_disks; i++) {
blocks_page[i] = blocks[i] + j * CHECK_PAGE_SIZE;
}
- if (disk[j] == diskQ) {
- qsyndrome(p, (uint8_t*)stripes[diskQ] + j * CHECK_PAGE_SIZE, (uint8_t**)blocks_page, data_disks, CHECK_PAGE_SIZE);
+ if (disk[j] == -2) {
+ qsyndrome(p, (uint8_t*)blocks_page[-2],
+ (uint8_t**)blocks_page,
+ syndrome_disks, CHECK_PAGE_SIZE);
}
else {
- char *all_but_failed_blocks[data_disks];
- int failed_block_index = block_index_for_slot[disk[j]];
- for(i = 0; i < data_disks; i++) {
- if (failed_block_index == i) {
- all_but_failed_blocks[i] = stripes[diskP] + j * CHECK_PAGE_SIZE;
- }
- else {
+ char *all_but_failed_blocks[syndrome_disks];
+ for(i = 0; i < syndrome_disks; i++) {
+ if (i == disk[j])
+ all_but_failed_blocks[i] = blocks_page[-1];
+ else
all_but_failed_blocks[i] = blocks_page[i];
- }
}
- xor_blocks(stripes[disk[j]] + j * CHECK_PAGE_SIZE,
- all_but_failed_blocks, data_disks, CHECK_PAGE_SIZE);
+ xor_blocks(blocks_page[disk[j]],
+ all_but_failed_blocks, syndrome_disks,
+ CHECK_PAGE_SIZE);
}
}
else {
@@ -200,8 +205,11 @@ int autorepair(int *disk, int diskP, int diskQ, unsigned long long start, int ch
int write_res = 0;
for(j = 0; j < (chunk_size >> CHECK_PAGE_BITS); j++) {
if(page_to_write[j] == 1) {
- lseek64(source[disk[j]], offsets[disk[j]] + start * chunk_size + j * CHECK_PAGE_SIZE, SEEK_SET);
- write_res += write(source[disk[j]], stripes[disk[j]] + j * CHECK_PAGE_SIZE, CHECK_PAGE_SIZE);
+ int slot = block_index_for_slot[disk[j]];
+ lseek64(source[slot], offsets[slot] + start * chunk_size + j * CHECK_PAGE_SIZE, SEEK_SET);
+ write_res += write(source[slot],
+ blocks[disk[j]] + j * CHECK_PAGE_SIZE,
+ CHECK_PAGE_SIZE);
}
}
@@ -215,101 +223,78 @@ int autorepair(int *disk, int diskP, int diskQ, unsigned long long start, int ch
}
/* Manual repair */
-int manual_repair(int diskP, int diskQ, int chunk_size, int raid_disks, int data_disks,
- int failed_disk1, int failed_disk2, unsigned long long start, int *block_index_for_slot,
- char *name[], char **stripes, char **blocks, uint8_t *p, struct mdinfo *info, sighandler_t *sig,
+int manual_repair(int chunk_size, int syndrome_disks,
+ int failed_slot1, int failed_slot2,
+ unsigned long long start, int *block_index_for_slot,
+ char *name[], char **stripes, char **blocks, uint8_t *p,
int *source, unsigned long long *offsets)
{
- int err = 0;
int i;
+ int fd1 = block_index_for_slot[failed_slot1];
+ int fd2 = block_index_for_slot[failed_slot2];
printf("Repairing stripe %llu\n", start);
printf("Assuming slots %d (%s) and %d (%s) are incorrect\n",
- failed_disk1, name[failed_disk1],
- failed_disk2, name[failed_disk2]);
+ fd1, name[fd1],
+ fd2, name[fd2]);
- if (failed_disk1 == diskQ || failed_disk2 == diskQ) {
- char *all_but_failed_blocks[data_disks];
+ if (failed_slot1 == -2 || failed_slot2 == -2) {
+ char *all_but_failed_blocks[syndrome_disks];
int failed_data_or_p;
- int failed_block_index;
- if (failed_disk1 == diskQ) {
- failed_data_or_p = failed_disk2;
- }
- else {
- failed_data_or_p = failed_disk1;
- }
+ if (failed_slot1 == -2)
+ failed_data_or_p = failed_slot2;
+ else
+ failed_data_or_p = failed_slot1;
+
printf("Repairing D/P(%d) and Q\n", failed_data_or_p);
- failed_block_index = block_index_for_slot[failed_data_or_p];
- for (i = 0; i < data_disks; i++) {
- if (failed_block_index == i) {
- all_but_failed_blocks[i] = stripes[diskP];
- }
- else {
+
+ for (i = 0; i < syndrome_disks; i++) {
+ if (i == failed_data_or_p)
+ all_but_failed_blocks[i] = blocks[-1];
+ else
all_but_failed_blocks[i] = blocks[i];
- }
}
- xor_blocks(stripes[failed_data_or_p],
- all_but_failed_blocks, data_disks, chunk_size);
- qsyndrome(p, (uint8_t*)stripes[diskQ], (uint8_t**)blocks, data_disks, chunk_size);
- }
- else {
+ xor_blocks(blocks[failed_data_or_p],
+ all_but_failed_blocks, syndrome_disks, chunk_size);
+ qsyndrome(p, (uint8_t*)blocks[-2], (uint8_t**)blocks,
+ syndrome_disks, chunk_size);
+ } else {
ensure_zero_has_size(chunk_size);
- if (failed_disk1 == diskP || failed_disk2 == diskP) {
- int failed_data, failed_block_index;
- if (failed_disk1 == diskP) {
- failed_data = failed_disk2;
- }
- else {
- failed_data = failed_disk1;
- }
- failed_block_index = block_index_for_slot[failed_data];
- printf("Repairing D(%d) and P\n", failed_data);
- raid6_datap_recov(raid_disks, chunk_size, failed_block_index, (uint8_t**)blocks);
- }
- else {
+ if (failed_slot1 == -1 || failed_slot2 == -1) {
+ int failed_data;
+ if (failed_slot1 == -1)
+ failed_data = failed_slot2;
+ else
+ failed_data = failed_slot1;
+ printf("Repairing D(%d) and P\n", failed_data);
+ raid6_datap_recov(syndrome_disks+2, chunk_size,
+ failed_data, (uint8_t**)blocks, 1);
+ } else {
printf("Repairing D and D\n");
- int failed_block_index1 = block_index_for_slot[failed_disk1];
- int failed_block_index2 = block_index_for_slot[failed_disk2];
- if (failed_block_index1 > failed_block_index2) {
- int t = failed_block_index1;
- failed_block_index1 = failed_block_index2;
- failed_block_index2 = t;
- }
- raid6_2data_recov(raid_disks, chunk_size, failed_block_index1, failed_block_index2, (uint8_t**)blocks);
- }
- }
-
- err = lock_stripe(info, start, chunk_size, data_disks, sig);
- if(err != 0) {
- if (err != 2) {
- return -1;
+ raid6_2data_recov(syndrome_disks+2, chunk_size,
+ failed_slot1, failed_slot2,
+ (uint8_t**)blocks, 1);
}
- return -2;;
}
int write_res1, write_res2;
off64_t seek_res;
- seek_res = lseek64(source[failed_disk1],
- offsets[failed_disk1] + start * chunk_size, SEEK_SET);
+ seek_res = lseek64(source[fd1],
+ offsets[fd1] + start * chunk_size, SEEK_SET);
if (seek_res < 0) {
fprintf(stderr, "lseek failed for failed_disk1\n");
return -1;
}
- write_res1 = write(source[failed_disk1], stripes[failed_disk1], chunk_size);
+ write_res1 = write(source[fd1], blocks[failed_slot1], chunk_size);
- seek_res = lseek64(source[failed_disk2],
- offsets[failed_disk2] + start * chunk_size, SEEK_SET);
+ seek_res = lseek64(source[fd2],
+ offsets[fd2] + start * chunk_size, SEEK_SET);
if (seek_res < 0) {
- fprintf(stderr, "lseek failed for failed_disk1\n");
+ fprintf(stderr, "lseek failed for failed_disk2\n");
return -1;
}
- write_res2 = write(source[failed_disk2], stripes[failed_disk2], chunk_size);
-
- err = unlock_all_stripes(info, sig);
- if(err != 0) {
- return -2;
- }
+ write_res2 = write(source[fd2], blocks[failed_slot2], chunk_size);
if (write_res1 != chunk_size || write_res2 != chunk_size) {
fprintf(stderr, "Failed to write a complete chunk.\n");
@@ -325,19 +310,38 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
enum repair repair, int failed_disk1, int failed_disk2)
{
/* read the data and p and q blocks, and check we got them right */
- char *stripe_buf = xmalloc(raid_disks * chunk_size);
+ int data_disks = raid_disks - 2;
+ int syndrome_disks = data_disks + is_ddf(layout) * 2;
+ char *stripe_buf;
+
+ /* stripes[] is indexed by raid_disk and holds chunks from each device */
char **stripes = xmalloc(raid_disks * sizeof(char*));
- char **blocks = xmalloc(raid_disks * sizeof(char*));
- char **blocks_page = xmalloc(raid_disks * sizeof(char*));
- int *block_index_for_slot = xmalloc(raid_disks * sizeof(int));
+
+ /* blocks[] is indexed by syndrome number and points to either one of the
+ * chunks from 'stripes[]', or to a chunk of zeros. -1 and -2 are
+ * P and Q */
+ char **blocks = xmalloc((syndrome_disks + 2) * sizeof(char*));
+
+ /* blocks_page[] is a temporary index to just one page of the chunks
+ * that blocks[] points to. */
+ char **blocks_page = xmalloc((syndrome_disks + 2) * sizeof(char*));
+
+ /* block_index_for_slot[] provides the reverse mapping from blocks to stripes.
+ * The index is a syndrome position, the content is a raid_disk number.
+ * indicies -1 and -2 work, and are P and Q disks */
+ int *block_index_for_slot = xmalloc((syndrome_disks+2) * sizeof(int));
+
+ /* 'p' and 'q' contain calcualted P and Q, to be compared with
+ * blocks[-1] and blocks[-2];
+ */
uint8_t *p = xmalloc(chunk_size);
uint8_t *q = xmalloc(chunk_size);
+ char *zero = xmalloc(chunk_size);
int *results = xmalloc(chunk_size * sizeof(int));
sighandler_t *sig = xmalloc(3 * sizeof(sighandler_t));
int i, j;
- int diskP, diskQ;
- int data_disks = raid_disks - 2;
+ int diskP, diskQ, diskD;
int err = 0;
extern int tables_ready;
@@ -345,10 +349,21 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
if (!tables_ready)
make_tables();
+ if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size) != 0)
+ exit(4);
+ block_index_for_slot += 2;
+ blocks += 2;
+ blocks_page += 2;
+
+ memset(zero, 0, chunk_size);
for ( i = 0 ; i < raid_disks ; i++)
stripes[i] = stripe_buf + i * chunk_size;
while (length > 0) {
+ /* The syndrome number of the broken disk is recorded
+ * in 'disk[]' which allows a different broken disk for
+ * each page.
+ */
int disk[chunk_size >> CHECK_PAGE_BITS];
err = lock_stripe(info, start, chunk_size, data_disks, sig);
@@ -375,40 +390,68 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
}
}
- for (i = 0 ; i < data_disks ; i++) {
- int disk = geo_map(i, start, raid_disks, level, layout);
- blocks[i] = stripes[disk];
- block_index_for_slot[disk] = i;
- }
-
- qsyndrome(p, q, (uint8_t**)blocks, data_disks, chunk_size);
diskP = geo_map(-1, start, raid_disks, level, layout);
+ block_index_for_slot[-1] = diskP;
+ blocks[-1] = stripes[diskP];
+
diskQ = geo_map(-2, start, raid_disks, level, layout);
- blocks[data_disks] = stripes[diskP];
- block_index_for_slot[diskP] = data_disks;
- blocks[data_disks+1] = stripes[diskQ];
- block_index_for_slot[diskQ] = data_disks+1;
+ block_index_for_slot[-2] = diskQ;
+ blocks[-2] = stripes[diskQ];
+
+ if (!is_ddf(layout)) {
+ /* The syndrome-order of disks starts immediately after 'Q',
+ * but skips P */
+ diskD = diskQ;
+ for (i = 0 ; i < data_disks ; i++) {
+ diskD = diskD + 1;
+ if (diskD >= raid_disks)
+ diskD = 0;
+ if (diskD == diskP)
+ diskD += 1;
+ if (diskD >= raid_disks)
+ diskD = 0;
+ blocks[i] = stripes[diskD];
+ block_index_for_slot[i] = diskD;
+ }
+ } else {
+ /* The syndrome-order exactly follows raid-disk
+ * numbers, with ZERO in place of P and Q
+ */
+ for (i = 0 ; i < raid_disks; i++) {
+ if (i == diskP || i == diskQ) {
+ blocks[i] = zero;
+ block_index_for_slot[i] = -1;
+ } else {
+ blocks[i] = stripes[i];
+ block_index_for_slot[i] = i;
+ }
+ }
+ }
+
+ qsyndrome(p, q, (uint8_t**)blocks, syndrome_disks, chunk_size);
raid6_collect(chunk_size, p, q, stripes[diskP], stripes[diskQ], results);
raid6_stats(disk, results, raid_disks, chunk_size);
for(j = 0; j < (chunk_size >> CHECK_PAGE_BITS); j++) {
- if(disk[j] >= -2) {
- disk[j] = geo_map(disk[j], start, raid_disks, level, layout);
- }
- if(disk[j] >= 0) {
- printf("Error detected at stripe %llu, page %d: possible failed disk slot: %d --> %s\n",
- start, j, disk[j], name[disk[j]]);
- }
- if(disk[j] == -65535) {
+ int role = disk[j];
+ if (role >= -2) {
+ int slot = block_index_for_slot[role];
+ if (slot >= 0)
+ printf("Error detected at stripe %llu, page %d: possible failed disk slot %d: %d --> %s\n",
+ start, j, role, slot, name[slot]);
+ else
+ printf("Error detected at stripe %llu, page %d: failed slot %d should be zeros\n",
+ start, j, role);
+ } else if(disk[j] == -65535) {
printf("Error detected at stripe %llu, page %d: disk slot unknown\n", start, j);
}
}
if(repair == AUTO_REPAIR) {
- err = autorepair(disk, diskP, diskQ, start, chunk_size,
- name, raid_disks, data_disks, blocks_page,
- blocks, p, stripes, block_index_for_slot,
+ err = autorepair(disk, start, chunk_size,
+ name, raid_disks, syndrome_disks, blocks_page,
+ blocks, p, block_index_for_slot,
source, offsets);
if(err != 0) {
unlock_all_stripes(info, sig);
@@ -416,22 +459,30 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
}
}
- err = unlock_all_stripes(info, sig);
- if(err != 0) {
- goto exitCheck;
- }
-
if(repair == MANUAL_REPAIR) {
- err = manual_repair(diskP, diskQ, chunk_size, raid_disks, data_disks,
- failed_disk1, failed_disk2, start, block_index_for_slot,
- name, stripes, blocks, p, info, sig,
- source, offsets);
+ int failed_slot1 = -1, failed_slot2 = -1;
+ for (i = -2; i < syndrome_disks; i++) {
+ if (block_index_for_slot[i] == failed_disk1)
+ failed_slot1 = i;
+ if (block_index_for_slot[i] == failed_disk2)
+ failed_slot2 = i;
+ }
+ err = manual_repair(chunk_size, syndrome_disks,
+ failed_slot1, failed_slot2,
+ start, block_index_for_slot,
+ name, stripes, blocks, p,
+ source, offsets);
if(err == -1) {
unlock_all_stripes(info, sig);
goto exitCheck;
}
}
+ err = unlock_all_stripes(info, sig);
+ if(err != 0) {
+ goto exitCheck;
+ }
+
length--;
start++;
}
@@ -440,9 +491,9 @@ exitCheck:
free(stripe_buf);
free(stripes);
- free(blocks);
- free(blocks_page);
- free(block_index_for_slot);
+ free(blocks-2);
+ free(blocks_page-2);
+ free(block_index_for_slot-2);
free(p);
free(q);
free(results);
@@ -626,7 +677,7 @@ int main(int argc, char *argv[])
if(disk_slot >= 0) {
disk_name[disk_slot] = map_dev(comp->disk.major, comp->disk.minor, 0);
offsets[disk_slot] = comp->data_offset * 512;
- fds[disk_slot] = open(disk_name[disk_slot], O_RDWR | O_SYNC);
+ fds[disk_slot] = open(disk_name[disk_slot], O_RDWR | O_DIRECT);
if (fds[disk_slot] < 0) {
perror(disk_name[disk_slot]);
fprintf(stderr,"%s: cannot open %s\n", prg, disk_name[disk_slot]);
@@ -642,8 +693,7 @@ int main(int argc, char *argv[])
raid_disks, chunk_size, level, layout,
start, length, disk_name, repair, failed_disk1, failed_disk2);
if (rv != 0) {
- fprintf(stderr,
- "%s: check_stripes returned %d\n", prg, rv);
+ fprintf(stderr, "%s: check_stripes returned %d\n", prg, rv);
exit_err = 7;
goto exitHere;
}
diff --git a/restripe.c b/restripe.c
index 93ef056e..56dca73e 100644
--- a/restripe.c
+++ b/restripe.c
@@ -194,7 +194,8 @@ int geo_map(int block, unsigned long long stripe, int raid_disks,
}
return -1;
}
-static int is_ddf(int layout)
+
+int is_ddf(int layout)
{
switch (layout)
{
@@ -344,16 +345,28 @@ void ensure_zero_has_size(int chunk_size)
/* Following was taken from linux/drivers/md/raid6recov.c */
/* Recover two failed data blocks. */
+
void raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
- uint8_t **ptrs)
+ uint8_t **ptrs, int neg_offset)
{
uint8_t *p, *q, *dp, *dq;
uint8_t px, qx, db;
const uint8_t *pbmul; /* P multiplier table for B data */
const uint8_t *qmul; /* Q multiplier table (for both) */
- p = ptrs[disks-2];
- q = ptrs[disks-1];
+ if (faila > failb) {
+ int t = faila;
+ faila = failb;
+ failb = t;
+ }
+
+ if (neg_offset) {
+ p = ptrs[-1];
+ q = ptrs[-2];
+ } else {
+ p = ptrs[disks-2];
+ q = ptrs[disks-1];
+ }
/* Compute syndrome with zero for the missing data pages
Use the dead data pages as temporary storage for
@@ -384,13 +397,19 @@ void raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
}
/* Recover failure of one data block plus the P block */
-void raid6_datap_recov(int disks, size_t bytes, int faila, uint8_t **ptrs)
+void raid6_datap_recov(int disks, size_t bytes, int faila, uint8_t **ptrs,
+ int neg_offset)
{
uint8_t *p, *q, *dq;
const uint8_t *qmul; /* Q multiplier table */
- p = ptrs[disks-2];
- q = ptrs[disks-1];
+ if (neg_offset) {
+ p = ptrs[-1];
+ q = ptrs[-2];
+ } else {
+ p = ptrs[disks-2];
+ q = ptrs[disks-1];
+ }
/* Compute syndrome with zero for the missing data page
Use the dead data page as temporary storage for delta q */
@@ -415,7 +434,7 @@ void raid6_datap_recov(int disks, size_t bytes, int faila, uint8_t **ptrs)
/* Try to find out if a specific disk has a problem */
int raid6_check_disks(int data_disks, int start, int chunk_size,
int level, int layout, int diskP, int diskQ,
- char *p, char *q, char **stripes)
+ uint8_t *p, uint8_t *q, char **stripes)
{
int i;
int data_id, diskD;
@@ -636,16 +655,11 @@ int save_stripes(int *source, unsigned long long *offsets,
if (fblock[1] == data_disks)
/* One data failed, and parity failed */
raid6_datap_recov(syndrome_disks+2, chunk_size,
- fdisk[0], bufs);
+ fdisk[0], bufs, 0);
else {
- if (fdisk[0] > fdisk[1]) {
- int t = fdisk[0];
- fdisk[0] = fdisk[1];
- fdisk[1] = t;
- }
/* Two data blocks failed, P,Q OK */
raid6_2data_recov(syndrome_disks+2, chunk_size,
- fdisk[0], fdisk[1], bufs);
+ fdisk[0], fdisk[1], bufs, 0);
}
}
if (dest) {
@@ -813,8 +827,8 @@ int test_stripes(int *source, unsigned long long *offsets,
char *stripe_buf = xmalloc(raid_disks * chunk_size);
char **stripes = xmalloc(raid_disks * sizeof(char*));
char **blocks = xmalloc(raid_disks * sizeof(char*));
- char *p = xmalloc(chunk_size);
- char *q = xmalloc(chunk_size);
+ uint8_t *p = xmalloc(chunk_size);
+ uint8_t *q = xmalloc(chunk_size);
int i;
int diskP, diskQ;
@@ -882,7 +896,8 @@ unsigned long long getnum(char *str, char **err)
return rv;
}
-main(int argc, char *argv[])
+char const Name[] = "test_restripe";
+int main(int argc, char *argv[])
{
/* save/restore file raid_disks chunk_size level layout start length devices...
*/
@@ -898,8 +913,7 @@ main(int argc, char *argv[])
char *err = NULL;
if (argc < 10) {
- fprintf(stderr, "Usage: test_stripe save/restore file raid_disks"
- " chunk_size level layout start length devices...\n");
+ fprintf(stderr, "Usage: test_stripe save/restore file raid_disks chunk_size level layout start length devices...\n");
exit(1);
}
if (strcmp(argv[1], "save")==0)
diff --git a/sha1.h b/sha1.h
index 999fc6a3..0f986585 100644
--- a/sha1.h
+++ b/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/super-ddf.c b/super-ddf.c
index bc0ce2c0..faaf0a7c 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -541,15 +541,15 @@ static int init_super_ddf_bvd(struct supertype *st,
static void pr_state(struct ddf_super *ddf, const char *msg)
{
unsigned int i;
- dprintf("%s/%s: ", __func__, msg);
+ dprintf("%s: ", msg);
for (i = 0; i < be16_to_cpu(ddf->active->max_vd_entries); i++) {
if (all_ff(ddf->virt->entries[i].guid))
continue;
- dprintf("%u(s=%02x i=%02x) ", i,
+ dprintf_cont("%u(s=%02x i=%02x) ", i,
ddf->virt->entries[i].state,
ddf->virt->entries[i].init_state);
}
- dprintf("\n");
+ dprintf_cont("\n");
}
#else
static void pr_state(const struct ddf_super *ddf, const char *msg) {}
@@ -825,11 +825,11 @@ static int load_ddf_header(int fd, unsigned long long lba,
return 0;
if (!be32_eq(hdr->magic, DDF_HEADER_MAGIC)) {
- pr_err("%s: bad header magic\n", __func__);
+ pr_err("bad header magic\n");
return 0;
}
if (!be32_eq(calc_crc(hdr, 512), hdr->crc)) {
- pr_err("%s: bad CRC\n", __func__);
+ pr_err("bad CRC\n");
return 0;
}
if (memcmp(anchor->guid, hdr->guid, DDF_GUID_LEN) != 0 ||
@@ -839,7 +839,7 @@ static int load_ddf_header(int fd, unsigned long long lba,
hdr->type != type ||
memcmp(anchor->pad2, hdr->pad2, 512 -
offsetof(struct ddf_header, pad2)) != 0) {
- pr_err("%s: header mismatch\n", __func__);
+ pr_err("header mismatch\n");
return 0;
}
@@ -918,8 +918,7 @@ static int load_ddf_headers(int fd, struct ddf_super *super, char *devname)
if (memcmp(super->anchor.revision, DDF_REVISION_0, 8) != 0 &&
memcmp(super->anchor.revision, DDF_REVISION_2, 8) != 0) {
if (devname)
- pr_err("can only support super revision"
- " %.8s and earlier, not %.8s on %s\n",
+ pr_err("can only support super revision %.8s and earlier, not %.8s on %s\n",
DDF_REVISION_2, super->anchor.revision,devname);
return 2;
}
@@ -928,8 +927,7 @@ static int load_ddf_headers(int fd, struct ddf_super *super, char *devname)
dsize >> 9, 1,
&super->primary, &super->anchor) == 0) {
if (devname)
- pr_err("Failed to load primary DDF header "
- "on %s\n", devname);
+ pr_err("Failed to load primary DDF header on %s\n", devname);
} else
super->active = &super->primary;
@@ -1055,8 +1053,7 @@ static int load_ddf_local(int fd, struct ddf_super *super,
if (posix_memalign((void**)&dl, 512,
sizeof(*dl) +
(super->max_part) * sizeof(dl->vlist[0])) != 0) {
- pr_err("%s could not allocate disk info buffer\n",
- __func__);
+ pr_err("could not allocate disk info buffer\n");
return 1;
}
@@ -1116,8 +1113,7 @@ static int load_ddf_local(int fd, struct ddf_super *super,
continue;
if (posix_memalign((void**)&dl->spare, 512,
super->conf_rec_len*512) != 0) {
- pr_err("%s could not allocate spare info buf\n",
- __func__);
+ pr_err("could not allocate spare info buf\n");
return 1;
}
@@ -1148,16 +1144,14 @@ static int load_ddf_local(int fd, struct ddf_super *super,
if (posix_memalign((void**)&vcl, 512,
(super->conf_rec_len*512 +
offsetof(struct vcl, conf))) != 0) {
- pr_err("%s could not allocate vcl buf\n",
- __func__);
+ pr_err("could not allocate vcl buf\n");
return 1;
}
vcl->next = super->conflist;
vcl->block_sizes = NULL; /* FIXME not for CONCAT */
vcl->conf.sec_elmnt_count = vd->sec_elmnt_count;
if (alloc_other_bvds(super, vcl) != 0) {
- pr_err("%s could not allocate other bvds\n",
- __func__);
+ pr_err("could not allocate other bvds\n");
free(vcl);
return 1;
};
@@ -1193,15 +1187,13 @@ static int load_super_ddf(struct supertype *st, int fd,
/* 32M is a lower bound */
if (dsize <= 32*1024*1024) {
if (devname)
- pr_err("%s is too small for ddf: "
- "size is %llu sectors.\n",
+ pr_err("%s is too small for ddf: size is %llu sectors.\n",
devname, dsize>>9);
return 1;
}
if (dsize & 511) {
if (devname)
- pr_err("%s is an odd size for ddf: "
- "size is %llu bytes.\n",
+ pr_err("%s is an odd size for ddf: size is %llu bytes.\n",
devname, dsize);
return 1;
}
@@ -1227,8 +1219,7 @@ static int load_super_ddf(struct supertype *st, int fd,
if (rv) {
if (devname)
- pr_err("Failed to load all information "
- "sections on %s\n", devname);
+ pr_err("Failed to load all information sections on %s\n", devname);
free(super);
return rv;
}
@@ -1237,8 +1228,7 @@ static int load_super_ddf(struct supertype *st, int fd,
if (rv) {
if (devname)
- pr_err("Failed to load all information "
- "sections on %s\n", devname);
+ pr_err("Failed to load all information sections on %s\n", devname);
free(super);
return rv;
}
@@ -1865,8 +1855,8 @@ static int find_index_in_bvd(const struct ddf_super *ddf,
j++;
}
}
- dprintf("%s: couldn't find BVD member %u (total %u)\n",
- __func__, n, be16_to_cpu(conf->prim_elmnt_count));
+ dprintf("couldn't find BVD member %u (total %u)\n",
+ n, be16_to_cpu(conf->prim_elmnt_count));
return 0;
}
@@ -1897,8 +1887,8 @@ static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst,
goto bad;
}
if (v->other_bvds == NULL) {
- pr_err("%s: BUG: other_bvds is NULL, nsec=%u\n",
- __func__, conf->sec_elmnt_count);
+ pr_err("BUG: other_bvds is NULL, nsec=%u\n",
+ conf->sec_elmnt_count);
goto bad;
}
nsec = n / be16_to_cpu(conf->prim_elmnt_count);
@@ -1915,13 +1905,13 @@ static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst,
if (!find_index_in_bvd(ddf, conf,
n - nsec*conf->sec_elmnt_count, n_bvd))
goto bad;
- dprintf("%s: found disk %u as member %u in bvd %d of array %u\n"
- , __func__, n, *n_bvd, ibvd, inst);
+ dprintf("found disk %u as member %u in bvd %d of array %u\n",
+ n, *n_bvd, ibvd, inst);
*vcl = v;
return conf;
}
bad:
- pr_err("%s: Could't find disk %d in array %u\n", __func__, n, inst);
+ pr_err("Could't find disk %d in array %u\n", n, inst);
return NULL;
}
#endif
@@ -2342,7 +2332,7 @@ static int init_super_ddf(struct supertype *st,
data_offset);
if (posix_memalign((void**)&ddf, 512, sizeof(*ddf)) != 0) {
- pr_err("%s could not allocate superblock\n", __func__);
+ pr_err("could not allocate superblock\n");
return 0;
}
memset(ddf, 0, sizeof(*ddf));
@@ -2477,7 +2467,7 @@ static int init_super_ddf(struct supertype *st,
strcpy((char*)ddf->controller.vendor_data, homehost);
if (posix_memalign((void**)&pd, 512, pdsize) != 0) {
- pr_err("%s could not allocate pd\n", __func__);
+ pr_err("could not allocate pd\n");
return 0;
}
ddf->phys = pd;
@@ -2493,7 +2483,7 @@ static int init_super_ddf(struct supertype *st,
memset(pd->entries[i].guid, 0xff, DDF_GUID_LEN);
if (posix_memalign((void**)&vd, 512, vdsize) != 0) {
- pr_err("%s could not allocate vd\n", __func__);
+ pr_err("could not allocate vd\n");
return 0;
}
ddf->virt = vd;
@@ -2672,7 +2662,7 @@ static int init_super_ddf_bvd(struct supertype *st,
/* Now create a new vd_config */
if (posix_memalign((void**)&vcl, 512,
(offsetof(struct vcl, conf) + ddf->conf_rec_len * 512)) != 0) {
- pr_err("%s could not allocate vd_config\n", __func__);
+ pr_err("could not allocate vd_config\n");
return 0;
}
vcl->vcnum = venum;
@@ -2687,15 +2677,14 @@ static int init_super_ddf_bvd(struct supertype *st,
vc->chunk_shift = chunk_to_shift(info->chunk_size);
if (layout_md2ddf(info, vc) == -1 ||
be16_to_cpu(vc->prim_elmnt_count) > ddf->mppe) {
- pr_err("%s: unsupported RAID level/layout %d/%d with %d disks\n",
- __func__, info->level, info->layout, info->raid_disks);
+ pr_err("unsupported RAID level/layout %d/%d with %d disks\n",
+ info->level, info->layout, info->raid_disks);
free(vcl);
return 0;
}
vc->sec_elmnt_seq = 0;
if (alloc_other_bvds(ddf, vcl) != 0) {
- pr_err("%s could not allocate other bvds\n",
- __func__);
+ pr_err("could not allocate other bvds\n");
free(vcl);
return 0;
}
@@ -2814,8 +2803,8 @@ static void add_to_super_ddf_bvd(struct supertype *st,
cpu_to_be16(DDF_Global_Spare));
be16_set(ddf->phys->entries[dl->pdnum].type,
cpu_to_be16(DDF_Active_in_VD));
- dprintf("%s: added disk %d/%08x to VD %d/%s as disk %d\n",
- __func__, dl->pdnum, be32_to_cpu(dl->disk.refnum),
+ dprintf("added disk %d/%08x to VD %d/%s as disk %d\n",
+ dl->pdnum, be32_to_cpu(dl->disk.refnum),
ddf->currentconf->vcnum, guid_str(vc->guid),
dk->raid_disk);
ddf_set_updates_pending(ddf, vc);
@@ -2846,15 +2835,14 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl)
if (t < cfs) {
__u64 wsp = cfs - t;
if (wsp > 1024*1024*2ULL && wsp > dl->size / 16) {
- pr_err("%s: %x:%x: workspace size 0x%llx too big, ignoring\n",
- __func__, dl->major, dl->minor,
- (unsigned long long)wsp);
+ pr_err("%x:%x: workspace size 0x%llx too big, ignoring\n",
+ dl->major, dl->minor, (unsigned long long)wsp);
} else
cfs = t;
}
pde->config_size = cpu_to_be64(cfs);
- dprintf("%s: %x:%x config_size %llx, DDF structure is %llx blocks\n",
- __func__, dl->major, dl->minor,
+ dprintf("%x:%x config_size %llx, DDF structure is %llx blocks\n",
+ dl->major, dl->minor,
(unsigned long long)cfs, (unsigned long long)(dl->size-cfs));
}
@@ -2886,23 +2874,20 @@ static int add_to_super_ddf(struct supertype *st,
fstat(fd, &stb);
n = find_unused_pde(ddf);
if (n == DDF_NOTFOUND) {
- pr_err("%s: No free slot in array, cannot add disk\n",
- __func__);
+ pr_err("No free slot in array, cannot add disk\n");
return 1;
}
pde = &ddf->phys->entries[n];
get_dev_size(fd, NULL, &size);
if (size <= 32*1024*1024) {
- pr_err("%s: device size must be at least 32MB\n",
- __func__);
+ pr_err("device size must be at least 32MB\n");
return 1;
}
size >>= 9;
if (posix_memalign((void**)&dd, 512,
sizeof(*dd) + sizeof(dd->vlist[0]) * ddf->max_part) != 0) {
- pr_err("%s could allocate buffer for new disk, aborting\n",
- __func__);
+ pr_err("could allocate buffer for new disk, aborting\n");
return 1;
}
dd->major = major(stb.st_rdev);
@@ -3173,6 +3158,7 @@ static int _write_super_to_disk(struct ddf_super *ddf, struct dl *d)
memcpy(&ddf->primary, &ddf->anchor, 512);
memcpy(&ddf->secondary, &ddf->anchor, 512);
+ ddf->anchor.type = DDF_HEADER_ANCHOR;
ddf->anchor.openflag = 0xFF; /* 'open' means nothing */
ddf->anchor.seq = cpu_to_be32(0xFFFFFFFF); /* no sequencing in anchor */
ddf->anchor.crc = calc_crc(&ddf->anchor, 512);
@@ -3439,8 +3425,7 @@ static int validate_geometry_ddf(struct supertype *st,
close(fd);
/* Just a bare device, no good to us */
if (verbose)
- pr_err("ddf: Cannot create this array "
- "on device %s - a container is required.\n",
+ pr_err("ddf: Cannot create this array on device %s - a container is required.\n",
dev);
return 0;
}
@@ -3556,8 +3541,7 @@ static int validate_geometry_ddf_bvd(struct supertype *st,
}
if (dcnt < raiddisks) {
if (verbose)
- pr_err("ddf: Not enough devices with "
- "space for this array (%d < %d)\n",
+ pr_err("ddf: Not enough devices with space for this array (%d < %d)\n",
dcnt, raiddisks);
return 0;
}
@@ -3575,8 +3559,7 @@ static int validate_geometry_ddf_bvd(struct supertype *st,
}
if (!dl) {
if (verbose)
- pr_err("ddf: %s is not in the "
- "same DDF set\n",
+ pr_err("ddf: %s is not in the same DDF set\n",
dev);
return 0;
}
@@ -3925,8 +3908,7 @@ static int store_super_ddf(struct supertype *st, int fd)
int ofd, ret;
if (fstat(fd, &sta) == -1 || !S_ISBLK(sta.st_mode)) {
- pr_err("%s: file descriptor for invalid device\n",
- __func__);
+ pr_err("file descriptor for invalid device\n");
return 1;
}
for (dl = ddf->dlist; dl; dl = dl->next)
@@ -3934,7 +3916,7 @@ static int store_super_ddf(struct supertype *st, int fd)
dl->minor == (int)minor(sta.st_rdev))
break;
if (!dl) {
- pr_err("%s: couldn't find disk %d/%d\n", __func__,
+ pr_err("couldn't find disk %d/%d\n",
(int)major(sta.st_rdev),
(int)minor(sta.st_rdev));
return 1;
@@ -3988,7 +3970,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
*/
if (!be32_eq(first->active->seq, second->active->seq)) {
- dprintf("%s: sequence number mismatch %u<->%u\n", __func__,
+ dprintf("sequence number mismatch %u<->%u\n",
be32_to_cpu(first->active->seq),
be32_to_cpu(second->active->seq));
return 0;
@@ -4010,7 +3992,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
if (vl1->other_bvds != NULL &&
vl1->conf.sec_elmnt_seq !=
vl2->conf.sec_elmnt_seq) {
- dprintf("%s: adding BVD %u\n", __func__,
+ dprintf("adding BVD %u\n",
vl2->conf.sec_elmnt_seq);
add_other_bvd(vl1, &vl2->conf,
first->conf_rec_len*512);
@@ -4021,8 +4003,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
if (posix_memalign((void **)&vl1, 512,
(first->conf_rec_len*512 +
offsetof(struct vcl, conf))) != 0) {
- pr_err("%s could not allocate vcl buf\n",
- __func__);
+ pr_err("could not allocate vcl buf\n");
return 3;
}
@@ -4030,8 +4011,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
vl1->block_sizes = NULL;
memcpy(&vl1->conf, &vl2->conf, first->conf_rec_len*512);
if (alloc_other_bvds(first, vl1) != 0) {
- pr_err("%s could not allocate other bvds\n",
- __func__);
+ pr_err("could not allocate other bvds\n");
free(vl1);
return 3;
}
@@ -4040,7 +4020,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
vl1->conf.guid, DDF_GUID_LEN))
break;
vl1->vcnum = vd;
- dprintf("%s: added config for VD %u\n", __func__, vl1->vcnum);
+ dprintf("added config for VD %u\n", vl1->vcnum);
first->conflist = vl1;
}
@@ -4054,8 +4034,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
if (posix_memalign((void **)&dl1, 512,
sizeof(*dl1) + (first->max_part) * sizeof(dl1->vlist[0]))
!= 0) {
- pr_err("%s could not allocate disk info buffer\n",
- __func__);
+ pr_err("could not allocate disk info buffer\n");
return 3;
}
memcpy(dl1, dl2, sizeof(*dl1));
@@ -4070,8 +4049,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
if (dl2->spare) {
if (posix_memalign((void **)&dl1->spare, 512,
first->conf_rec_len*512) != 0) {
- pr_err("%s could not allocate spare info buf\n",
- __func__);
+ pr_err("could not allocate spare info buf\n");
return 3;
}
memcpy(dl1->spare, dl2->spare, first->conf_rec_len*512);
@@ -4090,7 +4068,7 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
}
}
first->dlist = dl1;
- dprintf("%s: added disk %d: %08x\n", __func__, dl1->pdnum,
+ dprintf("added disk %d: %08x\n", dl1->pdnum,
be32_to_cpu(dl1->disk.refnum));
}
@@ -4113,10 +4091,10 @@ static int ddf_open_new(struct supertype *c, struct active_array *a, char *inst)
static const char faulty[] = "faulty";
if (all_ff(ddf->virt->entries[n].guid)) {
- pr_err("%s: subarray %d doesn't exist\n", __func__, n);
+ pr_err("subarray %d doesn't exist\n", n);
return -ENODEV;
}
- dprintf("%s: new subarray %d, GUID: %s\n", __func__, n,
+ dprintf("new subarray %d, GUID: %s\n", n,
guid_str(ddf->virt->entries[n].guid));
for (dev = a->info.devs; dev; dev = dev->next) {
for (dl = ddf->dlist; dl; dl = dl->next)
@@ -4124,16 +4102,15 @@ static int ddf_open_new(struct supertype *c, struct active_array *a, char *inst)
dl->minor == dev->disk.minor)
break;
if (!dl || dl->pdnum < 0) {
- pr_err("%s: device %d/%d of subarray %d not found in meta data\n",
- __func__, dev->disk.major, dev->disk.minor, n);
+ pr_err("device %d/%d of subarray %d not found in meta data\n",
+ dev->disk.major, dev->disk.minor, n);
return -1;
}
if ((be16_to_cpu(ddf->phys->entries[dl->pdnum].state) &
(DDF_Online|DDF_Missing|DDF_Failed)) != DDF_Online) {
- pr_err("%s: new subarray %d contains broken device %d/%d (%02x)\n",
- __func__, n, dl->major, dl->minor,
- be16_to_cpu(
- ddf->phys->entries[dl->pdnum].state));
+ pr_err("new subarray %d contains broken device %d/%d (%02x)\n",
+ n, dl->major, dl->minor,
+ be16_to_cpu(ddf->phys->entries[dl->pdnum].state));
if (write(dev->state_fd, faulty, sizeof(faulty)-1) !=
sizeof(faulty) - 1)
pr_err("Write to state_fd failed\n");
@@ -4357,7 +4334,7 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
struct dl *dl;
int update = 0;
- dprintf("%s: %d to %x\n", __func__, n, state);
+ dprintf("%d to %x\n", n, state);
if (vc == NULL) {
dprintf("ddf: cannot find instance %d!!\n", inst);
return;
@@ -4367,8 +4344,7 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
if (mdi->disk.raid_disk == n)
break;
if (!mdi) {
- pr_err("%s: cannot find raid disk %d\n",
- __func__, n);
+ pr_err("cannot find raid disk %d\n", n);
return;
}
@@ -4379,9 +4355,8 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
mdi->disk.minor == dl->minor)
break;
if (!dl) {
- pr_err("%s: cannot find raid disk %d (%d/%d)\n",
- __func__, n,
- mdi->disk.major, mdi->disk.minor);
+ pr_err("cannot find raid disk %d (%d/%d)\n",
+ n, mdi->disk.major, mdi->disk.minor);
return;
}
@@ -4389,11 +4364,11 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
if (pd < 0 || pd != dl->pdnum) {
/* disk doesn't currently exist or has changed.
* If it is now in_sync, insert it. */
- dprintf("%s: phys disk not found for %d: %d/%d ref %08x\n",
- __func__, dl->pdnum, dl->major, dl->minor,
+ dprintf("phys disk not found for %d: %d/%d ref %08x\n",
+ dl->pdnum, dl->major, dl->minor,
be32_to_cpu(dl->disk.refnum));
- dprintf("%s: array %u disk %u ref %08x pd %d\n",
- __func__, inst, n_bvd,
+ dprintf("array %u disk %u ref %08x pd %d\n",
+ inst, n_bvd,
be32_to_cpu(vc->phys_refnum[n_bvd]), pd);
if ((state & DS_INSYNC) && ! (state & DS_FAULTY) &&
dl->pdnum >= 0) {
@@ -4480,13 +4455,11 @@ static int _kill_subarray_ddf(struct ddf_super *ddf, const char *guid)
unsigned int vdnum, i;
vdnum = find_vde_by_guid(ddf, guid);
if (vdnum == DDF_NOTFOUND) {
- pr_err("%s: could not find VD %s\n", __func__,
- guid_str(guid));
+ pr_err("could not find VD %s\n", guid_str(guid));
return -1;
}
if (del_from_conflist(&ddf->conflist, guid) == 0) {
- pr_err("%s: could not find conf %s\n", __func__,
- guid_str(guid));
+ pr_err("could not find conf %s\n", guid_str(guid));
return -1;
}
for (dl = ddf->dlist; dl; dl = dl->next)
@@ -4496,7 +4469,7 @@ static int _kill_subarray_ddf(struct ddf_super *ddf, const char *guid)
DDF_GUID_LEN))
dl->vlist[i] = NULL;
memset(ddf->virt->entries[vdnum].guid, 0xff, DDF_GUID_LEN);
- dprintf("%s: deleted %s\n", __func__, guid_str(guid));
+ dprintf("deleted %s\n", guid_str(guid));
return 0;
}
@@ -4513,14 +4486,13 @@ static int kill_subarray_ddf(struct supertype *st)
ddf->currentconf = NULL;
if (!victim) {
- pr_err("%s: nothing to kill\n", __func__);
+ pr_err("nothing to kill\n");
return -1;
}
conf = &victim->conf;
vdnum = find_vde_by_guid(ddf, conf->guid);
if (vdnum == DDF_NOTFOUND) {
- pr_err("%s: could not find VD %s\n", __func__,
- guid_str(conf->guid));
+ pr_err("could not find VD %s\n", guid_str(conf->guid));
return -1;
}
if (st->update_tail) {
@@ -4529,8 +4501,7 @@ static int kill_subarray_ddf(struct supertype *st)
+ sizeof(struct virtual_entry);
vd = xmalloc(len);
if (vd == NULL) {
- pr_err("%s: failed to allocate %d bytes\n", __func__,
- len);
+ pr_err("failed to allocate %d bytes\n", len);
return -1;
}
memset(vd, 0 , len);
@@ -4565,7 +4536,7 @@ static void copy_matching_bvd(struct ddf_super *ddf,
return;
}
}
- pr_err("%s: no match for BVD %d of %s in update\n", __func__,
+ pr_err("no match for BVD %d of %s in update\n",
conf->sec_elmnt_seq, guid_str(conf->guid));
}
@@ -4637,8 +4608,8 @@ static void ddf_process_virt_update(struct supertype *st,
} else {
ent = find_vde_by_guid(ddf, vd->entries[0].guid);
if (ent != DDF_NOTFOUND) {
- dprintf("%s: VD %s exists already in slot %d\n",
- __func__, guid_str(vd->entries[0].guid),
+ dprintf("VD %s exists already in slot %d\n",
+ guid_str(vd->entries[0].guid),
ent);
return;
}
@@ -4650,8 +4621,8 @@ static void ddf_process_virt_update(struct supertype *st,
cpu_to_be16(
1 + be16_to_cpu(
ddf->virt->populated_vdes));
- dprintf("%s: added VD %s in slot %d(s=%02x i=%02x)\n",
- __func__, guid_str(vd->entries[0].guid), ent,
+ dprintf("added VD %s in slot %d(s=%02x i=%02x)\n",
+ guid_str(vd->entries[0].guid), ent,
ddf->virt->entries[ent].state,
ddf->virt->entries[ent].init_state);
}
@@ -4788,15 +4759,15 @@ static void ddf_process_conf_update(struct supertype *st,
vc = (struct vd_config*)update->buf;
len = ddf->conf_rec_len * 512;
if ((unsigned int)update->len != len * vc->sec_elmnt_count) {
- pr_err("%s: %s: insufficient data (%d) for %u BVDs\n",
- __func__, guid_str(vc->guid), update->len,
+ pr_err("%s: insufficient data (%d) for %u BVDs\n",
+ guid_str(vc->guid), update->len,
vc->sec_elmnt_count);
return;
}
for (vcl = ddf->conflist; vcl ; vcl = vcl->next)
if (memcmp(vcl->conf.guid, vc->guid, DDF_GUID_LEN) == 0)
break;
- dprintf("%s: conf update for %s (%s)\n", __func__,
+ dprintf("conf update for %s (%s)\n",
guid_str(vc->guid), (vcl ? "old" : "new"));
if (vcl) {
/* An update, just copy the phys_refnum and lba_offset
@@ -4964,7 +4935,7 @@ static int raid10_degraded(struct mdinfo *info)
for (d = info->devs; d; d = d->next) {
i = d->disk.raid_disk / n_prim;
if (i >= n_bvds) {
- pr_err("%s: BUG: invalid raid disk\n", __func__);
+ pr_err("BUG: invalid raid disk\n");
goto out;
}
if (d->state_fd > 0)
@@ -4973,12 +4944,11 @@ static int raid10_degraded(struct mdinfo *info)
ret = 2;
for (i = 0; i < n_bvds; i++)
if (!found[i]) {
- dprintf("%s: BVD %d/%d failed\n", __func__, i, n_bvds);
+ dprintf("BVD %d/%d failed\n", i, n_bvds);
ret = 0;
goto out;
} else if (found[i] < n_prim) {
- dprintf("%s: BVD %d/%d degraded\n", __func__, i,
- n_bvds);
+ dprintf("BVD %d/%d degraded\n", i, n_bvds);
ret = 1;
}
out:
@@ -5027,7 +4997,7 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a,
working ++;
}
- dprintf("%s: working=%d (%d) level=%d\n", __func__, working,
+ dprintf("working=%d (%d) level=%d\n", working,
a->info.array.raid_disks,
a->info.array.level);
if (working == a->info.array.raid_disks)
@@ -5212,8 +5182,8 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a,
&& dl->minor == di->disk.minor)
break;
if (!dl || dl->pdnum < 0) {
- pr_err("%s: BUG: can't find disk %d (%d/%d)\n",
- __func__, di->disk.raid_disk,
+ pr_err("BUG: can't find disk %d (%d/%d)\n",
+ di->disk.raid_disk,
di->disk.major, di->disk.minor);
return NULL;
}
diff --git a/super-gpt.c b/super-gpt.c
index 6a2f749e..1a2adce0 100644
--- a/super-gpt.c
+++ b/super-gpt.c
@@ -77,8 +77,7 @@ static int load_gpt(struct supertype *st, int fd, char *devname)
free_gpt(st);
if (posix_memalign((void**)&super, 4096, 32*512) != 0) {
- pr_err("%s could not allocate superblock\n",
- __func__);
+ pr_err("could not allocate superblock\n");
return 1;
}
diff --git a/super-intel.c b/super-intel.c
index e28ac7d3..90b7b6de 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -509,7 +509,9 @@ struct imsm_update_add_remove_disk {
static const char *_sys_dev_type[] = {
[SYS_DEV_UNKNOWN] = "Unknown",
[SYS_DEV_SAS] = "SAS",
- [SYS_DEV_SATA] = "SATA"
+ [SYS_DEV_SATA] = "SATA",
+ [SYS_DEV_NVME] = "NVMe",
+ [SYS_DEV_VMD] = "VMD"
};
const char *get_sys_dev_type(enum sys_dev_type type)
@@ -555,11 +557,30 @@ static int attach_hba_to_super(struct intel_super *super, struct sys_dev *device
if (super->hba == NULL) {
super->hba = alloc_intel_hba(device);
return 1;
- } else
- /* IMSM metadata disallows to attach disks to multiple
- * controllers.
- */
+ }
+
+ hba = super->hba;
+ /* Intel metadata allows for all disks attached to the same type HBA.
+ * Do not support HBA types mixing
+ */
+ if (device->type != hba->type)
+ return 2;
+
+ /* Always forbid spanning between VMD domains (seen as different controllers by mdadm) */
+ if (device->type == SYS_DEV_VMD && !path_attached_to_hba(device->path, hba->path))
+ return 2;
+
+ /* Multiple same type HBAs can be used if they share the same OROM */
+ const struct imsm_orom *device_orom = get_orom_by_device_id(device->dev_id);
+
+ if (device_orom != super->orom)
return 2;
+
+ while (hba->next)
+ hba = hba->next;
+
+ hba->next = alloc_intel_hba(device);
+ return 1;
}
static struct sys_dev* find_disk_attached_hba(int fd, const char *devname)
@@ -1370,7 +1391,7 @@ static int imsm_check_attributes(__u32 attributes)
}
if (not_supported)
- dprintf(Name "(IMSM): Unknown attributes : %x\n", not_supported);
+ dprintf("(IMSM): Unknown attributes : %x\n", not_supported);
ret_val = 0;
}
@@ -1693,7 +1714,8 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
break;
}
*c = '\0';
- if (sscanf(&path[hba_len], "host%d", &port) == 1)
+ if ((sscanf(&path[hba_len], "ata%d", &port) == 1) ||
+ ((sscanf(&path[hba_len], "host%d", &port) == 1)))
port -= host_base;
else {
if (verbose > 0) {
@@ -1744,6 +1766,57 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b
return err;
}
+static int print_vmd_attached_devs(struct sys_dev *hba)
+{
+ struct dirent *ent;
+ DIR *dir;
+ char path[292];
+ char link[256];
+ char *c, *rp;
+
+ if (hba->type != SYS_DEV_VMD)
+ return 1;
+
+ /* scroll through /sys/dev/block looking for devices attached to
+ * this hba
+ */
+ dir = opendir("/sys/bus/pci/drivers/nvme");
+ for (ent = dir ? readdir(dir) : NULL; ent; ent = readdir(dir)) {
+ int n;
+
+ /* is 'ent' a device? check that the 'subsystem' link exists and
+ * that its target matches 'bus'
+ */
+ sprintf(path, "/sys/bus/pci/drivers/nvme/%s/subsystem",
+ ent->d_name);
+ n = readlink(path, link, sizeof(link));
+ if (n < 0 || n >= (int)sizeof(link))
+ continue;
+ link[n] = '\0';
+ c = strrchr(link, '/');
+ if (!c)
+ continue;
+ if (strncmp("pci", c+1, strlen("pci")) != 0)
+ continue;
+
+ sprintf(path, "/sys/bus/pci/drivers/nvme/%s", ent->d_name);
+ /* if not a intel NVMe - skip it*/
+ if (devpath_to_vendor(path) != 0x8086)
+ continue;
+
+ rp = realpath(path, NULL);
+ if (!rp)
+ continue;
+
+ if (path_attached_to_hba(rp, hba->path)) {
+ printf(" NVMe under VMD : %s\n", rp);
+ }
+ free(rp);
+ }
+
+ return 0;
+}
+
static void print_found_intel_controllers(struct sys_dev *elem)
{
for (; elem; elem = elem->next) {
@@ -1752,7 +1825,14 @@ static void print_found_intel_controllers(struct sys_dev *elem)
fprintf(stderr, "SATA ");
else if (elem->type == SYS_DEV_SAS)
fprintf(stderr, "SAS ");
- fprintf(stderr, "RAID controller");
+ else if (elem->type == SYS_DEV_NVME)
+ fprintf(stderr, "NVMe ");
+
+ if (elem->type == SYS_DEV_VMD)
+ fprintf(stderr, "VMD domain");
+ else
+ fprintf(stderr, "RAID controller");
+
if (elem->pci_id)
fprintf(stderr, " at %s", elem->pci_id);
fprintf(stderr, ".\n");
@@ -1773,7 +1853,8 @@ static int ahci_get_port_count(const char *hba_path, int *port_count)
for (ent = readdir(dir); ent; ent = readdir(dir)) {
int host;
- if (sscanf(ent->d_name, "host%d", &host) != 1)
+ if ((sscanf(ent->d_name, "ata%d", &host) != 1) &&
+ ((sscanf(ent->d_name, "host%d", &host) != 1)))
continue;
if (*port_count == 0)
host_base = host;
@@ -1789,9 +1870,15 @@ static int ahci_get_port_count(const char *hba_path, int *port_count)
static void print_imsm_capability(const struct imsm_orom *orom)
{
- printf(" Platform : Intel(R) Matrix Storage Manager\n");
- printf(" Version : %d.%d.%d.%d\n", orom->major_ver, orom->minor_ver,
- orom->hotfix_ver, orom->build);
+ printf(" Platform : Intel(R) ");
+ if (orom->capabilities == 0 && orom->driver_features == 0)
+ printf("Matrix Storage Manager\n");
+ else
+ printf("Rapid Storage Technology%s\n",
+ imsm_orom_is_enterprise(orom) ? " enterprise" : "");
+ if (orom->major_ver || orom->minor_ver || orom->hotfix_ver || orom->build)
+ printf(" Version : %d.%d.%d.%d\n", orom->major_ver,
+ orom->minor_ver, orom->hotfix_ver, orom->build);
printf(" RAID Levels :%s%s%s%s%s\n",
imsm_orom_has_raid0(orom) ? " raid0" : "",
imsm_orom_has_raid1(orom) ? " raid1" : "",
@@ -1820,16 +1907,18 @@ static void print_imsm_capability(const struct imsm_orom *orom)
printf(" 2TB disks :%s supported\n",
(orom->attr & IMSM_OROM_ATTR_2TB_DISK)?"":" not");
printf(" Max Disks : %d\n", orom->tds);
- printf(" Max Volumes : %d per array, %d per controller\n",
- orom->vpa, orom->vphba);
+ printf(" Max Volumes : %d per array, %d per %s\n",
+ orom->vpa, orom->vphba,
+ imsm_orom_is_nvme(orom) ? "platform" : "controller");
return;
}
static void print_imsm_capability_export(const struct imsm_orom *orom)
{
printf("MD_FIRMWARE_TYPE=imsm\n");
- printf("IMSM_VERSION=%d.%d.%d.%d\n",orom->major_ver, orom->minor_ver,
- orom->hotfix_ver, orom->build);
+ if (orom->major_ver || orom->minor_ver || orom->hotfix_ver || orom->build)
+ printf("IMSM_VERSION=%d.%d.%d.%d\n", orom->major_ver, orom->minor_ver,
+ orom->hotfix_ver, orom->build);
printf("IMSM_SUPPORTED_RAID_LEVELS=%s%s%s%s%s\n",
imsm_orom_has_raid0(orom) ? "raid0 " : "",
imsm_orom_has_raid1(orom) ? "raid1 " : "",
@@ -1873,7 +1962,6 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
* platform capabilities. If raid support is disabled in the BIOS the
* option-rom capability structure will not be available.
*/
- const struct imsm_orom *orom;
struct sys_dev *list, *hba;
int host_base = 0;
int port_count = 0;
@@ -1886,13 +1974,12 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
if (!list)
return 2;
for (hba = list; hba; hba = hba->next) {
- orom = find_imsm_capability(hba->type);
- if (!orom) {
- result = 2;
+ if (find_imsm_capability(hba)) {
+ result = 0;
break;
}
else
- result = 0;
+ result = 2;
}
return result;
}
@@ -1900,46 +1987,82 @@ static int detail_platform_imsm(int verbose, int enumerate_only, char *controlle
list = find_intel_devices();
if (!list) {
if (verbose > 0)
- pr_err("no active Intel(R) RAID "
- "controller found.\n");
+ pr_err("no active Intel(R) RAID controller found.\n");
return 2;
} else if (verbose > 0)
print_found_intel_controllers(list);
for (hba = list; hba; hba = hba->next) {
- if (controller_path && (compare_paths(hba->path,controller_path) != 0))
+ if (controller_path && (compare_paths(hba->path, controller_path) != 0))
continue;
- orom = find_imsm_capability(hba->type);
- if (!orom)
+ if (!find_imsm_capability(hba)) {
+ char buf[PATH_MAX];
pr_err("imsm capabilities not found for controller: %s (type %s)\n",
- hba->path, get_sys_dev_type(hba->type));
- else {
- result = 0;
- print_imsm_capability(orom);
+ hba->type == SYS_DEV_VMD ? vmd_domain_to_controller(hba, buf) : hba->path,
+ get_sys_dev_type(hba->type));
+ continue;
+ }
+ result = 0;
+ }
+
+ if (controller_path && result == 1) {
+ pr_err("no active Intel(R) RAID controller found under %s\n",
+ controller_path);
+ return result;
+ }
+
+ const struct orom_entry *entry;
+
+ for (entry = orom_entries; entry; entry = entry->next) {
+ if (entry->type == SYS_DEV_VMD) {
+ for (hba = list; hba; hba = hba->next) {
+ if (hba->type == SYS_DEV_VMD) {
+ char buf[PATH_MAX];
+ print_imsm_capability(&entry->orom);
+ printf(" I/O Controller : %s (%s)\n",
+ vmd_domain_to_controller(hba, buf), get_sys_dev_type(hba->type));
+ print_vmd_attached_devs(hba);
+ printf("\n");
+ }
+ }
+ continue;
+ }
+
+ print_imsm_capability(&entry->orom);
+ if (entry->type == SYS_DEV_NVME) {
+ for (hba = list; hba; hba = hba->next) {
+ if (hba->type == SYS_DEV_NVME)
+ printf(" NVMe Device : %s\n", hba->path);
+ }
+ printf("\n");
+ continue;
+ }
+
+ struct devid_list *devid;
+ for (devid = entry->devid_list; devid; devid = devid->next) {
+ hba = device_by_id(devid->devid);
+ if (!hba)
+ continue;
+
printf(" I/O Controller : %s (%s)\n",
hba->path, get_sys_dev_type(hba->type));
if (hba->type == SYS_DEV_SATA) {
host_base = ahci_get_port_count(hba->path, &port_count);
if (ahci_enumerate_ports(hba->path, port_count, host_base, verbose)) {
if (verbose > 0)
- pr_err("failed to enumerate "
- "ports on SATA controller at %s.\n", hba->pci_id);
+ pr_err("failed to enumerate ports on SATA controller at %s.\n", hba->pci_id);
result |= 2;
}
}
}
+ printf("\n");
}
- if (controller_path && result == 1)
- pr_err("no active Intel(R) RAID "
- "controller found under %s\n",controller_path);
-
return result;
}
static int export_detail_platform_imsm(int verbose, char *controller_path)
{
- const struct imsm_orom *orom;
struct sys_dev *list, *hba;
int result=1;
@@ -1954,15 +2077,24 @@ static int export_detail_platform_imsm(int verbose, char *controller_path)
for (hba = list; hba; hba = hba->next) {
if (controller_path && (compare_paths(hba->path,controller_path) != 0))
continue;
- orom = find_imsm_capability(hba->type);
- if (!orom) {
- if (verbose > 0)
- pr_err("IMSM_DETAIL_PLATFORM_ERROR=NO_IMSM_CAPABLE_DEVICE_UNDER_%s\n",hba->path);
+ if (!find_imsm_capability(hba) && verbose > 0) {
+ char buf[PATH_MAX];
+ pr_err("IMSM_DETAIL_PLATFORM_ERROR=NO_IMSM_CAPABLE_DEVICE_UNDER_%s\n",
+ hba->type == SYS_DEV_VMD ? vmd_domain_to_controller(hba, buf) : hba->path);
}
- else {
- print_imsm_capability_export(orom);
+ else
result = 0;
+ }
+
+ const struct orom_entry *entry;
+
+ for (entry = orom_entries; entry; entry = entry->next) {
+ if (entry->type == SYS_DEV_VMD) {
+ for (hba = list; hba; hba = hba->next)
+ print_imsm_capability_export(&entry->orom);
+ continue;
}
+ print_imsm_capability_export(&entry->orom);
}
return result;
@@ -2142,7 +2274,7 @@ static __u8 imsm_num_data_members(struct imsm_dev *dev, int second_map)
case 5:
return map->num_members - 1;
default:
- dprintf("%s: unsupported raid level\n", __func__);
+ dprintf("unsupported raid level\n");
return 0;
}
}
@@ -2399,7 +2531,7 @@ static int imsm_create_metadata_checkpoint_update(
int update_memory_size = 0;
- dprintf("imsm_create_metadata_checkpoint_update(enter)\n");
+ dprintf("(enter)\n");
if (u == NULL)
return 0;
@@ -2411,14 +2543,12 @@ static int imsm_create_metadata_checkpoint_update(
*u = xcalloc(1, update_memory_size);
if (*u == NULL) {
- dprintf("error: cannot get memory for "
- "imsm_create_metadata_checkpoint_update update\n");
+ dprintf("error: cannot get memory\n");
return 0;
}
(*u)->type = update_general_migration_checkpoint;
(*u)->curr_migr_unit = __le32_to_cpu(super->migr_rec->curr_migr_unit);
- dprintf("imsm_create_metadata_checkpoint_update: prepared for %u\n",
- (*u)->curr_migr_unit);
+ dprintf("prepared for %u\n", (*u)->curr_migr_unit);
return update_memory_size;
}
@@ -2553,9 +2683,7 @@ static unsigned long long imsm_component_size_aligment_check(int level,
*/
component_size_alligment = component_size % (chunk_size/512);
- dprintf("imsm_component_size_aligment_check(Level: %i, "
- "chunk_size = %i, component_size = %llu), "
- "component_size_alligment = %u\n",
+ dprintf("(Level: %i, chunk_size = %i, component_size = %llu), component_size_alligment = %u\n",
level, chunk_size, component_size,
component_size_alligment);
@@ -2563,7 +2691,7 @@ static unsigned long long imsm_component_size_aligment_check(int level,
dprintf("imsm: reported component size alligned from %llu ",
component_size);
component_size -= component_size_alligment;
- dprintf("to %llu (%i).\n",
+ dprintf_cont("to %llu (%i).\n",
component_size, component_size_alligment);
}
@@ -2703,8 +2831,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
info->reshape_progress = blocks_per_unit * units;
- dprintf("IMSM: General Migration checkpoint : %llu "
- "(%llu) -> read reshape progress : %llu\n",
+ dprintf("IMSM: General Migration checkpoint : %llu (%llu) -> read reshape progress : %llu\n",
(unsigned long long)units,
(unsigned long long)blocks_per_unit,
info->reshape_progress);
@@ -2883,7 +3010,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
*/
max_enough = max(max_enough, enough);
}
- dprintf("%s: enough: %d\n", __func__, max_enough);
+ dprintf("enough: %d\n", max_enough);
info->container_enough = max_enough;
if (super->disks) {
@@ -3087,13 +3214,18 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst)
* use the same Intel hba
* If not on Intel hba at all, allow anything.
*/
- if (!check_env("IMSM_NO_PLATFORM")) {
- if (first->hba && sec->hba &&
- strcmp(first->hba->path, sec->hba->path) != 0) {
+ if (!check_env("IMSM_NO_PLATFORM") && first->hba && sec->hba) {
+ if (first->hba->type != sec->hba->type) {
fprintf(stderr,
- "HBAs of devices does not match %s != %s\n",
- first->hba ? first->hba->path : NULL,
- sec->hba ? sec->hba->path : NULL);
+ "HBAs of devices do not match %s != %s\n",
+ get_sys_dev_type(first->hba->type),
+ get_sys_dev_type(sec->hba->type));
+ return 3;
+ }
+ if (first->orom != sec->orom) {
+ fprintf(stderr,
+ "HBAs of devices do not match %s != %s\n",
+ first->hba->pci_id, sec->hba->pci_id);
return 3;
}
}
@@ -3568,8 +3700,7 @@ static int load_imsm_mpb(int fd, struct intel_super *super, char *devname)
if (posix_memalign((void**)&anchor, 512, 512) != 0) {
if (devname)
- pr_err("Failed to allocate imsm anchor buffer"
- " on %s\n", devname);
+ pr_err("Failed to allocate imsm anchor buffer on %s\n", devname);
return 1;
}
if (read(fd, anchor, 512) != 512) {
@@ -3606,7 +3737,7 @@ static int load_imsm_mpb(int fd, struct intel_super *super, char *devname)
free(anchor);
if (posix_memalign(&super->migr_rec_buf, 512, MIGR_REC_BUF_SIZE) != 0) {
- pr_err("%s could not allocate migr_rec buffer\n", __func__);
+ pr_err("could not allocate migr_rec buffer\n");
free(super->buf);
return 2;
}
@@ -3817,14 +3948,14 @@ static int find_intel_hba_capability(int fd, struct intel_super *super, char *de
if (devname) {
struct intel_hba *hba = super->hba;
- pr_err("%s is attached to Intel(R) %s RAID "
- "controller (%s),\n"
- " but the container is assigned to Intel(R) "
- "%s RAID controller (",
+ pr_err("%s is attached to Intel(R) %s %s (%s),\n"
+ " but the container is assigned to Intel(R) %s %s (",
devname,
- hba_name->path,
+ get_sys_dev_type(hba_name->type),
+ hba_name->type == SYS_DEV_VMD ? "domain" : "RAID controller",
hba_name->pci_id ? : "Err!",
- get_sys_dev_type(hba_name->type));
+ get_sys_dev_type(super->hba->type),
+ hba->type == SYS_DEV_VMD ? "domain" : "RAID controller");
while (hba) {
fprintf(stderr, "%s", hba->pci_id ? : "Err!");
@@ -3832,16 +3963,16 @@ static int find_intel_hba_capability(int fd, struct intel_super *super, char *de
fprintf(stderr, ", ");
hba = hba->next;
}
-
- fprintf(stderr, ").\n");
- cont_err("Mixing devices attached to multiple controllers "
- "is not allowed.\n");
+ fprintf(stderr, ").\n"
+ " Mixing devices attached to different %s is not allowed.\n",
+ hba_name->type == SYS_DEV_VMD ? "VMD domains" : "controllers");
}
return 2;
}
- super->orom = find_imsm_capability(hba_name->type);
+ super->orom = find_imsm_capability(hba_name);
if (!super->orom)
return 3;
+
return 0;
}
@@ -3906,8 +4037,8 @@ static int __prep_thunderdome(struct intel_super **table, int tbl_size,
if (tbl_mpb->family_num == mpb->family_num) {
if (tbl_mpb->check_sum == mpb->check_sum) {
- dprintf("%s: mpb from %d:%d matches %d:%d\n",
- __func__, super->disks->major,
+ dprintf("mpb from %d:%d matches %d:%d\n",
+ super->disks->major,
super->disks->minor,
table[i]->disks->major,
table[i]->disks->minor);
@@ -3924,8 +4055,8 @@ static int __prep_thunderdome(struct intel_super **table, int tbl_size,
*/
struct intel_disk *idisk;
- dprintf("%s: mpb from %d:%d replaces %d:%d\n",
- __func__, super->disks->major,
+ dprintf("mpb from %d:%d replaces %d:%d\n",
+ super->disks->major,
super->disks->minor,
table[i]->disks->major,
table[i]->disks->minor);
@@ -3953,8 +4084,8 @@ static int __prep_thunderdome(struct intel_super **table, int tbl_size,
idisk->disk.status |= CONFIGURED_DISK;
}
- dprintf("%s: mpb from %d:%d prefer %d:%d\n",
- __func__, super->disks->major,
+ dprintf("mpb from %d:%d prefer %d:%d\n",
+ super->disks->major,
super->disks->minor,
table[i]->disks->major,
table[i]->disks->minor);
@@ -4013,12 +4144,12 @@ validate_members(struct intel_super *super, struct intel_disk *disk_list,
idisk->owner == IMSM_UNKNOWN_OWNER)
ok_count++;
else
- dprintf("%s: '%.16s' owner %d != %d\n",
- __func__, disk->serial, idisk->owner,
+ dprintf("'%.16s' owner %d != %d\n",
+ disk->serial, idisk->owner,
owner);
} else {
- dprintf("%s: unknown disk %x [%d]: %.16s\n",
- __func__, __le32_to_cpu(mpb->family_num), i,
+ dprintf("unknown disk %x [%d]: %.16s\n",
+ __le32_to_cpu(mpb->family_num), i,
disk->serial);
break;
}
@@ -4074,8 +4205,8 @@ imsm_thunderdome(struct intel_super **super_list, int len)
s = NULL;
if (!s)
- dprintf("%s: marking family: %#x from %d:%d offline\n",
- __func__, mpb->family_num,
+ dprintf("marking family: %#x from %d:%d offline\n",
+ mpb->family_num,
super_table[i]->disks->major,
super_table[i]->disks->minor);
super_table[i] = s;
@@ -4122,8 +4253,7 @@ imsm_thunderdome(struct intel_super **super_list, int len)
champion = s;
if (conflict)
- pr_err("Chose family %#x on '%s', "
- "assemble conflicts to new container with '--update=uuid'\n",
+ pr_err("Chose family %#x on '%s', assemble conflicts to new container with '--update=uuid'\n",
__le32_to_cpu(s->anchor->family_num), s->disks->devname);
/* collect all dl's onto 'champion', and update them to
@@ -4463,8 +4593,7 @@ static int load_super_imsm(struct supertype *st, int fd, char *devname)
if (rv) {
if (devname)
- pr_err("Failed to load all information "
- "sections on %s\n", devname);
+ pr_err("Failed to load all information sections on %s\n", devname);
free_imsm(super);
return rv;
}
@@ -4600,8 +4729,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
unsigned long long num_data_stripes;
if (super->orom && mpb->num_raid_devs >= super->orom->vpa) {
- pr_err("This imsm-container already has the "
- "maximum of %d volumes\n", super->orom->vpa);
+ pr_err("This imsm-container already has the maximum of %d volumes\n", super->orom->vpa);
return 0;
}
@@ -4618,8 +4746,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
}
if (posix_memalign(&super->migr_rec_buf, 512,
MIGR_REC_BUF_SIZE) != 0) {
- pr_err("%s could not allocate migr_rec buffer\n",
- __func__);
+ pr_err("could not allocate migr_rec buffer\n");
free(super->buf);
free(super);
free(mpb_new);
@@ -4703,8 +4830,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
if (info->level == 1 && info->raid_disks > 2) {
free(dev);
free(dv);
- pr_err("imsm does not support more than 2 disks"
- "in a raid1 volume\n");
+ pr_err("imsm does not support more than 2 disksin a raid1 volume\n");
return 0;
}
@@ -4777,11 +4903,11 @@ static int init_super_imsm(struct supertype *st, mdu_array_info_t *info,
super = NULL;
}
if (!super) {
- pr_err("%s could not allocate superblock\n", __func__);
+ pr_err("could not allocate superblock\n");
return 0;
}
if (posix_memalign(&super->migr_rec_buf, 512, MIGR_REC_BUF_SIZE) != 0) {
- pr_err("%s could not allocate migr_rec buffer\n", __func__);
+ pr_err("could not allocate migr_rec buffer\n");
free(super->buf);
free(super);
return 0;
@@ -5000,6 +5126,14 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
}
get_dev_size(fd, NULL, &size);
+ /* clear migr_rec when adding disk to container */
+ memset(super->migr_rec_buf, 0, MIGR_REC_BUF_SIZE);
+ if (lseek64(fd, size - MIGR_REC_POSITION, SEEK_SET) >= 0) {
+ if (write(fd, super->migr_rec_buf,
+ MIGR_REC_BUF_SIZE) != MIGR_REC_BUF_SIZE)
+ perror("Write migr_rec failed");
+ }
+
size /= 512;
serialcpy(dd->disk.serial, dd->serial);
set_total_blocks(&dd->disk, size);
@@ -5035,8 +5169,7 @@ static int remove_from_super_imsm(struct supertype *st, mdu_disk_info_t *dk)
* is prepared.
*/
if (!st->update_tail) {
- pr_err("%s shall be used in mdmon context only"
- "(line %d).\n", __func__, __LINE__);
+ pr_err("shall be used in mdmon context only\n");
return 1;
}
dd = xcalloc(1, sizeof(*dd));
@@ -5069,13 +5202,13 @@ static int write_super_imsm_spares(struct intel_super *super, int doclose)
__u32 sum;
struct dl *d;
- spare->mpb_size = __cpu_to_le32(sizeof(struct imsm_super)),
- spare->generation_num = __cpu_to_le32(1UL),
+ spare->mpb_size = __cpu_to_le32(sizeof(struct imsm_super));
+ spare->generation_num = __cpu_to_le32(1UL);
spare->attributes = MPB_ATTRIB_CHECKSUM_VERIFY;
- spare->num_disks = 1,
- spare->num_raid_devs = 0,
- spare->cache_size = mpb->cache_size,
- spare->pwr_cycle_count = __cpu_to_le32(1),
+ spare->num_disks = 1;
+ spare->num_raid_devs = 0;
+ spare->cache_size = mpb->cache_size;
+ spare->pwr_cycle_count = __cpu_to_le32(1);
snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
MPB_SIGNATURE MPB_VERSION_RAID0);
@@ -5095,8 +5228,8 @@ static int write_super_imsm_spares(struct intel_super *super, int doclose)
spare->check_sum = __cpu_to_le32(sum);
if (store_imsm_mpb(d->fd, spare)) {
- pr_err("%s: failed for device %d:%d %s\n",
- __func__, d->major, d->minor, strerror(errno));
+ pr_err("failed for device %d:%d %s\n",
+ d->major, d->minor, strerror(errno));
return 1;
}
if (doclose) {
@@ -5189,8 +5322,8 @@ static int write_super_imsm(struct supertype *st, int doclose)
if (store_imsm_mpb(d->fd, mpb))
fprintf(stderr,
- "%s: failed for device %d:%d (fd: %d)%s\n",
- __func__, d->major, d->minor,
+ "failed for device %d:%d (fd: %d)%s\n",
+ d->major, d->minor,
d->fd, strerror(errno));
if (doclose) {
@@ -5345,7 +5478,7 @@ static int validate_geometry_imsm_container(struct supertype *st, int level,
#if DEBUG
char str[256];
fd2devname(fd, str);
- dprintf("validate_geometry_imsm_container: fd: %d %s orom: %p rv: %d raiddisk: %d\n",
+ dprintf("fd: %d %s orom: %p rv: %d raiddisk: %d\n",
fd, str, super->orom, rv, raiddisks);
#endif
/* no orom/efi or non-intel hba of the disk */
@@ -5357,8 +5490,7 @@ static int validate_geometry_imsm_container(struct supertype *st, int level,
if (super->orom) {
if (raiddisks > super->orom->tds) {
if (verbose)
- pr_err("%d exceeds maximum number of"
- " platform supported disks: %d\n",
+ pr_err("%d exceeds maximum number of platform supported disks: %d\n",
raiddisks, super->orom->tds);
free_imsm(super);
return 0;
@@ -5542,15 +5674,15 @@ active_arrays_by_format(char *name, char* hba, struct md_list **devlist,
for (vol = mdstat ; vol ; vol = vol->next) {
if ((vol->active > 0) &&
vol->metadata_version &&
- is_container_member(vol, memb->dev)) {
+ is_container_member(vol, memb->devnm)) {
found++;
count++;
}
}
if (*devlist && (found < dpa)) {
dv = xcalloc(1, sizeof(*dv));
- dv->devname = xmalloc(strlen(memb->dev) + strlen("/dev/") + 1);
- sprintf(dv->devname, "%s%s", "/dev/", memb->dev);
+ dv->devname = xmalloc(strlen(memb->devnm) + strlen("/dev/") + 1);
+ sprintf(dv->devname, "%s%s", "/dev/", memb->devnm);
dv->found = found;
dv->used = 0;
dv->next = *devlist;
@@ -5679,27 +5811,27 @@ count_volumes_list(struct md_list *devlist, char *homehost,
tmpdev->container = 0;
dfd = dev_open(devname, O_RDONLY|O_EXCL);
if (dfd < 0) {
- dprintf(": cannot open device %s: %s\n",
+ dprintf("cannot open device %s: %s\n",
devname, strerror(errno));
tmpdev->used = 2;
} else if (fstat(dfd, &stb)< 0) {
/* Impossible! */
- dprintf(": fstat failed for %s: %s\n",
+ dprintf("fstat failed for %s: %s\n",
devname, strerror(errno));
tmpdev->used = 2;
} else if ((stb.st_mode & S_IFMT) != S_IFBLK) {
- dprintf(": %s is not a block device.\n",
+ dprintf("%s is not a block device.\n",
devname);
tmpdev->used = 2;
} else if (must_be_container(dfd)) {
struct supertype *cst;
cst = super_by_fd(dfd, NULL);
if (cst == NULL) {
- dprintf(": cannot recognize container type %s\n",
+ dprintf("cannot recognize container type %s\n",
devname);
tmpdev->used = 2;
} else if (tst->ss != st->ss) {
- dprintf(": non-imsm container - ignore it: %s\n",
+ dprintf("non-imsm container - ignore it: %s\n",
devname);
tmpdev->used = 2;
} else if (!tst->ss->load_container ||
@@ -5713,11 +5845,11 @@ count_volumes_list(struct md_list *devlist, char *homehost,
} else {
tmpdev->st_rdev = stb.st_rdev;
if (tst->ss->load_super(tst,dfd, NULL)) {
- dprintf(": no RAID superblock on %s\n",
+ dprintf("no RAID superblock on %s\n",
devname);
tmpdev->used = 2;
} else if (tst->ss->compare_super == NULL) {
- dprintf(": Cannot assemble %s metadata on %s\n",
+ dprintf("Cannot assemble %s metadata on %s\n",
tst->ss->name, devname);
tmpdev->used = 2;
}
@@ -5754,7 +5886,7 @@ count_volumes_list(struct md_list *devlist, char *homehost,
* Or, if we are auto assembling, we just ignore the second
* for now.
*/
- dprintf(": superblock on %s doesn't match others - assembly aborted\n",
+ dprintf("superblock on %s doesn't match others - assembly aborted\n",
devname);
goto loop;
}
@@ -5776,7 +5908,7 @@ count_volumes_list(struct md_list *devlist, char *homehost,
if (iter->array.state & (1<<MD_SB_BLOCK_VOLUME)) {
/* do not assemble arrays with unsupported
configurations */
- dprintf(": Cannot activate member %s.\n",
+ dprintf("Cannot activate member %s.\n",
iter->text_version);
} else
count++;
@@ -5784,11 +5916,11 @@ count_volumes_list(struct md_list *devlist, char *homehost,
sysfs_free(head);
} else {
- dprintf(" no valid super block on device list: err: %d %p\n",
+ dprintf("No valid super block on device list: err: %d %p\n",
err, st->sb);
}
} else {
- dprintf(" no more devices to examin\n");
+ dprintf("no more devices to examine\n");
}
for (tmpdev = devlist; tmpdev; tmpdev = tmpdev->next) {
@@ -5810,37 +5942,75 @@ count_volumes_list(struct md_list *devlist, char *homehost,
}
static int
-count_volumes(char *hba, int dpa, int verbose)
+count_volumes(struct intel_hba *hba, int dpa, int verbose)
{
- struct md_list *devlist = NULL;
+ struct sys_dev *idev, *intel_devices = find_intel_devices();
int count = 0;
- int found = 0;;
+ const struct orom_entry *entry;
+ struct devid_list *dv, *devid_list;
+
+ if (!hba || !hba->path)
+ return 0;
- devlist = get_devices(hba);
- /* if no intel devices return zero volumes */
- if (devlist == NULL)
+ for (idev = intel_devices; idev; idev = idev->next) {
+ if (strstr(idev->path, hba->path))
+ break;
+ }
+
+ if (!idev || !idev->dev_id)
return 0;
- count = active_arrays_by_format("imsm", hba, &devlist, dpa, verbose);
- dprintf(" path: %s active arrays: %d\n", hba, count);
- if (devlist == NULL)
+ entry = get_orom_entry_by_device_id(idev->dev_id);
+
+ if (!entry || !entry->devid_list)
return 0;
- do {
- found = 0;
- count += count_volumes_list(devlist,
- NULL,
- verbose,
- &found);
- dprintf("found %d count: %d\n", found, count);
- } while (found);
-
- dprintf("path: %s total number of volumes: %d\n", hba, count);
-
- while(devlist) {
- struct md_list *dv = devlist;
- devlist = devlist->next;
- free(dv->devname);
- free(dv);
+
+ devid_list = entry->devid_list;
+ for (dv = devid_list; dv; dv = dv->next) {
+ struct md_list *devlist = NULL;
+ struct sys_dev *device = device_by_id(dv->devid);
+ char *hba_path;
+ int found = 0;
+
+ if (device)
+ hba_path = device->path;
+ else
+ return 0;
+
+ /* VMD has one orom entry for all domain, but spanning is not allowed.
+ * VMD arrays should be counted per domain (controller), so skip
+ * domains that are not the given one.
+ */
+ if ((hba->type == SYS_DEV_VMD) &&
+ (strncmp(device->path, hba->path, strlen(device->path)) != 0))
+ continue;
+
+ devlist = get_devices(hba_path);
+ /* if no intel devices return zero volumes */
+ if (devlist == NULL)
+ return 0;
+
+ count += active_arrays_by_format("imsm", hba_path, &devlist, dpa, verbose);
+ dprintf("path: %s active arrays: %d\n", hba_path, count);
+ if (devlist == NULL)
+ return 0;
+ do {
+ found = 0;
+ count += count_volumes_list(devlist,
+ NULL,
+ verbose,
+ &found);
+ dprintf("found %d count: %d\n", found, count);
+ } while (found);
+
+ dprintf("path: %s total number of volumes: %d\n", hba_path, count);
+
+ while (devlist) {
+ struct md_list *dv = devlist;
+ devlist = devlist->next;
+ free(dv->devname);
+ free(dv);
+ }
}
return count;
}
@@ -5877,8 +6047,7 @@ validate_geometry_imsm_orom(struct intel_super *super, int level, int layout,
*chunk = imsm_default_chunk(super->orom);
if (super->orom && !imsm_orom_has_chunk(super->orom, *chunk)) {
- pr_vrb(": platform does not support a chunk size of: "
- "%d\n", *chunk);
+ pr_vrb(": platform does not support a chunk size of: %d\n", *chunk);
return 0;
}
@@ -5898,6 +6067,7 @@ validate_geometry_imsm_orom(struct intel_super *super, int level, int layout,
pr_vrb(": platform does not support a volume size over 2TB\n");
return 0;
}
+
return 1;
}
@@ -5928,8 +6098,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
mpb = super->anchor;
if (!validate_geometry_imsm_orom(super, level, layout, raiddisks, chunk, size, verbose)) {
- pr_err("RAID gemetry validation failed. "
- "Cannot proceed with the action(s).\n");
+ pr_err("RAID gemetry validation failed. Cannot proceed with the action(s).\n");
return 0;
}
if (!dev) {
@@ -5970,9 +6139,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
}
if (dcnt < raiddisks) {
if (verbose)
- pr_err("imsm: Not enough "
- "devices with space for this array "
- "(%d < %d)\n",
+ pr_err("imsm: Not enough devices with space for this array (%d < %d)\n",
dcnt, raiddisks);
return 0;
}
@@ -5991,8 +6158,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
}
if (!dl) {
if (verbose)
- pr_err("%s is not in the "
- "same imsm set\n", dev);
+ pr_err("%s is not in the same imsm set\n", dev);
return 0;
} else if (super->orom && dl->index < 0 && mpb->num_raid_devs) {
/* If a volume is present then the current creation attempt
@@ -6000,15 +6166,12 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
* understand this configuration (all member disks must be
* members of each array in the container).
*/
- pr_err("%s is a spare and a volume"
- " is already defined for this container\n", dev);
- pr_err("The option-rom requires all member"
- " disks to be a member of all volumes\n");
+ pr_err("%s is a spare and a volume is already defined for this container\n", dev);
+ pr_err("The option-rom requires all member disks to be a member of all volumes\n");
return 0;
} else if (super->orom && mpb->num_raid_devs > 0 &&
mpb->num_disks != raiddisks) {
- pr_err("The option-rom requires all member"
- " disks to be a member of all volumes\n");
+ pr_err("The option-rom requires all member disks to be a member of all volumes\n");
return 0;
}
@@ -6051,21 +6214,16 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
if (!check_env("IMSM_NO_PLATFORM") &&
mpb->num_raid_devs > 0 && size && size != maxsize) {
- pr_err("attempting to create a second "
- "volume with size less then remaining space. "
- "Aborting...\n");
+ pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
return 0;
}
if (maxsize < size || maxsize == 0) {
if (verbose) {
if (maxsize == 0)
- pr_err("no free space"
- " left on device. Aborting...\n");
+ pr_err("no free space left on device. Aborting...\n");
else
- pr_err("not enough space"
- " to create volume of given size"
- " (%llu < %llu). Aborting...\n",
+ pr_err("not enough space to create volume of given size (%llu < %llu). Aborting...\n",
maxsize, size);
}
return 0;
@@ -6074,7 +6232,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
*freesize = maxsize;
if (super->orom) {
- int count = count_volumes(super->hba->path,
+ int count = count_volumes(super->hba,
super->orom->dpa, verbose);
if (super->orom->vphba <= count) {
pr_vrb(": platform does not support more than %d raid volumes.\n",
@@ -6151,9 +6309,7 @@ static int imsm_get_free_size(struct supertype *st, int raiddisks,
}
if (!check_env("IMSM_NO_PLATFORM") &&
mpb->num_raid_devs > 0 && size && size != maxsize) {
- pr_err("attempting to create a second "
- "volume with size less then remaining space. "
- "Aborting...\n");
+ pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
return 0;
}
cnt = 0;
@@ -6232,11 +6388,10 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
created */
if (super->orom && freesize) {
int count;
- count = count_volumes(super->hba->path,
+ count = count_volumes(super->hba,
super->orom->dpa, verbose);
if (super->orom->vphba <= count) {
- pr_vrb(": platform does not support more"
- " than %d raid volumes.\n",
+ pr_vrb(": platform does not support more than %d raid volumes.\n",
super->orom->vphba);
return 0;
}
@@ -6520,7 +6675,7 @@ static void update_recovery_start(struct intel_super *super,
* IMSM_ORD_REBUILD, so assume they are missing and the
* disk_ord_tbl was not correctly updated
*/
- dprintf("%s: failed to locate out-of-sync disk\n", __func__);
+ dprintf("failed to locate out-of-sync disk\n");
return;
}
@@ -6554,14 +6709,12 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
/* do not assemble arrays when not all attributes are supported */
if (imsm_check_attributes(mpb->attributes) == 0) {
sb_errors = 1;
- pr_err("Unsupported attributes in IMSM metadata."
- "Arrays activation is blocked.\n");
+ pr_err("Unsupported attributes in IMSM metadata.Arrays activation is blocked.\n");
}
/* check for bad blocks */
if (imsm_bbm_log_size(super->anchor)) {
- pr_err("BBM log found in IMSM metadata."
- "Arrays activation is blocked.\n");
+ pr_err("BBM log found in IMSM metadata.Arrays activation is blocked.\n");
sb_errors = 1;
}
@@ -6595,8 +6748,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
*/
if (dev->vol.migr_state &&
(migr_type(dev) == MIGR_STATE_CHANGE)) {
- pr_err("cannot assemble volume '%.16s':"
- " unsupported migration in progress\n",
+ pr_err("cannot assemble volume '%.16s': unsupported migration in progress\n",
dev->volume);
continue;
}
@@ -6618,8 +6770,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
map->num_members, /* raid disks */
&chunk, join_u32(dev->size_low, dev->size_high),
1 /* verbose */)) {
- pr_err("IMSM RAID geometry validation"
- " failed. Array %s activation is blocked.\n",
+ pr_err("IMSM RAID geometry validation failed. Array %s activation is blocked.\n",
dev->volume);
this->array.state |=
(1<<MD_SB_BLOCK_CONTAINER_RESHAPE) |
@@ -6841,8 +6992,7 @@ static int imsm_open_new(struct supertype *c, struct active_array *a,
struct imsm_super *mpb = super->anchor;
if (atoi(inst) >= mpb->num_raid_devs) {
- pr_err("%s: subarry index %d, out of range\n",
- __func__, atoi(inst));
+ pr_err("subarry index %d, out of range\n", atoi(inst));
return -ENODEV;
}
@@ -7255,7 +7405,7 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
case IMSM_T_STATE_NORMAL: /* transition to normal state */
dprintf("normal: ");
if (is_rebuilding(dev)) {
- dprintf("while rebuilding");
+ dprintf_cont("while rebuilding");
/* check if recovery is really finished */
for (mdi = a->info.devs; mdi ; mdi = mdi->next)
if (mdi->recovery_start != MaxSector) {
@@ -7263,8 +7413,8 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
break;
}
if (recovery_not_finished) {
- dprintf("\nimsm: Rebuild has not finished yet, "
- "state not changed");
+ dprintf_cont("\n");
+ dprintf("Rebuild has not finished yet, state not changed");
if (a->last_checkpoint < mdi->recovery_start) {
a->last_checkpoint = mdi->recovery_start;
super->updates_pending++;
@@ -7279,7 +7429,7 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
break;
}
if (is_gen_migration(dev)) {
- dprintf("while general migration");
+ dprintf_cont("while general migration");
if (a->last_checkpoint >= a->info.component_size)
end_migration(dev, super, map_state);
else
@@ -7291,26 +7441,26 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
}
break;
case IMSM_T_STATE_DEGRADED: /* transition to degraded state */
- dprintf("degraded: ");
+ dprintf_cont("degraded: ");
if ((map->map_state != map_state) &&
!dev->vol.migr_state) {
- dprintf("mark degraded");
+ dprintf_cont("mark degraded");
map->map_state = map_state;
super->updates_pending++;
a->last_checkpoint = 0;
break;
}
if (is_rebuilding(dev)) {
- dprintf("while rebuilding.");
+ dprintf_cont("while rebuilding.");
if (map->map_state != map_state) {
- dprintf(" Map state change");
+ dprintf_cont(" Map state change");
end_migration(dev, super, map_state);
super->updates_pending++;
}
break;
}
if (is_gen_migration(dev)) {
- dprintf("while general migration");
+ dprintf_cont("while general migration");
if (a->last_checkpoint >= a->info.component_size)
end_migration(dev, super, map_state);
else {
@@ -7321,22 +7471,22 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
break;
}
if (is_initializing(dev)) {
- dprintf("while initialization.");
+ dprintf_cont("while initialization.");
map->map_state = map_state;
super->updates_pending++;
break;
}
break;
case IMSM_T_STATE_FAILED: /* transition to failed state */
- dprintf("failed: ");
+ dprintf_cont("failed: ");
if (is_gen_migration(dev)) {
- dprintf("while general migration");
+ dprintf_cont("while general migration");
map->map_state = map_state;
super->updates_pending++;
break;
}
if (map->map_state != map_state) {
- dprintf("mark failed");
+ dprintf_cont("mark failed");
end_migration(dev, super, map_state);
super->updates_pending++;
a->last_checkpoint = 0;
@@ -7344,10 +7494,9 @@ static void imsm_set_disk(struct active_array *a, int n, int state)
}
break;
default:
- dprintf("state %i\n", map_state);
+ dprintf_cont("state %i\n", map_state);
}
- dprintf("\n");
-
+ dprintf_cont("\n");
}
static int store_imsm_mpb(int fd, struct imsm_super *mpb)
@@ -7409,7 +7558,7 @@ static struct dl *imsm_readd(struct intel_super *super, int idx, struct active_a
dl = NULL;
if (dl)
- dprintf("%s: found %x:%x\n", __func__, dl->major, dl->minor);
+ dprintf("found %x:%x\n", dl->major, dl->minor);
return dl;
}
@@ -7610,8 +7759,7 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
/* Cannot activate another spare if rebuild is in progress already
*/
if (is_rebuilding(dev)) {
- dprintf("imsm: No spare activation allowed. "
- "Rebuild in progress already.\n");
+ dprintf("imsm: No spare activation allowed. Rebuild in progress already.\n");
return NULL;
}
@@ -7631,8 +7779,7 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
* are removed from container.
*/
if (failed) {
- dprintf("found failed disks in %.*s, check if there another"
- "failed sub-array.\n",
+ dprintf("found failed disks in %.*s, check if there anotherfailed sub-array.\n",
MAX_RAID_SERIAL_LEN, dev->volume);
/* check if states of the other volumes allow for rebuild */
for (i = 0; i < super->anchor->num_raid_devs; i++) {
@@ -7776,8 +7923,7 @@ static int remove_disk_super(struct intel_super *super, int major, int minor)
super->disks = dl->next;
dl->next = NULL;
__free_imsm_disk(dl);
- dprintf("%s: removed %x:%x\n",
- __func__, major, minor);
+ dprintf("removed %x:%x\n", major, minor);
break;
}
prev = dl;
@@ -7803,9 +7949,8 @@ static int add_remove_disk_update(struct intel_super *super)
disk_cfg->next = super->disks;
super->disks = disk_cfg;
check_degraded = 1;
- dprintf("%s: added %x:%x\n",
- __func__, disk_cfg->major,
- disk_cfg->minor);
+ dprintf("added %x:%x\n",
+ disk_cfg->major, disk_cfg->minor);
} else if (disk_cfg->action == DISK_REMOVE) {
dprintf("Disk remove action processed: %x.%x\n",
disk_cfg->major, disk_cfg->minor);
@@ -7837,7 +7982,7 @@ static int apply_reshape_migration_update(struct imsm_update_reshape_migration *
void **tofree = NULL;
int ret_val = 0;
- dprintf("apply_reshape_migration_update()\n");
+ dprintf("(enter)\n");
if ((u->subdev < 0) ||
(u->subdev > 1)) {
dprintf("imsm: Error: Wrong subdev: %i\n", u->subdev);
@@ -7915,8 +8060,7 @@ static int apply_reshape_migration_update(struct imsm_update_reshape_migration *
new_disk = get_disk_super(super,
major(u->new_disks[0]),
minor(u->new_disks[0]));
- dprintf("imsm: new disk for reshape is: %i:%i "
- "(%p, index = %i)\n",
+ dprintf("imsm: new disk for reshape is: %i:%i (%p, index = %i)\n",
major(u->new_disks[0]),
minor(u->new_disks[0]),
new_disk, new_disk->index);
@@ -7957,7 +8101,7 @@ static int apply_size_change_update(struct imsm_update_size_change *u,
struct intel_dev *id;
int ret_val = 0;
- dprintf("apply_size_change_update()\n");
+ dprintf("(enter)\n");
if ((u->subdev < 0) ||
(u->subdev > 1)) {
dprintf("imsm: Error: Wrong subdev: %i\n", u->subdev);
@@ -7974,8 +8118,7 @@ static int apply_size_change_update(struct imsm_update_size_change *u,
/* calculate new size
*/
blocks_per_member = u->new_size / used_disks;
- dprintf("imsm: apply_size_change_update(size: %llu, "
- "blocks per member: %llu)\n",
+ dprintf("(size: %llu, blocks per member: %llu)\n",
u->new_size, blocks_per_member);
set_blocks_per_member(map, blocks_per_member);
imsm_set_array_size(dev, u->new_size);
@@ -8017,8 +8160,7 @@ static int apply_update_activate_spare(struct imsm_update_activate_spare *u,
break;
if (!dl) {
- pr_err("error: imsm_activate_spare passed "
- "an unknown disk (index: %d)\n",
+ pr_err("error: imsm_activate_spare passed an unknown disk (index: %d)\n",
u->dl->index);
return 0;
}
@@ -8118,15 +8260,14 @@ static int apply_reshape_container_disks_update(struct imsm_update_reshape *u,
int ret_val = 0;
unsigned int dev_id;
- dprintf("imsm: apply_reshape_container_disks_update()\n");
+ dprintf("(enter)\n");
/* enable spares to use in array */
for (i = 0; i < delta_disks; i++) {
new_disk = get_disk_super(super,
major(u->new_disks[i]),
minor(u->new_disks[i]));
- dprintf("imsm: new disk for reshape is: %i:%i "
- "(%p, index = %i)\n",
+ dprintf("imsm: new disk for reshape is: %i:%i (%p, index = %i)\n",
major(u->new_disks[i]), minor(u->new_disks[i]),
new_disk, new_disk->index);
if ((new_disk == NULL) ||
@@ -8359,8 +8500,7 @@ static void imsm_process_update(struct supertype *st,
struct imsm_update_general_migration_checkpoint *u =
(void *)update->buf;
- dprintf("imsm: process_update() "
- "for update_general_migration_checkpoint called\n");
+ dprintf("called for update_general_migration_checkpoint\n");
/* find device under general migration */
for (id = super->devlist ; id; id = id->next) {
@@ -8429,15 +8569,14 @@ static void imsm_process_update(struct supertype *st,
/* handle racing creates: first come first serve */
if (u->dev_idx < mpb->num_raid_devs) {
- dprintf("%s: subarray %d already defined\n",
- __func__, u->dev_idx);
+ dprintf("subarray %d already defined\n", u->dev_idx);
goto create_error;
}
/* check update is next in sequence */
if (u->dev_idx != mpb->num_raid_devs) {
- dprintf("%s: can not create array %d expected index %d\n",
- __func__, u->dev_idx, mpb->num_raid_devs);
+ dprintf("can not create array %d expected index %d\n",
+ u->dev_idx, mpb->num_raid_devs);
goto create_error;
}
@@ -8462,14 +8601,14 @@ static void imsm_process_update(struct supertype *st,
continue;
if (disks_overlap(super, i, u)) {
- dprintf("%s: arrays overlap\n", __func__);
+ dprintf("arrays overlap\n");
goto create_error;
}
}
/* check that prepare update was successful */
if (!update->space) {
- dprintf("%s: prepare update failed\n", __func__);
+ dprintf("prepare update failed\n");
goto create_error;
}
@@ -8481,7 +8620,7 @@ static void imsm_process_update(struct supertype *st,
for (i = 0; i < new_map->num_members; i++) {
dl = serial_to_dl(inf[i].serial, super);
if (!dl) {
- dprintf("%s: disk disappeared\n", __func__);
+ dprintf("disk disappeared\n");
goto create_error;
}
}
@@ -8600,8 +8739,7 @@ static void imsm_process_update(struct supertype *st,
break;
}
default:
- pr_err("error: unsuported process update type:"
- "(type: %d)\n", type);
+ pr_err("error: unsuported process update type:(type: %d)\n", type);
}
}
@@ -8632,8 +8770,7 @@ static int imsm_prepare_update(struct supertype *st,
case update_general_migration_checkpoint:
if (update->len < (int)sizeof(struct imsm_update_general_migration_checkpoint))
return 0;
- dprintf("imsm: prepare_update() "
- "for update_general_migration_checkpoint called\n");
+ dprintf("called for update_general_migration_checkpoint\n");
break;
case update_takeover: {
struct imsm_update_takeover *u = (void *)update->buf;
@@ -8682,7 +8819,7 @@ static int imsm_prepare_update(struct supertype *st,
if (update->len < (int)sizeof(*u))
return 0;
- dprintf("imsm: imsm_prepare_update() for update_reshape\n");
+ dprintf("for update_reshape\n");
for (dl = super->devlist; dl; dl = dl->next) {
int size = sizeof_imsm_dev(dl->dev, 1);
@@ -8717,7 +8854,7 @@ static int imsm_prepare_update(struct supertype *st,
if (update->len < (int)sizeof(*u))
return 0;
- dprintf("imsm: imsm_prepare_update() for update_reshape\n");
+ dprintf("for update_reshape\n");
/* add space for bigger array in update
*/
@@ -8879,8 +9016,7 @@ static void imsm_delete(struct intel_super *super, struct dl **dlp, unsigned ind
int i, j, num_members;
__u32 ord;
- dprintf("%s: deleting device[%d] from imsm_super\n",
- __func__, index);
+ dprintf("deleting device[%d] from imsm_super\n", index);
/* shift all indexes down one */
for (iter = super->disks; iter; iter = iter->next)
@@ -9061,32 +9197,68 @@ int open_backup_targets(struct mdinfo *info, int raid_disks, int *raid_fds,
******************************************************************************/
int validate_container_imsm(struct mdinfo *info)
{
- if (!check_env("IMSM_NO_PLATFORM")) {
- struct sys_dev *idev;
- struct mdinfo *dev;
- char *hba_path = NULL;
- char *dev_path = devt_to_devpath(makedev(info->disk.major,
- info->disk.minor));
+ if (check_env("IMSM_NO_PLATFORM"))
+ return 0;
- for (idev = find_intel_devices(); idev; idev = idev->next) {
- if (strstr(dev_path, idev->path)) {
- hba_path = idev->path;
- break;
- }
+ struct sys_dev *idev;
+ struct sys_dev *hba = NULL;
+ struct sys_dev *intel_devices = find_intel_devices();
+ char *dev_path = devt_to_devpath(makedev(info->disk.major,
+ info->disk.minor));
+
+ for (idev = intel_devices; idev; idev = idev->next) {
+ if (dev_path && strstr(dev_path, idev->path)) {
+ hba = idev;
+ break;
}
+ }
+ if (dev_path)
free(dev_path);
- if (hba_path) {
- for (dev = info->next; dev; dev = dev->next) {
- if (!devt_attached_to_hba(makedev(dev->disk.major,
- dev->disk.minor), hba_path)) {
- pr_err("WARNING - IMSM container assembled with disks under different HBAs!\n"
- " This operation is not supported and can lead to data loss.\n");
- return 1;
- }
+ if (!hba) {
+ pr_err("WARNING - Cannot detect HBA for device %s!\n",
+ devid2kname(makedev(info->disk.major, info->disk.minor)));
+ return 1;
+ }
+
+ const struct imsm_orom *orom = get_orom_by_device_id(hba->dev_id);
+ struct mdinfo *dev;
+
+ for (dev = info->next; dev; dev = dev->next) {
+ dev_path = devt_to_devpath(makedev(dev->disk.major, dev->disk.minor));
+
+ struct sys_dev *hba2 = NULL;
+ for (idev = intel_devices; idev; idev = idev->next) {
+ if (dev_path && strstr(dev_path, idev->path)) {
+ hba2 = idev;
+ break;
}
}
+ if (dev_path)
+ free(dev_path);
+
+ const struct imsm_orom *orom2 = hba2 == NULL ? NULL :
+ get_orom_by_device_id(hba2->dev_id);
+
+ if (hba2 && hba->type != hba2->type) {
+ pr_err("WARNING - HBAs of devices do not match %s != %s\n",
+ get_sys_dev_type(hba->type), get_sys_dev_type(hba2->type));
+ return 1;
+ }
+
+ if ((orom != orom2) || ((hba->type == SYS_DEV_VMD) && (hba != hba2))) {
+ pr_err("WARNING - IMSM container assembled with disks under different HBAs!\n"
+ " This operation is not supported and can lead to data loss.\n");
+ return 1;
+ }
+
+ if (!orom) {
+ pr_err("WARNING - IMSM container assembled with disks under HBAs without IMSM platform support!\n"
+ " This operation is not supported and can lead to data loss.\n");
+ return 1;
+ }
}
+
return 0;
}
#ifndef MDASSEMBLE
@@ -9268,8 +9440,7 @@ int save_checkpoint_imsm(struct supertype *st, struct mdinfo *info, int state)
unsigned long long curr_migr_unit;
if (load_imsm_migr_rec(super, info) != 0) {
- dprintf("imsm: ERROR: Cannot read migration record "
- "for checkpoint save.\n");
+ dprintf("imsm: ERROR: Cannot read migration record for checkpoint save.\n");
return 1;
}
@@ -9293,8 +9464,7 @@ int save_checkpoint_imsm(struct supertype *st, struct mdinfo *info, int state)
__cpu_to_le32(curr_migr_unit *
__le32_to_cpu(super->migr_rec->dest_depth_per_unit));
if (write_imsm_migr_rec(st) < 0) {
- dprintf("imsm: Cannot write migration record "
- "outside backup area\n");
+ dprintf("imsm: Cannot write migration record outside backup area\n");
return 1;
}
@@ -9405,16 +9575,14 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info)
new_disks,
super,
id->dev)) {
- pr_err("Cannot restore data from backup."
- " Too many failed disks\n");
+ pr_err("Cannot restore data from backup. Too many failed disks\n");
goto abort;