Skip to content

Node Disk Manager (NDM)

Kiran Mova edited this page Sep 1, 2018 · 4 revisions

NDM helps you manage the disks attached to the Kubernetes Nodes. NDM can be used to extend the capabilities of Kubernetes to provide access to disk inventory across cluster.

NDM is containerized and can be installed on any Kubernetes Cluster. The sample deployment file for installing NDM is available as ndm-operator.yaml.

The current version of NDM supports the following features:

  • Discover block devices attached to a Kubernetes Node and add them as Disk custom resource.
  • Detect block device addition/removal from a node.
  • The Disk custom resource contains the following properties under spec: (depending on their availability):
    • Device Path
    • Device Links ( by id, by name)
    • Vendor and Model information
    • WWN and Serial
    • Capacity
    • Sector Size
  • Disk custom resource is updated with following labels:
    • hostname (kubernetes.io/hostname)
    • disk-type (ndm.io/disk-type)
  • Disk status can have the following values:
    • Active : Disk is detected on the node
    • Inactive : Disk was detected earlier but doesn't exist at the given node anymore.
    • Unknown : The NDM was stopped on the node where disk was last detected.

Other Features:

  • Create sparse disks on the node. This is useful for Dev or CI systems, that need simulated disks for testing workloads.
  • Configure Filters for the type of disks to be added as Disks. The filters can be configured either via vendor type or via device path pattern.

Examples of Discovered Disk:

  • GPD disk:
    - apiVersion: openebs.io/v1alpha1
      kind: Disk
      metadata:
        clusterName: ""
        creationTimestamp: 2018-09-01T03:54:35Z
        labels:
          kubernetes.io/hostname: gke-kmova-helm-default-pool-e35ad688-hhmb
          ndm.io/disk-type: disk
        name: disk-03520be174134c68083bd6d4962c5296
        namespace: ""
        resourceVersion: "6120"
        selfLink: /apis/openebs.io/v1alpha1/disk-03520be174134c68083bd6d4962c5296
        uid: bdd584d6-ad9a-11e8-84a3-42010a800196
      spec:
        capacity:
          logicalSectorSize: 512
          storage: 107374182400
        details:
          firmwareRevision: '1   '
          model: PersistentDisk
          serial: kmova-gpd-node1
          spcVersion: "6"
          vendor: Google
        devlinks:
        - kind: by-id
          links:
          - /dev/disk/by-id/scsi-0Google_PersistentDisk_kmova-gpd-node1
          - /dev/disk/by-id/google-kmova-gpd-node1
        - kind: by-path
         links:
          - /dev/disk/by-path/virtio-pci-0000:00:03.0-scsi-0:0:2:0
        path: /dev/sdb
      status:
        state: Active
    

Clone this wiki locally