Testing the DRBD resource along with Apache
As a simple test, we will display the information about the PHP installation. Create a file named info.php
inside /var/www/html
on node01
with the following contents:
<?php phpinfo(); ?>
Now, point your browser to 192.168.0.4/info.php
and verify that the output is similar to the one shown here:
Then, stop the cluster (pcs cluster stop
) on node01
or put it into the standby mode (pcs cluster standby node01
) and refresh the browser. The only thing that should change on the output is the system name, as shown in the following screenshot, since the phinfo()
PHP function returns the local hostname along with the information about the PHP installation:
In addition, if you list the contents of /var/www/html
on node02
, you will see that the info.php
file that was created originally on node01
now shows on node02
as well, as indicated in this screenshot:
Before proceeding, remember to return node01
to normal mode:
pcs cluster unstandby node01