{"id":23087038,"url":"https://github.com/opennebula/addon-drbdmanage","last_synced_at":"2025-08-16T06:32:07.416Z","repository":{"id":74244455,"uuid":"53938102","full_name":"OpenNebula/addon-drbdmanage","owner":"OpenNebula","description":"DRBD Manage Storage Driver for OpenNebula","archived":false,"fork":false,"pushed_at":"2017-08-09T22:44:03.000Z","size":230,"stargazers_count":8,"open_issues_count":1,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T07:41:27.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenNebula.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-15T11:13:02.000Z","updated_at":"2023-06-15T15:55:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b924abd3-65c0-4ae3-bdb4-9dccbd80d74c","html_url":"https://github.com/OpenNebula/addon-drbdmanage","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/OpenNebula/addon-drbdmanage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNebula%2Faddon-drbdmanage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNebula%2Faddon-drbdmanage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNebula%2Faddon-drbdmanage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNebula%2Faddon-drbdmanage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenNebula","download_url":"https://codeload.github.com/OpenNebula/addon-drbdmanage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNebula%2Faddon-drbdmanage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270677641,"owners_count":24626804,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-16T19:41:32.101Z","updated_at":"2025-08-16T06:32:07.409Z","avatar_url":"https://github.com/OpenNebula.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DRBD Manage Storage Driver\n\n## Description\n\nThis driver allows for highly available storage using DRBD9 + DRBD Manage in\nOpenNebula.\n\n## Development\n\nTo contribute bug patches or new features, you can use the github Pull Request\nmodel. It is assumed that code and documentation are contributed under the\nApache License 2.0.\n\nSupport for this addon can be found at the\n[OpenNebula user forum](https://forum.opennebula.org/c/support) or the\n[DRBD-User](http://lists.linbit.com/listinfo/drbd-user) mailing list.\n\n## Authors\n\nHayley Swimelar [\u003chayley@linbit.com\u003e](hayley@linbit.com)\n\n## Compatibility\n\n* This addon is compatible with OpenNebula versions up to 5.0.2\n* It was tested with versions 4.14 and 5.0.2\n* This version of README.md describes the installation process for ONE 5.0.2 environments\n* This is intended for use as an images datastore for use with an NFS system datastore\n\n## Requirements\n\n* DRBD9 9.0.0+\n* DRBD Manage 0.99.2+\n\n## Features\n\n* quickly attaches images to VMs\n* fast image clones\n* transfers images over the network in diskless mode\n\n## Limitations\n\n* snapshots of images are not available\n* this driver does not support the ssh system datastore\n\n## Installation\n\nFollow these steps on the Front-End node only.\n\n### Clone the Repository and Run the Install Script.\n\nRun the following commands as either oneadmin or root:\n\n```bash\ngit clone git://git.linbit.com/addon-drbdmanage.git \u0026\u0026 cd addon-drbdmanage\nchmod u+x install.sh\n./install.sh\n```\n\n### Upgrading\n\nTo upgrade the driver, simply run the installation script again.\n\n## Configuration\n\n### Configure the Driver in OpenNebula\n\nModify the following sections of `/etc/one/oned.conf`\n\nAdd drbdmanage to the list of drivers in the `TM_MAD` and `DATASTORE_MAD`\nsections:\n\n```\nTM_MAD = [\n  executable = \"one_tm\",\n  arguments = \"-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph,drbdmanage\"\n]\n```\n```\nDATASTORE_MAD = [\n    EXECUTABLE = \"one_datastore\",\n    ARGUMENTS  = \"-t 15 -d dummy,fs,lvm,ceph,dev,iscsi_libvirt,vcenter,drbdmanage -s shared,ssh,ceph,fs_lvm,qcow2\"\n```\n\nAdd new TM_MAD_CONF and DS_MAD_CONF sections:\n\n```\nTM_MAD_CONF = [\n    name = \"drbdmanage\", ln_target = \"NONE\", clone_target = \"SELF\", shared = \"yes\"\n]\n```\n```\nDS_MAD_CONF = [\n    NAME = \"drbdmanage\", REQUIRED_ATTRS = \"BRIDGE_LIST\", PERSISTENT_ONLY = \"NO\",\n    MARKETPLACE_ACTIONS = \"export\"\n]\n```\nAfter making these changes, restart the opennebula service.\n\n### Configuring the Nodes\n\n#### Overview of node Roles\n\nThe Front-End node issues commands to the Storage and Host nodes via DRBD\nManage.\n\nStorage nodes hold disk images of VMs locally.\n\nHost nodes are responsible for running instantiated VMs and typically have the\nstorage for the images they need attached across the network via DRBD Manage\ndiskless mode.\n\nAll nodes must have DRBD9 and DRBD Manage installed. This process is detailed in the\n[User's Guide for DRBD9](http://docs.linbit.com/doc/users-guide-90/ch-admin-drbdmanage/)\n\nIt is possible to have Front-End and Host nodes act as storage nodes in\naddition to their primary role as long as they the meet all the requirements\nfor both roles.\n\nIf you do not intend for the Front-End or Host nodes to be used as storage\nnodes in addition to their primary role, they should be added to the DRBD\nManage cluster as\n[pure controller nodes](http://docs.linbit.com/doc/users-guide-90/s-dm-add-node/#_adding_a_pure_controller_node).\n\n#### Front-End Configuration\n\nThe Front-End node must be a control node with it's own copy of the control\nvolume, this means that you must provide a small, approximately 4Gb, volume\nfor the drbdpool volume group, even if you do not plan to use this node for\nDRBD storage.\n\n#### Host Configuration\n\nThe Host nodes may also be configured as\n[pure client nodes](http://docs.linbit.com/doc/users-guide-90/s-dm-add-node/#_adding_a_pure_client_node)\nwithout a local control volume by adding the `--satellite` option while adding\nthe node the the DRBD Manage cluster. This allows hosts to be added without\npreparing local storage for DRBD on that node.\n\n#### Storage Node Configuration\n\nOnly the Front-End and Host nodes require OpenNebula to be installed, but the\noneadmin user must be able to passwordlessly access storage nodes. Refer to\nthe OpenNebula install guide for your distribution on how to manually\nconfigure the oneadmin user account.\n\nThe Storage nodes must use one of the storage plugins that support snapshots,\nthis means one of the thin LVM plugins or ZFS. The merits of the different\nplugins are discussed in the\n[User's Guide](http://docs.linbit.com/doc/users-guide-90/s-drbdmanage-storage-plugins/#_discussion_of_the_storage_plugins).\n\nIn this example preparation of thinly-provisioned storage using LVM for DRBD\nManage, you must create a volume group and thinLV using LVM on each storage\nnode.\n\nExample of this process using two physical volumes (/dev/sdX and /dev/sdY) and\nthe default names for the volume group and thinpool. Make sure to set the thinLV's\nmetadata volume to a reasonable size, once it becomes full it can be difficult to resize:\n\n```bash\npvcreate /dev/sdX /dev/sdY\nvgcreate drbdpool /dev/sdX /dev/sdY\nlvcreate -l 95%VG --poolmetadatasize 8g -T /dev/drbdpool/drbdthinpool\n```\n\nInstructions on how to configure DRBD Manage to use a storage plugin can be\nfound in the cluster configuration section of the\n[User's Guide](http://docs.linbit.com/doc/users-guide-90/s-drbdmanage-storage-plugins/).\n\n### Additonal Driver Configuration\n\nAdditional configuration for the driver can be found in the\n`datastore/drbdmanage.conf` file in the driver director or in the install path,\nnormally `/var/lib/one/remotes/datastore/drbdmanage/drbdmanage.conf`\n\n### Permissions for Oneadmin\n\nThe oneadmin user must have passwordless sudo access to the `drbdmanage` program on the Front-End node \n\n```bash\noneadmin ALL=(root) NOPASSWD: /usr/bin/drbdmanage\n```\n\nand the `mkfs` command on the Storage nodes\n\n```bash\noneadmin ALL=(root) NOPASSWD: /sbin/mkfs\n```\n\nA policy section for the oneadmin user must also be added in\n`/etc/dbus-1/system.d/org.drbd.drbdmanaged.conf` on the Front-End node. Be\nsure to leave the original policy section intact!\n\n```\n\u003c!DOCTYPE busconfig PUBLIC\n\"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"\n\"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\"\u003e\n\u003cbusconfig\u003e\n\n  \u003cpolicy user=\"0\"\u003e\n    \u003callow own=\"org.drbd.drbdmanaged\"/\u003e\n    \u003callow send_interface=\"org.drbd.drbdmanaged\"/\u003e\n    \u003callow send_destination=\"org.drbd.drbdmanaged\"/\u003e\n  \u003c/policy\u003e\n\n  \u003cpolicy user=\"oneadmin\"\u003e\n    \u003callow own=\"org.drbd.drbdmanaged\"/\u003e\n    \u003callow send_interface=\"org.drbd.drbdmanaged\"/\u003e\n    \u003callow send_destination=\"org.drbd.drbdmanaged\"/\u003e\n  \u003c/policy\u003e\n\n\u003c/busconfig\u003e\n```\n#### Groups\n\nBe sure to consider the groups that oneadmin should be added to in order to\ngain access to the devices and programs needed to access storage and\ninstantiate VMs. For this addon, the oneadmin user must belong to the `disk`\ngroup on all nodes in order to access the DRBD devices where images are held.\n\n```bash\nusermod -a -G disk oneadmin\n```\n\n### Creating a New DRBD Manage Datastore\n\nCreate a datastore configuration file named ds.conf and use the `onedatastore`\ntool to create a new datastore based on that configuration. There are two\nmutually exclusive deployment options: DRBD_REDUNDANCY and\nDRBD_DEPLOYMENT_NODES. For both of these options, BRIDGE_LIST must be a space\nseparated list of all storage nodes in the DRBD Manage cluster.\n\n#### Deploying to a Redundancy Level\n\nThe DRBD_REDUNDANCY option takes a level of redundancy which is a number between\none and the total number of storage nodes. Resources are assigned to storage\nnodes automatically based on the level of redundancy and DRBD Manage's\ndeployment policy. The following example shows a cluster with three storage\nnodes that will deploy new resources to two of the nodes in the BRIDGE_LIST\nbased on the free space available on the storage nodes.\n\n```bash\ncat \u003eds.conf \u003c\u003cEOI\nNAME = drbdmanage_redundant\nDS_MAD = drbdmanage\nTM_MAD = drbdmanage\nDRBD_REDUNDANCY = 2\nBRIDGE_LIST = \"alice bob charlie\"\nEOI\n\nonedatastore create ds.conf\n```\n#### Deploying to a List of Nodes\n\nUsing DRBD_DEPLOYMENT_NODES allows you to select a group of nodes that\nresources will always be assigned to. In the following example, new resources\nwill always be assigned to the nodes alice and charlie. Please note that the\nbridge list still contains all of the storage nodes in the DRBD Manage cluster.\n\n```bash\ncat \u003eds.conf \u003c\u003cEOI\nNAME = drbdmanage_nodes\nDS_MAD = drbdmanage\nTM_MAD = drbdmanage\nDRBD_DEPLOYMENT_NODES = \"alice charlie\"\nBRIDGE_LIST = \"alice bob charlie\"\nEOI\n\nonedatastore create ds.conf\n```\n#### Restricting Where Resources Can Be Deployed\n\nUsing DRBD_DEPLOYMENT_SITE allows you to select a [site](https://www.drbd.org/en/doc/users-guide-90/s-dm-set-config)\ndefined in DRBD MANAGE to restrict deployment of resources. This optional setting\nworks in tandem with either DRBD_DEPLOYMENT_NODES or DRBD_REDUNDANCY. When\ndeploying to a redundancy level, only nodes within the site are considered when\ndeciding which nodes to deploy on. When deploying to a list of nodes, this\noption blocks deployment to nodes listed in DRBD_DEPLOYMENT_NODES that are not\nalso in the site.\n\n```bash\ncat \u003eds.conf \u003c\u003cEOI\nNAME = drbdmanage_nodes\nDS_MAD = drbdmanage\nTM_MAD = drbdmanage\nDRBD_REDUNDANCY = 2\nBRIDGE_LIST = \"alice bob charlie\"\nDRBD_DEPLOYMENT_SITE = \"alpha\"\nEOI\n\nonedatastore create ds.conf\n```\n#### Optional Attributes\n\nThere are three additional attributes that you may add to a datastore's\ntemplate. These can be used to overwrite the options of the same name in the\n`datastore/drbdmanage.conf` file.\n\nDRBD_MIN_COUNT is the minimum number of nodes that a resource must be deployed\non for the deployment of a new resource to be considered a success. This\nshould be an integer between 0 and the total number of storage nodes in your\nDRBD Manage cluster.\n\nDRBD_MIN_RATIO is the ratio of nodes a resource must be deployed on for the\ndeployment of a new resource to be considered a success. This should be a\nnumber between 0.0 and 1.0.\n\nMore information on the above policies can be found in the\n[Policy Plugin](http://docs.linbit.com/doc/users-guide-90/s-drbdmanage-deployment-policy/)\nsection of the\n[DRBD9 User's Guide](http://docs.linbit.com/doc/users-guide-90/drbd-users-guide/).\n\nDRBD_SUPPORT_LIVE_MIGRATION enables the live migration of VMs. Valid options are\n\"yes\" and \"no\" (default). If this option is enabled, you must also configure\nyour DRBD Manage cluster to allow dual primary.  To do this, run the following\ncommand:\n\n```bash\ndrbdmanage net-options --allow-two-primaries yes --common\n```\n\nPlease note that images that were created before live migration support has been\nenabled may not be available to all hosts. These images may be assigned to hosts\nafter the fact using DRBD Manage directly.\n\n#### Validating a Datastore Configuration\n\nIt is recommended to validate your configuration using the validation tool\nprovided with the driver. The tool will report any errors it finds in your\nconfiguration. Simply pass the configuration file you wish to validate as an\nargument.\n\n```bash\n./validate_config.py ds.conf\n```\n## Usage\n\nThis driver will use DRBD Manage to create new images and transfer them to\nhosts. Images are attached to hosts across the network using diskless mode.\nImages are replicated according to the deployment policy set in the datastore\ntemplate.\n\n## License\n\nApache 2.0\n\n##DRBD9 and DRBD Manage User's Guide\n\nIf you have any questions about setting up, tuning, or administrating DRBD9 or\nDRBD Manage, be sure to check out the information provided in the\n[User's Guide](http://docs.linbit.com/doc/users-guide-90/drbd-users-guide/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennebula%2Faddon-drbdmanage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopennebula%2Faddon-drbdmanage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennebula%2Faddon-drbdmanage/lists"}