[Gluster-devel] Client side afr versus server side, doing a self-heal

Krishna Srinivas krishna at zresearch.com
Thu May 1 18:33:02 UTC 2008


It is quite simple to set it up.

on server1:
find /mnt/raid/gfs -exec setfattr -n trusted.glusterfs.version -v 2 {} \;

Here "2" is a number greater than "1" which is the version of the attribute-less
file. It is set on both file and directories. There is no need to set the
trusted.glusterfs.createtime xattr.

on server2: (remove xattrs on the empty directory)
setfattr -x trusted.glusterfs.version /mnt/raid/gfs
setfattr -x trusted.glusterfs.createtime /mnt/raid/gfs

Please mail back in case there are still doubts.

Krishna

On Thu, May 1, 2008 at 11:46 PM, Brandon Lamb <brandonlamb at gmail.com> wrote:
> I think I accidentally butchered this thread because this was actually
>  a question on client versus server side afr, not setting up with pre
>  existing data...
>
>  HOWEVER.
>
>  I just had success. This time i tried with a TEST directory rather
>  than live data... /genius
>
>  Server1
>  /mnt/raid/gfs - contains 4 folders and some files within
>
>  Server2
>  /mnt/raid/gfs - empty directory
>
>  On server 2, set trusted version to 1 (lower value)
>  find /mnt/raid/gfs -depth -type f -execdir setfattr -n
>  trusted.glusterfs.version -v 1 {} \; >/dev/null
>
>  On server 1, set truster version to 3 (higher value)
>  find /mnt/raid/gfs -depth -type f -execdir setfattr -n
>  trusted.glusterfs.version -v 3 {} \; >/dev/null
>
>  I also ran the setfattr command on the /mnt/raid/gfs directory by
>  itself as well only because im not 100% sure that the find command
>  also included the specified directory. Probably did i guess but just
>  to be sure...
>  setfattr -n trusted.glusterfs.version -v 1 /mnt/raid/gfs (on server 2)
>  setfattr -n trusted.glusterfs.version -v 3 /mnt/raid/gfs (on server 1)
>
>  Then I launched glusterfsd on both servers (doing client side afr) and
>  then mounted on a single client, cd to /mnt/gfs on client and did ls
>  -al
>
>  Files showed up on server2 (the empty dir).
>
>  Now im going to delete everything and start over completely fresh in
>  case i forgot a step. If someone could create a wiki page on doing
>  this i will type up a howto or whatever.
>
>
>
>
>  _______________________________________________
>  Gluster-devel mailing list
>  Gluster-devel at nongnu.org
>  http://lists.nongnu.org/mailman/listinfo/gluster-devel
>





More information about the Gluster-devel mailing list