Is anyone using 'rsync' to synchronise local copies of the
'moodledata' directory across multiple Moodle servers ?
I was wondering whether there were any problems with this
approach, and whether it is better to use NFS and a single
shared file store for the moodledata.
We are planning to add a second Moodle server and use hardware-load
balancing to spread the load, so are looking at ways to do this.
Adrian Barker.
Synchronising 'moodledata' across load-balanced Moodle servers
by Adrian Barker -
Number of replies: 4
In reply to Adrian Barker
Re: Synchronising 'moodledata' across load-balanced Moodle servers
by Martín Langhoff -
You'll definitely need a shared mountpoint, as moodledata stores a lot of time-sensitive stuff, like the session files. So rsync won't cut it.
We normally use NFS. If you have a lot of traffic, and no session affinity @ the load balancer, that will cause high lock contention over the session files - you really need to have lockd running, and low latency between the machines.
We normally use NFS. If you have a lot of traffic, and no session affinity @ the load balancer, that will cause high lock contention over the session files - you really need to have lockd running, and low latency between the machines.
In reply to Martín Langhoff
Re: Synchronising 'moodledata' across load-balanced Moodle servers
by Martin Dougiamas -
They could use database sessions though ... it would probably work fine.
In reply to Adrian Barker
Re: Synchronising 'moodledata' across load-balanced Moodle servers
by F Echevarria -
We use a front-end server accessing a back-end datastore. All CRON and email tasks are handled by a back-end Moodle server and sessions are stored in the database. Separating our functionality in this manner allows us to expand to additional front-end Moodle application servers should the need arise.
Very simply, we created a new directory on the front-end server (/home/data) and then mounted the coursework file share via CIFS on this directory using the following /etc/FSTAB entry. (We chose to CHMOD 0777 this.)
//192.168.1.19/md /home/data cifs username=username,password=password,file_mode=0777,dir_mode=0777,rw 0 0
Very simply, we created a new directory on the front-end server (/home/data) and then mounted the coursework file share via CIFS on this directory using the following /etc/FSTAB entry. (We chose to CHMOD 0777 this.)
//192.168.1.19/md /home/data cifs username=username,password=password,file_mode=0777,dir_mode=0777,rw 0 0
In reply to Adrian Barker
Re: Synchronising 'moodledata' across load-balanced Moodle servers
by Mike Hutchison -
We actually use rsync very successfully to sync ~50 GB of moodledata from our production server to a test server...it's done in the early morning when usage is not an issue. You do have to watch out for permissions & ownership issues, however.
Unfortunately the sheer volume of folders and files is a detriment, especially when it comes to backing-up that data with Backup Exec...
If you want more info I can supply it to you.
Regards,
Mike Hutchison