Using Sun FireTM X4540 Server With Zmanda Recovery Manager 2.
Copyright © 2008 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Use is subject to license terms. This distribution may include materials developed by third parties.
Sun Microsystems, Inc. Table of Contents Introduction.....................................................................................................................................................1 Configuration ..................................................................................................................................................2 Overview.........................................................................................................................................
1 Introduction Sun Microsystems, Inc. Introduction This paper discusses how to quickly configure and deploy the Sun Fire X4540 server with Zmanda Recovery Manager 2.2 for MySQL databases. For more information on ZRM Enterprise, see: http://zmanda.com/zrm-mysql-enterprise.html. MySQLTM software has become the world's most popular open source database because of its ease of use, high performance, and high reliability (see http://www.sun.com/software/products/mysql).
2 Configuration Sun Microsystems, Inc. Configuration Overview Figure 1 shows an example of Zmanda Recovery Manager (ZRM) running on the Sun Fire X4540 server and protecting remote MySQL servers running on Solaris OS, Linux, and Microsoft Windows machines with MyISAM and InnoDB tables, and a MySQL Cluster with NDB storage engine. Figure 1. Centralized Backup of MySQL Server With ZRM on Sun Fire X4540 Server Notes: X4540 here refers to Sun Fire X4540 Server.
3 Overview Sun Microsystems, Inc. Solaris Configuration For this guide, the Sun Fire X4540 server used for ZRM certification was running the Solaris 10 8/07 OS. This is the minimum recommended version to use because various ZFS improvements were introduced in this build. The Sun Fire X4540 server is powered by up to 8 CPUs operating at 2300 MHz and provides 48 SATA drives with a total capacity close to 50 Tbytes in a 4U enclosure. The two boot drives are mirrored using Solaris Volume Manager with UFS.
4 Zpool Configuration Sun Microsystems, Inc. Example zpool creation commands for a pool zmanda: bash-3.00# zpool create -f zmanda raidz2 c0t0d0 c1t0d0 c2t0d0 c3t0d0 c4t0d0 c5t0d0 bash-3.00# zpool add zmanda raidz2 c0t2d0 c1t2d0 c2t2d0 c3t2d0 c4t2d0 c5t2d0 bash-3.00# zpool list NAME zmanda SIZE 10.9T USED 204K AVAIL 10.9T CAP 0% HEALTH ONLINE ALTROOT - CAP 0% HEALTH ONLINE ALTROOT - bash-3.00# zpool add zmanda spare c0t7d0 c1t7d0 bash-3.00# zpool list NAME zmanda SIZE 10.9T USED 210K AVAIL 10.
5 Zpool Configuration Sun Microsystems, Inc. The next step was adding two spare drives. Lastly, we checked the pool status and verified the availability of the zmanda pool for configuring ZFS. RAIDZ2 is a natural choice for a backup server, which contains information vital to business operations. RAIDZ2 can survive up to two drive failures, regardless of whether they are due to corrupt data coming off the drives, a physical failure of the drives, or drives that are missing.
6 ZRM Configuration Sun Microsystems, Inc. The dependency packages provided are as follows: • SMCcoreu • CSWgcc3corert • CSWgcc3g++rt • SMCgpgme • SMCgrep • SMClgcc346 • SMClgpger • SMCliconv • SMClintl • SMCpcre • SMCsudo • SMCtar These packages are also available from Sunfreeware at http://sunfreeware.org and from Blastwave at http://blastwave.org. Once the archive have been downloaded, use the gtar(1M) command to extract the prerequisite packages.
7 ZRM Configuration Sun Microsystems, Inc. The following software components are installed: • The ZRM for MySQL software • Zmanda Management Console with MySQL, PHP, Apache, PHPmyadmin, Perl and various Perl modules and their dependencies. These are installed under the /opt/zmanda/zrm and /opt/zmanda/common directories. Zmanda Management Console In addition to a powerful command line interface (CLI), ZRM also provides the Zmanda Management Console (ZMC).
8 Sun Microsystems, Inc. • • • Backup time and parameters for backup-level scheduling (OPTIONAL) Snapshot technology used to make backups (OPTIONAL) Local storage location of snapshots for near-CDP protection of MySQL databases Each backup set contains at least one database or database table. Backup sets are easy to copy, add, and modify. All backup, reporting, monitoring, and restore actions are performed on the backup sets.
9 Sun Microsystems, Inc. Note: For many ZMC forms, the fields change depending on the context; selecting different values can change the options that are displayed. For example, if you choose to back up the MySQL cluster, Backup What displays options that are different from what is shown in Figure 2. The Server Parameters section lets you specify the connection details for the MySQL server to back up.
10 Sun Microsystems, Inc. Configuring Storage Figure 4 shows the Backup Where page, which specifies where the backup images for the backup set will be stored and how long to retain them. Figure 3. Backup Where Page for Configuring Storage Regardless of where the remote MySQL server is hosted, backups are stored under the backup directory of the local machine where ZMC runs. The default is /var/lib/mysql-zrm.
11 Configuring Storage Sun Microsystems, Inc. ZMC creates temporary files and directories during backup on both the ZRM server and the MySQL server. The temporary directory specified here should exist on both machines, and should have sufficient space to hold at least one full backup on the MySQL server during backup and on the backup host during restore, plus 10%. How much space this requires in practice depends on the backup method.
12 Configuring ZFS Snapshots Sun Microsystems, Inc. To take advantage of ZFS snapshots, all MySQL database files (data, log, indexes) belonging to the backup set must be stored in ZFS volumes to ensure consistency. If any of the files are not on ZFS volumes, a raw backup (using mysqlhotcopy) or a logical backup (using mysqldump) is performed, depending on the storage engines of the tables in each of the databases.
13 Configuring ZFS Snapshots Sun Microsystems, Inc. ZRM Monitoring and Reporting The complexity of backup operations for MySQL databases makes it difficult to estimate how well you meet the business objectives of data protection. The comprehensive monitoring and backup reporting provided by ZRM helps you to ensure your MySQL data is protected well. Figure 5 shows the Monitor page. Figure 5.
14 ZRM Monitoring and Reporting Sun Microsystems, Inc. Figure 6.
15 Database Events Viewer Sun Microsystems, Inc. The date and time of each database event is shown as an individual record. You can easily scroll through the entries and search the logs with queries. Using the search, you can locate any event that caused harm to your database. You can also jump to a given date and timestamp. To help you navigate through events, there is a special vertical, orange tool bar to the left of the date and timestamps in the database events list.
16 Recovery Using ZMC Sun Microsystems, Inc. After selecting what to restore from, choose a recovery point objective (RPO). ZRM catalogs all full and incremental backups performed. When you request a point-in-time restore, ZRM automatically finds the full backup and all the incremental backups required to restore your database to the requested RPO.
17 Summary Sun Microsystems, Inc. Summary This guide was a quick introduction to configuring the Sun Fire X4540 server as a backup server for Zmanda Recovery Manager 2.2. It provides examples for installing the Zmanda Recovery Manager for MySQL and configuring a zpool and the ZFS file system on the Solaris OS to utilize the Sun Fire X4540 server for storing MySQL backups.
18 For More Information ● Sun Microsystems, Inc. Wikis: ● Sun BluePrintsTM wiki (http://wikis.sun.com/display/BluePrints/Main, especially the following: ● Storage BluePrints page: http://wikis.sun.com/display/BluePrints/Storage+BluePrints ● Sun BluePrints article: Optimize MySQL Server on Sun x64 Servers and Storage: http://wikis.sun.com/display/BluePrints/Optimize+MySQL+Server+on+Sun+x 64+Servers+and+Storage ● Sun Storage Administration wiki: http://wikis.sun.
19 Licensing Information Sun Microsystems, Inc. Licensing Information Unless otherwise specified, the use of this software is authorized pursuant to the terms of the license found at http://www.sun.com/bigadmin/common/berkeley_license.html. Using Sun Fire X4540 Server With Zmanda Recovery Manager 2.