<div dir="ltr">Hello,<div><br></div><div>We are currently figuring out how to add GlusterFS to our system to make our systems highly available using scripts.  We are using Gluster 3.7.11.</div><div><br></div><div><div>Problem:</div><div>Trying to migrate to GlusterFS from a non-clustered system to a 3-node glusterfs replicated cluster using scripts.  Tried various things to make this work, but it sometimes causes us to be in an indesirable state where if you call &quot;gluster volume heal &lt;volname&gt; full&quot;, we would get the error message, &quot;Launching heal operation to perform full self heal on volume &lt;volname&gt; has been unsuccessful on bricks that are down. Please check if all brick processes are running.&quot;  All the brick processes are running based on running the command, &quot;gluster volume status volname&quot;</div><div><br></div><div>Things we have tried:</div><div><div>Order of preference</div><div>1. Create Volume with 3 Filesystems with the same data</div><div>2. Create Volume with 2 Empty filesysytems and one with the data</div><div>3. Create Volume with only one filesystem with data and then using &quot;add-brick&quot; command to add the other two empty filesystems</div><div>4. Create Volume with one empty filesystem, mounting it, and then copying the data over to that one.  And then finally, using &quot;add-brick&quot; command to add the other two empty filesystems</div><div>5. Create Volume with 3 empty filesystems, mounting it, and then copying the data over</div></div><div><br></div><div>Other things to note:</div><div>  A few minutes after the volume is created and started successfully, our application server starts up against it, so reads and writes may happen pretty quickly after the volume has started.  But there is only about 50MB of data.</div></div><div><br></div><div>Steps to reproduce (all in a script):</div><div># This is run by the primary node with the IP Adress, &lt;server-ip-1&gt;, that has data</div><div>systemctl restart glusterd<br></div><div>gluster peer probe &lt;server-ip-2&gt;</div><div>gluster peer probe &lt;server-ip-3&gt;</div><div>Wait for &quot;gluster peer status&quot; to all be in &quot;Peer in Cluster&quot; state</div><div>gluster volume create &lt;volname&gt; replica 3 transport tcp ${BRICKS[0]} ${BRICKS[1]} ${BRICKS[2]} force<br></div><div>gluster volume set &lt;volname&gt; nfs.disable true</div><div>gluster volume start &lt;volname&gt;</div><div>mkdir -p $MOUNT_POINT<br></div><div>mount -t glusterfs &lt;server-ip-1&gt;:/volname $MOUNT_POINT</div><div>find $MOUNT_POINT | xargs stat</div><div><br></div><div>Note that, when we added sleeps around the gluster commands, there was a higher probability of success, but not 100%.</div><div><br></div><div># Once volume is started, all the the clients/servers will mount the gluster filesystem by polling &quot;mountpoint -q $MOUNT_POINT&quot;:<br></div><div><div>mkdir -p $MOUNT_POINT<br></div><div>mount -t glusterfs &lt;server-ip-1&gt;:/volname $MOUNT_POINT</div></div><div><br></div><div>Logs:</div><div><i>etc-glusterfs-glusterd.vol.log</i> in <i>server-ip-1</i></div><div><i><br></i></div><div><div>[2016-06-21 14:10:38.285234] I [MSGID: 106533] [glusterd-volume-ops.c:857:__glusterd_handle_cli_heal_volume] 0-management: Received heal vol req for volume volname</div><div>[2016-06-21 14:10:38.296801] E [MSGID: 106153] [glusterd-syncop.c:113:gd_collate_errors] 0-glusterd: Commit failed on &lt;server-ip-2&gt;. Please check log file for details.</div></div><div><br></div><div><br></div><div><i>usr-local-volname-data-mirrored-data.log</i> in <i>server-ip-1</i></div><div><i><br></i></div><div>[2016-06-21 14:14:39.233366] E [MSGID: 114058] [client-handshake.c:1524:client_query_portmap_cbk] 0-volname-client-0: failed to get the port number for remote subvolume. Please run &#39;gluster volume status&#39; on server to see if brick process is running.<br></div><div>*I think this is caused by the self heal daemon*</div><div><br></div><div><i>cmd_history.log</i> in <i>server-ip-1</i></div><div><i><br></i></div><div>[2016-06-21 14:10:38.298800]  : volume heal volname full : FAILED : Commit failed on &lt;server-ip-2&gt;. Please check log file for details.<br></div><div><br></div></div>