<commit_before># DRBDmanage Storage Driver

## Description

This driver allows for highly available storage using DRBD9 + DRBDmanage in OpenNebula.

## Development

## Authors

<NAME>[<<EMAIL>>](<EMAIL>)

## Compatibility

* OpenNebula 4.14
* DRBD9 9.0.0
* DRBDmanage pull from git HEAD

## Features

* quickly attaches images to VMs
* fast image clones
* transfers images over the network in diskless mode

## Limitations

* snapshots of images are not available
* this driver does not support the ssh system datastore

## Installation

Follow all of these steps on the Front-End node only

### Clone the repository:

```bash
git://git.linbit.com/addon-drbdmanage.git
```

### Install the driver components using the install script.

```bash
# cd addon-drbdmanage
# ./install.sh
```

### Upgrading

To upgrade the driver, simply run the installation script again.

## Configuration

### Configure the driver in OpenNebula

Modify the following sections of `/etc/one/oned.conf`

Add drbdmanage to the list of drivers in TM_MAD and DATASTORE_MAD:

```
TM_MAD = [
  executable = "one_tm",
  arguments = "-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph,drbdmanage"
]
```
```
DATASTORE_MAD = [
    executable = "one_datastore",
    arguments  = "-t 15 -d dummy,fs,vmfs,lvm,ceph,drbdmanage"
]
```

Add a new TM_MAD_CONF section:

```
TM_MAD_CONF = [
    name = "drbdmanage", ln_target = "NONE", clone_target = "SELF", shared = "yes"
]
```
### Configuring the Nodes

All nodes must have DRBD9 and DRBDmanage installed. This process is detailed in the
[User's Guide for DRBD9](http://drbd.linbit.com/users-guide-9.0/ch-admin-drbdmanage.html)

Only the Front-End and Host nodes require OpenNebula to be installed, but the oneadmin
user must be able to passwordlessly access access them. Refer to the OpenNebula install
guide for your distribution on how to manually configure this account.

The Front-End node must be a control node with it's own copy of the control volume,
this means that you must provide a small, approximately 1Gb, volume for the drbdpool volume
group, even if you do not plan to use this node for DRBD storage.

The Host nodes may be configured as pure Client nodes without a local control volume.

The Storage nodes must use one of the thinly-provisioned storage plugins. The merits of
the different plugins are dicussed in the [User's Guide](http://drbd.linbit.com/users-guide-9.0/s-drbdmanage-storage-plugins.html).

Instructions on how to configure DRBDmange to use a storage plugin can be found in the
cluster configuration section of the [User's Guide](http://drbd.linbit.com/users-guide-9.0/s-dm-set-config.html).

### Permissions for oneadmin

The oneadmin user must have passwordless sudo access to the `drbdmanage` program on the
Front-End node.

A policy section for the oneadmin user must also be added in
`/etc/dbus-1/system.d/org.drbd.drbdmanaged.conf` on the Front-End node. Be sure to
leave the original policy section intact!

```
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <policy user="0">
    <allow own="org.drbd.drbdmanaged"/>
    <allow send_interface="org.drbd.drbdmanaged"/>
    <allow send_destination="org.drbd.drbdmanaged"/>
  </policy>

  <policy user="oneadmin">
    <allow own="org.drbd.drbdmanaged"/>
    <allow send_interface="org.drbd.drbdmanaged"/>
    <allow send_destination="org.drbd.drbdmanaged"/>
  </policy>

</busconfig><commit_msg>add version info for drbdmanage and driver config section<commit_after># DRBDmanage Storage Driver

## Description

This driver allows for highly available storage using DRBD9 + DRBDmanage in OpenNebula.

## Development

## Authors

<NAME>[<<EMAIL>>](<EMAIL>)

## Compatibility

* OpenNebula 4.14
* DRBD9 9.0.0+
* DRBDmanage 0.92.1+

## Features

* quickly attaches images to VMs
* fast image clones
* transfers images over the network in diskless mode

## Limitations

* snapshots of images are not available
* this driver does not support the ssh system datastore

## Installation

Follow all of these steps on the Front-End node only

### Clone the repository:

```bash
git://git.linbit.com/addon-drbdmanage.git
```

### Install the driver components using the install script.

```bash
# cd addon-drbdmanage
# ./install.sh
```

### Upgrading

To upgrade the driver, simply run the installation script again.

## Configuration

### Configure the driver in OpenNebula

Modify the following sections of `/etc/one/oned.conf`

Add drbdmanage to the list of drivers in TM_MAD and DATASTORE_MAD:

```
TM_MAD = [
  executable = "one_tm",
  arguments = "-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph,drbdmanage"
]
```
```
DATASTORE_MAD = [
    executable = "one_datastore",
    arguments  = "-t 15 -d dummy,fs,vmfs,lvm,ceph,drbdmanage"
]
```

Add a new TM_MAD_CONF section:

```
TM_MAD_CONF = [
    name = "drbdmanage", ln_target = "NONE", clone_target = "SELF", shared = "yes"
]
```

### Configuring the Nodes

All nodes must have DRBD9 and DRBDmanage installed. This process is detailed in the
[User's Guide for DRBD9](http://drbd.linbit.com/users-guide-9.0/ch-admin-drbdmanage.html)

Only the Front-End and Host nodes require OpenNebula to be installed, but the oneadmin
user must be able to passwordlessly access access them. Refer to the OpenNebula install
guide for your distribution on how to manually configure this account.

The Front-End node must be a control node with it's own copy of the control volume,
this means that you must provide a small, approximately 1Gb, volume for the drbdpool volume
group, even if you do not plan to use this node for DRBD storage.

The Host nodes may be configured as pure Client nodes without a local control volume.

The Storage nodes must use one of the thinly-provisioned storage plugins. The merits of
the different plugins are dicussed in the [User's Guide](http://drbd.linbit.com/users-guide-9.0/s-drbdmanage-storage-plugins.html).

Instructions on how to configure DRBDmange to use a storage plugin can be found in the
cluster configuration section of the [User's Guide](http://drbd.linbit.com/users-guide-9.0/s-dm-set-config.html).

### Additonal Driver Configuration

Additional configuration for the driver can be found in the `datastore/drbdmanage.conf`
file in the driver director or in the install path, normally
`/var/lib/one/remotes/datastore/drbdmanage/drbdmanage.conf`

### Permissions for oneadmin

The oneadmin user must have passwordless sudo access to the `drbdmanage` program on the
Front-End node.

A policy section for the oneadmin user must also be added in
`/etc/dbus-1/system.d/org.drbd.drbdmanaged.conf` on the Front-End node. Be sure to
leave the original policy section intact!

```
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <policy user="0">
    <allow own="org.drbd.drbdmanaged"/>
    <allow send_interface="org.drbd.drbdmanaged"/>
    <allow send_destination="org.drbd.drbdmanaged"/>
  </policy>

  <policy user="oneadmin">
    <allow own="org.drbd.drbdmanaged"/>
    <allow send_interface="org.drbd.drbdmanaged"/>
    <allow send_destination="org.drbd.drbdmanaged"/>
  </policy>

</busconfig>
{'fraction_non_alphanumeric': 0.10302781202904507, 'fraction_numerical': 0.008220304151253596, 'mean_word_length': 4.328467153284672, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '436606', 'n_tokens_mistral': 2436, 'n_tokens_neox': 2293, 'n_words': 820}