Thursday, October 24, 2013

3PAR System Reporter, Part 2

We left off with a Linux host that had been built and configured to begin the installation of 3PAR System Reporter. Let’s continue on and get System Reporter installed and configured.
As a recap from Part 1, we are building a System Reporter system in Linux. I have chosen to use RedHat Enterprise Linux 5.8, along with MySQL for the database backend. Both System Reporter and MySQL will be hosted on the same server.
So let’s recap some file locations first, as we will need them later on.
The 3PAR CLI was installed into /opt/3PAR/inform_cli_3.1.1. You should have 2 files copied from the System Reporter CD, onto your system. They are sampleloop-.i386.rpm and sysrptwebsrv-.i386.rpm. At the time of writing, the current versions were 2.9-2 for sampleloop and 2.9-2 for sysrptwebsrv, but make sure to check with your 3PAR representative for the most recent versions.
We begin by making some modifications to the MySQL installation.
  1. Open /etc/my.cnf with your editor of choice (mine is vi )
    1. Comment out the socket= line, and add the line below underneath:
      1. socket=/var/run/mysqld/mysqld.sock
    1. Above [mysqld_safe], add the following line:
      1. max_allowed_packet=32M
    2. Save the file, and then restart mysql
      1. /etc/init.d/mysqld stop
      2. /etc/init.d/mysqld start
  2. Check to make sure the new socket file exists
    1. ls –al /var/run/mysqld/mysqld.sock
Now we are going to create the System Reporter database and users, and then grant those users access to the database.
  1. Connect to your MySQL database
    1. mysql –u root –p
      • when prompted, enter the password you defined for the root user
    1. Create the inservstats database:
      • create database inservstats;
    2. Create the cliuser and webuser users
      • create user cliuser identified by ‘3psrcli’;
      • create user webuser identified by ‘3parweb’;
    3. Grant privileges to the System Reporter users, by issuing the below commands:
      • use inservstats
      • grant all on * to cliuser;
      • grant select on * to webuser;
    4. Quit out of the database:
      • exit

Installing the SampleLoop applications

With the database and users created, we are able to start installing the software. Before we start, make sure to check to ensure the 32 bit package of GD is installed, by issuing
yum –y install gd.i386
. You should get a prompt back saying it’s installed and the latest version, otherwise it will install the missing package(s).

  1. Install the sampleloop package, which you copied from the System Reporter CD earlier
    • rpm –ivh sampleloop-.i386.rpm
      (substiture ver with your version)
  2. Edit the /etc/sampleloop.confconfiguration file, by opening it with your favorite editor. You will need to perform the following edits:
    • Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
    • Change the line “set Sysdb::smtpserver” to your local mail server address
    • Change the line “set Sysdb:smtporig” to the FROM email address System Reporter should use when sending you emails.
    • Change the “set Sysdb::smtpuser” and “set Sysdb:smtppasswd” to their respective user and password values, if your mail server requires you to login to send mail. If these are not needed, simply comment them out by putting a # in front of the lines.
    • Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
    • Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
  3. Now we will need to create the password file used by the sampleloop mechanism to access the CLI. Open/Create the file “/etc/sampleloop_dbpwfile”
    • On the first line, enter the username and password for the cli user, separated by a single space.
      • ie. “cliuser 3psrcli”
    • Save the file, and exit out of the editor.
  4. You are now ready to startup the SampleLoop processes.
    • run the below script:
      1. /etc/init.d/sampleloop startup
    • If this fails to start, check the log located in /var/log/sampleloop/sampleloop.log for hints on what went wrong. It’s usually a password mistyped.
  5. If everything starts successfully, add sampleloop to the default startup runlevels
    • chkconfig --add sampleloop

Installing the System Reporter Webserver Files

