Coder Social home page Coder Social logo

rbd's Introduction

Go RBD CLI

Golang based Ceph RBD image map, unmap, boot, and device list utility and library. No external dependencies outside of the Kernel's RBD sysfs interface.

$ rbd -h
rbd - Ceph RBD CLI

Usage:
  rbd [map|unmap|device|boot]

Subcommands:
  map      Map RBD Image
  unmap    Unmap RBD Image
  boot     Boot via RBD Image
  device   Manage RBD Devices

Flags:
  -h, --help      Diplay help.
  -n, --noop      No-op (don't actually perform action).
  -v, --verbose   Enable additional output.
  -V, --version   Displays the program version string.

map

$ rbd map -h
map - Map RBD Image

Usage:
  map

Flags:
      --id string          Specifies the username (without the 'client.' prefix)
  -i, --image string       Image to map
  -m, --monitor strings    Connect to one or more monitor addresses (192.168.0.1[:6789]). Multiple address are specified comma separated.
      --namespace string   Use a pre-defined image namespace within a pool
  -p, --pool string        Interact with the given pool.
      --read-only          Map the image read-only
      --secret string      Specifies the user authentication secret
      --snap string        Specifies a snapshot name

unmap

$ rbd unmap -h
unmap - Unmap RBD Image

Usage:
  unmap

Flags:
  -d, --devid int   RBD Device Index (default 0)
  -f, --force       Optional force argument will wait for running requests and then unmap the image

Boot

Tooling for booting from one or more RBD images.

  1. Parses /proc/cmdline for RBD settings
  2. Maps and mounts the image.
  3. Mount's an overlayfs over the mountpoint if configured.
  4. If argument is passed via the CLI, attempts to switch_root (typically requires being PID 1).
$ rbd boot -h
boot - Boot via RBD image

Usage:
  boot

Flags:
  -c, --cmdline string       Path to kernel cmdline (default: /proc/cmdline) (default "/proc/cmdline")
  -m, --mkdir                Create the destination mount path if it doesn't exist
  -s, --switch-root string   Attempt to switch_root to root filesystem and execute provided init path

Device

$ rbd device -h
device - Manage RBD Devices

Usage:
  device [list|map|unmap]

Subcommands:
  list     List connected devices
  map      Map RBD Image
  unmap    Unmap RBD Image

rbd's People

Contributors

bensallen avatar jlowellwofford avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jlowellwofford

rbd's Issues

Implement Plain Text Cmdline Arguments

Support the following plaintext arguments for rbdboot:

// rbd.<name>... where <name> is an arbitrary string identifer for the mount
// rbd.root.image=test-image1
// rbd.root.image.pool=rbd
// rbd.root.image.mons=192.168.0.1,192.168.0.2,192.168.0.3:6789
// rbd.root.image.user=admin
// rbd.root.image.secret=<key>
//
// Optional
// rbd.root.image.snap=snap1
// rbd.root.image.opts=rw,share
// rbd.root.part=1
// rbd.root.mntopts=defaults
// rbd.root.fstype=ext4
// rbd.root.overlay=false
// rbd.root.path=/newroot

Note, currently only the JSON formatted arguments are implemented.

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.