github.com/openebs/node-disk-manager@v1.9.1-0.20230225014141-4531f06ffa1e/README.md (about)

     1  # node-disk-manager
     2  
     3  [![Build Status](https://github.com/openebs/node-disk-manager/actions/workflows/build.yml/badge.svg)](https://github.com/openebs/node-disk-manager/actions/workflows/build.yml)
     4  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea8d7835d7224178af058d98e5dac117)](https://www.codacy.com/app/OpenEBS/node-disk-manager?utm_source=github.com&utm_medium=referral&utm_content=openebs/node-disk-manager&utm_campaign=Badge_Grade)
     5  [![Go Report](https://goreportcard.com/badge/github.com/openebs/node-disk-manager)](https://goreportcard.com/report/github.com/openebs/node-disk-manager)
     6  [![codecov](https://codecov.io/gh/openebs/node-disk-manager/branch/develop/graph/badge.svg)](https://codecov.io/gh/openebs/node-disk-manager)
     7  [![Slack](https://img.shields.io/badge/chat!!!-slack-ff1493.svg?style=flat-square)](https://kubernetes.slack.com/messages/openebs)
     8  [![BCH compliance](https://bettercodehub.com/edge/badge/openebs/node-disk-manager?branch=develop)](https://bettercodehub.com/results/openebs/node-disk-manager)
     9  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenebs%2Fnode-disk-manager.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenebs%2Fnode-disk-manager?ref=badge_shield)
    10  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1953/badge)](https://bestpractices.coreinfrastructure.org/projects/1953)
    11  
    12  `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. 
    13  
    14  While PVs are well suited for stateful workloads, the BlockDevice objects are aimed towards helping hyper-converged Storage Operators by providing abilities like:
    15  - Easy to access inventory of block devices available across the Kubernetes Cluster.
    16  - Predict failures on the blockdevices, to help with taking preventive actions.
    17  - Allow for dynamically attaching/detaching blockdevices to a Storage Pod, without requiring a restart.
    18  
    19  NDM has 2 main components:
    20  - node-disk-manager daemonset, which runs on each node and is responsible for device detection.
    21  - node-disk-operator deployment, which acts as an inventory of block devices in the cluster.
    22  
    23  and 2 optional components:
    24  - ndm-cluster-exporter deployment, which fetches block device object from etcd and exposes it as prometheus metrics.
    25  - ndm-node-exporter daemonset, which runs on each node, queries the disk for details like SMART and expose it as prometheus metrics.
    26  
    27  The design of the project is covered under this [design proposal](./docs/design.md)
    28  
    29  The feedback of users / organizations currently using OpenEBS can be found [here](https://github.com/openebs/openebs/tree/master/adopters) 
    30  
    31  ## Project Status
    32  Currently, the NDM project is in beta.
    33  
    34  # Usage
    35  A detailed usage documentation is maintained in the [wiki](https://github.com/openebs/node-disk-manager/wiki).
    36  
    37  - [FAQ](https://docs.openebs.io/docs/next/ugndm.html) and [Troubleshooting](https://docs.openebs.io/docs/next/t-ndm.html)
    38  
    39  ### Minimum Supported version
    40  K8S : 1.18+
    41  
    42  ### Start Node Disk Manager
    43  * Edit [ndm-operator.yaml](deploy/ndm-operator.yaml) to fit your environment: Set the `namespace`, `serviceAccount`, configure filters in the `node-disk-manager-config-map`.
    44  * Switch to Cluster Admin context and create the components with `kubectl create -f ndm-operator.yaml`.
    45  * This will install the daemon, operator and the exporters
    46  
    47  ### Using `kubectl` to fetch BlockDevice Information
    48  * `kubectl get blockdevices` displays the blockdevices across the cluster, with `NODENAME` showing the node to which disk is attached,
    49    `CLAIMSTATE` showing whether the device is currently in use and `STATE` showing whether the device is connected to the node.
    50  * `kubectl get blockdevices -o wide` displays the blockdevice along with the path at which the device is attached on the node.
    51  * `kubectl get blockdevices <blockdevice-cr-name> -o yaml` displays all the details of the disk captured by `ndm` for given disk resource.
    52  
    53  ### Building, Testing and Pushing Image
    54  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](./BUILD.md).
    55  
    56  ## Contributing
    57  
    58  OpenEBS welcomes your feedback and contributions in any form possible.
    59  - [Contributing Guide]( https://github.com/openebs/node-disk-manager/blob/master/CONTRIBUTING.md)
    60  - [Project Roadmap](https://github.com/orgs/openebs/projects/2)
    61  
    62  
    63  # License
    64  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenebs%2Fnode-disk-manager.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenebs%2Fnode-disk-manager?ref=badge_large)
    65  
    66  # Inspiration
    67  * Thanks to [Daniel](https://github.com/dswarbrick) for setting up the go-based [SMART](https://github.com/dswarbrick/smart) library.
    68  * Thanks to [Humble](https://github.com/humblec), [Jan](https://github.com/jsafrane) and other from the [Kubernetes Storage Community](https://github.com/kubernetes-incubator/external-storage/issues/736) for reviewing the approach and evaluating the use-case. 
    69  
    70  
    71