Salem Radio Labs. APPLICATION NOTE 003 Configuring Rivendell Hot Standby Hosts on SuSE



Similar documents
Setting Up Specify to use a Shared Workstation as a Database Server

How to install/configure MySQL Database

MySQL Backups: From strategy to Implementation

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

MySQL Backup and Security. Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer <lenz@mysql.com>

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery

Upgrading Software Using the Online Installer

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

Backing Up TestTrack Native Project Databases

Local Caching Servers (LCS): User Manual

Sophos Anti-Virus for Linux configuration guide. Product version: 9

Sophos Anti-Virus for Linux user manual

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

Rev C. DBDS Backup and Restore Procedures For System Release 2.2 Through 4.3

NAS 259 Protecting Your Data with Remote Sync (Rsync)

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

High Availability And Disaster Recovery

Backing up the Embedded Oracle database of a Red Hat Network Satellite

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Last modified: September 12, 2013 This manual was updated for TeamDrive Personal Server version

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

Sophos Anti-Virus for Linux configuration guide. Product version: 9

Training Proposal for Network OSS Training Project

Automated Offsite Backup with rdiff-backup

4 Backing Up and Restoring System Software

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

Ulteo Open Virtual Desktop Installation

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

CycleServer Grid Engine Support Install Guide. version 1.25

Upgrading MySQL from 32-bit to 64-bit

Graphviz Website Installation, Administration and Maintenance

Lenz Grimmer

TOSHIBA GA Printing from Windows

Microsoft Corporation. Project Server 2010 Installation Guide

Backing Up Your System With rsnapshot

BrightStor ARCserve Backup for Linux

Task Scheduler. Morgan N. Sandquist Developer: Gary Meyer Reviewer: Lauri Watts

Motorola Canopy Prizm Release 3.2 Server Setup Guide for Linux Platforms

Plesk 8.3 for Linux/Unix Acronis True Image Server Module Administrator's Guide

Exchange Brick-level Backup and Restore

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

Installing and Running MOVES on Linux

UPSentry Smart User s Manual. Shutdown Management Software. for Mac OS X 10.2

There s a variety of software that can be used, but the approach described here uses freely available Cygwin software: (1) Cygwin/X (2) Cygwin/openssh

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

How to backup a remote MySQL server with ZRM over the Internet

Implementing Failover Capabilities in Red Hat Network Satellite

stub (Private Switch) Solaris 11 Operating Environment In the Solaris 11 Operating Environment, four zones are created namely:

Installing LearningBay Enterprise Part 2

LAMP Quickstart for Red Hat Enterprise Linux 4

Commodity DataServer. Best Practices Guide

System update procedure for Kurio 7 (For build number above 110)

Installation documentation for Ulteo Open Virtual Desktop

Restoring Microsoft SQL Server 7 Master Databases

Moving the TRITON Reporting Databases

Application Note - JDSU PathTrak Video Monitoring System Data Backup and Restore Process

On premise upgrade guide (to 3.3) XperiDo for Microsoft Dynamics CRM

Decision Support System to MODEM communications

Maintaining the Content Server

ElectricCommander. Technical Notes MS Visual Studio Add-in Integration version version 3.5 or higher. October 2010

HowTo. Planning table online

Backup/Restore MySQL Server

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

GestióIP IPAM v3.0 IP address management software Installation Guide v0.1

webmethods Certificate Toolkit

Redmine Installation on Debian. v1.1

Introduction to Operating Systems

ACS 5.x and later: Integration with Microsoft Active Directory Configuration Example

Lotus Foundations Start Getting Started

Database Backup Datacolor Match Pigment and Datacolor Tools

Using RAID Admin and Disk Utility

Workflow Templates Library

FrontDesk Installation And Configuration

Transferring AIS to a different computer

Side-by-side Migration Guide for Snare Server v7

Installation / Migration Guide for Windows 2000/2003 Servers

How To Use 1Bay 1Bay From Awn.Net On A Pc Or Mac Or Ipad (For Pc Or Ipa) With A Network Box (For Mac) With An Ipad Or Ipod (For Ipad) With The

Performing Administrative Tasks

Intronis RMM Deployment Kit

FILE TRANSFER PROTOCOL (FTP) SITE

Moving the Web Security Log Database

Scala InfoChannel Content Manager 5 Backup and Restore Instructions

1. Product Information

Lab 5 Managing Access to Shared Folders

Online Backup Client User Manual Linux

Configuring High Availability for VMware vcenter in RMS Distributed Setup

X-POS GUIDE. v3.4 INSTALLATION SmartOSC and X-POS

Installation of MicroSoft Active Directory

Job Scheduler Daemon Configuration Guide

Windows BitLocker Drive Encryption Step-by-Step Guide

EMC AVAMAR 6.0 GUIDE FOR IBM DB2 P/N REV A01 EMC CORPORATION CORPORATE HEADQUARTERS: HOPKINTON, MA

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

Setting up Remote Replication on SNC NAS Series

IBM Tivoli Network Manager IP Edition V3.8

Transcription:

Salem Radio Labs APPLICATION NOTE 003 Configuring Rivendell Hot Standby Hosts on SuSE SCOPE This application note details the procedures for configuring one or more host systems to act as a 'hot standby' Rivendell server. Such a 'hot standby' system can be used to quickly restore a Rivendell network in the event of failure in the primary server. PREREQUISITES This procedure assumes that Rivendell is already properly installed on both the master and any standby host(s). This includes proper mysql installation and configuration. For further information on basic Rivendell installation, see SRL Application Note #1. Ideally, the versions of mysql being employed on the master and any standby system(s) should be identical, as data replication between different versions is not supported for all combinations. For more information regarding cross version compatibility, consult the mysql documentation. OVERVIEW It is possible to configure Rivendell so as to have two alternative configurations, called 'Master' and 'Standby' Each configuration can use a different mysql server and audio storage location (either local or connected via the network), thus allowing a backup configuration that can be quickly activated in the event of a problem with the Master setup. It is also possible to configure a standby system so that it is automatically kept up to date with any changes (configuration changes, new recordings, etc) made to the Master system. These capabilities are collectively referred to a 'hot standby' capability. Configuring hot standby for one or more Rivendell hosts consists of three basic steps: 1) Enabling database replication 2) Enabling audio replication 3) Setting up the master and standby configurations. Package Requirements In addition to the standard Rivendell dependencies, both the Master Server and any standby hosts will need the 'rsync' package installed. The package is included in SuSE, or can be downloaded from: http://rsync.samba.org/ CONFIGURING DATABASE REPLICATION Preparing the Master Server On the master server, copy the 'my.cnf master' file (from the Rivendell distribution) to '/etc/my.cnf'. This file can be found in the 'conf/' directory of the Rivendell sources, or in the package documentation directory ('/usr/share/doc/packages/rivendell') if an RPM distribution is being used. Next, create a mysql user account called 'repl' with rights to connect from each hot standby host. This account should have RELOAD, REPLICATION SLAVE, REPLICATION CLIENT and SUPER rights enabled, and no others. Finally, shutdown and then restart the mysql server by doing (as root):

/etc/init.d/mysql stop /etc/init.d/mysql start Generating The Initial Data Snapshot Before starting replication, it is necessary to generate an initial snapshot of data on the master server for importation into the slave. (IMPORTANT NOTE: this procedure will lock the Rivendell database while it is being performed, effectively taking it off line. Plan accordingly!) To generate the snapshot, proceed as follows: On the master mysql server, use the mysql monitor program to log into mysql with an administrator account, using a command such as: mysql u root p Once logged in, enter the following command: FLUSH TABLES WITH READ LOCK; Next, open up a root shell and make a copy of all the files in the '/var/lib/mysql' directory, by doing: cd /var/lib tar zcf snapshot.tar.gz mysql You should now have a file called 'snapshot.tar.gz', containing a snapshot of the server data. Next, enter the following command in the mysql monitor: SHOW MASTER STATUS; You should see output similar to the following: File Position Binlog_Do_DB Binlog_Ignore_DB rdserv-bin.000001 269414518 Note down the values of the 'File' and 'Position' fields. You will need these when starting replication on the slave system(s). Finally, enter the following in the mysql monitor: UNLOCK TABLES; Enter 'quit' to exit the monitor, and you're done creating the snapshot. Preparing the Standby Host (IMPORTANT NOTE: this procedure will completely destroy any previously existing mysql data on the slave system!). On the standby host, copy the 'my.cnf standby' file (from the Rivendell distribution) to '/etc/my.cnf'. This file can be found in the 'conf/' directory of the Rivendell sources, or in the package documentation directory ('/usr/share/doc/packages/rivendell') if an RPM distribution is being used. Open the '/etc/my.cnf' in a text editor and set the following values appropriately for your site:

