Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcache创建逻辑 #70

Open
jimorsm opened this issue Jun 2, 2022 · 1 comment
Open

bcache创建逻辑 #70

jimorsm opened this issue Jun 2, 2022 · 1 comment
Labels
question Further information is requested

Comments

@jimorsm
Copy link

jimorsm commented Jun 2, 2022

请问bcache是如何创建的?我在代码中没有在找到这块逻辑。
测试环境无法成功创建bcache。

0.10版本,helm部署,部署时已启用bcache。

[root@182 ~]# lsmod | grep bcache
bcache                274432  0
crc64                  16384  1 bcache

carina-ndoe 报错

 Create with no support type  failed to create LV name pvc-5b074f0d-c0ff-46b5-b0b5-7c658e4980d4
{"level":"error","ts":1654150765.6952772,"logger":"controller.logicvolume","msg":"Reconciler error","reconciler group":"carina.storage.io","reconciler kind":"LogicVolume","name":"pvc-5b074f0d-c0ff-46b5-b0b5-7c658e4980d4","namespace":"default","error":"Create with no support type ","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/github.com/carina-io/carina/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/github.com/carina-io/carina/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}
@antmoveh
Copy link
Contributor

这里是bcache的代码

bcache并不需要特别指定,只需要在sc中配置缓存比例以及缓存盘所在vg卷组即可

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-carina-test
provisioner: carina.storage.io
parameters:
  # file system
  csi.storage.k8s.io/fstype: xfs
  # disk group
  carina.storage.io/backend-disk-group-name: carina-raw-ssd/vdd
  carina.storage.io/cache-disk-group-name: carina-vg-ssd
  # 1-100 Cache Capacity Ratio
  carina.storage.io/cache-disk-ratio: "50"
  # writethrough/writeback/writearound
  carina.storage.io/cache-policy: writethrough
reclaimPolicy: Delete
allowVolumeExpansion: true
# WaitForFirstConsumer表示被容器绑定调度后再创建pv
volumeBindingMode: WaitForFirstConsumer
mountOptions:

@antmoveh antmoveh added the question Further information is requested label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants