Class: PhysicalVolume

Inherits:
Object
  • Object
show all
Defined in:
lib/VolumeManager/LVM/physical_volume.rb

Overview

One object of this class for each physical volume in a volume group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pvId = nil, pvName = nil, device = nil, deviceSize = nil, peStart = nil, peCount = nil) ⇒ PhysicalVolume

Returns a new instance of PhysicalVolume.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 7

def initialize(pvId = nil, pvName = nil, device = nil, deviceSize = nil, peStart = nil, peCount = nil)
  @pvId = pvId                        # the UUID of this physical volume
  @pvName = pvName                    # the name of this physical volume
  @device = device                    # the physical volume's device node under /dev.
  @deviceSize = deviceSize            # the size if this physical volume (in )
  @peStart = peStart.to_i             # the sector number of the first physical extent on this PV
  @peCount = peCount.to_i             # the number of physical extents on this PV

  @status = []
  @vgObj = nil                        # a reference to this PV's volume group
  @diskObj = nil                      # a reference to the MiqDisk object for this PV
end

Instance Attribute Details

#deviceObject

Returns the value of attribute device.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def device
  @device
end

#deviceSizeObject

Returns the value of attribute deviceSize.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def deviceSize
  @deviceSize
end

#diskObjObject

Returns the value of attribute diskObj.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def diskObj
  @diskObj
end

#peCountObject

Returns the value of attribute peCount.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def peCount
  @peCount
end

#peStartObject

Returns the value of attribute peStart.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def peStart
  @peStart
end

#pvIdObject

Returns the value of attribute pvId.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def pvId
  @pvId
end

#pvNameObject

Returns the value of attribute pvName.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def pvName
  @pvName
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def status
  @status
end

#vgObjObject

Returns the value of attribute vgObj.



5
6
7
# File 'lib/VolumeManager/LVM/physical_volume.rb', line 5

def vgObj
  @vgObj
end