Skip to main content

接入未知存储

简介

Pelicon 可以利用 StorageProvider CRD 接入暂时未受支持的存储设备,不过这种方式接入的存储只能具备一些基础的能力。

接入的前提条件:

  1. 目标存储符合CSI规范
  2. 目标存储运行正常

使用

  1. 按需修改以下yaml,并apply
apiVersion: uds.dce.daocloud.io/v1
kind: StorageProvider
metadata:
annotations:
uds.dce.daocloud.io/capabilities: '{"snapshot":true,"clone":true,"expansion":true,"protocol":"block"}' # Storage capabilities
name: ceph-rbd-1.0.0
spec:
driver: rbd.csi.ceph.com # Provision name
vendor: ceph # Storage vendor name
product: rbd # Storage product
protocol: block # Storage protocal(block/file/local)
version: 1.0.0 # Version
  1. 查看
kubectl get sp
NAME VENDOR PRODUCT PROTOCOL VERSION DRIVERNAME CSIDRIVER CSICONTROLLER STORAGEDRIVER AGE
ceph ceph rbd block 1.0.0 rbd.csi.ceph.com NotInstalled NotInstalled NotInstalled 162d
daocloud-local-1.0.0 daocloud DLocal local 1.0.0 local.storage.daocloud.io Ready Ready NotInstalled 332d
longhorn longhorn longhorn block 1.0.0 driver.longhorn.io NotInstalled NotInstalled NotInstalled 168d
xsky-block-4.1.x xsky SDS block 4.1.x iscsi.csi.xsky.com Ready Ready Ready 312d
xsky-file-4.1.x xsky SDS file 4.1.x nfs.csi.xsky.com Ready Ready NotInstalled 244d
  1. (可选) 管理CSI组件

如果你想让Pelicon识别存储系统的CSI组件,以此监控CSI的运行状态,并展示在StorageProvider CR的Status中,需要为CSI Controller和CSI Driver打标签(假设CSI组件全部是deployment).

kubectl label deployment <your-csi-controller> driver=<you provisioner name> role=csi-controller
kubectl label deployment <your-csi-driver> driver=<you provisioner name> role=csi-driver

StorageProvider Capabilities annotation 说明

NameExplanation
snapshot
clone
expansion
protocol