node-disk-manager

module
Version: v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: Apache-2.0

README

node-disk-manager

Build Status Codacy Badge Go Report codecov Slack BCH compliance FOSSA Status CII Best Practices

node-disk-manager (NDM) 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 contains a daemon which runs on each node, detects attached disks and loads them as BlockDevice objects (custom resource) into Kubernetes.

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

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

NDM has 2 main components:

  • node-disk-manager daemonset, which runs on each node and is responsible for device detection.
  • node-disk-operator deployment, which acts as an inventory of block devices in the cluster.

and 2 optional components:

  • ndm-cluster-exporter deployment, which fetches block device object from etcd and exposes it as prometheus metrics.
  • ndm-node-exporter daemonset, which runs on each node, queries the disk for details like SMART and expose it as prometheus metrics.

The design of the project is covered under this design proposal

The feedback of users / organizations currently using OpenEBS can be found here

Project Status

Currently, the NDM project is in beta.

Usage

A detailed usage documentation is maintained in the wiki.

Minimum Supported version

K8S : 1.18+

Start Node Disk Manager
  • 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 components with kubectl create -f ndm-operator.yaml.
  • This will install the daemon, operator and the exporters
Using kubectl to fetch BlockDevice Information
  • kubectl get blockdevices displays the blockdevices across the cluster, with NODENAME showing the node to which disk is attached, CLAIMSTATE showing whether the device is currently in use and STATE showing whether the device is connected to the node.
  • kubectl get blockdevices -o wide displays the blockdevice along with the path at which the device is attached on the node.
  • kubectl get blockdevices <blockdevice-cr-name> -o yaml displays all the details of the disk captured by ndm for given disk resource.
Building, Testing and Pushing Image

Before building the image locally, you need to setup your development environment. The detailed instructions for setting up development environment, building and testing are available here.

Contributing

OpenEBS welcomes your feedback and contributions in any form possible.

License

FOSSA Status

Inspiration

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=openebs.io
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=openebs.io
api-service
cmd
ndm_daemonset/app
Package app will instantiate and run the node-disk-manager in the context of the Container Orchestrator
Package app will instantiate and run the node-disk-manager in the context of the Container Orchestrator
db
integration_tests
k8s
pkg
env
logs
Package logs provides unified logging framework for all the binaries under node-disk-manager.
Package logs provides unified logging framework for all the binaries under node-disk-manager.
mount/libmount
Package libmount provides utilties to parse and operate on the various mount files (fstab, mtab, mounts, mountinfo, etc.).
Package libmount provides utilties to parse and operate on the various mount files (fstab, mtab, mounts, mountinfo, etc.).
smart
Package smart provides details about a particular disk device which includes both basic details such as vendor, model, serial, etc as well as smart details such as Raw_Read_Error_Rate, Temperature_Celsius, Spin_Up_Time, etc by parsing various disk pages such as inquiry page, ata command set page ,etc using various SCSI commands such as scsi inquiry, read device capacity, mode sense, etc.
Package smart provides details about a particular disk device which includes both basic details such as vendor, model, serial, etc as well as smart details such as Raw_Read_Error_Rate, Temperature_Celsius, Spin_Up_Time, etc by parsing various disk pages such as inquiry page, ata command set page ,etc using various SCSI commands such as scsi inquiry, read device capacity, mode sense, etc.
spec
ndm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL