<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi all,<br><br></div>I&#39;m doing a test setup where I have a 1-brick volume setup that I want to &quot;online expand&quot; into a 2-brick replicated volume setup. It&#39;s pretty hard to find information on this online; usually, only distributed volume setups are discussed.<br><br></div>I&#39;m using two machines for testing: mallorca and hawaii. They have been added into each other&#39;s trusted pools.<br><br></div>First, I create a 1-brick volume on Mallorca:<br><br></div># mkdir -p /local/glustertest/stor1 /stor1<br></div># gluster volume create stor1 mallorca:/local/glustertest/stor1<br></div><div># gluster volume start stor1<br></div># mount -t glusterfs mallorca:/stor1 /stor1<br></div># echo &quot;This is file A&quot; &gt;/stor1/fileA.txt<br></div># echo &quot;This is file B&quot; &gt;/stor1/fileB.txt<br></div># dd if=/dev/zero of=/stor1/largefile.img bs=1M count=100<br><br></div>So now /stor1 and /local/glustertest/stor1 contain these files.<br><br></div>Then, I expand the volume to a 2-brick replicated volume setup:<br><br></div># mkdir -p /local/glustertest/stor1 /stor1<br></div># gluster volume add-brick stor1 replica 2 hawaii:/local/glustertest/stor1<br></div># mount -t glusterfs hawaii:/stor1 /stor1<br><br></div>At this point, /local/glustertest/stor1 is still filled on mallorca, and empty on hawaii (except for .glusterfs). Here is the actual question: how do I sync the contents of the two?<br><br></div>I tried:<br></div>* &#39;volume sync&#39;, but it&#39;s only for syncing of volume info between peers, not volume contents<br></div>* &#39;volume rebalance&#39;, but it&#39;s only for Distribute volumes<br></div>* &#39;volume heal stor1 full&#39;, which finishes succesfully but didn&#39;t move anything<br></div>* &#39;volume replace-brick&#39;, which I found online used to move some contents, but now only supports switching the actual brick pointer with &#39;commit force&#39;<br></div>* listing actual file names on Hawaii.<br><br></div>The last one is the only one that had some effect: after listing /stor1/fileA.txt on Hawaii, the file appeared in /stor1 and /local/glustertest/stor1. The other files are still missing. So, a potential fix could be to get a list of all filenames from Mallorca and `ls` them all so they are synced. But this seems like a silly solution. There&#39;s two other viable solutions I could come up with:<br><br></div><div>* Stopping the volume, rsyncing the contents, adding the brick, starting the volume. But that&#39;s offline (and it feels wrong to be poking around inside Gluster&#39;s brick directory).<br></div><div>* Removing the volume, moving the brick directory, recreating the volume with 2 replicas, and moving the old contents of the brick directory back onto the new mount.<br></div><div><br></div>At some point, suddenly all files did appear on Hawaii, probably because of the self-heal daemon. Is there some way to trigger the daemon to walk over all files? Why didn&#39;t the explicit full self-heal do this?<br><br></div>Thanks,<br></div>Sjors<br></div>