3.3 Managing NCP Server

After you have installed NCP Server and created and mounted NCP volumes for your specific needs, some additional information can be useful to help you effectively manage NCP Server. This information consists of instructions for dismounting, removing and purging NCP volumes, and viewing NCP Server information.

3.3.1 Viewing NCP Server Information

You can view information on NCP server configuration and volumes using either the NCPCON utility or Novell Remote Manager.

Viewing NCP Server Information Using NCPCON

Enter ncpcon at the Linux server console, and then use any of the following NCPCON commands to view NCP server information:

Table 3-1 Viewing NCP Server Information Using NCPCON Commands

Command

Description

config

Displays the NCP server configuration.

stats

Displays NCP statistics such as bytes read, bytes written, and NCP requests.

volume

Displays a list of currently mounted NCP volumes. You can also specify a specific volume name with the command to get information about that volume

Viewing NCP Server Information Using NRM

On the Novell Remote Manager main page in the left column under Manage NCP Services, click View Server Information. You can also click View Diagnostic Information to view NCP server diagnostic information. This can help you troubleshoot NCP server problems. You can click the pid value to access additional pages for process information and to change file attributes for specific NCP-related program files.

3.3.2 Managing NCP Server Volumes

After creating and mounting an NCP volume on your Linux server, there might be occasions when you want to dismount the volume, purge deleted files from the volume, or remove the volume mount point.

Dismounting an NCP Volume Using NCPCON

Enter ncpcon at the Linux server console, and then enter the following command:

dismount volume_name

Replace volume_name with the name of the volume you want to dismount. This command removes NCP client accessibility to the mount point represented by the volume name. You can also replace volume_name with all to dismount all NCP volumes on the server.

Dismounting an NCP Volume Using Novell Remote Manager

On the Novell Remote Manager main page in the left column under Manage NCP Services, click Manage Shares, then click the Unmount button next to the NCP volume you want to dismount.

Dismounting an NCP volume makes it inaccessible to NCP clients.

Purging Deleted NSS Files Using NCPCON

Enter ncpcon at the Linux server console, and then enter the following command:

purge volume volume_name

Replace volume_name with the name of the NSS volume you want to purge. This command purges or permanently removes deleted files from an NSS volume. This command only works with NSS volumes.

Purging Deleted NSS Files Using Novell Remote Manager

Purging deleted NSS files using Novell Remote Manager is currently not possible. You can purge and undelete NSS files on your Linux server using NetStorage. For more information, see Purging and Salvaging Deleted NSS Files in the OES NetStorage Administration Guide for Linux.

Removing an NCP Volume Using NCPCON

Enter ncpcon at the Linux server console, and then enter the following command:

remove volume volume_name

Replace volume_name with the name of the volume you want to remove. This command does not remove or delete data. It only removes the NCP volume mount point (path and association) that was created when you created the NCP volume.

If you have removed an NCP volume and want to restore it, you must create the volume again like you did when you first created it.

Removing an NCP Volume Using Novell Remote Manager

  1. On the Novell Remote Manager main page in the left column under Manage NCP Services, click Manage Shares, then click Delete Existing Share.

  2. Enter the name of the NCP volume you want to remove, click OK, then click OK again to confirm the volume removal.

    This removes the NCP volume and path association. This does not remove or delete data from the directory; it only removes the volume mount point that was created.

3.3.3 Managing NCP Server Connections

You can view a list of NCP server connections as well as get specific information for each connection. Using Novell Remote Manager, you can also clear specific NCP connections and send a broadcast message out to current NCP connections.

Viewing NCP Connection Information Using NCPCON

Enter ncpcon at the Linux server console, then enter the following command:

connection

You can also enter connection list to get more detailed information on NCP connections, or specify the connection number to get detailed information on a specific NCP connection. For example, you would enter connection 1 to get specific information on that NCP connection.

Viewing NCP Connection Information Using Novell Remote Manager

On the Novell Remote Manager main page in the left column under Manage NCP Services, click Manage Connections.

Use this page to view NCP server connection statistics and the list of connections. You can also broadcast a message to all currently connected users and clear selected connections.

To broadcast a message to all NCP connections, type the message you want broadcast and click Send.

To clear specific NCP connections, check the boxes next to the connections you want to clear and then click Clear ALL Marked Connections.

3.3.4 Disabling and Enabling Opportunistic Locking

Opportunistic locking (Oplocks) improves file access performance and is enabled by default in NCP Server. Oplocks provides a way to cache file data at the client. It allows the client to read and write data using its local cache and interact with the file server only when necessary. Oplocks improves both client and network performance by reducing the amount of traffic on the network.

There are two levels of oplocks available with NCP Server. You can set oplocks to either of these levels or disable oplocks completely. By default, oplocks is set to level 2, which includes both level 1 and level 2 functionality.

