<div>Hello Avati:<br>I use the AFR function in glusterfs and get some trouble:<br>1. have 2 glusterfs-server, A-server and B-server, their config volume file is :<br>------------------------------------------------------------------------------------------------------<br>volume posix0<br>&nbsp; type storage/posix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # POSIX FS translator<br>&nbsp; option directory /home/yzy/glusterfs/rundir/grundir/gdisk/s0&nbsp; # Export this directory<br>end-volume<br><br>### Add POSIX record locking support to the storage brick<br>volume brick0<br>&nbsp; type features/posix-locks<br>&nbsp; option mandatory on&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # enables mandatory locking on all files<br>&nbsp; subvolumes posix0<br>end-volume<br><br>### Add network serving capability to above brick.<br>volume server<br>&nbsp; type protocol/server<br>&nbsp; option transport-type tcp/server&nbsp;&nbsp;&nbsp;&nbsp; # For TCP/IP transport<br>&nbsp; option listen-port 6995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Default is 6996<br>&nbsp; subvolumes brick0<br>&nbsp; option auth.addr.brick0.allow *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # access to "brick" volume<br>end-volume<br><br>the B-server's config file is similar with above information except "option directory" and "listen-port"<br>------------------------------------------------------------------------------------------------------<br>2. glusterfs client config volume file is :<br>------------------------------------------------------------------------------------------------------<br>### Add client feature and attach to remote subvolume of server1<br>volume client0<br>&nbsp; type protocol/client<br>&nbsp; option transport-type tcp/client&nbsp;&nbsp;&nbsp;&nbsp; # for TCP/IP transport<br>&nbsp; option remote-host 192.168.5.48&nbsp;&nbsp; # IP address of the remote brick<br>&nbsp; option remote-port 6995&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # default server port is 6996<br>&nbsp; option remote-subvolume brick0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # name of the remote volume<br>end-volume<br><br>### Add client feature and attach to remote subvolume of server2<br>volume client1<br>&nbsp; type protocol/client<br>&nbsp; option transport-type tcp/client&nbsp;&nbsp;&nbsp;&nbsp; # for TCP/IP transport<br>&nbsp; option remote-host 192.168.5.48&nbsp;&nbsp; # IP address of the remote brick<br>&nbsp; option remote-port 6996&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # default server port is 6996<br>&nbsp; option remote-subvolume brick1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # name of the remote volume<br>end-volume<br><br>## Add AFR (Automatic File Replication) feature.<br>volume afr<br>&nbsp; type cluster/afr<br>&nbsp; subvolumes client0 client1<br>&nbsp; option data_self_heal on<br>&nbsp; option metadata_self_heal on<br>&nbsp; option entry_self_heal on<br>&nbsp; option data_change_log on<br>&nbsp; option metadata_change_log on<br>&nbsp; option entry_change_log on<br>end-volume<br>------------------------------------------------------------------------------------------------------<br><br>I have some trouble about the AFR function as I met :<br>1. I set the "option data_self_heal on" option in client.vol, but why system log say :<br>&nbsp; "2009-04-02 13:45:41 W [glusterfsd.c:451:_log_if_option_is_invalid] afr: option 'data_self_heal' is not recognized"<br><br>&nbsp;why?&nbsp; my option information is incorrect? <br><br>2. I use the ext3 as the filesystem of glusterfs-server, and it support the xattr function, I done some test about the xattr :<br>&nbsp; root@yzy-ubuntu:/mnt# getfattr -d test1 <br>&nbsp; root@yzy-ubuntu:/mnt# setfattr -n user.comment -v 'xattr is working!' test1 <br>&nbsp; root@yzy-ubuntu:/mnt# getfattr -d test1 <br>&nbsp; # file: test1<br>&nbsp;&nbsp; user.comment="xattr is working!"<br><br>&nbsp; root@yzy-ubuntu:/mnt# <br><br>3.&nbsp; For test the Afr function, I done some test:<br>&nbsp;&nbsp;&nbsp;&nbsp; (1)I create a file in the glusterfs mountpoint, and write some information to this file.<br>&nbsp;&nbsp;&nbsp;&nbsp; (2)I down the A-server<br>&nbsp;&nbsp;&nbsp;&nbsp; (3)append&nbsp; some new information to the file<br>&nbsp; &nbsp;&nbsp; (4)restart the A-server<br>&nbsp; &nbsp;&nbsp; But the file's information is incorrect, the append information cannot be display as normal, instead of "@"<br>&nbsp;&nbsp;&nbsp;&nbsp; so, the AFR's self-heal function is invalid.&nbsp; why?<br><br>&nbsp;&nbsp;&nbsp; (5) I test the new file's xattr function, but I cannot get any xattr information:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #getfattr -d testfile<br><br>I need your help.<br>Thanks a lot of.<br><br>YZY<br>&nbsp;&nbsp;&nbsp;&nbsp; <br><br><br><br></div><br><!-- footer --><br><span title="neteasefooter"/><hr/>
<a href="http://email.163.com">网易邮箱,中国第一大电子邮件服务商</a>
</span>