]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Merge branch 'mdadm-3.3.x'
authorNeilBrown <neilb@suse.com>
Mon, 3 Aug 2015 06:21:37 +0000 (16:21 +1000)
committerNeilBrown <neilb@suse.com>
Mon, 3 Aug 2015 06:21:37 +0000 (16:21 +1000)
1  2 
Assemble.c
Incremental.c
ReadMe.c
mdadm.8.in

diff --combined Assemble.c
index 4275fad68849920e98bf3a22e44a3201868d5e78,2925733081e3967ccf02106ba10dc243ef22ca29..be4d8c962722731f7f587150619544490216844c
@@@ -250,7 -250,9 +250,9 @@@ static int select_devices(struct mddev_
                                        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);
@@@ -635,13 -637,7 +637,13 @@@ static int load_devices(struct devs *de
  
                        if (strcmp(c->update, "byteorder") == 0)
                                err = 0;
 -                      else
 +                      else if (strcmp(c->update, "home-cluster") == 0) {
 +                              tst->cluster_name = c->homecluster;
 +                              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
                                err = tst->ss->update_super(tst, content, c->update,
                                                            devname, c->verbose,
                                                            ident->uuid_set,
diff --combined Incremental.c
index be581a518a74b9ef72d69d94c64423f3ff7c9155,41876b9e70c3c00ca9bfc715176c25b61b24390c..304cc6d7cadf1830bb5a8de89736f6f7fbe5f8aa
@@@ -205,7 -205,7 +205,7 @@@ int Incremental(struct mddev_dev *devli
        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);
                                devname);
                goto out;
        }
 +      /* Skip the clustered ones. This should be started by
 +       * clustering resource agents
 +       */
 +      if (info.array.state & (1 << MD_SB_CLUSTERED))
 +              goto out;
  
        /* 3a/ if not, check for homehost match.  If no match, continue
         * but don't trust the 'name' in the array. Thus a 'random' minor
diff --combined ReadMe.c
index f4b4a4fd4829254309e4b84b259b1cfda1851826,386d7a01f7685822e43521ded2e2d52095c53a0d..c2423196a92f95c27d800b3bd0bb906bb3e40c67
+++ b/ReadMe.c
  #include "mdadm.h"
  
  #ifndef VERSION
- #define VERSION "3.3.3"
+ #define VERSION "3.3.4"
  #endif
  #ifndef VERS_DATE
- #define VERS_DATE "24th July 2015"
+ #define VERS_DATE "3rd August 2015"
  #endif
  char Version[] = "mdadm - v" VERSION " - " VERS_DATE "\n";
  
@@@ -140,8 -140,6 +140,8 @@@ 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},
  
      /* For assemble */
      {"uuid",      1, 0, 'u'},
      {"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},
diff --combined mdadm.8.in
index e1ea9a899bd67aedbccde536afd6f8791caf53b1,c25ac6c74aa0cb121ccf69372a6d12d33efd12fa..bf3e131159644fa64f428932b4308def14d2f36c
@@@ -5,7 -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.3
+ .TH MDADM 8 "" v3.3.4
  .SH NAME
  mdadm \- manage MD devices
  .I aka
@@@ -422,12 -422,6 +422,12 @@@ This functionality is currently only pr
  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
@@@ -707,12 -701,7 +707,12 @@@ and so is replicated on all devices.  I
  .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').
@@@ -984,12 -973,6 +984,12 @@@ However for RAID0, it is not possible t
  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.
 +
  .SH For assemble:
  
  .TP
@@@ -1104,9 -1087,7 +1104,9 @@@ argument given to this flag can be one 
  .BR summaries ,
  .BR uuid ,
  .BR name ,
 +.BR nodes ,
  .BR homehost ,
 +.BR home-cluster ,
  .BR resync ,
  .BR byteorder ,
  .BR devicesize ,
  .B name
  option will change the
  .I name
 +of the array as stored in the superblock and bitmap. This option only
 +works for clustered environment.
 +
 +The
 +.B nodes
 +option will change the
 +.I nodes
  of the array as stored in the superblock.  This is only supported for
  version-1 superblocks.
  
@@@ -1175,11 -1149,6 +1175,11 @@@ as recorded in the superblock.  For ver
  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
@@@ -1427,15 -1396,6 +1427,15 @@@ will avoid reading from these devices i
  .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