Path

ez.no / documentation / ez publish / technical manual / 4.6 / features / clustering / uninstalling an ezdfs cluster


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Uninstalling an eZDFS cluster

Since users may decide not to use cluster anymore, or even choose to use another file handler, this chapter would show how to uninstall an existing eZDFS cluster.

The following procedures may cause loss of information, since this is a cluster removal guide. Before proceeding, please be sure to make a complete backup of your site, cluster folder and database, to avoid losing data.

Removing an eZDFS cluster

1. Clear the cache

Before starting it's better to clear the eZ Publish's cache, by running the following command from your eZ Publish root folder:

php bin/php/ezcache.php --clear-all

2. Unclusterize your eZDFS cluster

Run the following shell command from your eZ Publish root folder:

php bin/php/clusterize.php -u

This will move cluster cache and binaries from the cluster path to the original locations.

3. Remove the images serving script

Remove the config.cluster.php file, which has been created while setting up the cluster environment. For that, you can use the following command from your eZ Publish root folder:

rm config.cluster.php

4. Remove the cluster database table

On MySQL the database table can be removed by executing the following shell command:

mysqladmin -u <user> -p<password> drop ezdfsfile
mysqladmin -u <user> -p<password> drop ezdfsfile_data

Note: On Oracle the same ezdfsfile and ezdfsfile_data tables need to be removed.

5. Remove the Clustering Setting from your file.ini.append.php:

Simply edit your file.ini.append.php file and remove the ClusteringSettings and eZDFSClusteringSettings blocks completelly. You can see an example below:

[ClusteringSettings]
FileHandler=eZDFSFileHandler
 
[eZDFSClusteringSettings]
MountPointPath=/media/nfs
DBBackend=eZDFSFileHandlerMySQLiBackend
DBHost=dbhost
DBPort=3306
DBSocket=
DBName=cluster
DBUser=root
DBPassword=
DBConnectRetries=3
DBExecuteRetries=20
MaxCopyRetries=5

6. Disable kernel clustering debug

Disable the kernel-clustering setting from debug.ini, by setting its value to disabled, as in the following example:

[GeneralCondition]
 
kernel-clustering=disabled

7. Remove the cluster rewrite rules from the Apache configuration

Edit your apache configurations file and remove the following rules:

RewriteRule ^/var/([^/]+/)?storage/images-versioned/.* /index_cluster.php [L]
RewriteRule ^/var/([^/]+/)?storage/images/.* /index_cluster.php [L]
RewriteRule ^/var/([^/]+/)?cache/public/(stylesheets|javascript) /index_cluster.php [L]
RewriteRule ^/index_cluster.php - [L]

8. Restart Apache and test the site

Restart the Apache web server. After it has been restarted, the system should be up and running in cluster mode. Verify that the site works correctly, content images are displayed and content binary files are accessible (open the site pages in a web browser, log in to the administration interface, try clicking around and so on).

9. Clear the cache files

Clear the cache files again, to make sure your sites generate clean caches. To do so, use the following command:

php bin/php/ezcache.php --clear-all

Ricardo Correia (01/10/2013 3:02 pm)

Ricardo Correia (02/10/2013 8:06 am)


Comments

There are no comments.