OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | Public Attributes | Protected Attributes | List of all members
OMV\System\Filesystem\Backend\BackendAbstract Class Reference
Inheritance diagram for OMV\System\Filesystem\Backend\BackendAbstract:
OMV\System\Filesystem\Backend\Btrfs OMV\System\Filesystem\Backend\Exfat OMV\System\Filesystem\Backend\Ext OMV\System\Filesystem\Backend\Fuseblk OMV\System\Filesystem\Backend\Hfsplus OMV\System\Filesystem\Backend\Iso9660 OMV\System\Filesystem\Backend\Jfs OMV\System\Filesystem\Backend\Msdos OMV\System\Filesystem\Backend\None OMV\System\Filesystem\Backend\Ntfs OMV\System\Filesystem\Backend\Reiserfs OMV\System\Filesystem\Backend\Udf OMV\System\Filesystem\Backend\Ufs OMV\System\Filesystem\Backend\Umsdos OMV\System\Filesystem\Backend\Vfat OMV\System\Filesystem\Backend\Xfs

Public Member Functions

 getType ()
 
 enumerate ()
 
 isBlkidEnumerated ()
 
 isTypeOf ($id)
 
 getProperties ()
 
 hasProperty ($property)
 
 hasDiscardSupport ()
 
 hasPosixAclSupport ()
 
 hasFstabSupport ()
 
 hasQuotaSupport ()
 
 hasResizeSupport ()
 
 hasReadOnlySupport ()
 
 hasCompressSupport ()
 
 hasAutoDefragSupport ()
 
 hasDeviceFile ()
 
 getFstabMntOptions (\OMV\System\Storage\StorageDevice $sd=null)
 
 getMkfsOptions (\OMV\System\Storage\StorageDevice $sd=null)
 
 getImpl ($args)
 

Public Attributes

const PROP_NONE = 0x0
 
const PROP_MNTENT = 0x1
 
const PROP_POSIX_ACL = 0x2
 
const PROP_DISCARD = 0x4
 
const PROP_QUOTA = 0x8
 
const PROP_RESIZE = 0x10
 
const PROP_READ_ONLY = 0x20
 
const PROP_COMPRESS = 0x40
 
const PROP_AUTO_DEFRAG = 0x80
 

Protected Attributes

 $type = ""
 
 $properties = self::PROP_NONE
 
 $mkfsOptions = ""
 
 $mntOptions = []
 

Detailed Description

The generic class that represents a filesystem backend.

Member Function Documentation

OMV\System\Filesystem\Backend\BackendAbstract::enumerate ( )

Get a list of filesystem device files or identifiers that are managed by this filesystem backend. Override this method if the filesystem implemented by this backend is not identified by the block device identification library. This method is only called when the method isBlkidEnumerated returns FALSE.

Returns
An array of objects with the fields devicefile, uuid, label and type, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::getFstabMntOptions ( \OMV\System\Storage\StorageDevice  $sd = null)

Get filesystem mount options used in '/etc/fstab'. See http://linux.die.net/man/8/mount. If a storage device is given the result mount option list can contain specific options for the given storage device.

Parameters
sdA optional storage device object. Defaults to NULL.
Returns
An array of 'mount' options.
OMV\System\Filesystem\Backend\BackendAbstract::getImpl (   $args)

Get the object of the class that represents and implements a filesystem of this filesystem backend.

Parameters
argsThe arguments to the class constructor.
Returns
The object of the class implementing the given filesystem type.
OMV\System\Filesystem\Backend\BackendAbstract::getMkfsOptions ( \OMV\System\Storage\StorageDevice  $sd = null)

Get 'mkfs' command options used to create the filesystem. See http://linux.die.net/man/8/mkfs. If a storage device is given the result command option list can contain specific options for the given storage device.

Parameters
sdA optional storage device object. Defaults to NULL.
Returns
An array of 'mkfs' options.
OMV\System\Filesystem\Backend\BackendAbstract::getProperties ( )
final

Get the filesystem properties.

Returns
The properties defined for this filesystem.
OMV\System\Filesystem\Backend\BackendAbstract::getType ( )
final

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

OMV\System\Filesystem\Backend\BackendAbstract::hasAutoDefragSupport ( )

Does the filesystem support auto defragmentation?

Returns
TRUE if the filesystem supports auto-defrag, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasCompressSupport ( )

Does the filesystem support compression?

Returns
TRUE if the filesystem supports compression, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasDeviceFile ( )

Does the filesystem have a device file? E.g. union mount or overlay file systems like UnionFS, aufs or mhddfs do not have such a device file.

Returns
TRUE if the filesystem has a device file, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasDiscardSupport ( )

Check whether the filesystem supports the discard/TRIM commands to the underlying block device when blocks are freed. See https://wiki.archlinux.org/index.php/Solid_State_Drives#TRIM.

Returns
TRUE if the filesystem supports the discard/TRIM commands, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasFstabSupport ( )

Is the filesystem mounted via /etc/fstab?

Returns
TRUE if the filesystem is mounted via '/etc/fstab', otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasPosixAclSupport ( )

Does the filesystem support POSIX ACL.

See also
http://de.wikipedia.org/wiki/Access_Control_List
http://www.suse.de/~agruen/acl/linux-acls/online
Returns
TRUE if the filesystem supports POSIX ACL, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasProperty (   $property)
final

Check whether the filesystem has the given property.

Parameters
propertyThe property to check for, e.g. PROP_POSIX_ACL.
Returns
TRUE if the given property is set, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasQuotaSupport ( )

Does the filesystem support disc quota?

Returns
TRUE if the filesystem supports disc quota, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasReadOnlySupport ( )

Is the filesystem read-only, e.g. ISO9660?

Returns
TRUE if the filesystem is read-only, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::hasResizeSupport ( )

Does the filesystem support the capability to resize it online?

See also
http://wiki.ubuntuusers.de/Dateisystemgr%C3%B6%C3%9Fe_%C3%A4ndern
Returns
TRUE if the filesystem supports online resizing, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::isBlkidEnumerated ( )

Check whether the filesystem implemented by this backend is identified by the block device identification library. If this is not the case, then the backend must override the enumerate method.

Returns
TRUE if the filesystem is identified by the block device identification library, otherwise FALSE.
OMV\System\Filesystem\Backend\BackendAbstract::isTypeOf (   $id)

Check whether the given filesystem identifier is represented by this filesystem backend.

Parameters
idThe filesystem identifier (e.g. UUID or device path), e.g.
78b669c1-9183-4ca3-a32c-80a4e2c61e2d (EXT2/3/4, JFS, XFS)
  • 7A48-BA97 (FAT)
  • 2ED43920D438EC29 (NTFS)
  • /dev/sde1
  • /dev/disk/by-id/scsi-SATA_ST3200XXXX2AS_5XWXXXR6-part1
  • /dev/disk/by-label/DATA
  • /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part2
  • /dev/disk/by-uuid/ad3ee177-777c-4ad3-8353-9562f85c0895
  • /dev/cciss/c0d0p2
Returns
TRUE if successful, otherwise FALSE.
Exceptions

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