Db2pd command fails in IBM Cloud environment

When trying to run the db2pd command, an error appears or nothing is returned.

You must configure ID mapping for a Db2 or Db2 Warehouse instance using IBM Cloud File Storage on IBM Cloud environments . ID mapping enables the no_root_squash property which, if not properly configured, produces the following issues:
  • Files in the mounted persistent volumes loose their root permissions, which can result in the db2pd command returning inconsistent results.
  • Attempting to retrieve HADR status results by running the manage_hadr -status command can fail because the command also relies on db2pd.

Symptoms

  • The manage_hadr -status command does not return any information about HADR status.
  • When running db2pd commands in the db2u engine pod, the command returns nothing or the following error:
    Unable to attach to database manager on member 0.
    Please ensure the following are true:
       - db2start has been run for the member.
       - db2pd is being run on the same physical machine as the member.
       - DB2NODE environment variable setting is correct for the member
         or db2pd -mem setting is correct for the member.
    Another possibility of this failure is the Virtual Address Space Randomization is currently enabled on this system.

Diagnosing the problem

  1. Access your Db2® pod. For details, see Exec into the Db2 pod.
  2. Run the following db2pd command and check the return value. .
    db2pd - -member all
    If nothing is returned, or the error message is returned, then continue to step 3.
  3. While in your Db2 pod, check the file permissions in the mounted meta volume by running the following command:
    ls -la `/mnt/blumeta0

Resolving the problem

  1. Setting up IBM Cloud File Storage.
  2. Deploying Db2 or Db2 Warehouse using a custom resource.