Giter VIP home page Giter VIP logo

Comments (10)

timoschwarzer avatar timoschwarzer commented on May 19, 2024 4

I have been working on a simple btrfs provisioner: https://github.com/timoschwarzer/btrfs-provisioner
I eventually want to add support for automatic node selection, moving volumes between nodes (using btrfs send/receive) and more in the future.

from local-path-provisioner.

nikolaishields avatar nikolaishields commented on May 19, 2024 2

I'm glad to see there is some interest on this topic.

from local-path-provisioner.

haslersn avatar haslersn commented on May 19, 2024 1

@dvonessen What needs to be done in order to integrate this with the volume snapshot API?

from local-path-provisioner.

haslersn avatar haslersn commented on May 19, 2024

I think this feature would be really great.

from local-path-provisioner.

dvonessen avatar dvonessen commented on May 19, 2024

Hello, I think this is possible.
You can use the setup and teardown bash scripts to create subvolumes.
Requirements: local-path-provisioner version >= v0.0.15
Steps:

  1. kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml to get the local-path-provisioner into you kubernetes cluster.
  2. If you want to use btrfs tools, make sure you are using a helper image which has those tools available. By default local-path-provisioner uses busybox docker image. To change this kubectl edit deployments.apps -n local-path-storage local-path-provisioner and edit the container templates command. Append it with e.g. alpine linux image.
  3. kubectl edit configmaps local-path-config -n local-path-storage in the data object there edit setup and teardown as wished. eg.
  setup: |-                                                                                        
    #!/bin/sh                                                                                      
    path=$1                                                                                        
    echo "$@"                                                                                      
    apk add btrfs-progs
    btrfs subvolume create ${path}                                                                                                                                                 
  teardown: |-                                                                                     
    #!/bin/sh                                                                                     
    path=$1                                                                                        
    rm -rf ${path}                                                           

For now it seems not possible to get btrfs subvolume delete ${path} working. I think the helper image hast to run as privileged or need some capabilities.

I hope that helps.

from local-path-provisioner.

haslersn avatar haslersn commented on May 19, 2024

Is there also an environment variable for the quota in the setup script?

I think btrfs subvolumes still need to be supported directly in local-path-provisioner (or similar project) in order to integrate it with the volume snapshot API, right?

from local-path-provisioner.

nikolaishields avatar nikolaishields commented on May 19, 2024

@dvonessen I can look into the permissions problems,
As I've started to look into this issue it appears that there is a btrfs storage driver for docker. I plan on diving into the volume snapshot api later this week, but in the interim I came across the ember-csi which appears to have btrfs support in some capacity. Not sure if either of these will be of use, but they may provide context to solve the problem.

from local-path-provisioner.

haslersn avatar haslersn commented on May 19, 2024

The btrfs storage driver for docker is about storing images, not volumes.

from local-path-provisioner.

MAFLO321 avatar MAFLO321 commented on May 19, 2024

Any updates on this?
What needs to be done?

from local-path-provisioner.

dylode avatar dylode commented on May 19, 2024

Any update/plans?

from local-path-provisioner.

Related Issues (20)

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.