[PATCH] Enable replica 1 mirror creation for mirrored volumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch to the cli enables a very simple replica 1 mirror creation (similar to the "missing" attribute for mdadm RAID1 creation).

It will likely need additional supporting work in add-brick so that incomplete mirrors are assembled correctly for distributed-replicated cases.

Building/Assembling an incomplete mirror is an important capability needed for a number of use cases.

--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics, Inc.
email: landman@xxxxxxxxxxxxxxxxxxxxxxx
web  : http://scalableinformatics.com
       http://scalableinformatics.com/sicluster
phone: +1 734 786 8423 x121
fax  : +1 866 888 3112
cell : +1 734 612 4615
--- a/glusterfs-3.1.3/cli/src/cli-cmd-parser.c	2011-05-28 08:15:39.000000000 -0500
+++ b/glusterfs-3.1.3/cli/src/cli-cmd-parser.c	2011-05-28 08:20:08.000000000 -0500
@@ -115,8 +115,14 @@
                         goto out;
                 }
                 count = strtol (words[4], NULL, 0);
-                if (!count || (count < 2)) {
-                        cli_out ("replica count should be greater than 1");
+/*
+   enable creation of a single 'replica', basically a mirrored
+   volume without a second mirror.  The idea is to allow the first
+   entry to be created with the second being created via an add-brick
+   later on
+ */
+                if (!count || (count < 1)) {
+                        cli_out ("replica count should be greater than 0");
                         ret = -1;
                         goto out;
                 }

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux