This is known in our lore as the "ping vs tail" issue, cf. http://bugs.gluster.com/show_bug.cgi?id=801#c27 There is a fix for this (technically verifired, but not yet in tree for various releng reasons): http://review.gluster.com/56 -- please try and report your experience. *** This bug has been marked as a duplicate of bug 801 ***
I get this occasionally from mysql "alter table"s and frequently with bazaar. I think this strace is showing a short read on a file that's still open for writing: open("/mnt/gluster/web2/web/.bzr/repository/upload/per4j8lrk16ku1w9ns4k.pack", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 5 fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 close(5) = 0 open("/mnt/gluster/web2/web/.bzr/repository/upload/per4j8lrk16ku1w9ns4k.pack", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5 fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 write(5, "Bazaar pack format 1 (introduced"..., 78065) = 78065 open("/mnt/gluster/web2/web/.bzr/repository/upload/per4j8lrk16ku1w9ns4k.pack", O_RDONLY) = 8 fstat(8, {st_mode=S_IFREG|0664, st_size=73728, ...}) = 0 fstat(8, {st_mode=S_IFREG|0664, st_size=73728, ...}) = 0 mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacf4000 lseek(8, 0, SEEK_SET) = 0 read(8, "Bazaar pack format 1 (introduced"..., 131072) = 73728 lseek(8, 0, SEEK_SET) = 0 read(8, "Bazaar pack format 1 (introduced"..., 131072) = 73728 lseek(8, 4103, SEEK_CUR) = 77831 read(8, "", 131072) = 0