Now we have the database and users created, sampleloop applications installed, and SampleLoop up and running. The next step is to install the sysrptwebsrv RPM package. This package is found on the System Reporter CD, and should be copied on to your Linux system.
  1. To install the packages, run the below:
    • rpm -ivh sysrptwebsrv-2.9-2.i386.rpm
    • Ensure it was installed successfully.
  2. We now need to setup two config.tcl files for the webserver.
    1. The first is at /var/www/cgi-bin/3par-rpts/config.tcl. Open this file in your favorite editor, and make the below changes:
      • Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
      • Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
      • Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
      • Change the line “set Sysdb::dbuser” to webuser
      • Change the line “set Sysdb::dbpasswd” to the password you set for webuser, in my example it was 3parweb.
      • Change the line “set Sysdb::smtpserver” to your local mail server address
      • Change the line “set Sysdb:smtporig” to the FROM email address System Reporter should use when sending you emails.
      • Change the “set Sysdb::smtpuser” and “set Sysdb:smtppasswd” to their respective user and password values, if your mail server requires you to login to send mail. If these are not needed, simply comment them out by putting a # in front of the lines.
    2. The second file is located at /var/www/cgi-bin/3par-policy/config.tcl. Open this file in your favorite editor, and make the below changes:
      • Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
      • Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
      • Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
      • Change the line “set Sysdb::dbuser” to cliuser
      • Change the line “set Sysdb::dbpasswd” to the password you set for cliuser, in my example it was 3psrcli.

Test your System Reporter setup

You should now have a working System Reporter configuration. You can access System Reporter by going to:
http:///3par/
Part 3 of my System Reporter series will involve adding the Inserv system to System Reporter, as well as setting some basic options up, and going over the various tabs available to you.

3PAR System Reporter, Part 1

System Reporter is a 3PAR tool that provides informative reporting about your 3PAR arrays, as well as being able to build custom reports, and schedule daily execution and email of any report.
System Reporter is also required to be installed, in order to use Adaptive Optimization, as System Reporter is used to determine which chunklets are to be migrated between which CPG’s. All the Adaptive Optimization configuration is done from within System Reporter’s web interface.
System Reporter can be installed on Windows 2003, Windows 2008, or RedHat Enterprise Linux 5. It may use either Microsoft SQL, MySQL, Oracle, or SQLite as it’s backend database, although there are restrictions on each database. MySQL seems to be the recommended database to use, as it has the fastest query times due to it’s MyISAM structure, and it has minimal restrictions across the server Operating Systems.
I will be installing and configuring System Reporter 2.8 on a RedHat Enterprise Linux 5.8 virtual machine. I will be using MySQL as the database backend, which will be installed on the same host virtual machine. In part 2 of this series, I will be then be installing and configuring System Reporter. Part 3 will be configuring and adding a 3PAR InServ system, in my case a T400. Part 4 will be setting up Adaptive Optimization. Part 5 will be all about reports, and how to create custom and scheduled reports.

System Requirements

System Reporter has the below requirements for it’s host system:
  • CPU: Pentium 4, 3Ghz or faster
  • Memory: 1GB
  • Disk: 20GB free space
Please make sure your host system meets or exceeds these requirements, prior to installation.

Install Linux

The first step, is to make sure you have a freshly installed and updated RedHat EL 5 installation. I chose to use the normal installation, and deselected anything I didn’t want. I left the apache webserver installed, as well as X11, but removed all Window Managers. After fully updating the installation with ‘yum –y update && yum –y upgrade’ I began the rest of my installation.

Install Apache Webserver

From the command line, issue the below command:
yum –y install httpd
This will install the Apache Webserver, if it has not already been installed.

Install 3PAR CLI

The System Reporter installation CD has both a Windows and a Linux directory, which contain all files necessary for installation. In my example, we are using Linux, so to install the CLI, you will need to copy the Linux/CLI/setup.bin file from the CD, on to your Linux host.
Once the file has been copied, change it’s permissions to be executable, and run the file:
 chmod +x setup.bin
./setup.bin
You will be prompted several questions, including where to install the CLI. I would recommend using the /opt/ location it defaults to. Make sure you write down this location, as it will be needed later in the installation. Once the installation is completed, it’s time to move on.

Install MySQL

Next, you need to install mysql. Connect to your linux server with ssh, and issue the command:
yum –y install mysql-server
Once the installation is completed, you will need to set the root database password.
To do this, issue the below commands:
mysqladmin -u root password "NEWPASSWORD"
mysqladmin -u root -h localhost -p password "NEWPASSWORD"

Installing System Reporter

Now that your system is ready, you can move on to Part 2, Installing System Reporter. Part 2 will be posted within a few days.
If you have built your base system as a Virtual Machine, now would be a great time to take a snapshot, or build a template for future installations.

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...