Difference between revisions of "Cluster shared storage"

From Teknologisk videncenter
Jump to: navigation, search
m (RedHat/Centos shared storage)
m (Mediawiki files and apache)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
= RedHat/Centos shared storage =
+
= 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.
 
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.
 
*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.
 
*The WEB-servers has Read/Write access to the NAS.
*Locking of files open for writing is necessary.  
+
*Locking of files open for writing is necessary.
 +
[[Image:SAN tegning1.png|thumb|300px|none| Gigabit ethernet SAN/Cluster løsning]]
 +
 
== The shared Storage ==
 
== The shared Storage ==
 
Two servers with each two drives are installed with [http://www.freenas.org FreeNAS]
 
Two servers with each two drives are installed with [http://www.freenas.org FreeNAS]
Line 9: Line 11:
 
== RedHat/Centos WEB servers ==
 
== RedHat/Centos WEB servers ==
 
The WEB servers all run Centos 5.2 and use the the FreeNAS servers for application data.
 
The WEB servers all run Centos 5.2 and use the the FreeNAS servers for application data.
*Install [[iSCSI]] initiator software
+
*Make a cluster with membernodes.
*   
+
*On one system do the following
[[Image:SAN tegning1.png|thumb|300px|none| Gigabit ethernet SAN/Cluster løsning]]
+
*#Install [[iSCSI]] initiator software on the WEB-servers, if not present.
 +
*##Attach the logical drives to the system
 +
*#Create a Volume Group with mirror
 +
*#Create a logical Volume
 +
*#Create a GFS filesystem
 +
*On all the Clusternodes
 +
*#Install [[iSCSI]] initiator software on the WEB-servers, if not present.
 +
*##Attach the logical drives to the system
 +
*#Make a mountppoint
 +
*#Mount the Logical Volume (GFS Filesystem)
 +
= Installing a copy of mediawiki and restoring a backup =
 +
== MYSQL ==
 +
Create and populate the database from a backup.
 +
<pre>
 +
[root@localhost ~]# chkconfig --level 345 mysqld on
 +
[root@localhost ~]# service mysqld start
 +
Initialiserer MySQL-database:  Installing MySQL system tables...
 +
OK
 +
Filling help tables...
 +
OK
 +
</pre>
 +
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.
 +
<pre>
 +
[root@localhost ~]# chkconfig --level 345 httpd on
 +
[root@localhost ~]# service httpd start
 +
Starter httpd:                                             [    O.k.    ]
 +
[root@localhost ~]# cd /var/www/html
 +
</pre>
 +
=Links=
 +
*[http://www.snia.org/education Storage Network Industry Association (SNIA) education homepage]
 +
*[http://www.snia.org/education/dictionary/ Storage Network Industry Association (SNIA) Dictionary]
 +
[[Category:Cluster]]

Latest revision as of 13:57, 8 May 2009

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