Skip to content

GKE Local SSDs or Ephemeral Disks

Kiran Mova edited this page Sep 1, 2018 · 1 revision

Overview

NDM can detect the Local SSDs or Ephemeral Disks attached to Kubernetes Nodes. NDM determines the Disk uuid for Ephemeral Disks ( Model=EphemeralDisk) by using the hostname and path

Note: In case you need to use Local SSDs as block devices, you will have to first umount them. On GKE, the Local SSDs are formatted with Ext4 and mounted under /mnt/disks/.

Configuration

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 GKE - Local SSD:

- apiVersion: openebs.io/v1alpha1
  kind: Disk
  metadata:
    clusterName: ""
    creationTimestamp: 2018-09-01T05:24:09Z
    labels:
      kubernetes.io/hostname: gke-kmova-ssd-default-pool-a834964f-k36k
      ndm.io/disk-type: disk
    name: disk-e58ee78463b6e970e0bf9307edbaff35
    namespace: ""
    resourceVersion: "1146"
    selfLink: /apis/openebs.io/v1alpha1/disk-e58ee78463b6e970e0bf9307edbaff35
    uid: 40ec0d47-ada7-11e8-9e3a-42010a80028f
  spec:
    capacity:
      logicalSectorSize: 4096
      storage: 402653184000
    details:
      firmwareRevision: '1   '
      model: EphemeralDisk
      serial: local-ssd-0
      spcVersion: "6"
      vendor: Google
    devlinks:
    - kind: by-id
      links:
      - /dev/disk/by-id/scsi-0Google_EphemeralDisk_local-ssd-0
      - /dev/disk/by-id/google-local-ssd-0
    - kind: by-path
      links:
      - /dev/disk/by-path/virtio-pci-0000:00:04.0-scsi-0:0:1:0
    path: /dev/sdb
  status:
    state: Active
Clone this wiki locally