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\StorageDeviceLvm Class Reference
Inheritance diagram for OMV\System\Storage\StorageDeviceLvm:
OMV\System\Storage\StorageDeviceDM OMV\System\Storage\StorageDevice OMV\System\BlockDevice OMV\System\Storage\IStorageDevice OMV\System\IBlockDevice OMV\System\Storage\Lvm\LogicalVolume

Public Member Functions

 refresh ()
 
 exists ()
 
 getVGName ()
 
 getName ()
 
 getPath ()
 
 getSize ()
 
 getUuid ()
 
 getDescription ()
 
 create ($name, $size, $vgName)
 
 remove ()
 
 rename ($name)
 
 extend ($size)
 
 reduce ($size)
 
- Public Member Functions inherited from OMV\System\Storage\StorageDeviceDM
 __construct ($deviceFile)
 
 getDeviceMapperName ()
 
 getDeviceMapperUuid ()
 
 getSlaves ()
 
 getDescription ()
 
- Public Member Functions inherited from OMV\System\Storage\StorageDevice
 getModel ()
 
 getVendor ()
 
 getSerialNumber ()
 
 getDescription ()
 
 isRotational ()
 
 isRemovable ()
 
 isRaid ()
 
 isUsb ()
 
 isAta ()
 
 isReadOnly ()
 
 IsMediaAvailable ()
 
 hasSmartSupport ()
 
 assertHasSmartSupport ()
 
- Public Member Functions inherited from OMV\System\BlockDevice
 __construct ($deviceFile)
 
 exists ()
 
 assertExists ()
 
 getDeviceFile ()
 
 getCanonicalDeviceFile ()
 
 getDeviceFileById ()
 
 hasDeviceFileById ()
 
 getPreferredDeviceFile ()
 
 getDeviceFileSymlinks ()
 
 getDeviceName ($canonical=FALSE)
 
 getSize ()
 
 getBlockSize ()
 
 getSectorSize ()
 
 getDeviceNumber ()
 
 getMajor ()
 
 getMinor ()
 
 getDescription ()
 
 hasUdevProperty ($id)
 
 assertUdevProperty ($id)
 
 getUdevProperty ($id)
 
 waitForDevice ($timeout)
 
- Public Member Functions inherited from OMV\System\Storage\IStorageDevice
 getDeviceFile ()
 
 getCanonicalDeviceFile ()
 
 getDeviceFileById ()
 
 hasDeviceFileById ()
 
 getDeviceFileSymlinks ()
 
 getDeviceName ($canonical=FALSE)
 
 getBlockSize ()
 
 getSectorSize ()
 
 isMediaAvailable ()
 

Static Public Member Functions

static enumerate ()
 
- Static Public Member Functions inherited from OMV\System\Storage\StorageDevice
static enumerate ($type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
static enumerateUnused ($type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
static enumerateUsed ($type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
static isUsed ($deviceFile, $type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
static getStorageDevice ($deviceFile)
 
static assertStorageDeviceExists ($deviceFile)
 

Protected Attributes

 $uuid = ""
 
 $attr = ""
 
 $kernelMajor = ""
 
 $kernelMinor = ""
 
 $lvName = ""
 
 $vgName = ""
 
- Protected Attributes inherited from OMV\System\Storage\StorageDevice
 $model = NULL
 
 $vendor = NULL
 
- Protected Attributes inherited from OMV\System\BlockDevice
 $deviceFile = NULL
 
 $deviceFileById = NULL
 
 $size = FALSE
 
 $blockSize = FALSE
 
 $sectorSize = FALSE
 
 $udevData = NULL
 

Additional Inherited Members

- Protected Member Functions inherited from OMV\System\BlockDevice
 getUdevData ($force=FALSE)
 

Detailed Description

This class provides a simple interface to handle a LVM logical volume.

Member Function Documentation

OMV\System\Storage\StorageDeviceLvm::create (   $name,
  $size,
  $vgName 
)

Create the logical volume.

Parameters
nameThe name for the new logical volume.
sizeGives the size of bytes to allocate for the new logical volume.
vgNameThe name of the volume group where to create the logical volume.
Returns
None.
Exceptions
static OMV\System\Storage\StorageDeviceLvm::enumerate ( )
static

Enumerate LVM logical volumes.

Returns
A list of LVM logical volumes, otherwise FALSE. Example: array( 0 => /dev/mapper/vgName-lvName 1 => /dev/mapper/... )
Exceptions
OMV\System\Storage\StorageDeviceLvm::exists ( )

Checks if the logical volume exists.

Returns
TRUE if the logical volume exists, otherwise FALSE.

Implements OMV\System\Storage\IStorageDevice.

OMV\System\Storage\StorageDeviceLvm::extend (   $size)

Extend the logical volume.

Parameters
sizeGives the size of bytes to extend the logical volume.
Returns
None.
Exceptions
OMV\System\Storage\StorageDeviceLvm::getDescription ( )

Get the description of the logical volume.

Returns
The logical volume description.

Implements OMV\System\Storage\IStorageDevice.

OMV\System\Storage\StorageDeviceLvm::getName ( )

Get the name of the logical volume.

Returns
The logical volume name, e.g. lvol0, or FALSE on failure.
OMV\System\Storage\StorageDeviceLvm::getPath ( )

Get the path of the logical volume.

Returns
The logical volume path, e.g. /dev/vg0/lvol0.
OMV\System\Storage\StorageDeviceLvm::getSize ( )

Get the size of the logical volume in bytes.

Returns
The size of the logical volume in bytes as string.

Implements OMV\System\Storage\IStorageDevice.

OMV\System\Storage\StorageDeviceLvm::getUuid ( )

Get the UUID of the array.

Returns
The UUID of the array.
OMV\System\Storage\StorageDeviceLvm::getVGName ( )

Get the name of the volume group.

Returns
The volume group name, FALSE on failure.
OMV\System\Storage\StorageDeviceLvm::reduce (   $size)

Reduce the logical volume.

Parameters
sizeGives the size of bytes to extend the logical volume.
Returns
None.
Exceptions
OMV\System\Storage\StorageDeviceLvm::refresh ( )

Refresh the cached information.

Returns
None.
OMV\System\Storage\StorageDeviceLvm::remove ( )

Remove the logical volume.

Returns
None.
Exceptions
OMV\System\Storage\StorageDeviceLvm::rename (   $name)

Rename the logical volume.

Parameters
nameThe new logical volume path/name.
Returns
None.
Exceptions

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