<div>
<p>Hi everyone, we have noticed some extremely odd behaviour with our distributed Gluster volume where duplicate files (same name, same or different content) are being created and stored on multiple bricks. The only consistent clue is that one of the duplicate files has the sticky bit set. I am hoping someone will be able to shed some light on why this is happening and how we can restore the volume as there appear to be hundreds of such files. I will try to provide as much pertinent information as I can.</p>
<p>We have a 130TB Gluster volume consisting of two 20TB bricks on server1, and three 40TB bricks on a server2 which were added at a later date (and rebalancing was done). The volume is mounted on server1, and accessed only through this server but by many users. Both servers went down due to power loss several days ago after which this problem was first noticed. We ran a rebalance command on the volumes, this has not fixed the problem.</p>
<p><br />Gluster volume info:<br />Volume Name: safari<br />Type: Distribute<br />Volume ID: d48d0e6b-4389-4c2c-8fd1-cd2854121eda<br />Status: Started<br />Number of Bricks: 5<br />Transport-type: tcp<br />Bricks:<br />Brick1: server1:/data/glusterfs/safari/brick00/brick<br />Brick2: server1:/data/glusterfs/safari/brick01/brick<br />Brick3: server2:/data/glusterfs/safari/brick02/brick<br />Brick4: server2:/data/glusterfs/safari/brick03/brick<br />Brick5: server2:/data/glusterfs/safari/brick04/brick</p>
<p><br />Size information:<br />/dev/sdc 37T 16T 22T 42% /data/glusterfs/safari/brick02<br />/dev/sdd 37T 16T 22T 42% /data/glusterfs/safari/brick03<br />/dev/sde 37T 17T 21T 45% /data/glusterfs/safari/brick04<br />/dev/md126 11T 7.7T 2.8T 74% /data/glusterfs/safari/brick00<br />/dev/md124 11T 8.0T 2.5T 77% /data/glusterfs/safari/brick01<br />server2:/safari 130T 63T 68T 48% /sar</p>
<p><br />Example 1:<br />-Two files with the same name exist in one directory<br />-They have different contents and attributes<br />-A file listing on the mounted volume shows the same inode<br />-The newer file has sticky bit set<br />-Neither file is corrupted, they can both be viewed by using the absolute path (on the bricks)</p>
<p>File listing on the mounted volume<br />13036730497538635177 -rw-rw-r-T 1 jon users 924 Dec 15 10:42 RSLC_tab<br />13036730497538635177 -rw-rw-r-- 1 jon users 418 Mar 18 2013 RSLC_tab</p>
<p>Listing of the files on the bricks:<br />8925798411 -rw-rw-r-T+ 2 jon users 924 Dec 15 10:42 /data/glusterfs/safari/brick00/brick/complete/shm/rs2/ottawa/mf6_asc/stack_org/RSLC_tab<br />51541886672 -rw-rw-r--+ 2 1002 users 418 Mar 18 2013 /data/glusterfs/safari/brick02/brick/complete/shm/rs2/ottawa/mf6_asc/stack_org/RSLC_tab</p>
<p><br />Example 2: <br />-Two files with the same name exist in one directory<br />-They have the same content and attributes<br />-No sticky bit is set when looking at file listing on the mounted volume<br />-Sticky bit is set for one while when looking at file listing on the bricks<br />-Files are corrupted</p>
<p>File listing on the mounted volume:<br />13012555852904096080 -rw-rw-r-- 1 tom users 2393848 Dec 8 2013 ifg_lr/20130226_20130813.diff.phi.ras<br />13012555852904096080 -rw-rw-r-- 1 tom users 2393848 Dec 8 2013 ifg_lr/20130226_20130813.diff.phi.ras</p>
<p>Listing of the files on the bricks:<br />17058578 -rw-rw-r-T+ 2 tom users 2393848 Dec 13 17:11 /data/glusterfs/safari/brick00/brick/rsc/rs2/calgary/u22_dsc/stack_org/ifg_lr/20130226_20130813.diff.phi.ras<br />57986922129 -rw-rw-r--+ 2 1010 users 2393848 Dec 8 2013 /data/glusterfs/safari/brick02/brick/rsc/rs2/calgary/u22_dsc/stack_org/ifg_lr/20130226_20130813.diff.phi.ras</p>
<p><br />Additionally, only some files in this directory are duplicated. The duplicated files are corrupted (can not be viewed as Raster images: the original file type) <br />The files which are not duplicated are not corrupted.</p>
<p>File command: (notice duplicate and singleton files)<br />ifg_lr/20091021_20100218.diff.phi.ras: Sun raster image data, 1208 x 1981, 8-bit, RGB colormap<br />ifg_lr/20091021_20101016.diff.phi.ras: data<br />ifg_lr/20091021_20101016.diff.phi.ras: data<br />ifg_lr/20091021_20101109.diff.phi.ras: Sun raster image data, 1208 x 1981, 8-bit, RGB colormap<br />ifg_lr/20091021_20101203.diff.phi.ras: Sun raster image data, 1208 x 1981, 8-bit, RGB colormap<br />ifg_lr/20091021_20101227.diff.phi.ras: Sun raster image data, 1208 x 1981, 8-bit, RGB colormap<br />ifg_lr/20091021_20110120.diff.phi.ras: Sun raster image data, 1208 x 1981, 8-bit, RGB colormap<br />ifg_lr/20091021_20110213.diff.phi.ras: data<br />ifg_lr/20091021_20110213.diff.phi.ras: data<br />ifg_lr/20091021_20110309.diff.phi.ras: data<br />ifg_lr/20091021_20110309.diff.phi.ras: sticky data<br />ifg_lr/20091021_20110402.diff.phi.ras: Sun raster image data, 1208 x 1981, 8-bit, RGB colormap</p>
<p><br />Information from Gluster log file:<br />Additionally, the log is full of thousands of the following such lines (possibly, one for each directory?) dating back several mponths<br />27 [2014-12-12 11:10:10.257950] I [dht-layout.c:726:dht_layout_dir_mismatch] 3-safari-dht: /rsc/tsx/lasvegas/spot_asc/stack/ifg_lr - disk layout missing<br />28 [2014-12-12 11:10:10.257988] I [dht-common.c:623:dht_revalidate_cbk] 3-safari-dht: mismatching layouts for /rsc/tsx/lasvegas/spot_asc/stack/ifg_ lr<br />29 [2014-12-12 11:10:13.042362] I [dht-layout.c:726:dht_layout_dir_mismatch] 3-safari-dht: /rsc/tsx/lasvegas/spot_dsc/stack/ifg_lr - disk layout missing<br />30 [2014-12-12 11:10:13.042395] I [dht-common.c:623:dht_revalidate_cbk] 3-safari-dht: mismatching layouts for /rsc/tsx/lasvegas/spot_dsc/stack/ifg_ lr<br />31 [2014-12-12 11:10:15.685876] I [dht-layout.c:726:dht_layout_dir_mismatch] 3-safari-dht: /rsc/tsx/lasvegas/spot_dsc/stack/ifg_lr - disk layout missing<br />32 [2014-12-12 11:10:15.685921] I [dht-common.c:623:dht_revalidate_cbk] 3-safari-dht: mismatching layouts for /rsc/tsx/lasvegas/spot_dsc/stack/ifg_ lr<br />33 [2014-12-12 11:10:19.028518] I [dht-layout.c:726:dht_layout_dir_mismatch] 3-safari-dht: /rsc/tsx/lasvegas/spot_asc/stack/ifg_lr - disk layout missing</p>
<p><br />There are also 1394 of the following errors in the last year, several (but not all) of them seem to correspond to duplicate files:<br />40620 [2014-12-12 22:55:57.180486] W [client-rpc-fops.c:1994:client3_3_setattr_cbk] 0-safari-client-1: remote operation failed: Operation not permitte d<br />40621 [2014-12-12 22:55:57.180514] E [dht-linkfile.c:213:dht_linkfile_setattr_cbk] 0-safari-dht: setattr of uid/gid on /freeport/tsx/miami/sm_asc/stac k/ifg_lr/20140930_20141102.diff.phi.ras :&lt;gfid:00000000-0000-0000-0000-000000000000&gt; failed (Operation not permitted)</p>
<p>Thanks,<br />Tom</p>
</div>