11.2 Clustering an NCP Volume on a Linux POSIX File System

This section describes how to configure a Linux POSIX file system for clustering with Novell Cluster Services for Linux, then how to set up a clustered NCP volume on the cluster resource. You can set up NCP volumes at the root of the cluster resource, or for subdirectories on it. You can create multiple NCP volumes on a Linux POSIX cluster resource. To provide NCP access to the share, you must create an NCS:NCP Server object and associate it with one or multiple NCP volumes, and bind the object to the IP address of the Linux POSIX cluster resource.

IMPORTANT:NCP Server does not support cross-protocol locks across a cluster migration or failover of the resource. If a file is opened with multiple protocols when the migration or failover begins, the file should be closed and reopened after the migration or failover to acquire cross-protocol locks on the new node.

For prerequisites, see Section 11.1, Planning for NCP Volumes in a Cluster Environment.

11.2.1 Gathering Information for Clustering the NCP Volume

Gather the information that you will use as you follow the steps to cluster an NCP volume.

IMPORTANT:On Linux, all names are case sensitive in the tools and cluster scripts.

Cluster Information

Example

Caveats

cluster name

cluster1

Name of the cluster.

cluster context

ou=cluster1,ou=boston,o=mycompany

Context where you created the cluster.

RESOURCE_IP

10.10.10.44

IP address of the Linux POSIX cluster resource.

The cluster resource must have a unique static IP address that is in the same subnet as the IP addresses that are used for the cluster and cluster nodes.

container_name

csm44

Name of the EVMS Cluster Segment Manager (CSM) container.

The container name must be one word, must consist of standard alphanumeric characters, and must not be any of the following reserved words:

  • Container
  • Disk
  • EVMS
  • Plugin
  • Region
  • Segment
  • Volume

evms_volumename

lxvol44

Name of the EVMS volume that you create on the CSM.

MOUNT_DEV

/dev/evms/container_name/evms_volumename

The Linux path for the EVMS volume. For example:

/dev/evms/csm44/lxvol44

MOUNT_FS

ext3, XFS, or reiserfs

The file system type you specify when you mount the volume.

IMPORTANT:NCP Server for Linux supports NCP volumes on Ext3, XFS, or Reiser file systems.

MOUNT_POINT

/path_to_mount_point

The mount location for the EVMS volume. You can mount the EVMS volume anywhere. It can have the same or different name than the underlying EVMS volume. For example:

/mnt/lxvol44
/mnt/users
/home

NCP_VOLUME

USERS

This is the name you give to the NCP volume. This is the share name seen by the users.

NCP_mount_point

/path_to_mount_point

The NCP share mount point must be the same as that for the EVMS volume (that is, at the root of the EVMS volume), or it can be a subdirectory below that location.

NCP_SERVER

cluster1_lxvol44_server

The virtual server object (NCS:NCP Server) name for the NCP volume.

This example uses a naming convention based on the one used by NSS pool resources (clustername_poolname_server), but the Linux POSIX cluster resource name is used instead.

clustername_resourcename_server

11.2.2 Creating and Cluster-Enabling a Linux POSIX Volume

The following procedure assumes that you are using a disk (or LUN) that does not contain data that you want to keep. You will initialize the disk and remove all segment managers.

WARNING:Initializing a disk destroys all data on it.

  1. On the first OES 2 Linux node in the cluster, log in as the root user, then open a terminal console.

  2. In NSSMU, initialize the disk that you want to use, mark the device as shareable for clustering, then exit NSSMU.

  3. In EVMSGUI, create a Linux POSIX volume on a shared disk that is managed by EVMS.

    For instructions, see Creating Linux POSIX Volumes on Shared Devices in the OES 2 SP3: Novell Cluster Services 1.8.8 Administration Guide for Linux.

  4. In iManager, cluster-enable the shared Linux POSIX volume with Novell Cluster Services.

    For instructions, see Cluster-Enabling a Linux POSIX Volume on a Shared Device in the OES 2 SP3: Novell Cluster Services 1.8.8 Administration Guide for Linux.

  5. After you have configured the Linux POSIX cluster resource, continue with Section 11.2.3, Creating a Shared NCP Volume on the Linux POSIX Cluster Resource.

