Git Product home page Git Product logo

linstor-csi-migrator's Introduction

linstor-csi-migrator

Convert old LINSTOR flexVolumes to CSI

How it works

Script takes PersistentVolumes with Linstor flexVolume driver or old-style CSI metadata, which stopped working after last update of linstor csi-plugin and generates commands for update their metadata to use with new csi-plugin.

Preparation

  • Make sure that you have jq and kubectl installed in your system.

  • Download the script:

    curl -LO https://github.com/kvaps/linstor-csi-migrator/raw/master/linstor-csi-migrator.sh
    chmod +x linstor-csi-migrator.sh
    

Usage

  • Make sure that you have access to list PVs in your cluster.

  • Generate commands:

    # FlexVolumes:
    ./linstor-csi-migrator.sh flexvolume > flexvolume_commands.sh
    # Old format CSIs:
    ./linstor-csi-migrator.sh csi1 > csi1_commands.sh
    # CSIs with old driver name:
    ./linstor-csi-migrator.sh csi2 > csi2_commands.sh
    
  • Create backup of your Persistent Volumes:

    kubectl get pv -o json > pv.json
    
  • Now you can open *_commands.sh and apply the changes.

Additional steps

  • To avoid problems with pods termination, before upgrade flexvolume volumes, please stop all the workload.

  • During csi2 upgrade, you should also change drivername for running pods, on every node run:

    sed -i 's/io.drbd.linstor-csi/linstor.csi.linbit.com/g' `find /var/lib/kubelet/pods/ -mindepth 5 -maxdepth 5 -name vol_data.json`
    

linstor-csi-migrator's People

Contributors

kvaps avatar

Watchers

 avatar  avatar

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.