wavezhang / k8s-csi-lvm Goto Github PK
View Code? Open in Web Editor NEWKubernetes CSI drivers for LVM
License: Apache License 2.0
Kubernetes CSI drivers for LVM
License: Apache License 2.0
Hi, this looks very promising regarding our usecase. We use rancher/k8s on bare-metal-nodes which are all connected to same SAN-storage volume via fibrechannel and exposed in the node as a multipathed device which i would like to manage via lvm. i tried to create a cluster-lvm but i failed to set it up.
Do i understand this repository not only as a csi-plugin to lvm but also as alternative to cluster-lvm? Can you give more detailed information on how to use it?
Thanks in advance
trying to create the pod csi-lvm-test on kubernetes 1.15, i get failure on mounting the volume:
Warning FailedMount pod/csi-lvm-test MountVolume.MountDevice failed for volume "pvc-05be8658-07b4-405c-b846-604669580af5" : driver name csi-lvmplugin not found in the list of registered CSI drivers
Perhaps i deployed this plugin incorrectly? Or do some changes need to be made to it to work with 1.15?
I'd like to understand how this is working and/or modify it. Currently, using k8s-csi-lvm requires copying an opaque binary blob to every node.
i am following the directions for deployment, but for some reason getting this when deploying the example pod:
MountVolume.MountDevice failed for volume "pvc-dc77adff-b751-46fa-a8fa-7c8ef530e622" : driver name csi-lvmplugin not found in the list of registered CSI drivers
I don't think this is an issue with the code, but rather with how i am deploying it. But perhaps you have an idea on how i can debug this. The volume and pvc are created ok. The volume is attached, but is not mounted. My kubernetes version is 1.15.1.
In /var/log/messages i see this error:
Jul 23 09:47:42 yav-015 kubelet: E0723 09:47:42.007695 14943 goroutinemap.go:150] Operation for "/var/lib/kubelet/plugins/csi-lvmplugin/csi.sock" failed. No retries permitted until 2019-07-23 09:49:44.00763596 -0700 PDT m=+64973.222879351 (durationBeforeRetry 2m2s). Error: "RegisterPlugin error -- failed to get plugin info using RPC GetInfo at socket /var/lib/kubelet/plugins/csi-lvmplugin/csi.sock, err: rpc error: code = Unimplemented desc = unknown service pluginregistration.Registration"
When i try to display csi drivers, none are found:
[root@yav-015 deploy]# kubectl get csidrivers
No resources found.
Hi, I started trying out this csi plugin on my cluster and it works great however I have a few questions.
Currently when a pvc is created a pv is instantly made but the lvm volume doesn't actually get created until a pod wants to mount it.
While is works perfectly fine I would like the available storage on the node to be taken into account while scheduling.
Is it possible to make it so when the pv is created it gets assigned to a node that has free space?
An alternative would be supporting WaitForFirstConsumer
in the storage class.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-lvm
provisioner: csi-lvmplugin
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
As documented here: https://kubernetes.io/docs/concepts/storage/storage-classes/#local
Delaying volume binding allows the scheduler to consider all of a pod’s scheduling constraints when choosing an appropriate PersistentVolume for a PersistentVolumeClaim.
I am not sure if i use this right. I managed to create the volume group according to the deploy.sh
and the lvmd-daemons are running. i can see the volume group k8s
and the logical volumes created by persistent-volume-claims.
when i open a shell inside the container and do a df .
inside the mounted volume i see that the underlying device is the rootdevice of my node. also creating a 2GB file in a 1GB volume claim shows that it is not the logical volume that is mounted inside the container.
do you have any ideas?
should say:
cd deploy
./node.sh
otherwise, lvmd will not be started correctly.
when i try to move a pod to another node (forced by adding nodeSelector) i get this error. Appearently the lvm-volume is not allowed to be accessed by the other node.
I found volume group name "k8s" is fixed in controllerserver.go,When I modify it and BUILD agein, I get an error "*"k8s-csi-lvm/vendor/k8s.io/client-go/kubernetes".Clientset does not implement "k8s-csi-lvm/vendor/github.com/wavezhang/k8s-csi-lvm/vendor/k8s.io/client-go/kubernetes".Interface (wrong type for Admissionregistration method)".Please tell me how to solve it
Would it be possible to provide the source code from which lvmd is compiled?
Or a location where lvmd was obtained from?
when kubelet mount volume, have error
Cannot determine filesystem type: err=exit status 2
So I enter lvmd that pod to execute
file-bsl /dev/volumegroup /pvc-xxxxxxxx
output
diy-thermocam raw data (Lepton 2.x), scale 0-246, spot sensor temperature 0.000000, unit Celsius, color scheme 0, calibration: Offset -0.001892, slope 0.046875
then I execute blkid -c /dev/ null-o export /dev/volumeGroup/pvc-xxxxxxxx
without any return, but the return code is 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.