Description of problem: I create a disperse 3 redundancy 1 volume, then touch /mountpoint/file.txt. I execute "echo 'AAAAAAAAAAAAAAAAAA' >> /mountpoint/file.txt", no error report, then read /mountpoint/file.txt by cat is NULL.But I can read the "AAAAAAAAAAAAAAA" from sub-directory's file.txt by cat. file.txt's size is ok, echo "AAAAAAAAAAA" > /mountpointf/file.txt (OVERWRITE) and copy all are ok. Version-Release number of selected component (if applicable): 3.6.0 and 3.6.1 and glusterfs-master from git How reproducible: Steps to Reproduce: 1.create a disperse 3 redundancy 1 volume Volume Name: test Type: Disperse Volume ID: 5de6b5d7-dc4f-48c6-bc2b-15019c900ed2 Status: Started Number of Bricks: 1 x (2 + 1) = 3 Transport-type: tcp Bricks: Brick1: 10.10.21.50:/sda Brick2: 10.10.21.50:/sdb Brick3: 10.10.21.50:/sdc 2.touch /mountpoint/file.txt 3.echo "AAAAAAAAAAAAAAA" >> /mountpoint/file.txt (APEND) 4.Can not read strings from /mountpoint/file.txt (by cat) Actual results: Expected results: Additional info: In my opinion, the circuit of O_APEND write is abnormal in disperse.
I tried flags &= O_APPEND in ec_open(), then "echo 'AAAAAAAAAAAAAA' >> /mountpoint/file.txt", and read file.txt is OK. In my opinion, like this relationship between offset and blocks in glusterfs, for example encryption/crypt, we should remove the O_APPEND flags that come frome users.
This bug is a duplicate of bug #1161885. The patch is already posted for review, but it's not merged yet. You can review it at: http://review.gluster.org/9079/ (for master) and http://review.gluster.org/9080/ (for 3.6)
*** This bug has been marked as a duplicate of bug 1161885 ***
Ok, I got it, caused by O_APPEND flag. (In reply to Xavier Hernandez from comment #3) > > *** This bug has been marked as a duplicate of bug 1161885 ***