Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

Sous-Chefs-Boneyard/chef-ruby-lvm-attrib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

394 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chef-ruby-lvm-attrib

This Gem is Deprecated and not needed anymore in the latest version of the lvm cookbook. Please update to use the cookbook lvm v7.x+.

Gem Version

This is a list of attributes for lvm objects. They are generated from the source code and broken down by version. See adding attributes below to contribute.

At their core these files exist to determine which arguments to pass lvs/vgs/pvs and the subsequent type conversions.

Currently this is split from the main ruby-lvm gem since these files require updating to follow LVM2 releases.

Usage

  require 'lvm/attributes'

  attributes = Attributes.load("2.0.36", "vgs.yaml")

Installation

sudo gem install chef-ruby-lvm-attrib

Updating for new LVM releases

To add attributes, use update-lvm.sh. Find tags in the LVM2 Repository.

  • Fork this repository
  • git clone your-forked-repo
  • cd your-forked-repo
  • ./update-lvm.sh v2_02_155

Helpful options:

  • ./update-lvm.sh -a to process all missing versions
  • ./update-lvm.sh v2_03_36 --no-branch to generate files only (no branch/commit created)

The script will add lib/lvm/attributes/LVM_VERSION where LVM_VERSION being something like 2.02.86(2) or 2.02.98(2).

By default, if the script succeeds it will create a branch and commit Added LVM_VERSION attributes.

The script now syncs the lvm2 submodule URL to HTTPS before cloning/fetching to avoid git:// transport issues.

In case of error, see missing attribute type note below.

If all is well, publish the changes and make Pull Request from GitHub web:

  • git push origin mybranch
  • Submit PR to this repository.

Missing Attribute Type

If you get an error like the below:

Oops, missing type conversion data of column 'discards' use by 'SEGS' which says its going to return a 'discards'
Figure out the missing type and rerun.
  • Look in path/to/lvm-source/lib/report/columns.h for the column name in the 7th field.
  • If the 3rd field is NUM, type will be Integer. If 3rd field is STR, type will be String.
  • Add the information to bin/generate_field_data in the TYPE_CONVERSION_MAP and try running again

About

A fork of https://github.com/gregsymons/di-ruby-lvm for use with the chef LVM cookbook

Resources

License

Code of conduct

Contributing

Stars

5 stars

Watchers

25 watching

Forks

Packages

 
 
 

Contributors