I have a glusterfs setup with two nodes (Node1 and Node2). I see connection has made between two connection. Problem is when I create some folders on Node1 it does not replicate it on Node2. Please suggest me to overcome if any one had fixed it?
If I mount it on some other server as glusterfs client and create files and folders then its replicating to glusterfs nodes. Is this behavior normal?
Volume Name: testvol
Type: Replicate
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: gluster1.example.com:/var/www/drupal7/sites/default/files
Brick2: gluster2.example.com:/var/www/drupal7/sites/default/files
Gluster volumes are supposed to access and update only via the clients. I saw a similar post by you on the same. Below links are suggested if you don't want to install the client in another node and install in the same server itself.
http://gopukrish.wordpress.com/glusterfs/
http://gopukrish.wordpress.com/high-availability-load-balanced-wordpress-site/
I am not certain what you mean when you use the word 'node'. Gluster is generally made up of bricks, volumes, and hosts.
volumes are generally made up of bricks hosted on hosts. In your example you created a replicated volume named testvol made up of two bricks. One brick is on gluster1.example.com and the other is on gluster2.example.com.
bricks are just places that gluster stores things. They are not themselves replicated or distributed and you are not meant to access them.
volumes are replicated and/or distributed. volumes do not appear in your filesystem until you mount them somewhere.
It is my experience that "gluster" people frown upon having gluster running along with other applications in the same server, but setting that aside and continuing with your example, what you are trying to achieve can be accomplished by re-arranging your thinking a little.
mkdir /mytestvol
mount -t glusterfs gluster1.example.org:testvol /mytestvol
on each host. It is /mytestvol which is the replicated gluster filesystem. The bricks are used by gluster for its own purposes. /mytestvol is your view into the replicated gluster volume.
Assuming you mounted testvol on /mytestvol in both systems you can create files in /mytestvol on one of the systems and it will automatically appear on the other.
Now as to your example, you will probably want to move your files folder into /mytestvol and then soft-link back into your web server hierarchy. Something like:
mv /var/www/drupal7/sites/default/files /mytestvol
ln -s /mytestvol/files /var/www/drupal7/sites/default/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With