Skip to content

liblvm is a rubygem to use the linux library liblvm2 in ruby

Notifications You must be signed in to change notification settings

malachheb/liblvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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")

About

liblvm is a rubygem to use the linux library liblvm2 in ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published