{"id":15022579,"url":"https://github.com/puppetlabs/puppetlabs-lvm","last_synced_at":"2025-05-14T07:08:13.801Z","repository":{"id":839158,"uuid":"910761","full_name":"puppetlabs/puppetlabs-lvm","owner":"puppetlabs","description":"Puppet Module to manage LVM","archived":false,"fork":false,"pushed_at":"2025-04-23T12:16:56.000Z","size":811,"stargazers_count":122,"open_issues_count":38,"forks_count":276,"subscribers_count":181,"default_branch":"main","last_synced_at":"2025-04-23T13:44:20.459Z","etag":null,"topics":["module","supported","trusted-contributor"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/puppetlabs/lvm","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-09-14T19:32:13.000Z","updated_at":"2025-04-23T12:17:00.000Z","dependencies_parsed_at":"2023-07-06T14:46:23.301Z","dependency_job_id":"de8faffb-b49b-4408-a8d4-67f3a8b19ba4","html_url":"https://github.com/puppetlabs/puppetlabs-lvm","commit_stats":{"total_commits":414,"total_committers":129,"mean_commits":"3.2093023255813953","dds":0.8260869565217391,"last_synced_commit":"799e0235f1ebc4fc5b974cf90f0ae00f6f31677c"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-lvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-lvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-lvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-lvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-lvm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092656,"owners_count":22013290,"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":["module","supported","trusted-contributor"],"created_at":"2024-09-24T19:58:08.435Z","updated_at":"2025-05-14T07:08:13.783Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Puppet LVM Module\n\nProvides Logical Volume Manager (LVM) types and providers for Puppet.\n\n## Usage Examples\n\nThis module provides four resource types (and associated providers):\n`volume_group`, `logical_volume`, `physical_volume`, and `filesystem`.\n\nThe basic dependency graph needed to define a working logical volume\nlooks something like:\n\n    filesystem -\u003e logical_volume -\u003e volume_group -\u003e physical_volume(s)\n\nHere's a simple working example:\n\n```puppet\nphysical_volume { '/dev/hdc':\n  ensure =\u003e present,\n}\n\nvolume_group { 'myvg':\n  ensure           =\u003e present,\n  physical_volumes =\u003e '/dev/hdc',\n}\n\nlogical_volume { 'mylv':\n  ensure       =\u003e present,\n  volume_group =\u003e 'myvg',\n  size         =\u003e '20G',\n}\n\nfilesystem { '/dev/myvg/mylv':\n  ensure  =\u003e present,\n  fs_type =\u003e 'ext3',\n  options =\u003e '-b 4096 -E stride=32,stripe-width=64',\n}\n```\n\nThis simple 1 physical volume, 1 volume group, 1 logical volume case\nis provided as a simple `volume` definition, as well.  The above could\nbe shortened to be:\n\n```puppet\nlvm::volume { 'mylv':\n  ensure =\u003e present,\n  vg     =\u003e 'myvg',\n  pv     =\u003e '/dev/hdc',\n  fstype =\u003e 'ext3',\n  size   =\u003e '20G',\n}\n```\n\nYou can also describe your Volume Group like this:\n\n```puppet\nclass { 'lvm':\n  volume_groups    =\u003e {\n    'myvg' =\u003e {\n      physical_volumes =\u003e [ '/dev/sda2', '/dev/sda3', ],\n      logical_volumes  =\u003e {\n        'opt'    =\u003e {'size' =\u003e '20G'},\n        'tmp'    =\u003e {'size' =\u003e '1G' },\n        'usr'    =\u003e {'size' =\u003e '3G' },\n        'var'    =\u003e {'size' =\u003e '15G'},\n        'home'   =\u003e {'size' =\u003e '5G' },\n        'backup' =\u003e {\n          'size'              =\u003e '5G',\n          'mountpath'         =\u003e '/var/backups',\n          'mountpath_require' =\u003e true,\n        },\n      },\n    },\n  },\n}\n```\n\nThis could be really convenient when used with hiera:\n\n```puppet\ninclude lvm\n```\n\nand\n\n```yaml\n---\nlvm::volume_groups:\n  myvg:\n    physical_volumes:\n      - /dev/sda2\n      - /dev/sda3\n    logical_volumes:\n      opt:\n        size: 20G\n      tmp:\n        size: 1G\n      usr:\n        size: 3G\n      var:\n        size: 15G\n      home:\n        size: 5G\n      backup:\n        size: 5G\n        mountpath: /var/backups\n        mountpath_require: true\n```\n\nor to just build the VG if it does not exist\n\n```yaml\n---\nlvm::volume_groups:\n  myvg:\n    createonly: true\n    physical_volumes:\n      /dev/sda2:\n        unless_vg: 'myvg'\n      /dev/sda3:\n        unless_vg: 'myvg'\n    logical_volumes:\n      opt:\n        size: 20G\n      tmp:\n        size: 1G\n      usr:\n        size: 3G\n      var:\n        size: 15G\n      home:\n        size: 5G\n      backup:\n        size: 5G\n        mountpath: /var/backups\n        mountpath_require: true\n```\n\nExcept that in the latter case you cannot specify create options.\nIf you want to omit the file system type, but still specify the size of the\nlogical volume, i.e. in the case if you are planning on using this logical\nvolume as a swap partition or a block device for a virtual machine image, you\nneed to use a hash to pass the parameters to the definition.\n\nIf you need a more complex configuration, you'll need to build the\nresources out yourself.\n\n## Optional Values\n\nThe `unless_vg` (physical_volume) and `createonly` (volume_group) will check\nto see if \"myvg\" exists.  If \"myvg\" does exist then they will not modify\nthe physical volume or volume_group.  This is useful if your environment\nis built with certain disks but they change while the server grows, shrinks\nor moves.\n\nExample:\n\n```puppet\nphysical_volume { \"/dev/hdc\":\n  ensure    =\u003e present,\n  unless_vg =\u003e \"myvg\",\n}\n\nvolume_group { \"myvg\":\n  ensure           =\u003e present,\n  physical_volumes =\u003e \"/dev/hdc\",\n  createonly       =\u003e true,\n}\n```\n\n## Tasks\n\nSee [tasks reference](REFERENCE.md#tasks)\n\n## Plans\n\nSee [plans reference](REFERENCE.md#plans)\n\n## Limitations\n\n### Namespacing\n\nDue to puppet's lack of composite keys for resources, you currently\ncannot define two `logical_volume` resources with the same name but\na different `volume_group`.\n\n### Removing Physical Volumes\n\nYou should not remove a `physical_volume` from a `volume_group`\nwithout ensuring the physical volume is no longer in use by a logical\nvolume (and possibly doing a data migration with the `pvmove` executable).\n\nRemoving a `physical_volume` from a `volume_group` resource will cause the\n`pvreduce` to be executed -- no attempt is made to ensure `pvreduce`\ndoes not attempt to remove a physical volume in-use.\n\n### Resizing Logical Volumes\n\nLogical volume size can be extended, but not reduced -- this is for\nsafety, as manual intervention is probably required for data\nmigration, etc.\n\n## Deprecation Notice\n\nSome facts reported by this module are being deprecated in favor of upcoming structured facts.  The following facts are being deprecated:\n\n* `lvm_vg_*`\n* `lvm_vg_*_pvs`\n* `lvm_pv_*`\n\n## License\n\nThis codebase is licensed under the GPL 2.0, however due to the nature of the\ncodebase the open source dependencies may also use a combination of\n[AGPL](https://opensource.org/license/agpl-v3/),\n[BSD-2](https://opensource.org/license/bsd-2-clause/),\n[BSD-3](https://opensource.org/license/bsd-3-clause/),\n[GPL2.0](https://opensource.org/license/gpl-2-0/),\n[LGPL](https://opensource.org/license/lgpl-3-0/),\n[MIT](https://opensource.org/license/mit/) and\n[MPL](https://opensource.org/license/mpl-2-0/).\n\n# Contributors\n\nBruce Williams \u003cbruce@codefluency.com\u003e\n\nDaniel Kerwin \u003cgithub@reductivelabs.com\u003e\n\nLuke Kanies \u003cluke@reductivelabs.com\u003e\n\nMatthaus Litteken \u003cmatthaus@puppetlabs.com\u003e\n\nMichael Stahnke \u003cstahnma@puppetlabs.com\u003e\n\nMikael Fridh \u003cfrimik@gmail.com\u003e\n\nTim Hawes \u003cgithub@reductivelabs.com\u003e\n\nYury V. Zaytsev \u003cyury@shurup.com\u003e\n\ncsschwe \u003ccsschwe@gmail.com\u003e\n\nwindowsrefund \u003cwindowsrefund@gmail.com\u003e\n\nAdam Gibbins \u003cgithub@adamgibbins.com\u003e\n\nSteffen Zieger \u003cgithub@saz.sh\u003e\n\nJason A. Smith \u003csmithj4@bnl.gov\u003e\n\nMathieu Bornoz \u003cmathieu.bornoz@camptocamp.com\u003e\n\nCédric Jeanneret \u003ccedric.jeanneret@camptocamp.com\u003e\n\nRaphaël Pinson \u003craphael.pinson@camptocamp.com\u003e\n\nGarrett Honeycutt \u003ccode@garretthoneycutt.com\u003e\n\n[More Contributors](https://github.com/puppetlabs/puppetlabs-lvm/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-lvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-lvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-lvm/lists"}