{"id":18690452,"url":"https://github.com/kvaps/opennebula-addon-3par","last_synced_at":"2025-11-08T08:30:31.250Z","repository":{"id":39797675,"uuid":"407260548","full_name":"kvaps/opennebula-addon-3par","owner":"kvaps","description":"The 3PAR datastore driver enables OpenNebula to use a HPE 3PAR storage system for storing disk images.","archived":false,"fork":false,"pushed_at":"2022-08-31T10:15:03.000Z","size":338,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T02:30:18.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kvaps.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":"2021-09-16T17:44:01.000Z","updated_at":"2021-12-10T14:51:25.000Z","dependencies_parsed_at":"2022-09-21T02:12:59.909Z","dependency_job_id":null,"html_url":"https://github.com/kvaps/opennebula-addon-3par","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Fopennebula-addon-3par","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Fopennebula-addon-3par/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Fopennebula-addon-3par/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Fopennebula-addon-3par/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kvaps","download_url":"https://codeload.github.com/kvaps/opennebula-addon-3par/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550283,"owners_count":19657541,"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":[],"created_at":"2024-11-07T10:47:37.954Z","updated_at":"2025-11-08T08:30:31.206Z","avatar_url":"https://github.com/kvaps.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HPE 3PAR Storage Driver\n\n## Description\n\nThe 3PAR datastore driver enables OpenNebula to use a [HPE 3PAR](https://www.hpe.com/us/en/storage/3par.html) storage system for storing disk images.\n\n## Development\n\nTo contribute bug patches or new features, you can use the GitLab Merge Request model. It is assumed that code and documentation are contributed under the Apache License 2.0.\n\nMore info:\n\n* Issues Tracking: GitHub issues (https://github.com/wedos/opennebula-addon-3par/issues)\n\n## Authors\n\n* Original design and implementation: Kristian Feldsam (feldsam@feldhost.net)\n* Rework and new versions adaptation: Andrei Kvapil (kvapss@gmail.com)\n* Debian adaptation and tests: Egor Pronin (pronin.egor@gmail.com)\n\n## Support\n\n[WEDOS Cloud](https://www.wedos.com/cloud) offers design, implementation, operation and management of a cloud solution based on OpenNebula.\n\n## Compatibility\n\nThis add-on is developed and tested with:\n- OpenNebula 5.12 and 3PAR OS 3.3.1 (MU5)+P126,P132,P135,P140,P141,P146,P150,P151,P155\n\n## Requirements\n\n### OpenNebula Front-end\n\n* Working OpenNebula CLI interface with `oneadmin` account authorized to OpenNebula's core with UID=0\n* Password-less SSH access from the front-end `oneadmin` user to the `node` instances.\n* 3PAR python package `python-3parclient` installed, WSAPI username, password and access to the 3PAR API network\n\n#### Ubuntu\n\n```bash\napt-get install python python3-pip\npip3 install python-3parclient xmltodict\n```\n\n#### Debian\n\n```bash\napt-get install python python-dev python3-dev python3-pip python3-setuptools build-essential libssl-dev libffi-dev\npip3 install --upgrade pip\npip3 install python-3parclient xmltodict\n```\n### OpenNebula Node (or Bridge Node)\n\n* sg3_utils package installed\n* `/etc/sudoers.d/opennebula` - add `ONE_3PAR` cmd alias\n\n```\ncat \u003e /etc/sudoers.d/opennebula-3par \u003c\u003c\\EOT\nCmnd_Alias ONE_3PAR = /sbin/multipath, /usr/sbin/multipathd, /sbin/dmsetup, /usr/sbin/blockdev, /usr/bin/tee /sys/block/*/device/delete, /usr/bin/rescan-scsi-bus.sh, /usr/sbin/iscsiadm, /usr/bin/cat /etc/iscsi/initiatorname.iscsi\noneadmin ALL=(ALL) NOPASSWD: ONE_3PAR\nEOT\n```\n\n#### Ubuntu\n```bash\napt-get install open-iscsi multipath-tools\n```\n\n#### Debian\n```bash\napt-get install open-iscsi multipath-tools lsscsi netcat-openbsd\n```\n\n## Features\nSupport standard OpenNebula datastore operations:\n\n* datastore configuration via CLI\n* all Datastore MAD(DATASTORE_MAD) and Transfer Manager MAD(TM_MAD) functionality\n* SYSTEM datastore\n* TRIM/discard in the VM when virtio-scsi driver is in use (require `DEV_PREFIX=sd` and `DISCARD=unmap`)\n* disk images can be full provisioned, thin provisioned, thin deduplicated, thin compressed or thin deduplicated and compressed RAW block devices\n* support different 3PAR CPGs as separate datastores\n* support for 3PAR Priority Optimization Policy (QoS)\n* live VM snapshots\n* live VM migrations\n* Volatile disks support (need patched KVM driver `attach_disk` script)\n* Configuration of API endpoint and auth in datastore template\n* Automatic hosts registration and configuration\n* Option to reduce iSCSI endpoints usage\n* Suspend/unsuspend to 3par volumes\n* Multiple 3PARs systems support\n\n## Limitations\n\n1. FibreChannel is not currently supported.\n1. Tested only with KVM hypervisor\n1. When SYSTEM datastore is in use the reported free/used/total space is the space on 3PAR CPG. (On the host filesystem there are mostly symlinks and small files that do not require much disk space)\n1. Tested/confirmed working on Ubuntu 20.04 (Frontend) and Ubuntu 20.04 (Nodes) / Debian 10 (Frontend and Nodes).\n\n## ToDo\n\n1. QOS Priority per VM\n\n## Installation\n\nThe installation instructions are for OpenNebula 5.6+.\n\n### Get the addon from github\n```bash\ncd ~\ngit clone https://github.com/kvaps/opennebula-addon-3par.git\n```\n\n### Installation\n\nThe following commands are related to latest OpenNebula version.\n\n#### oned related pieces\n\n* Copy 3PAR's DATASTORE_MAD driver files\n```bash\ncp -a ~/opennebula-addon-3par/datastore/3par /var/lib/one/remotes/datastore/\n\n# copy config\ncp -a ~/opennebula-addon-3par/etc/datastore/3par /var/lib/one/remotes/etc/datastore/\n\n# fix ownership\nchown -R oneadmin.oneadmin /var/lib/one/remotes/datastore/3par /var/lib/one/remotes/etc/datastore/3par\n\n```\n\n* Copy 3PAR's TM_MAD driver files\n```bash\ncp -a ~/opennebula-addon-3par/tm/3par /var/lib/one/remotes/tm/\n\n# fix ownership\nchown -R oneadmin.oneadmin /var/lib/one/remotes/tm/3par\n```\n\n* Copy 3PAR's VM_MAD driver files\n```bash\ncp -a ~/opennebula-addon-3par/vmm/kvm /var/lib/one/remotes/vmm/\n\n# fix ownership\nchown -R oneadmin.oneadmin /var/lib/one/remotes/vmm/kvm\n```\n\n### Addon configuration\nThe global configuration of one-addon-3par is in `/var/lib/one/remotes/etc/datastore/3par/3par.conf` file.\n\n\n* Edit `/etc/one/oned.conf` and add `3par` to the `TM_MAD` arguments\n```\nTM_MAD = [\n    executable = \"one_tm\",\n    arguments = \"-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph,dev,3par\"\n]\n```\n\n* Edit `/etc/one/oned.conf` and add `3par` to the `DATASTORE_MAD` arguments\n\n```\nDATASTORE_MAD = [\n    executable = \"one_datastore\",\n    arguments  = \"-t 15 -d dummy,fs,vmfs,lvm,ceph,dev,3par  -s shared,ssh,ceph,fs_lvm,qcow2,3par\"\n]\n```\n\n* Edit `/etc/one/oned.conf` and append `TM_MAD_CONF` definition for 3par\n```\nTM_MAD_CONF = [\n  NAME = \"3par\", LN_TARGET = \"NONE\", CLONE_TARGET = \"SYSTEM\", SHARED = \"yes\", DRIVER = \"raw\", ALLOW_ORPHANS=\"yes\"\n]\n```\n\n* Edit `/etc/one/oned.conf` and append DS_MAD_CONF definition for 3par\n```\nDS_MAD_CONF = [\n    NAME = \"3par\",\n    REQUIRED_ATTRS = \"CPG,BRIDGE_LIST\",\n    PERSISTENT_ONLY = \"NO\",\n    MARKETPLACE_ACTIONS = \"\"\n]\n```\n\n* Edit `/etc/one/oned.conf` and update VM_MAD arguments for 3par\n\n```\nVM_MAD = [\n      ARGUMENTS = \"-t 15 -r 0 kvm -l save=save-3par,restore=restore-3par,snapshotcreate=snapshot_create-3par,snapshotdelete=snapshot_delete-3par,snapshotrevert=snapshot_revert-3par\",\n      ...\n```\n\n* Enable live disk snapshots support for 3PAR by adding `kvm-3par` to `LIVE_DISK_SNAPSHOTS` variable in `/etc/one/vmm_exec/vmm_execrc`\n```\nLIVE_DISK_SNAPSHOTS=\"kvm-qcow2 kvm-ceph kvm-3par\"\n```\n\n### Post-install\n* Restart `opennebula` service\n```bash\nsystemctl restart opennebula\n```\n* As oneadmin user (re)sync the remote scripts\n```bash\nsu - oneadmin -c 'onehost sync --force'\n```\n\n### Volatile disks support info\n\nTo make volatile disks working, we need to patch vmm driver action `attach_disk`. Patched file is available in `vmm/kvm`\ndirectory and have to be installed to `/var/lib/one/remotes/vmm/kvm/`.\n\n### Configuring the System Datastore\n\nThis addon enables full support of transfer manager (TM_MAD) backend of type 3par for the system datastore.  \nThe system datastore will hold only the symbolic links to the 3PAR block devices and context isos, so it will not take much space. See more details on the [Open Cloud Storage Setup](https://docs.opennebula.org/5.8/deployment/open_cloud_storage_setup/).\n\n### Configuring the Datastore\n\nSome configuration attributes must be set to enable a datastore as 3PAR enabled one:\n\n* **DS_MAD**: [mandatory] The DS driver for the datastore. String, use value `3par`\n* **TM_MAD**: [mandatory] Transfer driver for the datastore. String, use value `3par`\n* **DISK_TYPE**: [mandatory for IMAGE datastores] Type for the VM disks using images from this datastore. String, use value `block`\n* **CPG**: [mandatory] Name of Common Provisioning Group created on 3PAR. String\n* **THIN**: Use thin volumes `tpvv` or no. By default enabled. `YES|NO`\n* **DEDUP**: Use deduplicated thin volumes `tdvv` or no. By default disabled. `YES|NO`\n* **COMPRESSION**: Use compressed thin volumes or no. By default disabled. `YES|NO`\n* **NAMING_TYPE**: Part of volume name defining environment. By default `dev`. String (1)\n* **BRIDGE_LIST**: Nodes to use for image datastore operations. String (2)\n* **QOS_ENABLE**: Enable QoS. `YES|NO` (3)\n* **QOS_PRIORITY**: QoS Priority. `HIGH|NORMAL|LOW` (4)\n* **QOS_MAX\\_IOPS**: QoS Max IOPS. Int (5)\n* **QOS_MIN\\_IOPS**: QoS Min IOPS. Int (6)\n* **QOS_MAX\\_BW**: QoS Man bandwidth in kB/s. Int (7)\n* **QOS_MIN\\_BW**: QoS Min bandwidth in kB/s. Int (8)\n* **QOS_LATENCY**: QoS Latency goal in ms. Int (9)\n\n1. Volume names are created according to best practices naming conventions.\n   `\u003cTYPE\u003e` part - can be prd for production servers, dev for development servers, tst for test servers, etc.\n   Volume name will be `\u003cTYPE\u003e.one.\u003cIMAGE_ID\u003e.vv` for ex. `dev.one.1.vv` or `tst.one.3.vv`\n   \n2. Quoted, space separated list of server hostnames which are Hosts on the 3PAR System.\n\n3. QoS Rules - Applied per VM, so if VM have multiple disks, them QoS policy applies to all VM disks\n   - minimum goals and maximum limits are shared.\n   Persistent disks use `QOS_*` attributes from IMAGE datastore.\n   Non-Persistent disks use `QOS_*` attributes from target SYSTEM datastore.\n\n4. QoS Priority - Determines the sequence for throttling policies to meet latency goals.\n   High priority should be used for critical applications, lower priority should be used for less critical applications.\n   The priority will be ignored if the system does not have policies with a latency goal and minimum goal.\n\n5. The maximum IOPS permitted for the virtual volumes associated with the policy.\n   The IOPS maximum limit must be between 0 and 2 147 483 647 IO/s.\n\n6. If IOPS fall below this minimum goal, then IOPS will not be throttled (reduced) for the virtual volumes\n   associated with the policy. If a minimum goal is set for IOPS, then a maximum limit must also be set for IOPS.\n   The minimum goal will be ignored if the system does not have policies with a latency goal set.\n   The IOPS minimum goal must be between 0 and 2 147 483 647 IO/s.\n   Zero means disabled.\n\n7. The maximum bandwidth permitted for the virtual volumes associated with the policy. The maximum limit does not have\n   dependencies on the other optimization settings.\n   The bandwidth maximum limit must be between 0 and 9 007 199 254 740 991 KB/s.\n\n8. If bandwidth falls below this minimum goal, then bandwidth will not be throttled (reduced) for the virtual volumes\n   associated with the policy. If a minimum goal is set for bandwidth, then a maximum limit must also be set\n   for bandwidth. The minimum goal will be ignored if the system does not have policies with a latency goal set.\n   The bandwidth minimum goal must be between 0 and 9 007 199 254 740 991 KB/s.\n   Zero means disabled.\n\n9. Service time that the system will attempt to achieve for the virtual volumes associated with the policy.\n   A latency goal requires the system to have other policies with a minimum goal specified so that the latency goal\n   algorithm knows which policies to throttle. The sequence in which these will be throttled is set\n   by priority (low priority is throttled first).\n   The latency goal must be between 0,50 and 10 000,00 ms.\n   Zero means disabled.\n\nThe following example illustrates the creation of a 3PAR datastore.\nThe datastore will use hosts `tst.lin.fedora1.host`, `tst.lin.fedora2.host` and `tst.lin.fedora3.host` for importing and creating images.\n\n#### Image datastore through *onedatastore*\n\n```bash\n# create datastore configuration file\n$ cat \u003e/tmp/imageds.tmpl \u003c\u003cEOF\nNAME = \"3PAR IMAGE\"\nDS_MAD = \"3par\"\nTM_MAD = \"3par\"\nTYPE = \"IMAGE_DS\"\nDISK_TYPE = \"block\"\nCPG = \"SSD_r6\"\nNAMING_TYPE = \"tst\"\nBRIDGE_LIST = \"tst.lin.fedora1.host tst.lin.fedora2.host tst.lin.fedora3.host\"\nQOS_ENABLE = \"YES\"\nEOF\n\n# Create datastore\n$ onedatastore create /tmp/imageds.tmpl\n\n# Verify datastore is created\n$ onedatastore list\n\n  ID NAME                SIZE AVAIL CLUSTER      IMAGES TYPE DS       TM\n   0 system             98.3G 93%   -                 0 sys  -        ssh\n   1 default            98.3G 93%   -                 0 img  fs       ssh\n   2 files              98.3G 93%   -                 0 fil  fs       ssh\n 100 3PAR IMAGE         4.5T  99%   -                 0 img  3par     3par\n```\n\n#### System datastore through *onedatastore*\n\n```bash\n# create datastore configuration file\n$ cat \u003e/tmp/ds.conf \u003c\u003cEOF\nNAME = \"3PAR SYSTEM\"\nTM_MAD = \"3par\"\nTYPE = \"SYSTEM_DS\"\nCPG = \"SSD_r6\"\nNAMING_TYPE = \"tst\"\nQOS_ENABLE = \"YES\"\nEOF\n\n# Create datastore\n$ onedatastore create /tmp/ds.conf\n\n# Verify datastore is created\n$ onedatastore list\n\n  ID NAME                SIZE AVAIL CLUSTER      IMAGES TYPE DS       TM\n   0 system             98.3G 93%   -                 0 sys  -        shared\n   1 default            98.3G 93%   -                 0 img  fs       shared\n   2 files              98.3G 93%   -                 0 fil  fs       ssh\n 100 3PAR IMAGE         4.5T  99%   -                 0 img  3par     3par\n 101 3PAR SYSTEM        4.5T  99%   -                 0 sys  -        3par\n ```\n\n## 3PAR best practices guide incl. naming conventions\n\nPlease follow the [best practices guide](https://h20195.www2.hpe.com/v2/GetPDF.aspx/4AA4-4524ENW.pdf).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvaps%2Fopennebula-addon-3par","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkvaps%2Fopennebula-addon-3par","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvaps%2Fopennebula-addon-3par/lists"}