Ariel

From Wikitech
(Difference between revisions)
Jump to: navigation, search
m (automatic host update (by hashar))
m (automatic host update (by hashar))
Line 3: Line 3:
 
|location=pmtpa
 
|location=pmtpa
 
|usage=mysql
 
|usage=mysql
 +
|status=[http://ganglia.wikimedia.org/small/?c=Apaches&h=ariel.pmtpa.wmnet&m=&r=day&s=descending&hc=4 status]
 
|memory=7920 MBytes
 
|memory=7920 MBytes
 
|cpu=2 x AMD Opteron(tm) Processor 248
 
|cpu=2 x AMD Opteron(tm) Processor 248
 
|kernel=2.6.12-1.1378_FC3smp
 
|kernel=2.6.12-1.1378_FC3smp
|updated=Sun Nov 27 22:07:10 2005
+
|updated=Sun Nov 27 22:10:20 2005
 
|}}
 
|}}
  

Revision as of 22:10, 27 November 2005

ariel
Location: pmtpa
Usage:
Mysql logo small.png
Status
Overal: status
Nagios?: Nagios status
Hardware
Memory: 7920 MBytes
CPU: 2 x AMD Opteron(tm) Processor 248
Software
Kernel: 2.6.12-1.1378_FC3smp
Ariel is the master DB server. See also: Ariel MySQL configuration. Suda, the former master database server.

Note: As of 23 July 2005, samuel is the new master, and ariel is down.

Contents

Hardware

Motherboard: AccelerTech HDAMA AT02161 - http://www.accelertech.com/products/motherboard/ATO2161.php

Yes, it has BIOS console redirection.

Software

Some problems with kernel 2.6.7-rc3 on ariel. Some allocation_memory problems appear when stressing the machine. No more problems by disabling the swap.

Starting and stopping MySQL

  • to start: sudo /usr/local/mysql/bin/mysqld_safe & (while logged in as a member of group wikidev). Normal response is Starting mysqld daemon with databases from /usr/local/mysql/var
  • to stop: mysqladmin shutdown (use mysqladmin -uroot -p and supply the mysql root password if you don't have it in your my.cnf)

Process to switch to ariel

  • In CommonSettings.php, set $wgReadOnlyFile
  • Put read-only mysql on ariel
    • in mysql shell:
mysql: set global read_only = on
  • Switch user and server to ariel in CommonSettings.php
    • $wgDBserver -> ariel (server)
    • same user as Suda
    • Disable linkscc, cause linkscc try to write. $wgEnablePersistentLC = false;
  • Test wiki
  • On suda, create an account for replicating the data.
mysql> GRANT REPLICATION SLAVE ON *.*
   -> TO 'repl'@'ariel-eth1' IDENTIFIED BY  'slavepass' ;
  • To record the current log file name and offset, you should issue the following statements before you shutting down suda:
mysql> FLUSH TABLES WITH READ LOCK;
mysql> SHOW MASTER STATUS;
  • shut down suda without unlocking the tables to make sure that the server goes down with the snapshot corresponding to the current log file and offset:
shell> mysqladmin -u root shutdown
  • Copy the db to ariel
    • rsync -av /mnt/newdrive/newdata ariel:/usr/local/mysql/ --rsh=ssh --progress as root
    • Alternative: Use netcat (nc) instead. Unencrypted and therefor faster. 10 MByte/s have been observed between ariel and zwinger.
  • Stop mysql on Ariel
  • remove symlink /usr/local/mysql/data
  • mv /usr/local/mysql/newdata to /usr/local/mysql/data
  • restart mysql on ariel
  • Test wiki
  • Set the master/slave: On Suda, do:
mysql> CHANGE MASTER TO
   ->     MASTER_HOST='ariel-eth1',
   ->     MASTER_USER='repl',
   ->     MASTER_PASSWORD=' replication_password ',
   ->     MASTER_LOG_FILE=' recorded_log_file_name ',
   ->     MASTER_LOG_POS=recorded_log_position;


  • Start the slave threads:
mysql> START SLAVE;

External links

Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox