OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
OMV\System\Storage\Lvm\PhysicalVolume Class Reference

Public Member Functions

 __construct ($deviceFile)
 
 refresh ()
 
 exists ()
 
 assertExists ()
 
 getDeviceFile ()
 
 getUuid ()
 
 getSize ()
 
 getFree ()
 
 getUsed ()
 
 getAllocatedPhysicalExtents ()
 
 getVGName ()
 
 getVGUuid ()
 
 getDescription ()
 
 create ()
 
 remove ()
 
 resize ()
 

Static Public Member Functions

static enumerate ()
 

Protected Attributes

 $deviceFile = ""
 
 $uuid = ""
 
 $size = ""
 
 $free = ""
 
 $used = ""
 
 $vgUuid = ""
 
 $vgName = ""
 
 $allocatedPE = 0
 

Detailed Description

Class to handle a LVM physical volume.

Constructor & Destructor Documentation

OMV\System\Storage\Lvm\PhysicalVolume::__construct (   $deviceFile)

Constructor

Parameters
string$deviceFileThe device file, e.g. /dev/sdb.

Member Function Documentation

OMV\System\Storage\Lvm\PhysicalVolume::assertExists ( )

Assert that the volume group exists.

Returns
None.
Exceptions
OMV\System\Storage\Lvm\PhysicalVolume::create ( )

Create the physical volume.

Returns
None.
Exceptions
static OMV\System\Storage\Lvm\PhysicalVolume::enumerate ( )
static

Enumerate LVM physical volumes.

Returns
A list of LVM physical volumes. Example: array( 0 => /dev/sdb 1 => /dev/sdd )
Exceptions
OMV\System\Storage\Lvm\PhysicalVolume::exists ( )

Checks if the physical volume exists.

Returns
TRUE if the physical volume exists, otherwise FALSE.
OMV\System\Storage\Lvm\PhysicalVolume::getAllocatedPhysicalExtents ( )

Get total number of allocated physical extents.

Returns
The total number of allocated physical extents.
OMV\System\Storage\Lvm\PhysicalVolume::getDescription ( )

Get the description of the physical volume.

Returns
The physical volume description.
OMV\System\Storage\Lvm\PhysicalVolume::getDeviceFile ( )

Get the device path, e.g. /dev/vg0/lvol0.

Returns
The device path.
OMV\System\Storage\Lvm\PhysicalVolume::getFree ( )

Get the total amount of unallocated space.

Returns
The total amount of unallocated space in bytes as string.
OMV\System\Storage\Lvm\PhysicalVolume::getSize ( )

Get the size of the physical volume in bytes.

Returns
The size of the physical volume in bytes as string.
OMV\System\Storage\Lvm\PhysicalVolume::getUsed ( )

Get the total amount of allocated space.

Returns
The total amount of allocated space in bytes as string.
OMV\System\Storage\Lvm\PhysicalVolume::getUuid ( )

Get the UUID of the physical volume.

Returns
The UUID of the physical volume.
OMV\System\Storage\Lvm\PhysicalVolume::getVGName ( )

Get the name of the volume group the physical volume is assigned to.

Returns
The volume group name.
OMV\System\Storage\Lvm\PhysicalVolume::getVGUuid ( )

Get the UUID of the volume group the physical volume is assigned to.

Returns
The volume group UUID.
OMV\System\Storage\Lvm\PhysicalVolume::refresh ( )

Refresh the cached informations.

Returns
None.
OMV\System\Storage\Lvm\PhysicalVolume::remove ( )

Remove the physical volume.

Returns
None.
Exceptions
OMV\System\Storage\Lvm\PhysicalVolume::resize ( )

Resize the physical volume.

Returns
None.
Exceptions

The documentation for this class was generated from the following file: