[Gluster-users] Unify over AFR with pre-existing data

Keith Freedman freedman at FreeFormIT.com
Wed Jul 23 06:04:01 UTC 2008

I had 2 situations with pre-existing data and I solved the both 2 
different ways.

1), I followed the instructions in the link provided, however, I was 
running xfs on the underlying filesystem and so the command to add 
attributes is different.
in this case, it's attr instead of setfattr to set the extended 
attribute.  Also, I *think* the actual attribute name is different.
so, what I recommend is to create one file through gluster, view it's 
extended attributes through the base filesystem then apply those to 
the remaining files.

2) This is the less friendly but more surefire solution:
make the gluster source point a sub directory in the source filesystem.
then "move" the files into the gluster filesystem.
This is less handy for "live" data, but it does insure the existing 
data is properly "glustered"

here's what I did:

(this may not be syntatically correct):
cd /home
for i in *
if [ $i != 'glusterhome' ]
   mv $i glusterhome
   ln -s gluster/home/$i $i

then unmount /gluster/home, unmount /home   remount /home on /gluster
now you have /gluster/home with your data which has the gluster 
attributes attached.
mount glusterfs from /gluster/home  to /home

I actually used this second procedure  to get the data onto my new 
AFR mirror.  It slowed the process down since it was replicating 50GB 
of data while moving it form disk to disk, but I'm not sure it slowed 
it down much.  it seems to really mostly just reduce disk thrashing 
and my copy was going at near network speed.

At 07:11 PM 7/22/2008, baggio liu wrote:
>Hi guys,
>    I have configured a cluster with unify over afr. one of server 
> in afr has some pre-existing  data.  And I want to make these data 
> can be seen by client.
>    Some  config have been done according to
>       "Setting up AFR on two servers with pre-existing data"
>    But namespace can not aware with those data.
>    After afr completing, ls at client , pre-existing  data can not 
> be seen. cat  them, Input/output error can be found.
>    What should I fix them? Thank you for any help.
>Gluster-users mailing list
>Gluster-users at gluster.org

More information about the Gluster-users mailing list