[Gluster-users] AFR not working?

Piotr Findeisen piotr.findeisen at azouk.com
Mon Mar 2 12:58:33 UTC 2009


Hello!

I'm using glusterfs version 2.0.0rc2 on both client and servers and
configuration copied literally from
http://gluster.org/docs/index.php/Automatic_File_Replication_(Mirror)_across_Two_Storage_Servers
with only change being replacement of "storage*.example.com" with 2
different "10.*.*.*" IPs.
There are 2 servers, 1 client.
"server1" is the first server mentioned in client's config, "server2" is
the second.

I start servers with "glusterfsd -f /etc/glusterfs/glusterfs-server.vol"
and client with "glusterfs -f /etc/glusterfs/glusterfs-client.vol
/home/import"

My test looks like (commands were issued by hand, so you may assume
quite long sleeps between them).
server2$ glusterfsd -f /etc/glusterfs/glusterfs-server.vol
client$ glusterfs -f /etc/glusterfs/glusterfs-client.vol /home/import
client$ echo 1 > /home/import/1
client$ umount /home/import
server1$ glusterfsd -f /etc/glusterfs/glusterfs-server.vol
client$ glusterfs -f /etc/glusterfs/glusterfs-client.vol /home/import
client$ ls -l /home/import/1
-rw-r--r-- 1 root root 0 Mar  0 12:39 /home/import/1
client$ make-a-coffee # e.g. wait a while
client$ ls -l /home/import/1
-rw-r--r-- 1 root root 2 Mar  2 12:40 /home/import/1
client$ hexdump -C /home/import/1
00000000  00 00                                             |..|
00000002

So:
- first `ls -l` after server1 is brought up gives *0* byte file size,
instead of 2
- later `ls -l` gives proper size, but the file is filled with 0
- now, if i do `killall glusterfsd` on server1, client sees file "1"
with proper contents, but only until glusterfsd is started on server1 again.

This is what is `ls` and `hexdump` gives on servers:
server1$ hexdump -C /data/export/1
00000000  00 00                                             |..|
00000002
server1$ ls -l /data/export/1
-rw-r--r-- 1 root root 2 Mar  2 12:40 /data/export/1

server2$ hexdump -C /data/export/1
00000000  31 0a                                             |1.|
00000002
server2$ ls -l /data/export/1
-rw-r--r-- 1 root root 2 Mar  2 12:39 /data/export/1

Am I doing something obviously wrong?


I'm running both client and servers in OpenVZ VPSes on Debian lenny.
Servers have SYS_ADMIN granted for xattrs to work correctly.

Best regards,
Piotr Findeisen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20090302/8f0b2dcb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20090302/8f0b2dcb/attachment.sig>


More information about the Gluster-users mailing list