Bug 762371 (GLUSTER-639)

Summary: Data corruption with write-behind on server side
Product: [Community] GlusterFS Reporter: Anush Shetty <anush>
Component: write-behindAssignee: Raghavendra G <raghavendra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 3.0.2CC: gluster-bugs, rabhat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTA Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Anush Shetty 2010-02-18 13:04:26 UTC
Pasting the correct output of the bug:

cp /tmp/file /mnt/client/

c9ecca0f5000035fa1b06c07cbb765ba  file
10932188053aae6e8902244970e126bc  /mnt/client1/file

Comment 1 Anand Avati 2010-02-18 13:40:02 UTC
PATCH: http://patches.gluster.com/patch/2781 in master (server_writev: add proper iobuf into iobref)

Comment 2 Anand Avati 2010-02-18 13:40:22 UTC
PATCH: http://patches.gluster.com/patch/2781 in release-3.0 (server_writev: add proper iobuf into iobref)

Comment 3 Anush Shetty 2010-02-18 15:35:18 UTC
When write-behind was used on the server side, there was data corruption.


cp /tmp/file /mnt/client/
c9ecca0f5000035fa1b06c07cbb765ba  /tmp/file
c9ecca0f5000035fa1b06c07cbb765ba  /mnt/client/file

Server Volume file:

volume posix1
  type storage/posix                    
  option directory /mnt/export
end-volume


volume locks
  type features/posix-locksn         
  subvolumes posix1
end-volume

volume iot
 type performance/io-threads
 option thread-count 8
 subvolumes locks
end-volume

volume writebehind
 type performance/write-behind
 option cache-size 4MB
 subvolumes iot
end-volume

volume brick1
   type performance/read-ahead
  option page-count 4          
  option force-atime-update off 
  subvolumes writebehind
end-volume

volume server
  type protocol/server
  option transport-type tcp                     
  option transport.socket.listen-port 7777
  subvolumes brick1
  option auth.addr.brick1.allow *              
end-volume

Client vol file:

volume client1
  type protocol/client
  option transport-type tcp    
  option remote-host 127.0.0.1     
  option transport.socket.remote-port 7777
  option remote-subvolume brick1      
end-volume

volume writebehind
  type performance/write-behind
  option cache-size 4MB
  option flush-behind on  
  subvolumes client1
end-volume