[Pacemaker] DRBD with Pacemaker on CentOs 6.5

Sihan Goi goister at gmail.com
Fri Nov 14 06:32:16 UTC 2014


Hi,

So it seems that my setup was not working because SELinux was not disabled.
Once I disabled it, my web server displays the correct index.html. In my
master node's /var/www/html, I see the correct index.html, but in the
slave's /var/www/html I still see the old index.html. Once I do a failover
and the slave becomes the master, I see the correct index.html in the new
master's /var/www/html, and the website works as expected with no downtime.

Is this the correct behavior? I was under the impression that both nodes
will reflect the same contents, and whatever is changed on the master will
be replicated in near real time in the slave.

Also, I wish now with to put a mySQL database in the DRBD block device.
What would the procedure be to do so? I suppose it would be similar to the
Apache example, except /var/www/html would be replaced by wherever the DB
is installed?

On Thu, Nov 13, 2014 at 9:42 AM, Sihan Goi <goister at gmail.com> wrote:

> Hi,
>
> getenforce returns "Enforcing"
> ls -dZ /var/www/html returns "drwxr-xr-x. root root
> system_u:object_r:httpd_sys_content_t:s0 /var/www/html" on both nodes.
>
> Running restorecon doesn't change the ls-dZ output.
>
> On Wed, Nov 12, 2014 at 2:24 PM, Vladislav Bogdanov <bubble at hoster-ok.com>
> wrote:
>
>> 11.11.2014 07:27, Sihan Goi wrote:
>> > Hi,
>> >
>> > DocumentRoot is still set to /var/www/html
>> > ls -al /var/www/html shows different things on the 2 nodes
>> > node01:
>> >
>> > total 28
>> > drwxr-xr-x. 3 root root  4096 Nov 11 12:25 .
>> > drwxr-xr-x. 6 root root  4096 Jul 23 22:18 ..
>> > -rw-r--r--. 1 root root    50 Oct 28 18:00 index.html
>> > drwx------. 2 root root 16384 Oct 28 17:59 lost+found
>> >
>> > node02 only has index.html, no lost+found, and it's a different version
>> > of the file.
>> >
>>
>> It look like apache is unable to stat its document root.
>> Could you please show output of two commands:
>>
>> getenforce
>> ls -dZ /var/www/html
>>
>> on both nodes when fs is mounted on one of them?
>> If you see 'Enforcing', and the last part of the selinux context of a
>> mounted fs root is not httpd_sys_content_t, then run
>> 'restorecon -R /var/www/html' on that node.
>>
>> > Status URL is enabled in both nodes.
>> >
>> >
>> > On Oct 30, 2014 11:14 AM, "Andrew Beekhof" <andrew at beekhof.net
>> > <mailto:andrew at beekhof.net>> wrote:
>> >
>> >
>> >     > On 29 Oct 2014, at 1:01 pm, Sihan Goi <goister at gmail.com
>> >     <mailto:goister at gmail.com>> wrote:
>> >     >
>> >     > Hi,
>> >     >
>> >     > I've never used crm_report before. I just read the man file and
>> >     generated a tarball from 1-2 hours before I reconfigured all the
>> >     DRBD related resources. I've put the tarball here -
>> >
>> https://www.dropbox.com/s/suj9pttjp403msv/unexplained-apache-failure.tar.bz2?dl=0
>> >     >
>> >     > Hope you can help figure out what I'm doing wrong. Thanks for the
>> >     help!
>> >
>> >     Oct 28 18:13:38 node02 Filesystem(WebFS)[29940]: INFO: Running start
>> >     for /dev/drbd/by-res/wwwdata on /var/www/html
>> >     Oct 28 18:13:39 node02 kernel: EXT4-fs (drbd1): mounted filesystem
>> >     with ordered data mode. Opts:
>> >     Oct 28 18:13:39 node02 crmd[9870]:   notice: process_lrm_event: LRM
>> >     operation WebFS_start_0 (call=164, rc=0, cib-update=298,
>> >     confirmed=true) ok
>> >     Oct 28 18:13:39 node02 crmd[9870]:   notice: te_rsc_command:
>> >     Initiating action 7: start WebSite_start_0 on node02 (local)
>> >     Oct 28 18:13:39 node02 apache(WebSite)[30007]: ERROR: Syntax error
>> >     on line 292 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a
>> >     directory
>> >
>> >     Is DocumentRoot still set to /var/www/html?
>> >     If so, what happens if you run 'ls -al /var/www/html' in a shell?
>> >
>> >     Oct 28 18:13:39 node02 apache(WebSite)[30007]: INFO: apache not
>> running
>> >     Oct 28 18:13:39 node02 apache(WebSite)[30007]: INFO: waiting for
>> >     apache /etc/httpd/conf/httpd.conf to come up
>> >
>> >     Did you enable the status url?
>> >
>> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-plugin/html/Clusters_from_Scratch/_enable_the_apache_status_url.html
>> >
>> >
>> >
>> >     _______________________________________________
>> >     Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> >     <mailto:Pacemaker at oss.clusterlabs.org>
>> >     http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>> >
>> >     Project Home: http://www.clusterlabs.org
>> >     Getting started:
>> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> >     Bugs: http://bugs.clusterlabs.org
>> >
>> >
>> >
>> > _______________________________________________
>> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>> >
>> > Project Home: http://www.clusterlabs.org
>> > Getting started:
>> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> > Bugs: http://bugs.clusterlabs.org
>> >
>>
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
>>
>
>
>
> --
> - Goi Sihan
> goister at gmail.com
>



-- 
- Goi Sihan
goister at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20141114/6c4c6a7e/attachment.htm>


More information about the Pacemaker mailing list