11.2.3 Creating a Shared NCP Volume on the Linux POSIX Cluster Resource

Before You Begin

After you create the NCP volume by using the procedure in this section, you must restart ndsd on this node. Stopping ndsd sends a notification that the server is down to NCP users of the local volumes and existing cluster volumes that are mounted on the server.

Two cluster best practices should be observed:

  • Perform maintenance tasks during non-peak hours so that users are minimally affected.

  • When performing maintenance on a node, cluster migrate existing cluster resources to another node if you want the related users to be undisturbed.

If NCP users are connected to local or exiting cluster volumes on the node when you stop ndsd, they receive a "Server is down" notification from the NCP client.

When you start ndsd, NCP users of local volumes on the node are automatically reconnected and their sessions continue.

If you do not cluster migrate the existing cluster resources to another node, when you start ndsd, NCP users of existing cluster volumes on the node are not automatically reconnected because their cluster resources are no longer bound to NCP. You can offline the resources and then online the resources, or issue the ncpcon bind command for each resource at a terminal console (same as the command used in each of their respective load scripts). After a cluster resource is bound to NCP, its NCP users are automatically reconnected and their sessions continue.

To prevent NCP users from receiving any broadcast messages while you are performing these tasks, you can disable the NCP broadcast message support for the server. For instructions, see Section 9.3.1, Enabling or Disabling Broadcast Message Support.

Creating a Shared NCP Volume

Use the following procedure to create one or more shared NCP volumes on the Linux POSIX cluster resource.

  1. On one node in the cluster, you must create the NCP volume once in order to create its Volume object in Novell eDirectory. You do not create the NCP volume on every server.

    For detailed instructions, see Section 10.2, Creating NCP Volumes on Linux File Systems.

    1. In Novell Remote Manager, click Manage NCP Services > Manage Shares, then click Create New Share.

    2. In Volume Name, type the name of the NCP volume you want to create, such as USERS.

    3. In Path, specify the Linux path of the cluster-enabled Linux POSIX file system or one of its subdirectories, then select the Create If Not Present check box if the subdirectory in the path does not already exist.

      For example, if the mount point for the cluster-enabled Linux POSIX file system is /mnt/lxvol44, you can create the NCP volume at its root by specifying /mnt/lxvol44 as the share path, or you can create the NCP volume for a subdirectory on it, such as /mnt/lxvol44/USERS.

      For our ongoing example, we create the NCP volume at the root of the Linux POSIX cluster resource. The mount point of the EVMS volume and the NCP volume is the same, such as /mnt/lxvol44.

    4. In Shadow Path, leave the field blank and do not select the Create If Not Present check box beneath it.

      IMPORTANT:Dynamic Storage Technology does not support using NCP volumes in shadow volume pairs for OES 2 Linux. This field is a placeholder for future capabilities.

    5. Make sure the Inherit POSIX Permissions option is disabled by deselecting the check box.

      In OES 2 SP1 Linux and earlier versions, the Inherit POSIX Permissions setting is disabled by default. Enabling the setting here has no effect when you mount the clustered NCP volume in the cluster load script. The setting also cannot be enabled later for clustered NCP volumes as you can for unclustered volumes.

      IMPORTANT:For clustered NCP volumes, an option to set Inherit POSIX Permissions in the cluster load script is planned for OES 2 SP2 Linux. Contact Novell Support if you need to enable the Inherit POSIX Permissions option for a clustered NCP volume on OES 2 SP1 Linux.

    6. Click OK to confirm the creation of the NCP volume (share).

      This creates the Volume object for the NCP volume on the server, such as cn=servername_USERS,ou=context,o=mycompany. This object will be renamed later when you create the virtual NCP server (NCS:NCP Server) object.

      This also creates a mount point to the volume (share) name you specified, and mounts the NCP volume to make it accessible to NCP clients.

  2. Verify that the share was created successfully by clicking Manage NCP Services > Manage Shares to see a list of NCP shares.

    The NCP volume should appear in the list, and be mounted. Mounted volumes appear with the name hyperlinked, and an Unmount button next to it.

  3. Dismount the share from the node by clicking Manage NCP Services > Manage Shares, then clicking the Unmount button next it.

  4. Repeat Step 1 through Step 3 for each NCP volume that you want to create on the Linux POSIX cluster resource.

  5. Remove the NCP volume names that you created in the previous steps from the /etc/opt/novell/ncpserv.conf file, or comment out the lines.

    You want the load and unload scripts for the cluster to control the mounts and dismounts for the NCP volumes. You will modify the cluster scripts later.

    If an NCP volume line is present and active in the ncpserv.conf file, the node tries to mount the volume on system startup, even if the cluster resources are not loaded on the node. Mounting and dismounting volumes that are on clustered resources should be done in the cluster load and unload scripts, or at the command line after the resource is loaded. Thus, the names of the NCP volumes on the cluster resource should not appear in the ncpserv.conf file on any of the nodes.

    1. On the cluster node where you created the NCP volumes, open a terminal console then log in as the root user.

    2. Open the /etc/opt/novell/ncpserv.conf file in a text editor.

      gedit /etc/opt/novell/ncpserv.conf
      
    3. Remove or comment out the line. Volume entries look like this:

      VOLUME volumename /path_to_mount_point
      

      For example, change

      VOLUME USERS /mnt/lxvol44
      

      to this:

      ;VOLUME USERS /mnt/lxvol44
      
    4. Save your changes and close the file.

  6. Restart the Novell eDirectory (ndsd) daemon by entering the following commands:

    /etc/init.d/ndsd stop
    
    /etc/init.d/ndsd start
    
  7. If NSS is installed on the server, restart the Novell NCP/NSS IPC daemon by entering

    /etc/init.d/ncp2nss restart
    

    For information about why this is necessary, see Section 3.5, Restarting the Novell NCP/NSS IPC (ncp2nss) Daemon.

  8. For each of the other nodes in the cluster where you want to mount the shared cluster resource, create the path for the mount points of each of the NCP volumes that you created in Step 1 through Step 4.

    1. On a cluster node, open a terminal console as the root user.

    2. At the terminal console prompt, enter

      mkdir /path_to_mount_point
      

      For example, if the mount point is /mnt/lxvol44, enter

      mkdir /mnt/lxvol44
      
  9. Continue with Section 11.2.4, Creating a Virtual NCP Server Object for Shared NCP Volumes.

