local-disk-manager

module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0

README

Local Disk Manager (LDM)

Hwameistor Logo

README: English中文

local-disk-manager (LDM) is a sub module of HwameiStor.

Local Disk Manager (LDM) is one of modules of HwameiStor. LDM is to simplify the management of disks on nodes. It can abstract the disk on the node into a resource and can be monitored and managed. It's a daemon that will be deployed on each node, then detect the disk on the node, abstract it into local disk (LD) resources and save it to kubernetes.

At present, the LDM project is still in the alpha stage.

Architecture of HwameiStor

image

Concepts

LocalDisk(LD): LDM abstracts disk resources into objects in k8s. A LD resource object represents the disk resources on the host.

LocalDiskClaim(LDC): The way to use disk, users can add a description of the disk to select the disk to be used.

At present, LDC supports the following disk description options:

  • NodeName
  • Capacity
  • DiskType(e.g. HDD/SSD)

Usage

If you want to entirely deploy HwameiStor, please refer to here. If you just want to deploy LDM separately, you can refer to the following installation steps.

Install Local Disk Manager

1. Clone this repo to your machine:
# git clone https://github.com/hwameistor/local-disk-manager.git
2. Change to deploy directory:
# cd deploy
3. Deploy CRDs and run local-disk-manager
3.1 Deploy LD and LDC CRDs
# kubectl apply -f deploy/crds/
3.2 Deploy RBAC CRs and operators
# kubectl apply -f deploy/
4. Get LocalDisk Infomation
# kubectl get localdisk
10-6-118-11-sda    10-6-118-11                             Unclaimed
10-6-118-11-sdb    10-6-118-11                             Unclaimed

Get locally discovered disk resource information. There are four columns of information.

  • Column NAME represents how this disk is displayed in the cluster resources.
  • Column NODEMATCH indicates which host this disk is on.
  • Column CLAIM indicates which localdiskclaim statement this disk is used by.
  • Column PHASE represents the current state of the disk.

kuebctl get localdisk <name> -o yaml View more information about disks.

5. Claim Available Disks
5.1 Apply a LocalDiskClaim
# kubectl apply -f deploy/samples/hwameistor.io_v1alpha1_localdiskclaim_cr.yaml

Allocate available disks by issuing a disk usage request. In the description of the request, you can add disk requirements, such as disk type and disk capacity

5.2 Get LocalDiskClaim Infomation
# kubectl get localdiskclaim <name>

Check the status of claim. If there is a disk available, you will see that the status is bound and the status is on the corresponding localdisk is Claimed and points to the claim that references the disk.

Roadmap

Feature Status Release TP Date GA Date Description
CSI for disk volume Planed CSI driver for provisioning Local Pvs with bare disk
Disk management Planed Disk management, disk allocation, disk event aware processing
Disk health management Planed Fault prediction, status information reporting and so on
HA disk Volume Planed Disk Volume with HA

Feedbacks

Please submit any feedback and issue at: Issues

Directories

Path Synopsis
cmd
pkg
apis/generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
apis/generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
apis/generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
apis/generated/clientset/versioned/typed/hwameistor/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
apis/generated/clientset/versioned/typed/hwameistor/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
apis/hwameistor
Package hwameistor contains hwameistor API versions.
Package hwameistor contains hwameistor API versions.
apis/hwameistor/v1alpha1
Package v1alpha1 contains API Schema definitions for the hwameistor v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=hwameistor.io Package v1alpha1 contains API Schema definitions for the hwameistor v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=hwameistor
Package v1alpha1 contains API Schema definitions for the hwameistor v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=hwameistor.io Package v1alpha1 contains API Schema definitions for the hwameistor v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=hwameistor
test

Jump to

Keyboard shortcuts

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