server id = <id num> where <id num> is a site unique number that identifies this mysql server. By convention, the master Rivendell server gets a server id of '1', and standby hosts are sequentially numbered, starting with '100'. master host = <hostname> where <hostname> is the hostname of the master Rivendell server. master user = <username> where <username> is the name of the account on the master server to use for replication. Normally, this is the repl account. master password = <password> where <password> is the password for accessing the replication account on the master server. Next, populate the snapshot data from the master system. Copy the snapshot file you created on the master to the standby system, then open a root shell on the standby system and do the following: cd /var/lib tar zvxf /path/to/snapshot/file/snapshot.tar.gz Finally, restart the mysql server by doing: /etc/init.d/mysql start Starting Replication To actually start replication, log into a mysql account with administrative rights on the standby host (using the mysq -u root -p command) and issue the following commands: CHANGE MASTER TO MASTER_HOST= <hostname>, MASTER_USER= repl, MASTER_PASSWORD= <password>, MASTER_LOG_FILE= <filename>, MASTER_LOG_POS=<position>; where <hostname> and <password> are the hostname and mysql password of the master system and <filename> and <position> are the values of the File and Position fields reported by the SHOW_MASTER_STATUS command on the master. Next, enter the following command: START SLAVE; Each of these commands should return 'Query OK'. If errors occur, consult the mysql log (at '/var/lib/mysql/mysql.log') for clues as what could be going wrong. Replication should now be operational.

CONFIGURING AUDIO REPLICATION Preparing the Master Server Configure an rsync module for the Rivendell audio archive by inserting the following into the '/etc/rsyncd.conf' file: [rivendell] path = /var/snd comment = Rivendell Audio Archive read only = true In addition, make sure that the 'hosts allow=' directive in '/etc/rsyncd.conf' is set so as to allow the standby host(s) to connect. See the rsyncd.conf(5) man page for more details. Next, open Yast2, click on System and then click on Runlevel Editor. Select the rsyncd service and the click Enable, then Finish. Next, create the replication check file by doing the following as the Rivendell user: touch /var/snd/repl.chk The audio replication code will check to see that this file exists each time before replicating audio. This is to prevent catastrophes with mirror deletes in the event of a failure of the storage device containing the primary archive. Preparing the Standby Host Create a '/var/snd.standby' directory with enough free space to be able to contain all of the audio data from the master server, and make sure that it is owned as well as readable and writable by the Rivendell user and group (normally, user 'rd' and group 'users'). Run the initial audio syncronization by entering the following command as the Rivendell user: rsync <hostname>::rivendell/*.wav /var/snd.standby where <hostname> is the name of the master server. Since this is the initial syncronization, this command may take a significant amount of time to complete, as the entire audio archive must be transferred. Enabling Audio Replication Add the following cron job for the Rivendell user (using the crontab -e command): 0 * * * * /usr/local/bin/rd_audio_sync <hostname> where <hostname> is the name of the master server. This will cause the archive to be syncronized once per day. Some sites may want syncronization to occur more frequently. This can be accomplished by adjusting the parameters of the cron job see the crontab(5) man page for details. SETTING UP CONFIGURATIONS Stop Daemons Before proceeding with the rest of this procedure, stop the Rivendell daemons on the standby host by doing (as root): /etc/init.d/rivendell stop

Database Configurations Prepare two 'rd.conf' files, one each for your 'Master' and 'Standby' setup. The master file should be saved as '/etc/rc.conf.master', while the standby file should be saved as '/etc/rd.conf.standby'. Be sure to back up anything in the original '/etc/rd.conf' file, as it's contents will be overwritten. Audio Directories If you haven't already, create two directories, called '/var/snd.master' and '/var/snd.standby'. They should both be owned by the Rivendell user, as well as readable and writtable by that user. Move the contents of the original '/var/snd' directory to '/var/snd.master', and then delete '/var/snd'. Start It Up To generate the initial master configuration, enter the following (as root): rd_config master This will generate the appropriate symbolic links and then start up the Rivendell daemons. SWITCHING BETWEEN CONFIGURATIONS To switch between the Master and Standby configurations, all you need to do is: Close any open Rivendell programs. Do the following command (as root): rd_config <config name> where <config name> is either master or standby. This command will shut down the Rivendell daemons, regenerate the appropriate sym links for the selected configuration and then restart the daemons. IMPORTANT NOTE: running this command will cause any active audio operations (playout or recording) to be interrupted. REVISION HISTORY Thu 19 Oct 2006 Fred Gleason <fredg@salemradiolabs.com> Fixed missing ' x' switch provided to tar(1) command (reported by Andrew Struiksma <andy@krpiradio.com>). Sun 03 Sep 2006 Fred Gleason <fredg@salemradiolabs.com> Added sections on generating and installing initial data snapshot. Fri 28 Jan 2005 Fred Gleason <fredg@salemradiolabs.com> Added directions on starting the rsyncd daemon. Thu 04 Nov 2004 Fred Gleason <fredg@salemradiolabs.com> Initial document creation.