11.2.4 Creating a Virtual NCP Server Object for Shared NCP Volumes

After you create a shared NCP volume, you must create a virtual NCP Server object (NCS:NCP Server) in Novell eDirectory in order to make it possible for NCP clients to access the data on the NCP volume. The NCS: NCP Server object is not created automatically as it is with clustered NSS pools. When you are done, you must add a line to the script that identifies the name of this virtual server and binds it to the IP address of the Linux POSIX cluster resource.

Do not use periods in cluster resource names. Novell clients interpret periods as delimiters. If you use a space in a cluster resource name, that space is converted to an underscore.

The /opt/novell/ncs/bin/ncs_ncpserv.py script creates a virtual NCP Server object (NCS:NCP Server) in eDirectory, and associates it with none, one, or multiple NCP volumes that you specify. It automatically renames the NCP Volume objects to use the cluster name instead of the server name where the NCP volume was created. NCP clients access files on the Linux POSIX volume via the virtual server name.

The bind command are automatically added to the load script and the unload script to bind the NCP volumes to the IP address of the cluster resource.

Syntax

At the terminal console prompt on the master node of the cluster, enter the following command as the root user:

./ncs_ncpserv.py -c lx_volumename -i resource_ip_address [-v <ncp_volumename | "ncp_volumename1:ncp_volumename2:..."> ]

Replace the lx_volumename, resource_ip_address, and ncp_volumename with the information for your particular solution.

If the -v option is not specified, all of the NCP volumes that currently exist on the Linux POSIX cluster resource are bound to the IP address.

If you enter multiple volume names, use colons to delimit the names and put quotation marks around the list of names. Volume names can be listed by the volume name (MY_NNCP_VOL06) or by the volume distinguished name (cn=CLUS_02_MY_NNCP_VOL06,o=novell), or any combination of the two methods.

