C.5 Configuring iFolder Server Cluster on OES Linux

Support for configuring iFolder Server Cluster on OES Linux in the active/passive mode of clustering is available from OES Support Pack 1 only. Ensure that iFolder 2.1.x is installed on each node in the cluster.

Before proceeding, make sure that OES Linux is configured for clustering based on the instructions given in the Novell Cluster Services Administration Guide.

To configure Novell iFolder 2.1 on Novell Cluster Services for OES Linux SP1 and later:

  1. You can create file system only on one node of the cluster as follows:

    Go to YaST > Partition> Cluster Partition and then create file system. iFolder supports the VFS (REISERFS and EXT3) and NSS file systems.

    NOTE:Ensure that the file system is visible on each node of the cluster.

    Create file system partition of the required size.

    1. For VFS file system, select REISERFS or EXT3 and enter the required size. Do not configure the mount point, leave it blank.

      If you configure the mount point, an entry is created in fstab and the partition is mounted automatically after the system reboots.

      Use fdisk -l to view the newly created partition. For example, it might be listed as /dev/sdc1.

    2. For NSS file system, using the NSSMU utility on Linux, select the cluster resource and create a partition

  2. Ensure that the partition created in Step 1 is mounted.

    1. For VFS file system, create a directory /mnt/ifolder on each node of the cluster. Mount the partition on node 1.For example, mount/dev/sdc1 /mnt/ifolder.

    2. For NSS file system, the partition is mounted automatically and is located at /media/nss/VOL1.

      where VOL1 is the NSS volume created by selecting cluster resource on node 1.

  3. Create a directory called ifolderdata on cluster volume.

  4. Repeat Step 5 through Step 12 for every node in the cluster.

    Do not create an ifolderdata directory on the other nodes because it is already present on the shared resource.

  5. Configure iFolder 2.x from YaST 2 by executing yast2 ifolder2 to display the iFolder 2.x LDAP Server Configuration screen.

  6. In the iFolder 2.x LDAP Server Configuration screen enter the required details as follows:

    • For LDAP server configuration, select Remote System and then specify the LDAP server IP address and the admin name with context and password.
    • Click Next to continue.
  7. Configure iFolder for coexistence mode.

    1. Specify the shared resource IP address for the iFolder server.

      This IP address should be valid and have valid DNS name.

    2. Specify the Netmask and DNS hostname for the same IP address.

    3. Specify the iFolder user data path as to create the ifolderdata directory on the shared resource.

      • For VFS file system, use the data path /mnt/ifolder/ifolderdata.
      • For NSS file system, use the data path /media/nss/VOL1/ifolderdata

        where VOL1 is the NSS volume.

    4. Click Next to continue, then click Yes to start Apache2.

      iFolder 2.x server is configured.

  8. Stop the iFolder server on the node by executing the following:

    /etc/init.d/novell-ifolder stop

  9. Remove the following entries for the iFolder server from the file /etc/sysconfig/network/ifcfg-eth-id-xx.xx.xx.xx.xx.xx

    where xx:xx:xx:xx:xx:xx is the hardware address of network card.

    • IPADDR_ifdr
    • NETMASK_ifdr

    If these entries are not removed, then binding to the node's IP address gives the following error:

    IP address is already in use

  10. Restart the network by executing the following:

    /etc/init.d/network restart

  11. Modify the /etc/apache2/listen.conf configuration file.

    1. Make sure the main instance of Apache2 is configured to listen only on the primary IP address and not to all IP addresses or to the cluster resource IP address.

      For example, Listen 10.1.1.1:80 and Listen 10.1.1.1:443 are valid. Listen 80 and Listen 443 are not valid because they listen on all IP addresses.

    2. Restart apache2 if changes are made to listen.conf.

      For example: /etc/init.d/apache2 restart.

  12. Migrate the cluster resource to node 2.

  13. Mount the shared resource on any one of the Linux nodes and complete Step 14 through Step 20 on that node.

  14. Create the following directories:

    • For VFS file system, create the following directories on the mount point /mnt/ifolder directory of the shared volume
      • mkdir -p /mnt/ifolder/etc/opt/novell/ifolder
      • mkdir -p /mnt/ifolder/var/opt/novell/ifolder
      • mkdir -p /mnt/ifolder/srv/www/ifolder

    Or

    • For NSS file system, create the following directories on the mount point /media/nss/VOL1 of the shared volume
      • mkdir -p /media/nss/VOL1/etc/opt/novell/ifolder
      • mkdir -p /media/nss/VOL1/var/opt/novell/ifolder
      • mkdir -p /media/nss/VOL1/srv/www/ifolder
  15. Copy the contents of the following directories

    • For VFS file system:
      • /etc/opt/novell/ifolder to /mnt/ifolder/etc/opt/novell/ifolder
      • /var/opt/novell/ifolder to /mnt/ifolder/var/opt/novell/ifolder
      • /srv/www/ifolder to /mnt/ifolder/srv/www/ifolder

    Or

    • For NSS file system:
      • /etc/opt/novell/ifolder to /media/nss/VOL1/etc/opt/novell/ifolder
      • /var/opt/novell/ifolder to /media/nss/VOL1/var/opt/novell/ifolder
      • /srv/www/ifolder to /media/nss/VOL1/srv/www/ifolder
  16. Change the ownership of the directories created in Step 14 and the /mnt/ifolder/ifolderdata directory to the user novlifdr and group ifdrwww. Assign the directories permissions of drwxr-xr-x.

    Use the following commands format to change permissions:

    For VFS file system:

    chown -R novlifdr:ifdrwww /mnt/ifolder

    For NSS file system:

    chown -R novlifdr:ifdrwww /media/nss/VOL1/ifolder

    rights -f <path to ifolder data directory on NSS volume> -r all trustee novlifdr.<eDir admin context>.<eDir tree name>

    For example:

    rights -f /media/nss/VOL1/etc -r all trustee novlifdr.novell.MYTREE 
    

    where /media/nss/VOL1/etc is the path of the etc directory copied on the NSS volume in Step 15, novell is the local eDirectory admin context ,and MYTREE is the local eDirectory tree name

    Run the above command for all the directories copied in Step 15 as well as the ifolderdata directory.

  17. Modify the configuration file as follows:

    For VFS file system, make the following modifications in the file /mnt/ifolder/etc/novell/ifolder/conf/httpd.conf

    • Change all occurrences of /etc/opt/novell/ifolder to /mnt/ifolder/etc/opt/novell/ifolder
    • Change all occurrences of /var/opt/novell/ifolder to /mnt/ifolder/var/opt/novell/ifolder
    • Change all occurrences of /srv/www/ifolder to /mnt/ifolder/srv/www/ifolder

    Or

    For NSS file system, make the following modifications in the file /media/nss/VOL1/etc/novell/ifolder/conf/httpd.conf

    • Change all occurrences of /etc/opt/novell/ifolder to /media/nss/VOL1/etc/opt/novell/ifolder
    • Change all occurrences of /var/opt/novell/ifolder to /media/nss/VOL1/var/opt/novell/ifolder
    • Change all occurrences of /srv/www/ifolder to /media/nss/VOL1/srv/www/ifolder
  18. Modify the configuration file as follows:

    For VFS file system, make the following changes in /mnt/folder/etc/novell/ifolder/conf/httpd_ifolder_unix.conf

    • Change all occurrences of /etc/opt/novell/ifolder to /mnt/ifolder/etc/opt/novell/ifolder.
    • Change all occurrences of /var/opt/novell/ifolder to /mnt/ifolder/var/opt/novell/ifolder.
    • Modify the iFolderServerDNSorIP key to be the DNS name or IP address of the cluster resource. This is a secondary IP address.

    Or

    For NSS file system, make the following changes in /mnt/folder/etc/novell/ifolder/conf/httpd_ifolder_unix.conf

    • Change all occurrences of /etc/opt/novell/ifolder to /media/nss/VOL1/etc/opt/novell/ifolder.
    • Change all occurrences of /var/opt/novell/ifolder to /media/nss/VOL1/var/opt/novell/ifolder.
    • Modify the iFolderServerDNSorIP key to be the DNS name or IP address of the cluster resource. This is a secondary IP address.
  19. Recreate the following link for each node of the cluster using the following command format:

    For VFS file system,

    rm /opt/novell/ifolder/DocumentRoot

    ln -s /opt/novell/ifolder/DocumentRoot /mnt/ifolder/var/opt/novell/ifolder/DocumentRoot

    Or

    For NSS file system,

    rm /opt/novell/ifolder/DocumentRoot

    ln -s /opt/novell/ifolder/DocumentRoot/media/nss/VOL1/var/opt/novell/ifolder/DocumentRoot

  20. Unmount /mnt/ifolder.

  21. Open iManager > Cluster > Cluster Options, then browse to select the cluster you want to manage.

  22. Create a new cluster resource and select an iFolder template. Edit the existing load and unload scripts by specifying IP address of iFolder server, device name and mount point.

    For VFS file system:

    HINT:In both scripts, for aa.bb.cc.dd use the shared resource IP noted in Step 7 (IP address of the iFolder server).

    Load Script

    #!/bin/bash
    ./opt/novell/ncs/lib/ncsfuncs
    # mount the file system
    exit_on_error mount -t ext3 /dev/sdc1 /mnt/ifolder
    # add the IP address
    exit_on_error add_secondary_ipaddress aa.bb.cc.dd
    #setting permisions for ifolder data directory
    exit_on_error chown -R novlifdr:ifdrwww /mnt/ifolder/ifolderdata
    # start iFolder
    exit_on_error /usr/sbin/httpd2-worker -k start -f /mnt/ifolder/etc/opt/novell/ifolder/conf/httpd.conf -DSSL
    exit 0
    

    The examples given here are specific for the EXT3 filesystem. To use REISERFS or EXT2 filesystems, replace the word ext3 in the load script with reiserfs or ext2 as required.

    Unload Script

    #!/bin/bash
    ./opt/novell/ncs/lib/ncsfuncs
    #mount the file system
    PID_FILE=/mnt/ifolder/var/opt/novell/ifolder/run/ifolder.pid
    # stop iFolder 
    ignore_error killproc -p $PID_FILE -TERM /usr/sbin/httpd2-worker
    # Wait for all children to terminate 
    for ((wait=0; wait<120; wait++)); 
    do 
    if test -f $PID_FILE;
    then
        usleep 500000
    else
        continue 2
    fi
    done
    sleep 10
    # del the IP address
    ignore_error del_secondary_ipaddress aa.bb.cc.dd
    # umount the file system 
    exit_on_error umount /dev/evms/sda1
    # return status 
    exit 0 
    

    iFolder template for NCS Linux clusters is only for EXT3 or reiserfs file system. To cluster-enable the NSS file system, create the cluster resource and then copy the following cluster load and unload scripts.Place the load script at the end of the existing script, after activating the NSS volume.Place the unload script before deactivating the NSS volume.

    In the load and unload scripts, VOL means cluster NSS volume.Load Script for NSS:

    # add the IP address
    exit_on_error add_secondary_ipaddress a.b.c.d
    # start iFolder
    exit_on_error /usr/sbin/httpd2-worker -k start -f /media/nss/VOL/etc/opt/novell/ifolder/conf/httpd.conf -DSSL
    # return status
    exit 0
    

    Unload script:

    PID_FILE=/media/nss/VOL/var/opt/novell/ifolder/run/ifolder.pid
    # stop iFolder
    ignore_error killproc -p $PID_FILE -TERM /usr/sbin/httpd2-worker
    # Wait for all children to terminate
    for ((wait=0; wait<120; wait++));
    do
    	if test -f $PID_FILE;
    	then
    		usleep 500000
      else
    		continue 2
    if
    done
    # del the IP address
    ignore_error del_secondary_ipaddress a.b.c.d
    # return status
    exit 0
    
  23. Restart all the nodes.

iFolder server is now configured to run on the cluster shared resource IP address on Linux.