Hi all,
First, my plesk cluster only used for Web Hosting service. We are not using Mail and DNS.
I have setup two Linux servers running Redhat Cluster with a common disk storage.
I have installed Plesk into these two servers and soft link the following directories to the shared folder(the common disk storage)
1) /var/lib/mysql soft link to /shared1/mysql
2) /etc/httpd/conf.d soft link to /shared/conf.d
3) /etc/psa soft link to /shared/etc/psa
4) /usr/local/psa soft link to /shared/psa
5) /var/lib/mysql soft link to /shared/mysql
6) /var/lib/pgsql soft link to /shared/pgsql
7) /var/www soft link to /shared/www
My problem is that the ftp accounts of websites are stored in the local Linux server "/etc/passwd". When the server failover to the other server, the httpd can not startup as it will look for the ftp account information. I have wrote a script to solve it. My script will look at the sys_user table of the psa database of Mysql. I will then compare with the /etc/passwd user, if any user missed, I will run "useradd" again to this server and httpd can startup
This is what I have done!
@KCLO and @everyone,
It is
not a good idea to
- use soft links to a clustered file system, (and)
- use a clustered file system,
for a number of evident reasons that I will not explain now, for the sake of convenience.
In essence, one should use
- a
file share, which can a cloud based file share OR a separate disk space that can be made available to multiple machines
- a
persistent mount that can be attached to the servers of choice
and note that I am NOT talking about a SAMBA file share: it is just a "file share", a common disk partition that can be shared across servers.
From that starting point one has to
make sure that specific default Plesk (data) directories are mounted and mapped properly on the file share.
In essence, it is quite a simple solution, at least as far as it concerns the use of (shared) disk space.
However, the databases are a whole different question with separate answers: it entirely depends on what one wants to achieve.
In general, one has the options to use
1 - one central database (disadvantage: the entire ecosystem is vulnerable to database failure)
2 - a psa database per local machine, augmented with a central and clustered database for application databases
3 - a clustered database system
and it is
highly recommend to use option 2, in order to have some additional performance AND security on critical data that is stored in the local psa and other databases.
It is possible to cluster the psa database server, but that is
not recommend at all.
After all, when storing daily mysql dumps on the shared file system, one has all the tools to recreate a clean database system in minutes, given the fact that the daily dump contains the psa, mysql and mail databases (and ibdata1 and similar files are also stored on the file storage, so you can use those files to).
In summary, one can suffice by simply using a file share.
The exception to the above is the environment in which one has the desire to create a load-balanced, clustered Plesk eco-environment, which environment requires a more elaborate database server infrastructure (which I will not discuss now).
Hope the above helps a bit.....
Regards...........