Examples

In the following examples, the resource IP address is 10.10.10.44, the cluster name is cluster1 and the cluster context is ou=cluster1,o=mycompany.

Example 1

To specify a single NCP volume named USERS on the lxvol44 cluster resource, enter

./ncs_ncpserv.py -c lxvol44 -i 10.10.10.44 -v USERS

The following confirmation message is displayed:

NCP Server 'cn=cluster1_lxvol44_server,ou=cluster1,o=mycompany' created.

Object 'cn=servername_USERS,ou=cluster1,o=mycompany' renamed to 'cn=cluster1_USERS,ou=cluster1,o=mycompany'.
The volume name you need to use in the scripts is: USERS
NCP server 'cn=cluster1_lxvol44_server,ou=cluster1,o=mycompany' and volume 'cn=cluster1_USERS,ou=cluster1,o=mycompany' are linked with each other.

Example 2

To specify multiple NCP volumes on the lxvol44 cluster resource, enter

./ncs_ncpserv.py -c lxvol44 -i 10.10.10.44 -v "USERS:MY_NCP_VOL06:cn=servername_MY_NCP_VOL07,ou=cluster1,o=novell"

The following confirmation message is displayed:

NCP Server 'cn=cluster1_lxvol44_server,ou=cluster1,o=mycompany' created.

Object 'cn=servername_USERS,ou=cluster1,o=mycompany' renamed to 'cn=cluster1_USERS,ou=cluster1,o=mycompany'.
The volume name you need to use in the scripts is: USERS
NCP server 'cn=cluster1_lxvol44_server,ou=cluster1,o=mycompany' and volume 'cn=cluster1_USERS,ou=cluster1,o=mycompany' are linked with each other.

Object 'cn=servername_MY_NCP_VOL06,ou=cluster1,o=mycompany' renamed to 'cn=cluster1_MY_NCP_VOL06,ou=cluster1,o=mycompany'.
The volume name you need to use in the scripts is: MY_NCP_VOL06
NCP server 'cn=cluster1_lxvol44_server,ou=cluster1,o=mycompany' and volume 'cn=cluster_MY_NCP_VOL06,ou=cluster1,o=mycompany' are linked with each other.

Object 'cn=servername_MY_NCP_VOL07,ou=cluster1,o=mycompany' renamed to 'cn=cluster1_MY_NCP_VOL07,ou=cluster1,o=mycompany'.
The volume name you need to use in the scripts is: MY_NCP_VOL07
NCP server 'cn=cluster1_lxvol44_server,ou=cluster1,o=mycompany' and volume 'cn=cluster_MY_NCP_VOL07,ou=cluster1,o=mycompany' are linked with each other.

Procedure

  1. On the master cluster node, open a terminal console, then log in as the root user.

  2. In the console, use the cd command to go to the /opt/novell/ncs/bin directory.

  3. At the terminal console prompt, enter

    ./ncs_ncpserv.py -c lx_volumename -i resource_ip_address -v ncp_volumename
    

    Replace the lx_volumename, resource_ip_address, and ncp_volume with the information for your particular solution.

    For example, to include the NCP volume USERS on the lxvol44 cluster resource where the IP address is 10.10.10.44 and the cluster context is ou=cluster1,ou=boston,o=mycompany, enter

    ./ncs_ncpserv.py -c lxvol44 -i 10.10.10.44 -v USERS
    

    The confirmation message is displayed:

    NCP Server 'cn=cluster1_lxvol44_server,ou=cluster1,ou=boston,o=mycompany' created.
    Object 'cn=servername_USERS,ou=cluster1,ou=boston,o=mycompany' renamed to 'cn=cluster1_USERS,ou=cluster1,ou=boston,o=mycompany'.
    The volume name you need to use in the scripts is: USERS
    NCP server 'cn=cluster1_lxvol44_server,ou=cluster1,ou=boston,o=mycompany' and volume 'cn=cluster_USERS,ou=cluster1,ou=boston,o=mycompany' are linked with each other.
    
  4. Continue with Section 11.2.5, Modifying the Load Script for the Linux POSIX Cluster Resource.

