{"id":16836374,"url":"https://github.com/bensallen/rbd","last_synced_at":"2025-07-15T13:23:02.408Z","repository":{"id":54315800,"uuid":"252888904","full_name":"bensallen/rbd","owner":"bensallen","description":"Go Library and CLI for Mapping/Unmapping Images with the Ceph Linux RBD client","archived":false,"fork":false,"pushed_at":"2021-02-24T15:50:49.000Z","size":1296,"stargazers_count":3,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T05:11:49.104Z","etag":null,"topics":["boot","ceph","cmdline","golang","rbd"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bensallen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-04T02:18:45.000Z","updated_at":"2024-04-30T03:14:14.000Z","dependencies_parsed_at":"2022-08-13T11:50:33.475Z","dependency_job_id":null,"html_url":"https://github.com/bensallen/rbd","commit_stats":null,"previous_names":["bensallen/rbdmap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bensallen/rbd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Frbd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Frbd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Frbd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Frbd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bensallen","download_url":"https://codeload.github.com/bensallen/rbd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Frbd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265437658,"owners_count":23765125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boot","ceph","cmdline","golang","rbd"],"created_at":"2024-10-13T12:13:16.869Z","updated_at":"2025-07-15T13:23:02.388Z","avatar_url":"https://github.com/bensallen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go RBD CLI\n\nGolang based Ceph RBD image map, unmap, boot, and device list utility and library. No external dependencies outside of the Kernel's RBD sysfs interface.\n\n```\n$ rbd -h\nrbd - Ceph RBD CLI\n\nUsage:\n  rbd [map|unmap|device|boot]\n\nSubcommands:\n  map      Map RBD Image\n  unmap    Unmap RBD Image\n  boot     Boot via RBD Image\n  device   Manage RBD Devices\n\nFlags:\n  -h, --help      Diplay help.\n  -n, --noop      No-op (don't actually perform action).\n  -v, --verbose   Enable additional output.\n  -V, --version   Displays the program version string.\n```\n\n## map\n\n```\n$ rbd map -h\nmap - Map RBD Image\n\nUsage:\n  map\n\nFlags:\n      --id string          Specifies the username (without the 'client.' prefix)\n  -i, --image string       Image to map\n  -m, --monitor strings    Connect to one or more monitor addresses (192.168.0.1[:6789]). Multiple address are specified comma separated.\n      --namespace string   Use a pre-defined image namespace within a pool\n  -p, --pool string        Interact with the given pool.\n      --read-only          Map the image read-only\n      --secret string      Specifies the user authentication secret\n      --snap string        Specifies a snapshot name\n```\n\n## unmap\n\n```\n$ rbd unmap -h\nunmap - Unmap RBD Image\n\nUsage:\n  unmap\n\nFlags:\n  -d, --devid int   RBD Device Index (default 0)\n  -f, --force       Optional force argument will wait for running requests and then unmap the image\n```\n\n## Boot\n\nTooling for booting from one or more RBD images.\n\n1. Parses /proc/cmdline for RBD settings\n2. Maps and mounts the image.\n3. Mount's an overlayfs over the mountpoint if configured.\n4. If argument is passed via the CLI, attempts to switch_root (typically requires being PID 1).\n\n- See https://github.com/bensallen/rbd/blob/master/pkg/cmdline/cmdline.go#L50 for cmdline format (limited to JSON form currently)\n- Currently requires passing the cephx secret via cmdline, which is not ideal.\n\n```\n$ rbd boot -h\nboot - Boot via RBD image\n\nUsage:\n  boot\n\nFlags:\n  -c, --cmdline string       Path to kernel cmdline (default: /proc/cmdline) (default \"/proc/cmdline\")\n  -m, --mkdir                Create the destination mount path if it doesn't exist\n  -s, --switch-root string   Attempt to switch_root to root filesystem and execute provided init path\n```\n\n## Device \n\n```\n$ rbd device -h\ndevice - Manage RBD Devices\n\nUsage:\n  device [list|map|unmap]\n\nSubcommands:\n  list     List connected devices\n  map      Map RBD Image\n  unmap    Unmap RBD Image\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensallen%2Frbd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbensallen%2Frbd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensallen%2Frbd/lists"}