H-Sphere Documentation Sysadmin Guide

For more information contact us at info@psoft.net

NetApp Configuration

 

Starting from H-Sphere version 2.3, you can configure your system to work with NetApp Filers. They are not part of the H-Sphere system, thus if you want to use NetApp Filer with H-Sphere, you should first buy and install it directly from www.netapp.com.

NetApp Filers are the building blocks for open storage networks. They allow companies to simplify, share and scale their storage networking and content delivery infrastructures.

This document dwells on the NetApp filer integration into H-Sphere. The instruction about installing and configuring the filer itself can be found in the NetApp Documentation.

NetApp file server solution would contain a number of physical servers (at least four boxes):

  • NetApp (file) server for managing resources;
  • At least two boxes for web/mail servers; we will call them Web1, Web2, Mail1, Mail2 further in the text;
  • Load Balancer server for storage and load balancing across the web/mail servers. For example, Load Balancer directs traffic to another server if the first one is currently overloaded.
 

NetApp Configuration Pre-Requisites

Before starting the NetApp servers integration into H-Sphere, it is required to install the H-Sphere software to each of NetApp web/mail servers.

Also:

  1. rsh access should be granted to the NetApp server from the CP box to root and cpanel user
  2. nfs access to the /etc directory should be granted for the CP box in rw mode
  3. nfs access to the home directory on the storage partition (/vol/vol0/home) should be granted for CP box in rw mode with root privileges (-access=192.168.0.9:192.168.0.10,root=192.168.0.8:192.168.0.9:192.168.0.10)
 

Configure NetApp Server

Do the following steps to configure your NetApp server (read the NetApp Manual for commands):

  1. Telnet to the NetApp server:
    telnet <NetApp_IP>
    Here, <NetApp_IP> is the NetApp server IP.
  2. Get the list of NetApp partitions with the qtree command:
    qtree
  3. To enable disk quota management, export the /etc directory on the NetApp server and allow to mount it only from the CP box:
    exportfs -o access=<CP_IP>,root=<CP_IP>,rw=<CP_IP> /etc
    Here,<CP_IP> is the CP server IP.
  4. To enable user disk space management on the web/mail servers, export the user storage directory on the NetApp server allow to mount it from the physical web/mail boxes:
    exportfs -o access=<Web/Mail1_IP>:<Web/Mail2&_IPgt;,root=<Web/Mail1_IP>:<Web/Mail2_IP>,rw=<Web/Mail1_IP>:<Web/Mail2_IP> /vol/hsphere/home
    Here, <Web/Mail1_IP>, <Web/Mail2_IP> are web/mail server IPs, /vol/hspere/home is the user storage directory.
  5. exit telnet session on the NetApps server.
 

Configure CP Server To Implement NetApp Support

On the H-Sphere CP server:

  1. install suidperl
    - for Linux, it could be installed, for example, like this:
    rpm -ivh perl-suidperl-5.6.1-34.99.6.i386.rpm
    - for FreeBSD, it is already installed into the system.
  2. set permissions for the script fileserver-quota.pl
    run chmod +s /hsphere/shared/scripts/fileserver-quota.pl
  3. set SUPPORT_NET_APP property in the hsphere.properties file
    SUPPORT_NET_APP=1
  4. mount /etc/ directory on the netapp fileserver to the /hsphere/YOUR_NETAPP_SERVER_IP/etc directory on CP server.
    $NA="YOUR_FILER_IP", (e.g: $NA="192.168.1.1")
    mkdir /hsphere/$NA/etc
    mount $NA:/etc /hsphere/$NA/etc
  5. In logical web-server properties, set File Server and File Path, where:
    - File Server is a filer name or IP-address and also a qtree-name;
    - File Path is a path to the mounted filer storage directory.
  6. For example:
    file_server=YOUR_FILER_IP:/YOUR_QTREE (e.g: 192.168.1.1:/vol/vol0)
    file_server_path=YOUR_FILESERVER_PATH (e.g: file_server_path=/web0.msp0/local)
  7. Check the /hsphere/<NetApp_IP>/etc/quotas. There should be a line like this:
    * user@/vol/hsphere/home 20000M 160K
  8. Check that rsh and quota are enabled:
    rsh <NetApp_IP> quota report
 

