OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | List of all members
OMV\System\Filesystem\IFilesystem Interface Reference
Inheritance diagram for OMV\System\Filesystem\IFilesystem:
OMV\System\Filesystem\Filesystem OMV\System\Filesystem\Btrfs OMV\System\Filesystem\Ext OMV\System\Filesystem\Jfs OMV\System\Filesystem\Xfs

Public Member Functions

 exists ()
 
 getDeviceFile ()
 
 getCanonicalDeviceFile ()
 
 getDeviceFileById ()
 
 getDeviceFileByUuid ()
 
 getDeviceFileByLabel ()
 
 getPreferredDeviceFile ()
 
 getDeviceFileSymlinks ()
 
 getDeviceFiles ()
 
 getParentDeviceFile ()
 
 hasUuid ()
 
 getUuid ()
 
 hasLabel ()
 
 getLabel ()
 
 getType ()
 
 getSize ()
 
 getDescription ()
 
 isMounted ()
 
 mount ($options)
 
 umount ($force, $lazy)
 
 grow ()
 
 shrink ()
 
 remove ()
 

Detailed Description

Interface for filesystems.

Member Function Documentation

OMV\System\Filesystem\IFilesystem::exists ( )

Checks if the device exists.

Returns
TRUE if the device exists, otherwise FALSE.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getCanonicalDeviceFile ( )

Get the canonical device file, e.g.

/dev/root -> /dev/sde1

  • /dev/disk/by-uuid/4B04EA317E4AA567 -> /dev/sdd1
  • /dev/mapper/vg0-lv0 -> /dev/dm-0
    Returns
    Returns the canonical device file.
OMV\System\Filesystem\IFilesystem::getDescription ( )

Get the description (e.g. incl. additional information like used and available disk space usage) of the file system.

Returns
The file system description.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getDeviceFile ( )

Get the device file, e.g.

/dev/sda1

  • /dev/mapper/vg0-lv0
  • /dev/disk/by-uuid/fc3e1da5-fd8d-4fda-341e-d0135efa7a7c
  • /dev/disk/by-id/scsi-SATA_ST3200XXXX2AS_5XWXXXR6-part1
  • /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part2
    Returns
    Returns the device file.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getDeviceFileById ( )

Get the device file by ID, e.g.

/dev/disk/by-id/wwn-0x5000cca211cc703c

  • /dev/disk/by-id/scsi-SATA_IBM-DHEA-36481_SG0SGF08038
  • /dev/disk/by-id/ata-Hitachi_HDT725032VLA360_VFD200R2CWB7ML-part2 The following order of paths will be retured if available:
    ata-xxx
  • wwn-xxx
  • scsi-xxx
  • ...
    Returns
    The device file (/dev/disk/by-id/xxx) if available, otherwise NULL will be returned.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getDeviceFileByLabel ( )

Get the device path by label, e.g.

/dev/disk/by-label/data

Returns
The device path (/dev/disk/by-label/xxx).

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getDeviceFileByUuid ( )

Get the device path by UUID, e.g.

/dev/disk/by-uuid/ad3ee177-777c-4ad3-8353-9562f85c0895

  • /dev/disk/by-uuid/2ED43920D438EC29 (NTFS)
    Returns
    The device path (/dev/disk/by-uuid/xxx).

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getDeviceFiles ( )

Get all devices that make up the filesystem.

Returns
An array that contains the component devices of the filesystem.

Implemented in OMV\System\Filesystem\Filesystem, and OMV\System\Filesystem\Btrfs.

OMV\System\Filesystem\IFilesystem::getDeviceFileSymlinks ( )

Get all device file symlinks via udev, e.g.

/dev/disk/by-id/wwn-0x5000cca211cc703c

  • /dev/disk/by-id/scsi-SATA_IBM-DHEA-36481_SG0SGF08038
  • /dev/disk/by-id/ata-Hitachi_HDT725032VLA360_VFD200R2CWB7ML
  • /dev/disk/by-path/pci-0000:00:02.5-scsi-0:0:0:0
  • /dev/disk/by-id/ata-WDC_WD15EARS-00MVWB0_WD-WMAZB2574325-part1
  • /dev/disk/by-uuid/fc3e1da5-fd8d-4fda-341e-d0135efa7a7c
    Returns
    Returns an string array of device files.
OMV\System\Filesystem\IFilesystem::getLabel ( )

Get the filesystem label.

Returns
Returns the label of the filesystem, otherwise an empty string.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getParentDeviceFile ( )

Get the device file of the storage device which contains this file system. Example:

/dev/sdb1 => /dev/sdb

  • /dev/cciss/c0d0p2 => /dev/cciss/c0d0
    Returns
    The device file of the underlying storage device.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getPreferredDeviceFile ( )

Get the special device file to present in the UI instead of the value of the getDeviceFile method. Get the special device file in the following preferred order:

/dev/disk/by-label/xxx

  • /dev/disk/by-uuid/xxx
  • /dev/disk/by-id/xxx
  • /dev/xxx
    Returns
    Returns the special device file.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getSize ( )

Get the size of the device in bytes.

Returns
The size of the device in bytes.
Exceptions
OMV\System\Filesystem\IFilesystem::getType ( )

Get the filesystem type, e.g. 'ext3' or 'vfat'.

Returns
The filesystem type.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::getUuid ( )

Get the UUID of the filesystem.

See also
http://wiki.ubuntuusers.de/UUID
Returns
Returns the UUID of the filesystem, otherwise an empty string.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::grow ( )

Grow the filesystem.

Returns
None.
Exceptions

Implemented in OMV\System\Filesystem\Filesystem, OMV\System\Filesystem\Ext, OMV\System\Filesystem\Jfs, and OMV\System\Filesystem\Xfs.

OMV\System\Filesystem\IFilesystem::hasLabel ( )

Check if the filesystem has a label.

Returns
Returns TRUE if the filesystem has a label, otherwise FALSE.

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::hasUuid ( )

Check if the filesystem has an UUID, e.g.

78b669c1-9183-4ca3-a32c-80a4e2c61e2d (EXT2/3/4, JFS, XFS)

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::isMounted ( )

Check if a filesystem is mounted.

Returns
TRUE if the filesystem is mounted, otherwise FALSE.
Exceptions

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::mount (   $options)

Mount the filesystem by its device file or UUID.

Parameters
optionsAdditional mount options.
Returns
None.
Exceptions

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::remove ( )

Remove the filesystem.

Returns
None.
Exceptions

Implemented in OMV\System\Filesystem\Filesystem, and OMV\System\Filesystem\Btrfs.

OMV\System\Filesystem\IFilesystem::shrink ( )

Shrink the filesystem.

Returns
None.
Exceptions

Implemented in OMV\System\Filesystem\Filesystem.

OMV\System\Filesystem\IFilesystem::umount (   $force,
  $lazy 
)

Unmount the filesystem.

Parameters
forceSet to TRUE to force unmount.
lazySet to TRUE to lazy unmount.
Returns
None.
Exceptions

Implemented in OMV\System\Filesystem\Filesystem.


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