<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><br><div>Thank you for your reply.I have two more questions as below</div><div><br></div><div style="width: 1312.89px; line-height: 23.324px;">1. the command "gluster v replace-brick " is async or sync? &nbsp;The replace is complete&nbsp;<span style="line-height: 23.324px;">when the command quit </span><span style="line-height: 23.324px;">?&nbsp;</span></div><div style="width: 1312.89px; line-height: 23.324px;">2.I run "tail -n 0"&nbsp;<span style="font-family: arial; line-height: 23.8px; white-space: pre-wrap;">on mount point.Does it trigger the heal?</span></div><div style="width: 1312.89px; line-height: 23.324px;"><span style="font-family: arial; line-height: 23.8px; white-space: pre-wrap;"><br></span></div><div style="width: 1312.89px; line-height: 23.324px;"><span style="font-family: arial; line-height: 23.8px; white-space: pre-wrap;">Thanks,</span></div><div style="width: 1312.89px; line-height: 23.324px;"><span style="font-family: arial; line-height: 23.8px; white-space: pre-wrap;">Xin</span></div><div style="width: 1312.89px; line-height: 23.324px;"><br></div><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2016-03-02 15:22:35, "Anuradha Talur" &lt;atalur@redhat.com&gt; wrote:
&gt;
&gt;
&gt;----- Original Message -----
&gt;&gt; From: "songxin" &lt;songxin_1980@126.com&gt;
&gt;&gt; To: "gluster-user" &lt;gluster-users@gluster.org&gt;
&gt;&gt; Sent: Tuesday, March 1, 2016 7:19:23 PM
&gt;&gt; Subject: [Gluster-users] about tail command
&gt;&gt; 
&gt;&gt; Hi,
&gt;&gt; 
&gt;&gt; recondition:
&gt;&gt; A node:128.224.95.140
&gt;&gt; B node:128.224.162.255
&gt;&gt; 
&gt;&gt; brick on A node:/data/brick/gv0
&gt;&gt; brick on B node:/data/brick/gv0
&gt;&gt; 
&gt;&gt; 
&gt;&gt; reproduce steps:
&gt;&gt; 1.gluster peer probe 128.224.162.255 (on A node)
&gt;&gt; 2. gluster volume create gv0 replica 2 128.224.95.140:/data/brick/gv0
&gt;&gt; 128.224.162.255:/data/brick/gv0 force (on A node)
&gt;&gt; 3.gluster volume start gv0 (on A node)
&gt;&gt; 4. mount -t glusterfs 128.224.95.140:/gv0 gluster (on A node)
&gt;&gt; 5.create some files (a,b,c) in dir gluster (on A node)
&gt;&gt; 6.shutdown the B node
&gt;&gt; 7.change the files (a,b,c) in dir gluster (on A node)
&gt;&gt; 8.reboot B node
&gt;&gt; 9.start glusterd on B node but glusterfsd is offline (on B node)
&gt;&gt; 10. gluster volume remove-brick gv0 replica 1 128.224.162.255:/data/brick/gv0
&gt;&gt; force (on A node)
&gt;&gt; 11. gluster volume add-brick gv0 replica 2 128.224.162.255:/data/brick/gv0
&gt;&gt; force (on A node)
&gt;&gt; 
&gt;&gt; Now the files are not same between two brick
&gt;&gt; 
&gt;&gt; 12." gluster volume heal gv0 info " show entry num is 0 (on A node)
&gt;&gt; 
&gt;&gt; Now What I should do if I want to sync file(a,b,c) on two brick?
&gt;&gt; 
&gt;Currently, once you add a brick to a cluster, files won't sync automatically.
&gt;Patch has been sent to handle this requirement. Auto-heal will be available soon.
&gt;
&gt;You could kill the newly added brick and perform the following operations from mount
&gt;for the sync to start :
&gt;1) create a directory &lt;dirname&gt;
&gt;2) setfattr -n "user.dirname" -v "value" &lt;dirname&gt;
&gt;3) delete the directory &lt;dirname&gt;
&gt;
&gt;Once these steps are done, start the killed brick. self-heal-daemon will heal the files.
&gt;
&gt;But, for the case you have mentioned, why are you removing brick and using add-brick again?
&gt;Is it because you don't want to change the brick-path?
&gt;
&gt;You could use "replace-brick" command.
&gt;gluster v replace-brick &lt;volname&gt; &lt;hostname:old-brick-path&gt; &lt;hostname:new-brick-path&gt;
&gt;Note that source and destination should be different for this command to work.
&gt;
&gt;&gt; I know the "heal full" can work , but I think the command take too long time.
&gt;&gt; 
&gt;&gt; So I run "tail -n 1 file" to all file on A node, but some files are sync but
&gt;&gt; some files are not.
&gt;&gt; 
&gt;&gt; My question is below:
&gt;&gt; 1.Why the tail can't sync all files?
&gt;Did you run the tail command on mount point or from the backend (bricks)?
&gt;If you run from bricks, sync won't happen. Was client-side healing on?
&gt;To check if they were on or off, run `gluster v get volname all | grep self-heal`, cluster.metadata-self-heal, cluster.data-self-heal, cluster.entry-self-heal should be on.
&gt;
&gt;&gt; 2.Can the command "tail -n 1 filename" trigger selfheal, just like "ls -l
&gt;&gt; filename"?
&gt;&gt; 
&gt;&gt; Thanks,
&gt;&gt; Xin
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; _______________________________________________
&gt;&gt; Gluster-users mailing list
&gt;&gt; Gluster-users@gluster.org
&gt;&gt; http://www.gluster.org/mailman/listinfo/gluster-users
&gt;
&gt;-- 
&gt;Thanks,
&gt;Anuradha.
</pre></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>