Linux operating systems

Linux: Verifying access rights and user limits

Before you start the server, verify access rights and user limits.

About this task

If you do not verify user limits, also known as ulimits, you might experience server instability or a failure of the server to respond. You must also verify the system-wide limit for the maximum number of open files. The system-wide limit must be greater than or equal to the user limit.

Procedure

  1. Verify that the server instance user ID has permissions to start the server.
  2. For the server instance that you plan to start, ensure that you have authority to read and write files in the server instance directory. Verify that the dsmserv.opt file exists in the server instance directory, and that the file includes parameters for the server instance.
  3. If the server is attached to a tape drive, medium changer, or removable media device, and you plan to start the server by using the instance user ID, grant read/write access to the instance user ID for these devices. To set permissions, take one of the following actions:
    • If the system is dedicated to IBM Spectrum Protect™ and only the IBM Spectrum Protect administrator has access, make the device special file world-writable. On the operating system command line, issue the following command:
      chmod +w /dev/rmtX
    • If the system has multiple users, you can restrict access by making the IBM Spectrum Protect instance user ID the owner of the special device files. On the operating system command line, issue the following command:
      chmod u+w /dev/rmtX
    • If multiple user instances are running on the same system, change the group name, for example TAPEUSERS, and add each IBM Spectrum Protect instance user ID to that group. Then, change the ownership of the device special files to belong to the group TAPEUSERS, and make them group-writable. On the operating system command line, issue the following command:
      chmod g+w /dev/rmtX
  4. Linux operating systems If you are using the IBM Spectrum Protect device driver and the autoconf utility, use the -a option to grant read/write access to the instance user ID.
  5. Linux operating systemsTo prevent server failures during interaction with DB2®, tune the kernel parameters.

    Linux operating systemsFor instructions about tuning kernel parameters, see Linux: Tuning kernel parameters for Linux systems.

  6. Verify the following user limits based on the guidelines in the table.
    Table 1. User limit (ulimit) values
    User limit type Preferred value Command to query value
    Maximum size of core files created Unlimited ulimit -Hc
    Maximum size of a data segment for a process Unlimited ulimit -Hd
    Maximum file size Unlimited ulimit -Hf
    Maximum number of open files 65536 ulimit -Hn
    Maximum amount of processor time in seconds Unlimited ulimit -Ht

    To modify user limits, follow the instructions in the documentation for your operating system.

    Tip: If you plan to start the server automatically by using a script, you can set the user limits in the script.
  7. Ensure that the user limit of maximum user processes (the nproc setting) is set to the minimum suggested value of 16384.
    1. To verify the current user limit, issue the ulimit -Hu command by using the instance user ID. For example:
      [user@Machine ~]$ ulimit -Hu
      16384
    2. If the limit of maximum user processes is not set to 16384, set the value to 16384.
      Linux operating systemsAdd the following line to the /etc/security/limits.conf file:
      instance_user_id        -    nproc           16384
      where instance_user_id specifies the server instance user ID.
      Linux operating systemsIf the server is installed on the Red Hat Enterprise Linux 6 operating system, set the user limit by editing the /etc/security/limits.d/90-nproc.conf file in the /etc/security/limits.d directory. This file overrides the settings in the /etc/security/limits.conf file.
      Tip: The default value for the user limit of maximum user processes has changed on some distributions and versions of the Linux operating system. The default value is 1024. If you do not change the value to the minimum suggested value of 16384, the server might fail or hang.