Configure Web Servers

  1. On each web box, mount the NetApp storage partition to the /mnt/NAS directory:
    mkdir /mnt/NAS
    mount -t nfs <NetApp_IP>:/vol/hsphere/home /mnt/NAS
  2. Copy the following directories to the mountpoint directory on the NetApp server:
    cp -prv /hsphere/local/home /mnt/NAS/
    cp -prv /hsphere/local/var/statistic /mnt/NAS/
    cp -prv /hsphere/local/var/httpd/logs /mnt/NAS/
    cp -prv /usr/local/frontpage /mnt/NAS/
    On the master (Web1) web box:
    cp -prf /hsphere /mnt/NAS/linuxweb1-001
    On the the slave (Web2) web box:
    cp -prf /hsphere /mnt/NAS/linuxweb2-001
  3. On both web servers, create the /hsphere and /hsphere2 directories if you don't have them:
    mkdir /hsphere
    mkdir /hsphere2

  4. On the master web server, /hsphere directory should point to the previously copied linuxweb1-001 master web server directory on the NetApp server /hsphere2 to the slave server directory (linuxweb2-001). Similarly, on the slave web server, /hsphere should point to the slave web server directory, /hsphere2 to the master web server directory.

    Thus, the two corresponding mountpoints for the /hsphere and /hsphere2 directories should be added in the /etc/fstab file on both web servers.

    For the master web server there should be the following lines:
    <NetApp_IP>:/vol/hsphere/home/linuxweb1-001 /hsphere nfs rw 0 0
    <NetApp_IP>:/vol/hsphere/home/linuxweb2-001 /hsphere2 nfs rw 0 0
    for the slave web server:
    <NetApp_IP>:/vol/hsphere/home/linuxweb2-001 /hsphere nfs rw 0 0
    <NetApp_IP>:/vol/hsphere/home/linuxweb1-001 /hsphere2 nfs rw 0 0

  5. For both the master and the slave servers, the /etc/fstab file should also contain mountpoints to other directories previously copied to the NetApp server.
    <NetApp_IP>:/vol/hsphere/home/home           /hsphere/local/home nfs            rw  0 0
    <NetApp_IP>:/vol/hsphere/home/statistic      /hsphere/local/var/statistic nfs   rw  0 0
    <NetApp_IP>:/vol/hsphere/home/logs           /hsphere/local/var/httpd/logs nfs  rw  0 0
    <NetApp_IP>:/vol/hsphere/home/frontpage      /usr/local/frontpage nfs           rw  0 0
    
  6. Check if the crontab contains scripts for synchronizing information from the Web1 master to the Web2 slave server.

    a) Master web server: Crontab on the master web server should contain the following lines:

    1 */4 * * * /usr/sbin/ntpdate ntps1-{0,1,2}.uni-erlangen.de            # time syncronization script
    0 1 * * * nice -15 /hsphere/shared/scripts/cron/cron_analyze.pl
    0 2 * * * nice -15 /hsphere/shared/scripts/cron/cron_rotate.pl
    0 3 * * * nice -15 /hsphere/shared/scripts/cron/ftp_anlz.pl
    0 4 * * * nice -15 /hsphere/shared/scripts/cron/ftp_anlz_user.pl
    */1 * * * * nice -15 /hsphere/shared/scripts/cron/apache-confsynch.pl
    */1 * * * * nice -15 /hsphere/shared/scripts/cron/apache-restart.pl
    */1 * * * * nice -15 /hsphere/shared/scripts/cron/ftp-confsynch.pl
    */2 * * * * nice -15 /hsphere/shared/scripts/cron/ftp-restart.pl
    0 5 * * * nice -15 /hsphere/shared/scripts/cron/db_usage.pl
    

    Note: For correct synchronization between servers, it is essential to have time sychronization script in crontab on both servers!

    Crontab on the master server should also contain the following scripts:

    On RedHat Linux:

    */4 * * * *  rsync -e ssh /etc/passwd 10.10.2.12:/etc/passwd
    */4 * * * *  rsync -e ssh /etc/shadow 10.10.2.12:/etc/shadow
    */4 * * * *  rsync -e ssh /etc/group 10.10.2.12:/etc/group
    

    On FreeBSD:

    */4 * * * *  rsync -e ssh /etc/passwd 209.132.97.68:/etc/passwd
    */4 * * * *  rsync -e ssh /etc/group 209.132.97.68:/etc/group
    */4 * * * *  rsync -e ssh /etc/master.passwd 209.132.97.68:/etc/master.passwd
    */4 * * * *  rsync -e ssh /etc/pwd.db 209.132.97.68:/etc/pwd.db
    */4 * * * *  rsync -e ssh /etc/spwd.db  209.132.97.68:/etc/spwd.db
    

    b) Slave web server: Crontab on the master and the slave server should contain the following lines:

    1 */4 * * * /usr/sbin/ntpdate ntps1-{0,1,2}.uni-erlangen.de
    0 1 * * * nice -15 /hsphere/shared/scripts/cron/cron_analyze.pl
    0 2 * * * nice -15 /hsphere/shared/scripts/cron/cron_rotate.pl
    0 3 * * * nice -15 /hsphere/shared/scripts/cron/ftp_anlz.pl
    0 4 * * * nice -15 /hsphere/shared/scripts/cron/ftp_anlz_user.pl
    */1 * * * * nice -15 /hsphere/shared/scripts/cron/apache-need-restart.pl
    */1 * * * * nice -15 /hsphere/shared/scripts/cron/apache-restart.pl
    */1 * * * * nice -15 /hsphere/shared/scripts/cron/ftp-need-restart.pl
    */2 * * * * nice -15 /hsphere/shared/scripts/cron/ftp-restart.pl
    0 5 * * * nice -15 /hsphere/shared/scripts/cron/db_usage.pl
    
  7. On the master web server, create IP map file:
    vi /hsphere2/local/config/httpd/sites/map_table.txt
    Insert one line of the following format:
    <Master_IP>|<Slave_IP>
  8. To synchronize the NetApp web servers on dedicated IPs, after you have configured the IP map file in the previous step, add the corresponding H-Sphere scripts to the crontab on the master web server and the slave web server.

    For the master web server:
    */4 * * * * /hsphere/shared/scripts/cron/master-ipsynch.pl

    For the slave web server:
    */4 * * * * /hsphere/shared/scripts/cron/slave-ipupdate.pl

 

Configure Mail Servers

  1. On each mail box, mount the mail storage partition to the /mnt/NAS directory:
    mkdir /mnt/NAS
    mount -t nfs <NetApp_IP>:/vol/hsphere/mail /mnt/NAS
  2. Copy the following directories to the mountpoint directory on the NetApp server:
    cp -prv /hsphere/local/var/vpopmail  /mnt/NAS/
    cp -prv /var/qmail/control /mnt/NAS/
    cp -prv /var/qmail/users /mnt/NAS/
  3. Configure the /etc/fstab file for web servers:
    vi /etc/fstab
    Crontab on both the master and the slave mail servers should contain the following lines:
    <NetApp_IP>:/vol/hsphere/mail/vpopmail on /hsphere/local/var/vpopmail (nfs)
    <NetApp_IP>:/vol/hsphere/mail/control on /var/qmail/control (nfs)
    <NetApp_IP>:/vol/hsphere/mail/users on /var/qmail/users (nfs)
    
  4. On the master mail server, crontab contains all necessary H-Sphere scripts.
  5. On the slave mail server, crontab should NOT contain any H-Sphere scripts!


Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.