Andreas Hollaus
2015-Apr-03 08:32 UTC
[Gluster-users] Any workarounds for creating a non-empty replicated volume
Hi, I understand that the proper way to create a GlusterFS volume is to use bricks that consists of empty directories. Are there no workarounds for this, so that a non-empty directory could be transformed into a replicated brick? I have seen that when there are existing files in the directory before the volume is created, those files will be treated by GlusterFS when more data is written. For instance: 1. A file which exists on both replicated bricks will get additional data whenever written using the volume path. 2. A file which exists on only on of the bricks will be copied to the other brick and get additional data whenever more data is written using the volume path. 3 A file which exists on both replicated volumes, but with different contents, will get additional data whenever written using the volume path. However, the original differences will remain so the files are not properly synchronized. However, I have failed to synchronize these files using stat. I have to write to the files to achieve these results. Could this or any other circumstance be used to create a replicated volume in a preoccupied directory? Have there been any ideas to support such cases? I guess it wouldn't be impossible to detect this as those files that already exists in the directory lack the extended file attributes that are used to determine if the file is in sync. Whenever those attributes doesn't exist, the file could be copied to the other bricks (the favourite child option could be used to state which brick to trust). Maybe this is not the way GlusterFS is intended to work, but I guess it could have been implemented like that, right? The reason I ask these (rather stupid) questions is that I am really worried about performance when we create our volume and have to move all files to the new directory. Regards Andreas