OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
OMVStorageDevices Class Reference
Inheritance diagram for OMVStorageDevices:
OMVObject

Public Member Functions

 enumerateUnused ($type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
 enumerateUsed ($type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
 isUsed ($deviceFile, $type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 

Static Public Member Functions

static registerBackend (OMVStorageDeviceBackendAbstract $backend)
 
static getBackend ($deviceFile)
 
static enumerate ($type=OMV_STORAGE_DEVICE_TYPE_ALL)
 
static getImpl ($deviceFile)
 

Additional Inherited Members

- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

Helper class to get all existing devices of the given storage type.

Member Function Documentation

static OMVStorageDevices::enumerate (   $type = OMV_STORAGE_DEVICE_TYPE_ALL)
static

Enumerate devices matching the given storage device type.

Parameters
typeDefines the storage device type, e.g. hard disk, hard or Software RAID. Defaults to OMV_STORAGE_DEVICE_TYPE_ALL.
Returns
A list of devicefile names, otherwise FALSE.
OMVStorageDevices::enumerateUnused (   $type = OMV_STORAGE_DEVICE_TYPE_ALL)
final

Enumerate all unused devices. This list contains all devices of the given type except the devices that are used by other storage devices (e.g. LVM as physical volume or a member of a Software RAID).

Parameters
typeDefines the storage device type, e.g. hard disk, hard or Software RAID. Defaults to OMV_STORAGE_DEVICE_TYPE_ALL.
Returns
A list of devicefile names, otherwise FALSE.
OMVStorageDevices::enumerateUsed (   $type = OMV_STORAGE_DEVICE_TYPE_ALL)
final

Enumerate all used devices. The list contains all those devices that are used by the given storage devices, e.g. all members of a LVM or Software RAID.

Parameters
typeDefines the storage device type, e.g. hard disk, hard or Software RAID. Defaults to OMV_STORAGE_DEVICE_TYPE_ALL.
Returns
A list of devicefile names, otherwise FALSE.
static OMVStorageDevices::getBackend (   $deviceFile)
staticfinal

Get the backend of the given device.

Parameters
deviceFileSpecifies the device file.
Returns
The backend that implements the given device file, otherwise NULL.
static OMVStorageDevices::getImpl (   $deviceFile)
static

Get the object of the class which implements the given storage device.

Parameters
deviceFileSpecifies the device file, e.g.
/dev/sdb
  • /dev/md1
  • /dev/cciss/c0d0
  • /dev/disk/by-id/scsi-SATA_ST3200XXXX2AS_5XWXXXR6
  • /dev/disk/by-label/DATA
  • /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0
  • /dev/disk/by-uuid/ad3ee177-777c-4ad3-8353-9562f85c0895
Returns
The object of the class implementing the given storage device, otherwise NULL.
OMVStorageDevices::isUsed (   $deviceFile,
  $type = OMV_STORAGE_DEVICE_TYPE_ALL 
)
final

Check if the given device is used/consumed by another storage device.

Parameters
deviceFileSpecifies the device file, e.g.
/dev/sdb
  • /dev/md1
  • /dev/cciss/c0d0
  • /dev/disk/by-id/scsi-SATA_ST3200XXXX2AS_5XWXXXR6
  • /dev/disk/by-label/DATA
  • /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0
  • /dev/disk/by-uuid/ad3ee177-777c-4ad3-8353-9562f85c0895
typeDefines the storage device type, e.g. hard disk, hard or Software RAID. Defaults to OMV_STORAGE_DEVICE_TYPE_ALL.
Returns
TRUE if the given device is used/consumed by another storage device, otherwise FALSE.
static OMVStorageDevices::registerBackend ( OMVStorageDeviceBackendAbstract  $backend)
staticfinal

Register a storage device backend.

Parameters
backendThe storage device backend object to register.
Returns
TRUE if successful, otherwise FALSE.

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