liblvm is a rubygem to use the linux library liblvm2 in ruby
C Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ext
lib
README.md
example.rb
liblvm-1.0.0.gem
liblvm.gemspec

README.md

Liblvm

liblvm is a rubygem provide functions to manipulate the linux LVM objects.

  • Create Lvm
  • Remove LVM
  • Get LVM list
  • Verify if a LVM exist
  • Get vg extent size
  • Get vg free size
  • Get vg extent count

Requirement

  • libllvm2.7 a linux library

Getting started

  • Install the liblvm rubygem
gem  install liblvm
  • Initialize the lvm Object Before you should create your VG. The constructor take the VG name as argument
lvm = Linuxlvm.new('TEST_VG')
  • Get the lvm version
lvm.get_lvm_version
  • Get the VG free size (KB)
lvm.vg_get_free_size
  • Get VG extent count
lvm.vg_get_extent_count
  • Get VG extent size
lvm.vg_get_extent_size
  • Get vg free extent count
lvm.vg_get_free_extent_count
  • Create a LV object the lv_create function take two argument the "lv name" and "lv size"
lvm.lv_create("test", lvm.vg_get_extent_size * 10)
  • Verify if a lv exist
lvm.lv_exist("test")
  • Get the lvs list
lvm.get_lv_list
  • Remove a Lv object
lvm.lv_remove("test")