Is it possible to have multiple installs with different users share a common moodledata directory?
Just create a different data directory for each install, and configure each Moodle install as such. Problem solvered.
Sharing moodledata is mt realistic but if you could explain what you want shared storage for there might be another solution.
Is there a way to point to one moodledata folder content from a different instance of moodle?
Easy enough to create more than one data directory..
Yes, but the content is in /moodledata for moodle instance #1. For moodle instance #2, I want to use the content in /moodledata, rather than replicating the same content on the same server. Are you saying to simply point the dataroot to /moodledata?
I would suggest you export the content from Course A on Instance #1 into Course B on Instance #2 using the built in Moodle backup/export/restore functionality.
I can't help but think it would fall over in a big ball of flame if you were to try and use the same /moodledata directory for two Moodle instances, personally I wouldn't even try
Otherwise you may be able to investigate meta courses, but they would then need to be in the same Moodle instance rather than seperate ones which kind of defeats the purpose.
Thanks very much.
But I am finding the way to run moodle on a Load balance envirnoment.which is, we Load balance our users request to 2 moodle instance and 2 moodle instance are connect to same database since 2 instance should be the same toward users.
As a result, if 2 instance are using different moodledata directories, then how 2 instance share the data in moodledata.
I had read some post about moodle Load balance set up but it did not suggest how to install the node ...
It would be great if you make some suggestion to me ...
In this arrangement it is perfectly reasonable (and required) to load moodledata as an NFS share on each web server and point your instances at it. It should work fine. Just make sure you find a fast NFS implementation.
There should be nothing special you have to do.
Thank you very much.
Sorry for my mis-understanding.
Yes, we have already implement the NFS share successfully. but have problem in pointing 2 *same* instance to single database.
My problem is, after we implement the first copy of moodle, all services is running ok. My first copy of moodle is running on Windows 2008 + apache + php + MSSQL 2008.
But I am wonder the step in implement the second copy of moodle. Do any configuration needed before implement the second copy of moodle? I tried to implement the second copy of moodle and point to same database, but the installation cannot complete.
If you have a dedicated data server, with multiple but not identical copies of the database, say mdl_1, Mdl_2 etc, and each instance of Moodle from different file servers pointing at a specific copy of the database, would that not tend to speed things up? Or would it slow it down? Your data server would, I expect, need to be something above average, and your network connections would have to be at least Gb ethernet, and even that may be to slow.
I mention this as I have heard a tech IT guy at a conference raise this as an alternate solution to load sharing two-three years ago. I do not know if this has ever been implemented, I understand that it was a proposal for a solution to a problem of data management though. Sounds reasonable to a non-techie like me, but no guarantee it would even work.
I created a moodle instance with its own database (M_2). In M_2, I went through the installation process and created a config.php file. Once the installation was done, I edited the cofig.php file to point to the M_1 /moodledata folder. Next, I imported M_1's database into M_2's database (they are identical systems).
It all worked. The problem I ran into was inconsistencies in the database - module ID's didn't match, quiz questions were there, but could not be loaded. These problems have to do with how I copied the database (export/import). If I knew how to simply copy a database (with data) with the primary keys being copied, then I wouldn't have this problem.
The only difference between M_1 and M_2 is the site name. Other than that, it should be OK with a little work cleaning up the quizzes, etc.
Thank you very much.
How about if 2 identical instance are using same database instance and data directories for Load balance.
I was able to install the first instanc of moodle on windows 2008 + apache + php, after that, I try to install the second instance (should be identical to the first instance), but failed.
I realise I said sharing /moodledata directories wasn't ideal before, but it's important to realise I was talking about seperate Moodle instances, in a load-balanced setup like we use and like you're suggesting, for the purposes of this discussion, would be a single instance. Even though there is multiple copies of Moodle.
You don't need to 'install' the other Moodle front ends, all the install does is set up the Database tables and default content, plus create the config.php file. On your other front ends, if you are having seperate Moodle source, copy the config.php from the first install into the new ones. Don't forget this implies the same URL to access Moodle via the load-balancer too.
Personally I think you should also mount your Moodle source directory on the front end webservers so you have only one physical copy of Moodle, rather than 2 or more. More than one source directory to maintain adds major headaches for maintenance etc.
hi James, my case is similar to yours , moodledata directoires is shared by file server and both front end webservers are pointing to the same DB. BTW, i don't know how to setup the 2nd front end apache web server after the first one is installed.
What do you mean of having seperate Moodle source ?
Thank you so much in advance
If we are talking about load balancing. You have ONE database, ONE moodledata (which could actually be on the same machine), AND several web servers. The point is that the web servers are absolutely identical (apart from the IP and hostname). You get one working and then (if possible) image the disk to create the others. They should be pointing at the same moodledata and the same database. It should "just work" (ha ha). If there's specific problems, it's probably a matter of carefully checking logs.
Hi Howard, I've tried yr suggestion and clone the first web server HD to the 2nd one. After modified the IP inside config.php to the ip of 2nd web server, the login page can be displayed successfully. BTW, attached error appears after clicked the login link. Do you have any idea ?
Also, check the MySQL error log. Are you sure that you haven't simply made a mistake creating the user in MySQL. If you have not specified the host name/range to allow access from all your prospective web servers you will have problems.
As I always say, no point guessing
I have set up a network share on a SAS \\moodle\data\moodledata. The front end is a 2003x64Enterprise apache2.2/php5.3.2 and the backend is 2003x64Enterprise SQL Server 2005x86.
This is working in all regards except for one small problem, using the internal unzip or external unzip (GNUWin32) results in pclzip_err_missing_file. This is caused, I suspect, to the share not being resolved or a permissions problem. I have given the share an 'everyone' access but I can't seem to fix it.
Any ideas what I can try next?
EDIT: My assumption is that you are load balancing or sharing across different servers - of course..
Using the form \\drivename\moodledata will appear to work until you try and use zip/unzip. The extra slashes are not handled well by the Moodle file system and will fail. Now if you are thinking that you can do without zip/unzip it will also cause backups to fail which also rely on zipped files. If you are thinking that you can do without backups as well then there are other 'unspecified' breakages all over the place that will fail as well.
So I have abandoned the idea of using a shared network drive between identical instances of 2003 web servers using UNC naming.
Instead I am now investigating setting up my instances with local storage (mapped to the SAN) and use DFS to replicate the folder across all instances. The downside is duplication of the data.
- multiple moodle frontend webservers
- common moodle data directory using NFS or Storage (SAN)
- common database server (separate machine)
i can view on both servers the same frontpage/theme. I can login to Moodle server 1 (main) but i can not login to moodle server 2 using SAME ACCOUNT.
Is there additional configuration so that server2 will work. Already enabled Moodle network authentication.
I am having same problem. Did you find any solutuon for this?
Thanks for your reply in advance.
You may not be familiar with the moodle.org site policies, so please check the Post your question in one forum only section.
You have already posted in five different threads:
I cannot use any of the zip functions on Moodle when my moodle data directory uses a windows path to another server.
For example \\moodle-1\moodledata instead of D:\moodledata in the config file.
So at present I cannot use backup, restore, zip or even deploy zipped scorn packages.
When the moodledata folder resides on the same web server it works fine.
I need to do this on Windows at my organisation.
Is this the only way to setup a distributed installation of moodle?
I am looking for a system design for close to 5000 concurrent logins.
Please do advice.
If you are thinking of a server cluster, "Hardware and Performance" http://moodle.org/mod/forum/view.php?id=596 is the right place. Check their documentaion first: http://docs.moodle.org/en/Performance and http://docs.moodle.org/en/Performance_FAQ