Skip to content
Kiran Mova edited this page Sep 1, 2018 · 1 revision

Overview

NDM can detect the Google Persistent Disks (GPD) attached to a given Kubernetes node. NDM can also detect if the GPD has been detached and attached to another node.

Configuration

GPD Name must be unique.

The uniqueness of a GPD is determined by Hash of model, serial, vendor as show below:

      model: PersistentDisk
      serial: kmova-gpd-node1
      vendor: Google

In case of GPD, the serial is the name of the GPD disk provided by the user. When GPDs are created from gcloud cli, it is possible that two GPDs with same name can be created and attached to different nodes. NDM will not be able to detect this. It is recommended that each GPD disk have a unique name.

Specify Exclude Filters

When using with GKE/Ubuntu 16.06, it is possible that loopback devices (Example: /dev/loop5) are also detected. To filter these loop back devices and any disk patterns that need to be excluded, use the NDM ConfigMap as shown in ndm-operator.yaml.

The default configuration comes with an exclusion filter for loop back:

      "filterconfigs": [
        {
          "key": "path-filter",
          "name": "path filter",
          "state": "true",
          "include":"",
          "exclude":"loop"
        }
      ]

The exclude parameter above can take a comma separated list of disk patterns or complete disk paths. For instance, if the Nodes are configured with a CD/DVD drives, the exclude value can be "loop,/dev/cdrom"

Example 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