Class: LVM::LogicalVolumes
- Inherits:
-
Object
- Object
- LVM::LogicalVolumes
- Defined in:
- lib/lvm/logical_volumes.rb
Instance Method Summary collapse
-
#each ⇒ Object
Gather all information about logical volumes.
-
#initialize(options) ⇒ LogicalVolumes
constructor
A new instance of LogicalVolumes.
- #list ⇒ Object
Methods included from Volumes
Constructor Details
#initialize(options) ⇒ LogicalVolumes
Returns a new instance of LogicalVolumes.
12 13 14 15 |
# File 'lib/lvm/logical_volumes.rb', line 12 def initialize() @lvs = LVS.new() @lvsseg = LVSSEG.new() end |
Instance Method Details
#each ⇒ Object
Gather all information about logical volumes.
See VolumeGroups.each for a better representation of LVM data.
20 21 22 23 24 25 26 27 28 |
# File 'lib/lvm/logical_volumes.rb', line 20 def each lvs = @lvs.list lvsseg = @lvsseg.list lvs.each do |lv| lv.segments = lvsseg.select { |seg| seg.lv_uuid == lv.uuid } yield lv end end |
#list ⇒ Object
30 31 32 |
# File 'lib/lvm/logical_volumes.rb', line 30 def list each {} end |