8.3 Installation and Configuration

8.3.1 Prerequisites

8.3.2 Verifying the Novell Cluster Services Setup

To ensure that the Novell Cluster Services is set up properly:

  1. In iManager, select the Cluster > Cluster Options task.

    Click the Search icon to open the eDirectory Object Selector. Browse to locate and select the Cluster object for the DHCP cluster. The Cluster Objects list is displayed.

  2. Select the check box next to the Cluster Resource object that you created for the shared NSS pool, then click the Details link.

    This opens the Cluster Resource Properties page to the Policies tab.

  3. Click the Preferred Nodes tab to view a list of the nodes that are assigned as the preferred nodes for failover and migration.

After executing these steps, you can mount the shared volume on the preferred nodes by using the Novell Client. The shared volume is mounted on the preferred node so that the directories and lease files are created. This process also assigns rights to the shared volume.

8.3.3 Installing and Configuring a Cluster

  1. Ensure that association between the DHCP Server object and the DHCP Service object is set by using iManager. For details, see Viewing or Modifying a Service.

  2. Use iManager to create a DHCP Subnet and a DHCP Pool object. For details, see Creating a Subnet Object and Creating a Pool Object.

    or

    Use Java Management Console for DHCP to create a DHCP Subnet and a DHCP Pool object. For details see Section 7.2.5, Subnet Management and Section 7.2.6, Pool Management.

  3. The DHCP server by default uses the dhcpd user that is created in the local system during installation process. If you want to use another user, create the user by using the Security and Users > User Management option in YaST.

    After creating the user, update /etc/sysconfig/dhcpd file, then set the value of the variable DHCPD_RUN_AS to the new user.

  4. Click the Users > Create User task in iManager to open the Create User window. Specify the details and click OK to create user dhcpd or the new user in eDirectory.

  5. The user created in Step 4 needs to be LUM-enabled. To do this, click the Linux User Management > Enable Users for Linux task. This opens the Enable Users for Linux window. Search for and select the user created in Step 4, then click OK to select the user.

    1. Make sure that every user belongs to a primary group. To add a user to a group, search for an Existing eDirectory Group object.

    2. Select the DHCPGroup object from the list.

    3. Select the workstations to which the Linux-enabled user should have access.

    4. Click Next to confirm the selection.

      The user is now Linux-enabled, included in the DHCP Group, and granted access to cluster nodes.

  6. Mount the shared volume on one of the nodes in the cluster.

  7. Execute the following command at the command prompt:

    /opt/novell/dhcp/bin/ncs_dir.sh <MountPath> <FQDN of Username with tree-name>

    The MountPath parameter indicates the target directory in the volume where DHCP-specific directories are created.

    For example, /opt/novell/dhcp/bin/ncs_dir.sh /media/nss/DHCPVOL/ cn=dhcpd.o=novell.T=MyTree;

    When the script is executed, it creates the following folders:

    • /media/nss/DHCPVOL/etc

    • /media/nss/DHCPVOL/var/lib/dhcp/db

    The script also takes care of assigning permissions for these directories.

  8. Copy the /etc/dhcpd.conf file to /media/nss/DHCPVOL/etc directory and modify the LDAP attributes as required.

    For example, ldap-server "192.168.0.1"; ldap-dhcp-server-cn "DHCP_acme";

    Set the ldap-server attribute with the shared NSS pool IP Address.

    Set the ldap-dhcp-server-cn attribute with the name of the DHCP server object that you want to use.

  9. To hardlink, enable the shared volume on which the dhcpd.conf and dhcpd.leases files are hosted eg.DHCPVOL.

    Invoke nsscon in the linux terminal and execute the following commands:

    /ZLSSUpgradeCurrentVolumeMediaFormat=VolName
    /hardlinks=VolName
    
  10. To ensure that hard links are enabled, execute the following commands in the shared volume:

    touch testfile.txt
    ln testfile.txt testlink.txt
    unlink testlink.txt
    rm testfile.txt
    

    If the hard link was successfully enabled, these commands execute without errors.

  11. Open a terminal on the node where the shared volume is mounted and execute the following command at the prompt:

    dhcpd -cf /media/nss/DHCPVOL/etc/dhcpd.conf -lf /media/nss/DHCPVOL/var/lib/dhcp/db/dhcpd.leases

    This step ensures that the DHCP server can work on a cluster setup with shared volumes.

    Stop the server by executing the following command at the prompt: killproc -p /var/run/dhcpd.pid -TERM /usr/sbin/dhcpd

  12. Click Cluster > Cluster Options task in iManager. The Cluster objects are displayed.

    Select the DHCP Cluster resource that was created as part of Prerequisites and click Details. The Cluster Pool Properties are displayed. Click the Scripts tab. You can now view or edit the load or unload scripts.

    1. Click Load Script.

    2. Ensure that the DHCP load script is same as specified in DHCP Load Script.

    3. Click Unload Script.

    4. Ensure that the DHCP unload script is same as specified in DHCP Unload Script.

    5. Click OK to save the changes.

  13. Set the DHCP resource online by using the Clusters > Cluster Manager task in iManager.

8.3.4 DHCP Load and Unload Scripts

DHCP Load Script

The load script contains commands to start the DHCP service.The load script appears similar to the following example:

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs
exit_on_error add_secondary_ipaddress 10.10.2.1
exit_on_error nss /poolact=DHCPPOOL
exit_on_error ncpcon mount DHCPVOL=254
exit_on_error ncpcon bind --ncpservername=DHCPCLUSTER_DHCPPOOL_SERVER --ipaddress=10.10.2.1
exit 0
Configuring the DHCP Load Script
  1. Add the following line to the script before exit 0 to load DHCP:

    exit_on_error /opt/novell/dhcp/bin/cluster_dhcpd.sh -m <MOUNT_POINT>
    

    For example: MOUNT_POINT= /media/nss/DHCPVOL

  2. Click Next and continue with the unload script configuration.

DHCP Unload Script

The unload script contains commands to stop the DHCP service. The unload script appears similar to the following example:

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs
ignore_error ncpcon unbind --ncpservername=DHCPCLUSTER_DHCPPOOL_SERVER --ipaddress=10.10.2.1
ignore_error nss /pooldeact=DHCPPOOL
ignore_error del_secondary_ipaddress 10.10.2.1
exit 0
Configuring the DHCP Unload Script
  1. Add the following line after the . /opt/novell/ncs/lib/ncsfuncs statement:

    ignore_error killproc -p /var/run/dhcpd.pid -TERM /usr/sbin/dhcpd