11.2.5 Modifying the Load Script for the Linux POSIX Cluster Resource

After you have created the NCP volume and an NCS:NCP Server object, you must modify the load script so that it mounts the NCP volume path as the Linux POSIX cluster resource is brought online. You must also bind the NCS:NCP Server object to the resource. For an example load script, see Section 11.3.1, Sample Load Script for an NCP Volume Cluster Resource.

  1. In iManager, select Clusters > Cluster Options, then select the cluster.

  2. Click the name link of the Linux POSIX cluster resource to open its Cluster Resource Properties page.

  3. Click the Scripts tab to open the Load script.

  4. In the definition area, add the following lines to define the NCP volume and the virtual NCP server name:

    # define NCP volume
    NCP_VOLUME=USERS
    # define NCP server name
    NCP_SERVER=cluster1_lxvol44_server
    

    Replace USERS with the name of the NCP volume you created. Replace the NCP server name with the name for your virtual NCP server.

  5. Above the exit line, add a line to mount the NCP volume:

    # mount the NCP volume
    exit_on_error ncpcon mount $NCP_VOLUME=VOL_ID,PATH=$MOUNT_POINT
    

    The volume ID is a value between 0 and 254 (up to 255 volumes per server) that you specify so that the same volume ID is used by the NCP volume on all nodes in the server. Cluser volumes are typically numbered from 254 and downward to avoid conflicts with the automatic volume ID assignments that begin with 0.

  6. Under the mount line, add a line to bind the NCP server name to the resource IP address:

    # bind the NCP volume
    exit_on_error ncpcon bind --ncpservername=$NCP_SERVER --ipaddress=$RESOURCE_IP
    
  7. Click Apply to save your changes.

    The script changes are not active until the next time the cluster resource is taken offline, and then brought online. Do not active the script changes at this time.

  8. Continue with Section 11.2.6, Modifying the Unload Script for the Linux POSIX Cluster Resource.

11.2.6 Modifying the Unload Script for the Linux POSIX Cluster Resource

After you have created the NCP volume and an NCS:NCP Server object, you must modify the unload script so that it dismounts the NCP volume path as the Linux POSIX cluster resource is brought offline. You must also unbind the NCS:NCP Server object from the resource. For an example unload script, see Section 11.3.2, Sample Unload Script for an NCP Volume Cluster Resource.

  1. In iManager, select Clusters > Cluster Options, then select the cluster.

  2. Click the name link of the Linux POSIX cluster resource to open its Cluster Resource Properties page.

  3. Click the Scripts tab, then click Unload to open the Unload script.

  4. In the definition area, add the following lines to define the NCP volume and the virtual NCP server name:

    # define NCP volume
    NCP_VOLUME=USERS
    # define NCP server name
    NCP_SERVER=cluster1_lxvol44_server
    

    Replace USERS with the name of the NCP volume you created. Replace the NCP server name with the name for your virtual NCP server. Use the same values for variables that you did in the load script.

  5. Under the definition, add a line to unbind the NCP server name from the resource IP address:

    # unbind the NCP volume
    ignore_error ncpcon unbind --ncpservername=$NCP_SERVER --ipaddress=$RESOURCE_IP
    
  6. Under the unbind line, add a line to dismount the NCP volume:

    # dismount the NCP volume
    ignore_error ncpcon dismount $NCP_VOLUME
    
  7. Click Apply to save your changes.

    The script changes are not active until the next time the cluster resource is taken offline, and then brought online.

  8. Continue with Section 11.2.7, Activating the Script Changes.

11.2.7 Activating the Script Changes

The script changes are not active until the next time the cluster resource is taken offline, and then brought online.

  1. In iManager, select Clusters > Cluster Manager, then select the cluster.

  2. Select the check box next to the Linux POSIX cluster resource, then click Offline.

    Wait until the resource is reports an Offline status before continuing.

  3. Select the check box next to the Linux POSIX cluster resource, then click Online.

    Wait until the resource is reports an Online status before continuing.

  4. Verify that an NCP user can access the volume. On a workstation, use the Novell Client to map a drive to the NCP volume.