Cluster shared storage

From Teknologisk videncenter
Jump to: navigation, search

RedHat/Centos shared storage example

Consider the drawing below. The WEB-servers run Centos 5.2 and share the redundant data from the shared storage.

  • Each WEB server has access to the same data from the shared storage calles NAS - Network Attached Storage.
  • The WEB-servers has Read/Write access to the NAS.
  • Locking of files open for writing is necessary.
Gigabit ethernet SAN/Cluster løsning

The shared Storage

Two servers with each two drives are installed with FreeNAS The drives are exported as iSCSI targets.

RedHat/Centos WEB servers

The WEB servers all run Centos 5.2 and use the the FreeNAS servers for application data.

  • Make a cluster with membernodes.
  • On one system do the following
    1. Install iSCSI initiator software on the WEB-servers, if not present.
      1. Attach the logical drives to the system
    2. Create a Volume Group with mirror
    3. Create a logical Volume
    4. Create a GFS filesystem
  • On all the Clusternodes
    1. Install iSCSI initiator software on the WEB-servers, if not present.
      1. Attach the logical drives to the system
    2. Make a mountppoint
    3. Mount the Logical Volume (GFS Filesystem)

Installing a copy of mediawiki and restoring a backup

MYSQL

Create and populate the database from a backup.

[root@localhost ~]# chkconfig --level 345 mysqld on
[root@localhost ~]# service mysqld start
Initialiserer MySQL-database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com

                                                          [     O.k.    ]

Starter MySQL: [ O.k. ] [root@localhost ~]# mysqladmin -u root create wikidb [root@localhost ~]# mysql -u root wikidb < /tmp/wikidbbackup12032009-1508.dump </pre>

Mediawiki files and apache

Copy the mediawikifiles to apache root directory.

[root@localhost ~]# chkconfig --level 345 httpd on
[root@localhost ~]# service httpd start
Starter httpd:                                             [     O.k.    ]
[root@localhost ~]# cd /var/www/html

Links