Git Product home page Git Product logo

Comments (4)

Kunde21 avatar Kunde21 commented on June 14, 2024 2

The way to accomplish this is somewhat of a hack. First, manually create the directory in your moosefs cluster (this plugin doesn't create directories, yet).
Then, define the volume pointing at that directory (reference the volume in the pvc definition):

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: moosefs-pv
spec:
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: moosefs-block-storage
  volumeMode: Filesystem
  capacity:
    storage: 5Gi
  storageClassName: moosefs-block-storage
  csi:
    driver: com.tuxera.csi.moosefs
    fsType: ext4
    volumeHandle: moosefs-pv
    volumeAttributes:
      endpoint: '<master endpoint>:/<directory path>'
...

This will mount the directory from within the moosefs cluster as the root of the volume in kubernetes.

Now you can point the claim at the volume you created:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: moosefs-csi-pvc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
  storageClassName: moosefs-block-storage
  volumeMode: Filesystem
  volumeName: moosefs-pv

It's enough to get you started. I'm working on a patch to add the directory path as an entry on VolumeAttributes, similar to how the csi plugin for nfs storage allows setting of the share to mount.

from moosefs-csi.

antoinetran avatar antoinetran commented on June 14, 2024

Not sure if this is a MooseFs plugin issue or Kubernetes issue. I created an issue in Kubernetes side: kubernetes/kubernetes#89091 . But I still believe this is a MooseFs plugin issue. The sourcePath in the code is set to the endpoint of mfsmaster, but it could be configurable.

from moosefs-csi.

antoinetran avatar antoinetran commented on June 14, 2024

Hi, is this going to be added soon?
Also, I can see "ext4", should we write the filesystem containing MooseFs chunks or do we always need to write that? Thank you.

from moosefs-csi.

Kunde21 avatar Kunde21 commented on June 14, 2024

@antoinetran Sorry to have disappeared. Didn't expect for the world to catch on fire all at once. 😭

I spent a lot of time trying to refactor and update, but the aws driver gave me problems the entire way.
Ended up creating an on-prem, focused driver, so I can iterate on it more cleanly and so I don't need to spend time studying up on the goals of the aws target here. github.com/Kunde21/moosefs-csi

from moosefs-csi.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.