[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:
CURRENT SOURCE: /home
GLUSTER SOURCE /home/home
GLUSTER MOUNT POINT /gluster/home
(this may not be syntatically correct):
cd /home
for i in *
do
if [ $i != 'glusterhome' ]
mv $i glusterhome
ln -s gluster/home/$i $i
fi
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.
Keith
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"
>
><http://gluster.org/docs/index.php/Setting_up_AFR_on_two_servers_with_pre-existing_data>http://gluster.org/docs/index.php/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.
>
>Regards
>Baggio
>_______________________________________________
>Gluster-users mailing list
>Gluster-users at gluster.org
>http://zresearch.com/cgi-bin/mailman/listinfo/gluster-users
More information about the Gluster-users
mailing list