node-disk-manager(ndm) runs as a DaemonSet in Kubernetes and helps with Disk Inventory Management
Switch branches/tags
Clone or download
sch00lb0y and princerachit probe: add probe to fill capacity for the aws ebs disk (#145)
* probe: add probe to fill capacity for the aws ebs disk

* ebs probe: update capacity only if the capacity is zero

* probe: rename ebs probe to capacity probe

* capacity probe: update comments

* capacity probe: change smart probe variables in capcity probe

* smart probe: change size to NoOfBlocks

* cacity probe: fetch block size from file

Signed-off-by: balaji <>
Latest commit 60986e2 Oct 10, 2018


Build Status Go Report codecov BCH compliance License FOSSA Status

node-disk-manager aims to make it easy to manage the disks attached to the node. It treats disks as resources that need to be monitored and managed just like other resources like CPU, Memory and Network. It is a daemon which runs on each node, detects attached disks and loads them as Disk objects (custom resource) into Kubernetes.

While PVs are well suited for stateful workloads, the Disk objects are aimed towards helping hyper-converged Storage Operators by providing abilities like:

  • Easy to access inventory of Disks available across the Kubernetes Cluster
  • Predict failures on the Disks, to help with taking preventive actions
  • Allow for dynamically attaching/detaching Disks to a Storage Pod, without requiring a restart

The design and implementation are currently in progress. The design is covered under this design proposal


A detailed usage documentation is maintained in the wiki

Start Node Disk Manager DaemonSet

  • Edit ndm-operator.yaml to fit your environment: Set the namespace, serviceAccount, configure filters in the node-disk-manager-config-map.
  • Switch to Cluster Admin context and create the DaemonSet with kubectl create -f ndm-operator.yaml

Using kubectl to fetch Disk Information

  • kubectl get disks --show-labels displays the disks across the cluster, with showing the node to which disk is attached.
  • kubectl get disks -l "<hostname>" displays the disks attached to node with the provided hostname.
  • kubectl get disk <disk-cr-name> -o yaml displays all the details of the disk captured by ndm for given disk resource

Build Image

  • go get or git clone node-disk-manager repo into $GOPATH/src/ with one of the below directions:

    • cd $GOPATH/src/ && git clone
    • cd $GOPATH/src/ && go get
  • Setup build tools:

    • By default node-disk-manager enables fetching disk attributes using udev. This requires udev develop files. For Ubuntu, libudev-dev package should be installed.
    • make bootstrap installs the required Go tools
  • run make in the top directory. It will:

    • Build the binary.
    • Build the docker image with the binary.
  • Test your changes

    • sudo -E env "PATH=$PATH" make test execute the unit tests
    • make integration-test will launch minikube to run the tests. Make sure that minikube can be executed via sudo -E minikube start --vm-driver=none

Push Image

By default travis pushes the docker image to openebs/node-disk-manager-amd64, with ci as well as commit tags. You can push to your custom registry and modify the ndm-operator.yaml file for your testing.


FOSSA Status