To disable oplocks, edit the etc/opt/novell/ncpserv.conf file and add the following line:

OPLOCK_SUPPORT_LEVEL 0

To set oplocks to level 1, edit the etc/opt/novell/ncpserv.conf file and add the following line:

OPLOCK_SUPPORT_LEVEL 1

There is no need to add a line to the ncpserv.conf file to set oplocks to level 2, because it is by default set to that level.

For more information on Oplocks with NCP Server, see Section 4.1, Opportunistic Locking and NCP.

3.3.5 Setting Volume Definition Flags

There are two options that can be added to provide NetWare-like functionality to non-NSS NCP volumes on Linux. These are the Enable Archive Bit option and the Inherit Posix Permissions option. Both options are disabled by default. The Enable Archive Bit option turns on support for the DOS archive bit on files. NCP, like Samba, uses the user-execute mode bit to save this information. For more information on the Inherit Posix Permissions option, see Section 4.2, NCP on Linux Security.

Setting Volume Definition Flags Using Novell Remote Manager

Adding these options using Novell Remote Manager can only be done during the volume creation. See Step 3 for information on adding these options using Novell Remote Manager.

Setting Volume Definition Flags Using Ncpserv.conf

To add either or both of these options, edit the etc/opt/novell/ncpserv.conf file and add the following flag(s) to the end of the volume definition line for the volume you want to add the options to.

Enable_Archive_Bit
Inherit_Posix_Permissions

The following sample volume definition lines provide examples for adding each option individually and together:

VOLUME TEST1 /usr/Novell/TEST1 Inherit_POSIX_Permissions
VOLUME TEST2 /usr/Novell/TEST2 Enable_Archive_Bit
VOLUME TEST3 /usr/Novell/TEST3 Enable_Archive_Bit Inherit_POSIX_Permissions

3.3.6 Monitoring NCP Server

You can monitor NCP Server connections, communications, volumes, and diagnostics using NCPTOP. NCPTOP is a monitoring utility that has the look of the NetWare Monitor utility, and is an interactive, real-time reporting utility. It is part of the novell-ncpserv RPM.

After NCP Server has been installed, you can start NCPTOP by entering ncptop at the Linux server console. Different statistic monitoring functions of NCPTOP can be accessed using the F1 through F5 function keys. The purpose of each function key is displayed within the NCPTOP utility.

3.3.7 Changing the NCP Server Code Page

NCP Server by default uses the code page corresponding to the Linux server’s default language. For example, if the Linux server is installed as a Japanese server, NCP Server will by default use shift-JIS as its local code page. If the Linux server is installed as a French server, NCP Server will by default use CP850 as its local code page. NCP Server can automatically detect and use most commonly used code pages.

If you want NCP Server to use a code page that is different than the one that is set by default, you must specify that code page in the /etc/opt/novell/ncpserv.conf configuration file.

Open the /etc/opt/novell/ncpserv.conf configuration file and add the following line

LOCAL_CODE_PAGE Code_Page

Replace Code_Page with the code page you want. Some examples are CP437, CP850, CP737, CP866, CP874, CP949, SJIS, BIG5, and GBK. For a complete list of available code pages, type iconv --list | more at the linux command line.

3.3.8 Disabling Sendfile Support

The Linux sendfile() API improves the performance for file reads. Samba has had problems in the past with sendfile(). Sendfile() support is enabled by default. If you experience problems with Samba and sendfile(), you can turn sendfile() off by adding the following line to the /etc/opt/novell/ncpserv.conf configuration file.

SENDFILE_SUPPORT 0

You can also replace the 0 with a 1 to turn sendfile() back on.

3.3.9 Enabling and Disabling the Execute Only File Attribute

The Execute Only file attribute is enabled by default. You can disable it by adding the following line to the /etc/opt/novell/ncpserv.conf configuration file.

EXECUTE_ATTRIBUTE_SUPPORT 0

If this option is enabled, volume archive bit support is turned off automatically.

You can also replace the 0 with a 1 to enable the Execute Only file attribute.

3.3.10 Enabling and Disabling Cross Protocol Locks

Cross-protocol locks are disabled by default. Enabling cross-protocol locks turns on the cross-protocol checking for physical record locks This lets you run applications from Samba and NCP clients concurrently; and each will recognize when the other has the file in use. Enabling cross-protocol locks also enables file share modes. File share modes allow an application to specifiy whether or not it allows other clients to read and/or write the file while it is using it. Commonly, this is used to allow other clients to read the same file but not write to it while the primary client is using it. Without share modes, applications incorrectly assume that they have exclusive access to a file.

You can enable cross-protocol locks by adding the following line to the /etc/opt/novell/ncpserv.conf configuration file.

CROSS_PROTOCOL_LOCKS 1

You can also replace the 1 with a 0 to disable cross-protocol locks.