The createStorageAllNodes.sh (noi-local-storage-create-0.4.0.zip) script helps you set up Kubernetes local volume StorageClasses and PersistentVolumes (PVs), which are required by Netcool Operations Insight running on Red Hat OpenShift. The script generates PVs using local storage, which are mapped volumes that are mapped to directories off the root file system on the parent node. Local storage volumes are only intended for proof of concept (PoC) or demonstration environments and should not be used in production. For production systems, consult with your system administrator for a file system with the required performance, scale, and redundancy requirements.

Before you begin

Please ensure the following:

  • You are logged into a master node of your cluster.
  • The Alpine Linux image is available.
  • You are using the default namespace.

See the troubleshooting section if you experience problems.

Creating local storage volumes

  • Create storage classes.

The script creates the following storage classes:


  • Create PVs.

The script creates the following PVs for each node:


  • Create directories.

On each worker node the script creates directories under the root directory:


The script can either automatically create required storage classes, PVs, and directories. Or, the script can output a YAML template, which can be used with the kubectl create -f command.

Deleting local volumes

In addition to creating local storage artifacts, the script also outputs a delete script called deleteStorageAllNodes.sh, which removes all artifacts created by the createStorageAllNodes.sh script.

Create script usage

%> ./createStorageAllNodes.sh -h
This script will create local Storage Classes, Persistent Volumes and Directories required by Netcool Operations Insight
Usage: ./createStorageAllNodes.sh [-dnryh] [-d base directory path] [-n nodes] [-r release name] [-y yaml output only] [-s silent mode] [-h help]


Create storage on all worker nodes

The following example creates storage for a Netcool Operations Insight release called noi with a root directory path on each worker node of the /home/netcool/ibm-netcool/prod path. A deleteStorageAllNodes.sh delete script is also created.
%> ./createStorageAllNodes.sh -d /home/netcool/ibm-netcool-prod

Create storage on a specified node

The following example creates storage for a Netcool Operations Insight release called noi with a root directory path on each worker node of the /home/netcool/ibm-netcool/prod path. A deleteStorageAllNodes.sh delete script is also created.
%> ./createStorageAllNodes.sh -n ""

Create YAML template

The following example outputs a YAML template file noi-storage.yaml, which can be used with the kubectl create -f command to create storage for a Netcool Operations Insight release called noi with a root directory of /root/ibm-netcool-prod. No delete script is created, instead the storage artifacts can be removed by running the kubectl delete -f noi-storage.yaml command.

Note: This example does not remove the storage directories on the nodes. They must be removed manually.

%> ./createStorageAllNodes.sh -y > noi-storage.yaml

Delete script usage

./deleteStorageAllNodes.sh -h
This script will delete PVCs, PVs, Storage Classes and directories created by ./createStorageAllNodes.sh
Usage:  ./deleteStorageAllNodes.sh [-sy]
 [ -s silent mode ]
 [ -y yaml only ]
 [ -h help ]


Default namespace

The script is intended to run in the default namespace. When running in a different namespace, ensure the namespace has the correct privileges in order to create the following Kubernetes artifacts:

  • Storage classes
  • PVs
  • Directories

Alpine linux

The script requires the alpine image in order to create directories on worker nodes. If the cluster does not have a connection to docker hub, the createStorageAllNodes.sh script hangs:

Script hangs when deleting PVs

Firstly, check that there are no PVCs bound to the PV, as these prevent the PV from being deleted.
Secondly, editing the PV and removing the finalizer allows the PVC to be deleted, for example:

kubectl patch pv [name] -p '{"metadata":{"finalizers":null}}'

Multiple PVs can be deleted with the following command:

kubectl get pv | cut -f1 -d' ' | grep [release] | grep -v NAME | xargs kubectl patch pv -p '{"metadata":{"finalizers":null}}'


Released: 31 Oct 2019
Updated: 16 July 2020
Version: N/A
Cost: No Charge
Support: Not Supported
Download License: L-JROZ-72S5LA



  • IBM Netcool Operations Insights V1.6.1 on Red Hat OpenShift


This package is subject to the License terms included, along with those displayed upon download.

To report a problem with deploying this entry, entitled customers may contact the country specific IBM support channel, reference the IBM Worldwide Directory.

5 comments on"Local storage script"

  1. Some steps provided in this link are not correct and is confusing

    1. In step 1 – NOI 1.6 is now installed using ICP GUI. Editing values.yaml file is old way. In order to get values.yaml file, we have to untar NOI_V1.6_OM_FOR_ICP.tar.gz, then in charts directory, untar ibm-netcool-prod-2.1.0.tgz, which is not needed at all when installing NOI 1.6. Besides, the mentioned storage class name for each microservice are the default one in helm chart. We don’t need modify values.yaml file at all.

    2. In step 2 – Using this command ./createStorageAllNodes.sh -a -f sshscript.sh to generate sshscript.sh. sshscript.sh file is empty. Nothing is in it. After running createStorageAllNodes.sh , PV and local directories are created.

    3. In step 3, the output of ‘kubectl get pods -o wide’ commands doesn’t appear from NOI. NOI doesn’t have these pods.

  2. Thanks for the feedback, Bin Tang. The information and procedure has been updated.

  3. the reference to the createStorageAllNodes.sh (createStorageAllNodes.zip) at the top is wrong.
    clicking here gives you a zip file with HTML content 🙂

  4. Thanks Mario, the file has been updated.

  5. Hi, looks like the issue mario mentioned is still present in the file linked in the Overview paragraph text as “createStorageAllNodes.sh (noi-local-storage-create-0.2.0.zip)” as this contains html content. However the link on the right as “noi-local-storage-create-0.2.0.zip” is working as expected and provides a zip of the script.

Join The Discussion

Your email address will not be published. Required fields are marked *