#include <StorageInterface.h>

Public Member Functions | |
| StorageInterface () | |
| virtual | ~StorageInterface () |
| virtual void | getContainers (deque< ContainerInfo > &infos)=0 |
| virtual int | getDiskInfo (const string &disk, DiskInfo &info)=0 |
| virtual int | getContDiskInfo (const string &disk, ContainerInfo &cinfo, DiskInfo &info)=0 |
| virtual int | getLvmVgInfo (const string &name, LvmVgInfo &info)=0 |
| virtual int | getContLvmVgInfo (const string &name, ContainerInfo &cinfo, LvmVgInfo &info)=0 |
| virtual int | getEvmsCoInfo (const string &name, EvmsCoInfo &info)=0 |
| virtual int | getContEvmsCoInfo (const string &name, ContainerInfo &cinfo, EvmsCoInfo &info)=0 |
| virtual int | getDmraidCoInfo (const string &name, DmraidCoInfo &info)=0 |
| virtual int | getContDmraidCoInfo (const string &name, ContainerInfo &cinfo, DmraidCoInfo &info)=0 |
| virtual void | getVolumes (deque< VolumeInfo > &infos)=0 |
| virtual int | getVolume (const string &device, VolumeInfo &info)=0 |
| virtual int | getPartitionInfo (const string &disk, deque< PartitionInfo > &plist)=0 |
| virtual int | getLvmLvInfo (const string &name, deque< LvmLvInfo > &plist)=0 |
| virtual int | getEvmsInfo (const string &name, deque< EvmsInfo > &plist)=0 |
| virtual int | getMdInfo (deque< MdInfo > &plist)=0 |
| virtual int | getNfsInfo (deque< NfsInfo > &plist)=0 |
| virtual int | getLoopInfo (deque< LoopInfo > &plist)=0 |
| virtual int | getDmInfo (deque< DmInfo > &plist)=0 |
| virtual int | getDmraidInfo (const string &name, deque< DmraidInfo > &plist)=0 |
| virtual bool | getFsCapabilities (FsType fstype, FsCapabilities &fscapabilities) const =0 |
| virtual string | getAllUsedFs () const =0 |
| virtual void | printInfo (std::ostream &str)=0 |
| virtual void | printInfoCo (std::ostream &str, const string &name)=0 |
| virtual int | createPartition (const string &disk, PartitionType type, unsigned long start, unsigned long sizeCyl, string &device)=0 |
| virtual int | resizePartition (const string &device, unsigned long sizeCyl)=0 |
| virtual int | resizePartitionNoFs (const string &device, unsigned long sizeCyl)=0 |
| virtual int | updatePartitionArea (const string &device, unsigned long start, unsigned long sizeCyl)=0 |
| virtual int | nextFreePartition (const string &disk, PartitionType type, unsigned &nr, string &device)=0 |
| virtual int | createPartitionKb (const string &disk, PartitionType type, unsigned long long start, unsigned long long size, string &device)=0 |
| virtual int | createPartitionAny (const string &disk, unsigned long long size, string &device)=0 |
| virtual int | createPartitionMax (const string &disk, PartitionType type, string &device)=0 |
| virtual unsigned long long | cylinderToKb (const string &disk, unsigned long size)=0 |
| virtual unsigned long | kbToCylinder (const string &disk, unsigned long long size)=0 |
| virtual int | removePartition (const string &partition)=0 |
| virtual int | changePartitionId (const string &partition, unsigned id)=0 |
| virtual int | forgetChangePartitionId (const string &partition)=0 |
| virtual int | destroyPartitionTable (const string &disk, const string &label)=0 |
| virtual int | initializeDisk (const string &disk, bool value)=0 |
| virtual string | defaultDiskLabel () const =0 |
| virtual string | defaultDiskLabelSize (unsigned long long size_k) const =0 |
| virtual unsigned long long | maxSizeLabelK (const string &label) const =0 |
| virtual int | changeFormatVolume (const string &device, bool format, FsType fs)=0 |
| virtual int | changeLabelVolume (const string &device, const string &label)=0 |
| virtual int | changeMkfsOptVolume (const string &device, const string &opts)=0 |
| virtual int | changeTunefsOptVolume (const string &device, const string &opts)=0 |
| virtual int | changeMountPoint (const string &device, const string &mount)=0 |
| virtual int | getMountPoint (const string &device, string &mount)=0 |
| virtual int | changeMountBy (const string &device, MountByType mby)=0 |
| virtual int | getMountBy (const string &device, MountByType &mby)=0 |
| virtual int | changeFstabOptions (const string &device, const string &options)=0 |
| virtual int | getFstabOptions (const string &device, string &options)=0 |
| virtual int | addFstabOptions (const string &device, const string &options)=0 |
| virtual int | removeFstabOptions (const string &device, const string &options)=0 |
| virtual int | setCryptPassword (const string &device, const string &pwd)=0 |
| virtual int | forgetCryptPassword (const string &device)=0 |
| virtual int | getCryptPassword (const string &device, string &pwd)=0 |
| virtual int | setCrypt (const string &device, bool val)=0 |
| virtual int | setCryptType (const string &device, bool val, EncryptType typ)=0 |
| virtual int | getCrypt (const string &device, bool &val)=0 |
| virtual int | setIgnoreFstab (const string &device, bool val)=0 |
| virtual int | getIgnoreFstab (const string &device, bool &val)=0 |
| virtual int | changeDescText (const string &device, const string &txt)=0 |
| virtual int | addFstabEntry (const string &device, const string &mount, const string &vfs, const string &options, unsigned freq, unsigned passno)=0 |
| virtual int | resizeVolume (const string &device, unsigned long long newSizeMb)=0 |
| virtual int | resizeVolumeNoFs (const string &device, unsigned long long newSizeMb)=0 |
| virtual int | forgetResizeVolume (const string &device)=0 |
| virtual void | setRecursiveRemoval (bool val)=0 |
| virtual bool | getRecursiveRemoval () const =0 |
| virtual void | setZeroNewPartitions (bool val)=0 |
| virtual bool | getZeroNewPartitions () const =0 |
| virtual void | setDefaultMountBy (MountByType val)=0 |
| virtual MountByType | getDefaultMountBy () const =0 |
| virtual void | setRootPrefix (const string &root)=0 |
| virtual void | setDetectMountedVolumes (bool val)=0 |
| virtual bool | getDetectMountedVolumes () const =0 |
| virtual int | removeVolume (const string &device)=0 |
| virtual int | createLvmVg (const string &name, unsigned long long peSizeK, bool lvm1, const deque< string > &devs)=0 |
| virtual int | removeLvmVg (const string &name)=0 |
| virtual int | extendLvmVg (const string &name, const deque< string > &devs)=0 |
| virtual int | shrinkLvmVg (const string &name, const deque< string > &devs)=0 |
| virtual int | createLvmLv (const string &vg, const string &name, unsigned long long sizeM, unsigned stripe, string &device)=0 |
| virtual int | removeLvmLvByDevice (const string &device)=0 |
| virtual int | removeLvmLv (const string &vg, const string &name)=0 |
| virtual int | changeLvStripeCount (const string &vg, const string &name, unsigned long stripes)=0 |
| virtual int | changeLvStripeSize (const string &vg, const string &name, unsigned long long stripeSize)=0 |
| virtual int | createEvmsContainer (const string &name, unsigned long long peSizeK, bool lvm1, const deque< string > &devs)=0 |
| virtual int | modifyEvmsContainer (const string &old_name, const string &new_name, unsigned long long peSizeK, bool lvm1)=0 |
| virtual int | removeEvmsContainer (const string &name)=0 |
| virtual int | extendEvmsContainer (const string &name, const deque< string > &devs)=0 |
| virtual int | shrinkEvmsContainer (const string &name, const deque< string > &devs)=0 |
| virtual int | createEvmsVolume (const string &coname, const string &name, unsigned long long sizeM, unsigned stripe, string &device)=0 |
| virtual int | removeEvmsVolumeByDevice (const string &device)=0 |
| virtual int | removeEvmsVolume (const string &coname, const string &name)=0 |
| virtual int | changeEvmsStripeCount (const string &coname, const string &name, unsigned long stripe)=0 |
| virtual int | changeEvmsStripeSize (const string &coname, const string &name, unsigned long long stripeSize)=0 |
| virtual int | evmsActivate (bool force)=0 |
| virtual int | createMd (const string &name, MdType rtype, const deque< string > &devs)=0 |
| virtual int | createMdAny (MdType rtype, const deque< string > &devs, string &device)=0 |
| virtual int | removeMd (const string &name, bool destroySb)=0 |
| virtual int | extendMd (const string &name, const string &dev)=0 |
| virtual int | shrinkMd (const string &name, const string &dev)=0 |
| virtual int | changeMdType (const string &name, MdType rtype)=0 |
| virtual int | changeMdChunk (const string &name, unsigned long chunk)=0 |
| virtual int | changeMdParity (const string &name, MdParity ptype)=0 |
| virtual int | checkMd (const string &name)=0 |
| virtual int | addNfsDevice (const string &nfsDev, const string &opts, unsigned long long sizeK, const string &mp)=0 |
| virtual int | checkNfsDevice (const string &nfsDev, const string &opts, unsigned long long &sizeK)=0 |
| virtual int | createFileLoop (const string &lname, bool reuseExisting, unsigned long long sizeK, const string &mp, const string &pwd, string &device)=0 |
| virtual int | modifyFileLoop (const string &device, const string &lname, bool reuseExisting, unsigned long long sizeK)=0 |
| virtual int | removeFileLoop (const string &lname, bool removeFile)=0 |
| virtual int | removeDmraid (const string &name)=0 |
| virtual deque< string > | getCommitActions (bool mark_destructive)=0 |
| virtual const string & | getLastAction () const =0 |
| virtual const string & | getExtendedErrorMessage () const =0 |
| virtual void | setCallbackProgressBar (CallbackProgressBar pfnc)=0 |
| virtual CallbackProgressBar | getCallbackProgressBar () const =0 |
| virtual void | setCallbackShowInstallInfo (CallbackShowInstallInfo pfnc)=0 |
| virtual CallbackShowInstallInfo | getCallbackShowInstallInfo () const =0 |
| virtual void | setCallbackInfoPopup (CallbackInfoPopup pfnc)=0 |
| virtual CallbackInfoPopup | getCallbackInfoPopup () const =0 |
| virtual void | setCallbackYesNoPopup (CallbackYesNoPopup pfnc)=0 |
| virtual CallbackYesNoPopup | getCallbackYesNoPopup () const =0 |
| virtual void | setCacheChanges (bool cache)=0 |
| virtual bool | isCacheChanges () const =0 |
| virtual int | commit ()=0 |
| virtual int | createBackupState (const string &name)=0 |
| virtual int | restoreBackupState (const string &name)=0 |
| virtual bool | checkBackupState (const string &name)=0 |
| virtual bool | equalBackupStates (const string &lhs, const string &rhs, bool verbose_log) const =0 |
| virtual int | removeBackupState (const string &name)=0 |
| virtual bool | checkDeviceMounted (const string &device, string &mp)=0 |
| virtual bool | umountDevice (const string &device)=0 |
| virtual bool | mountDevice (const string &device, const string &mp)=0 |
| virtual bool | mountDeviceOpts (const string &device, const string &mp, const string &opts)=0 |
| virtual bool | mountDeviceRo (const string &device, const string &mp, const string &opts)=0 |
| virtual bool | checkDmMapsTo (const string &device)=0 |
| virtual void | removeDmTableTo (const string &device)=0 |
| virtual bool | getFreeInfo (const string &device, unsigned long long &resize_free, unsigned long long &df_free, unsigned long long &used, bool &win, bool &efi, bool use_cache)=0 |
| virtual bool | readFstab (const string &dir, deque< VolumeInfo > &infos)=0 |
| virtual void | setNoEvms (bool val)=0 |
| virtual bool | getNoEvms ()=0 |
| virtual void | activateHld (bool val)=0 |
| virtual void | rescanEverything ()=0 |
| virtual void | dumpObjectList ()=0 |
| virtual int | getContVolInfo (const string &dev, ContVolInfo &info)=0 |
| storage::StorageInterface::StorageInterface | ( | ) | [inline] |
| virtual storage::StorageInterface::~StorageInterface | ( | ) | [inline, virtual] |
| virtual void storage::StorageInterface::getContainers | ( | deque< ContainerInfo > & | infos | ) | [pure virtual] |
Query all containers found in system
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getDiskInfo | ( | const string & | disk, | |
| DiskInfo & | info | |||
| ) | [pure virtual] |
Query disk info for a disk device
| disk | device name of disk, e.g. /dev/hda | |
| info | record that get filled with disk special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getContDiskInfo | ( | const string & | disk, | |
| ContainerInfo & | cinfo, | |||
| DiskInfo & | info | |||
| ) | [pure virtual] |
Query disk info for a disk device
| disk | device name of disk, e.g. /dev/hda | |
| cinfo | record that gets filled with container general data | |
| info | record that gets filled with disk special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getLvmVgInfo | ( | const string & | name, | |
| LvmVgInfo & | info | |||
| ) | [pure virtual] |
Query info for a LVM volume group
| name | name of volume group, e.g. system | |
| info | record that gets filled with LVM VG special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getContLvmVgInfo | ( | const string & | name, | |
| ContainerInfo & | cinfo, | |||
| LvmVgInfo & | info | |||
| ) | [pure virtual] |
Query info for a LVM volume group
| name | name of volume group, e.g. system | |
| cinfo | record that gets filled with container general data | |
| info | record that gets filled with LVM VG special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getEvmsCoInfo | ( | const string & | name, | |
| EvmsCoInfo & | info | |||
| ) | [pure virtual] |
Query container info for a EVMS container
| name | name of container, e.g. lvm2/system | |
| info | record that gets filled with EVMS Container special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getContEvmsCoInfo | ( | const string & | name, | |
| ContainerInfo & | cinfo, | |||
| EvmsCoInfo & | info | |||
| ) | [pure virtual] |
Query container info for a EVMS container
| name | name of container, e.g. lvm2/system | |
| cinfo | record that gets filled with container general data | |
| info | record that gets filled with EVMS Container special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getDmraidCoInfo | ( | const string & | name, | |
| DmraidCoInfo & | info | |||
| ) | [pure virtual] |
Query container info for a DMRAID container
| name | name of container, e.g. pdc_ccaihgii | |
| info | record that gets filled with DMRAID Container special data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getContDmraidCoInfo | ( | const string & | name, | |
| ContainerInfo & | cinfo, | |||
| DmraidCoInfo & | info | |||
| ) | [pure virtual] |
Query container info for a DMRAID container
| name | name of container, e.g. pdc_ccaihgii | |
| cinfo | record that gets filled with container general data | |
| info | record that gets filled with DMRAID Container special data |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::getVolumes | ( | deque< VolumeInfo > & | infos | ) | [pure virtual] |
Query all volumes found in system
| infos | list of records that get filled with volume info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getVolume | ( | const string & | device, | |
| VolumeInfo & | info | |||
| ) | [pure virtual] |
Query a volume by device name found in system
| device | device name , e.g. /dev/hda1 | |
| info | record that gets filled with data |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getPartitionInfo | ( | const string & | disk, | |
| deque< PartitionInfo > & | plist | |||
| ) | [pure virtual] |
Query infos for partitions of a disk
| disk | device name of disk, e.g. /dev/hda | |
| plist | list of records that get filled with partition specific info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getLvmLvInfo | ( | const string & | name, | |
| deque< LvmLvInfo > & | plist | |||
| ) | [pure virtual] |
Query infos for LVM LVs of a LVM VG
| name | name of volume group, e.g. system | |
| plist | list of records that get filled with LV specific info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getEvmsInfo | ( | const string & | name, | |
| deque< EvmsInfo > & | plist | |||
| ) | [pure virtual] |
Query infos for EVMS volumes of a EVMS container
| name | name of volume group, e.g. lvm2/system | |
| plist | list of records that get filled with EVMS specific info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getMdInfo | ( | deque< MdInfo > & | plist | ) | [pure virtual] |
Query infos for software raid devices in system
| plist | list of records that get filled with MD specific info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getNfsInfo | ( | deque< NfsInfo > & | plist | ) | [pure virtual] |
Query infos for nfs devices in system
| plist | list of records that get filled with nfs info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getLoopInfo | ( | deque< LoopInfo > & | plist | ) | [pure virtual] |
Query infos for file based loop devices in system
| plist | list of records that get filled with loop specific info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getDmInfo | ( | deque< DmInfo > & | plist | ) | [pure virtual] |
Query infos for dm devices in system
| plist | list of records that get filled with dm specific info |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getDmraidInfo | ( | const string & | name, | |
| deque< DmraidInfo > & | plist | |||
| ) | [pure virtual] |
Query infos for dmraid devices in system
| plist | list of records that get filled with dmraid specific info | |
| name | name of dmraid, e.g. pdc_igeeeadj |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::getFsCapabilities | ( | FsType | fstype, | |
| FsCapabilities & | fscapabilities | |||
| ) | const [pure virtual] |
Query capabilities of a filesystem type.
Implemented in storage::Storage.
| virtual string storage::StorageInterface::getAllUsedFs | ( | ) | const [pure virtual] |
Get list of filesystem types present on any block devices. List elements are separated by blanks.
Implemented in storage::Storage.
| virtual void storage::StorageInterface::printInfo | ( | std::ostream & | str | ) | [pure virtual] |
Print all detected entities to a stream. Exact output format may change between releases. Function mainly meant for debugging purposes.
| str | stream to print data to |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::printInfoCo | ( | std::ostream & | str, | |
| const string & | name | |||
| ) | [pure virtual] |
Print names entities to a stream. Exact output format may change between releases. Function mainly meant for debugging purposes.
| str | stream to print data to | |
| name | name of container to print |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createPartition | ( | const string & | disk, | |
| PartitionType | type, | |||
| unsigned long | start, | |||
| unsigned long | sizeCyl, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a new partition. Units given in disk cylinders.
| disk | device name of disk, e.g. /dev/hda | |
| type | type of partition to create, e.g. primary or extended | |
| start | cylinder number of partition start (cylinders are numbered starting with 0) | |
| sizeCyl | size of partition in disk cylinders | |
| device | is set to the device name of the new partition The name is returned instead of the number since creating the name from the number is not straight-forward. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::resizePartition | ( | const string & | device, | |
| unsigned long | sizeCyl | |||
| ) | [pure virtual] |
Resize an existing disk partition. Units given in disk cylinders. Filesystem data is resized accordingly.
| device | device name of partition | |
| sizeCyl | new size of partition in disk cylinders |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::resizePartitionNoFs | ( | const string & | device, | |
| unsigned long | sizeCyl | |||
| ) | [pure virtual] |
Resize an existing disk partition. Units given in disk cylinders. Filesystem data is ignored.
| device | device name of partition | |
| sizeCyl | new size of partition in disk cylinders |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::updatePartitionArea | ( | const string & | device, | |
| unsigned long | start, | |||
| unsigned long | sizeCyl | |||
| ) | [pure virtual] |
Update area used by a new partition. Units given in disk cylinders. This function can only be used with a partition created but not yet committed.
| device | device name of partition, e.g. /dev/hda1 | |
| start | cylinder number of partition start (cylinders are numbered starting with 0) | |
| sizeCyl | size of partition in disk cylinders |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::nextFreePartition | ( | const string & | disk, | |
| PartitionType | type, | |||
| unsigned & | nr, | |||
| string & | device | |||
| ) | [pure virtual] |
Determine the device name of the next created partition
| disk | device name of disk, e.g. /dev/hda | |
| type | type of partition to create, e.g. primary or extended | |
| nr | is set to the number of the next created partition | |
| device | is set to the device name of the next created partition |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createPartitionKb | ( | const string & | disk, | |
| PartitionType | type, | |||
| unsigned long long | start, | |||
| unsigned long long | size, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a new partition. Units given in Kilobytes.
| disk | device name of disk, e.g. /dev/hda | |
| type | type of partition to create, e.g. primary or extended | |
| start | offset in kilobytes from start of disk | |
| size | size of partition in kilobytes | |
| device | is set to the device name of the new partition The name is returned instead of the number since creating the name from the number is not straight-forward. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createPartitionAny | ( | const string & | disk, | |
| unsigned long long | size, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a new partition of any type anywhere on the disk. Units given in Kilobytes.
| disk | device name of disk, e.g. /dev/hda | |
| size | size of partition in kilobytes | |
| device | is set to the device name of the new partition The name is returned instead of the number since creating the name from the number is not straight-forward. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createPartitionMax | ( | const string & | disk, | |
| PartitionType | type, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a new partition of given type as large as possible.
| disk | device name of disk, e.g. /dev/hda | |
| type | type of partition to create, e.g. primary or extended | |
| device | is set to the device name of the new partition The name is returned instead of the number since creating the name from the number is not straight-forward. |
Implemented in storage::Storage.
| virtual unsigned long long storage::StorageInterface::cylinderToKb | ( | const string & | disk, | |
| unsigned long | size | |||
| ) | [pure virtual] |
Compute number of kilobytes of a given number of disk cylinders
| disk | device name of disk, e.g. /dev/hda | |
| size | number of disk cylinders |
Implemented in storage::Storage.
| virtual unsigned long storage::StorageInterface::kbToCylinder | ( | const string & | disk, | |
| unsigned long long | size | |||
| ) | [pure virtual] |
Compute number of disk cylinders needed for given space
| disk | device name of disk, e.g. /dev/hda | |
| size | number of kilobytes |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removePartition | ( | const string & | partition | ) | [pure virtual] |
Remove a partition
| partition | name of partition, e.g. /dev/hda1 |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changePartitionId | ( | const string & | partition, | |
| unsigned | id | |||
| ) | [pure virtual] |
Change partition id of a partition
| partition | name of partition, e.g. /dev/hda1 | |
| new | partition id (e.g. 0x82 swap, 0x8e for lvm, ...) |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::forgetChangePartitionId | ( | const string & | partition | ) | [pure virtual] |
Forget previously issued change of partition id
| partition | name of partition, e.g. /dev/hda1 |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::destroyPartitionTable | ( | const string & | disk, | |
| const string & | label | |||
| ) | [pure virtual] |
Destroys the partition table of a disk. An empty disk label of the given type without any partition is created.
| disk | device name of disk, e.g. /dev/hda | |
| label | disk label to create on disk , e.g. msdos, gpt, ... |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::initializeDisk | ( | const string & | disk, | |
| bool | value | |||
| ) | [pure virtual] |
Do a what is needed for low level initialisation of a Disk. This function does nothing on normal disks but is needed e.g. on S390 DASD devices where it executes a dasdfmt. If should be considered as destroying all data on the disk.
| disk | device name of disk, e.g. /dev/hda | |
| value | toggle if disk should be initialized or not |
Implemented in storage::Storage.
| virtual string storage::StorageInterface::defaultDiskLabel | ( | ) | const [pure virtual] |
Query the default disk label of the architecture of the machine (e.g. msdos for ix86, gpt for ia64, ...)
Implemented in storage::Storage.
| virtual string storage::StorageInterface::defaultDiskLabelSize | ( | unsigned long long | size_k | ) | const [pure virtual] |
Query the default disk label of the architecture of the machine (e.g. msdos for ix86, gpt for ia64, ...) for a disk with certain size
| size_k | size of disk in kilobyte |
Implemented in storage::Storage.
| virtual unsigned long long storage::StorageInterface::maxSizeLabelK | ( | const string & | label | ) | const [pure virtual] |
Query the maximal allowed size the given disk label supports.
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeFormatVolume | ( | const string & | device, | |
| bool | format, | |||
| FsType | fs | |||
| ) | [pure virtual] |
Sets or unsets the format flag for the given volume.
| device | name of volume, e.g. /dev/hda1 | |
| format | flag if format is set on or off | |
| fs | type of filesystem to create if format is true |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeLabelVolume | ( | const string & | device, | |
| const string & | label | |||
| ) | [pure virtual] |
Sets the value of the filesystem label.
| device | name of volume, e.g. /dev/hda1 | |
| label | value of the label |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeMkfsOptVolume | ( | const string & | device, | |
| const string & | opts | |||
| ) | [pure virtual] |
Sets the value of mkfs options.
| device | name of volume, e.g. /dev/hda1 | |
| opts | options for mkfs command |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeTunefsOptVolume | ( | const string & | device, | |
| const string & | opts | |||
| ) | [pure virtual] |
Sets the value of tunefs options.
| device | name of volume, e.g. /dev/hda1 | |
| opts | options for tunefs command |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeMountPoint | ( | const string & | device, | |
| const string & | mount | |||
| ) | [pure virtual] |
Changes the mount point of a volume
| device | name of volume, e.g. /dev/hda1 | |
| mount | new mount point of the volume (e.g. /home). it is valid to set an empty mount point |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getMountPoint | ( | const string & | device, | |
| string & | mount | |||
| ) | [pure virtual] |
Get the mount point of a volume
| device | name of volume, e.g. /dev/hda1 | |
| mount | will be set to the mount point of the volume (e.g. /home). |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeMountBy | ( | const string & | device, | |
| MountByType | mby | |||
| ) | [pure virtual] |
Changes mount by value in fstab of a volume
| device | name of volume, e.g. /dev/hda1 | |
| options | new mount by value of the volume. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getMountBy | ( | const string & | device, | |
| MountByType & | mby | |||
| ) | [pure virtual] |
Get mount by value in fstab of a volume
| device | name of volume, e.g. /dev/hda1 | |
| options | will be set to the mount by value of the volume. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeFstabOptions | ( | const string & | device, | |
| const string & | options | |||
| ) | [pure virtual] |
Changes the fstab options of a volume
| device | name of volume, e.g. /dev/hda1 | |
| options | new fstab options of the volume (e.g. noauto,user,sync). Multiple options are separated by ",". It is valid to set an empty fstab option. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getFstabOptions | ( | const string & | device, | |
| string & | options | |||
| ) | [pure virtual] |
Get the fstab options of a volume
| device | name of volume, e.g. /dev/hda1 | |
| options | will be set to the fstab options of the volume (e.g. noauto,user,sync). Multiple options are separated by ",". |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::addFstabOptions | ( | const string & | device, | |
| const string & | options | |||
| ) | [pure virtual] |
Add to the fstab options of a volume
| device | name of volume, e.g. /dev/hda1 | |
| options | fstab options to add to already exiting options of the volume (e.g. noauto,user,sync). Multiple options are separated by ",". |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeFstabOptions | ( | const string & | device, | |
| const string & | options | |||
| ) | [pure virtual] |
Remove from the fstab options of a volume
| device | name of volume, e.g. /dev/hda1 | |
| options | fstab options to remove from already existing options of the volume (e.g. noauto). Multiple options are separated by ",". It is possible to specify wildcards, so "uid=.*" matches every option starting with the string "uid=". |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::setCryptPassword | ( | const string & | device, | |
| const string & | pwd | |||
| ) | [pure virtual] |
Set crypt password of a volume
| device | name of volume, e.g. /dev/hda1 | |
| pwd | crypt password for this volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::forgetCryptPassword | ( | const string & | device | ) | [pure virtual] |
Makes library forgt a crypt password of a volume
| device | name of volume, e.g. /dev/hda1 |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getCryptPassword | ( | const string & | device, | |
| string & | pwd | |||
| ) | [pure virtual] |
Get crypt password of a volume
| device | name of volume, e.g. /dev/hda1 | |
| pwd | crypt password for this volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::setCrypt | ( | const string & | device, | |
| bool | val | |||
| ) | [pure virtual] |
Set encryption state of a volume
| device | name of volume, e.g. /dev/hda1 | |
| val | flag if encryption should be activated |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::setCryptType | ( | const string & | device, | |
| bool | val, | |||
| EncryptType | typ | |||
| ) | [pure virtual] |
Set encryption state of a volume
| device | name of volume, e.g. /dev/hda1 | |
| val | flag if encryption should be activated | |
| typ | type of encryption to set up |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getCrypt | ( | const string & | device, | |
| bool & | val | |||
| ) | [pure virtual] |
Get encryption state of a volume
| device | name of volume, e.g. /dev/hda1 | |
| val | will be set if encryption is activated |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::setIgnoreFstab | ( | const string & | device, | |
| bool | val | |||
| ) | [pure virtual] |
Set fstab handling state of a volume. This way one can make libstorage ignore fstab handling for a volume. Use this with care.
| device | name of volume, e.g. /dev/hda1 | |
| val | flag if fstab should be ignored for this volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getIgnoreFstab | ( | const string & | device, | |
| bool & | val | |||
| ) | [pure virtual] |
Get fstab handling state of a volume.
| device | name of volume, e.g. /dev/hda1 | |
| val | will be set if fstab should be ignored for this volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeDescText | ( | const string & | device, | |
| const string & | txt | |||
| ) | [pure virtual] |
Sets the value of description text. This text will be returned together with the text returned by getCommitActions
| device | name of volume, e.g. /dev/hda1 | |
| txt | description text for this partition |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::addFstabEntry | ( | const string & | device, | |
| const string & | mount, | |||
| const string & | vfs, | |||
| const string & | options, | |||
| unsigned | freq, | |||
| unsigned | passno | |||
| ) | [pure virtual] |
Adds the specified entry to /etc/fstab
| device | name of volume, e.g. /dev/hda1 | |
| mount | mount point, e.g. /home | |
| vfs | virtual filesystem type, e.g. reiserfs or ext3 | |
| options | fstab options e.g. noauto,user,sync | |
| freq | value for fifth fstab field | |
| passno | value for sixth fstab field |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::resizeVolume | ( | const string & | device, | |
| unsigned long long | newSizeMb | |||
| ) | [pure virtual] |
Resizes a volume while keeping the data on the filesystem
| device | name of volume, e.g. /dev/hda1 | |
| newSizeMb | new size desired volume in Megabyte |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::resizeVolumeNoFs | ( | const string & | device, | |
| unsigned long long | newSizeMb | |||
| ) | [pure virtual] |
Resizes a volume while ignoring the data on the filesystem
| device | name of volume, e.g. /dev/hda1 | |
| newSizeMb | new size desired volume in Megabyte |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::forgetResizeVolume | ( | const string & | device | ) | [pure virtual] |
Forget about possible resize of an volume.
| device | device name of volume |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setRecursiveRemoval | ( | bool | val | ) | [pure virtual] |
Set handling of deletion of entities that belong to other volumes. Normally it is not possible to remove a volume that is part of another entity (e.g. you cannot remove a partition that is part of an LVM Volume group or a Software raid). This setting makes the removal recursive, this means all entities where the removed volume is a part of are also removed. Use this setting with extreme care, it may cause the removal of LVM Volume group spanning multiple disks just because one partition of the LVM Volume group got deleted. Default value of this flag is false.
| val | flag if removal is done recursive |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::getRecursiveRemoval | ( | ) | const [pure virtual] |
Get value of the flag for recursive removal
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setZeroNewPartitions | ( | bool | val | ) | [pure virtual] |
Set handling of newly created partitions. With this flag once can make the library overwrite start and end of newly created partitions with zeroes. This prevents that obsolete structures (e.g. LVM VGs or MD superblocks) still exists on newly created partitions since the area on disk previously contained a LVM PV or a device of a software raid. volumes. Use this setting with extreme care, it make libstorage behave fundamentally different from all other partitioning tools. Default value of this flag is false.
| val | flag if newly created partitions should be zeroed |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::getZeroNewPartitions | ( | ) | const [pure virtual] |
Get value of the flag for zeroing newly created partitions
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setDefaultMountBy | ( | MountByType | val | ) | [pure virtual] |
Implemented in storage::Storage.
| virtual MountByType storage::StorageInterface::getDefaultMountBy | ( | ) | const [pure virtual] |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setRootPrefix | ( | const string & | root | ) | [pure virtual] |
Set value for root prefix. This value is appended to all mount points of volumes, when changes are commited. Config files fstab, cryptotab, raidtab and mdadm.conf are also created relative to this prefix. This variable must be set before first call to commit.
| root | new value for root prefix |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setDetectMountedVolumes | ( | bool | val | ) | [pure virtual] |
Determine of libstorage should detect mounted volumes.
| val | flag if mounted volumes should be detected |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::getDetectMountedVolumes | ( | ) | const [pure virtual] |
Get value of the flag for detection of mounted volumes.
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeVolume | ( | const string & | device | ) | [pure virtual] |
Removes a volume from the system. This function can be used for removing all types of volumes (partitions, LVM LVs, MD devices ...)
| device | name of volume, e.g. /dev/hda1 |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createLvmVg | ( | const string & | name, | |
| unsigned long long | peSizeK, | |||
| bool | lvm1, | |||
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Create a LVM volume group
| name | name of volume group, must not contain blanks, colons and shell special characters (e.g. system) | |
| peSizeK | physical extent size in kilobytes | |
| lvm1 | flag if lvm1 compatible format should be used | |
| devs | list with physical devices to add to that volume group |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeLvmVg | ( | const string & | name | ) | [pure virtual] |
Remove a LVM volume group. If the volume group contains logical volumes, these are automatically also removed.
| name | name of volume group |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::extendLvmVg | ( | const string & | name, | |
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Extend a LVM volume group with additional physical devices
| name | name of volume group | |
| devs | list with physical devices to add to that volume group |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::shrinkLvmVg | ( | const string & | name, | |
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Shrink a LVM volume group
| name | name of volume group | |
| devs | list with physical devices to remove from that volume group |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createLvmLv | ( | const string & | vg, | |
| const string & | name, | |||
| unsigned long long | sizeM, | |||
| unsigned | stripe, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a LVM logical volume
| vg | name of volume group | |
| name | of logical volume | |
| size | size of logical volume in megabytes | |
| stripe | stripe count of logical volume (use 1 unless you know exactly what you are doing) | |
| device | is set to the device name of the new LV |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeLvmLvByDevice | ( | const string & | device | ) | [pure virtual] |
Remove a LVM logical volume
| device | name of logical volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeLvmLv | ( | const string & | vg, | |
| const string & | name | |||
| ) | [pure virtual] |
Remove a LVM logical volume
| vg | name of volume group | |
| name | of logical volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeLvStripeCount | ( | const string & | vg, | |
| const string & | name, | |||
| unsigned long | stripes | |||
| ) | [pure virtual] |
Change stripe count of a LVM logical volume. This can only be before the volume is created on disk.
| vg | name of volume group | |
| name | of logical volume | |
| stripe | new stripe count of logical volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeLvStripeSize | ( | const string & | vg, | |
| const string & | name, | |||
| unsigned long long | stripeSize | |||
| ) | [pure virtual] |
Change stripe size of a LVM logical volume. This can only be before the volume is created on disk.
| vg | name of volume group | |
| name | of logical volume | |
| stripeSize | new stripe size of logical volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createEvmsContainer | ( | const string & | name, | |
| unsigned long long | peSizeK, | |||
| bool | lvm1, | |||
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Create a EVMS container
| name | name of container, must not contain blanks, colons and shell special characters (e.g. system) | |
| peSizeK | physical extent size in kilobytes | |
| lvm1 | flag if lvm1 compatible format should be used | |
| devs | list with physical devices to add to that volume group |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::modifyEvmsContainer | ( | const string & | old_name, | |
| const string & | new_name, | |||
| unsigned long long | peSizeK, | |||
| bool | lvm1 | |||
| ) | [pure virtual] |
Modify a EVMS container. This function can only be used between the creation of a EVMS container and the next call to commit(). Containers that are already written to disk cannot have these properties changed.
| old_name | name of container, must not contain blanks, colons and shell special characters (e.g. system) | |
| new_name | new name of container, same restrictions as for first parameter | |
| peSizeK | physical extent size in kilobytes | |
| lvm1 | flag if lvm1 compatible format should be used |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeEvmsContainer | ( | const string & | name | ) | [pure virtual] |
Remove a EVMS container. If the container contains logical volumes, these are automatically also removed.
| name | name of container |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::extendEvmsContainer | ( | const string & | name, | |
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Extend a EVMS container with additional physical devices
| name | name of container | |
| devs | list with physical devices to add to that container |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::shrinkEvmsContainer | ( | const string & | name, | |
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Shrink a EVMS container
| name | name of container | |
| devs | list with physical devices to remove from that container |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createEvmsVolume | ( | const string & | coname, | |
| const string & | name, | |||
| unsigned long long | sizeM, | |||
| unsigned | stripe, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a EVMS volume within a EVMS container
| coname | of container | |
| name | of volume | |
| size | size of volume in megabytes | |
| stripe | stripe count of volume (use 1 unless you know exactly what you are doing) | |
| device | is set to the device name of the new volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeEvmsVolumeByDevice | ( | const string & | device | ) | [pure virtual] |
Remove a EVMS volume
| device | name of EVMS volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeEvmsVolume | ( | const string & | coname, | |
| const string & | name | |||
| ) | [pure virtual] |
Remove a EVMS volume from a EVMS container
| coname | name of container | |
| name | name of volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeEvmsStripeCount | ( | const string & | coname, | |
| const string & | name, | |||
| unsigned long | stripe | |||
| ) | [pure virtual] |
Change strip count of a EVMS volume. This can only be before the volume is created on disk.
| coname | name of EVMS container | |
| name | of volume | |
| stripe | new stripe count of volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeEvmsStripeSize | ( | const string & | coname, | |
| const string & | name, | |||
| unsigned long long | stripeSize | |||
| ) | [pure virtual] |
Change strip size of a EVMS volume. This can only be before the volume is created on disk.
| coname | name of EVMS container | |
| name | of volume | |
| stripeSize | new stripe size of volume |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::evmsActivate | ( | bool | force | ) | [pure virtual] |
Activate EVMS devices on the system. This is only necessary on systems where EVMS is not activated during system startup. This command is executed immediately, there is no need for a call to commit().
| force | flag if activation should be forced |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createMd | ( | const string & | name, | |
| MdType | rtype, | |||
| const deque< string > & | devs | |||
| ) | [pure virtual] |
Create a Software raid device by name
| name | name of software raid device to create (e.g. /dev/md0) | |
| rtype | raid personality of the new software raid | |
| devs | list with physical devices for the new software raid |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createMdAny | ( | MdType | rtype, | |
| const deque< string > & | devs, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a Software raid device. Name determined by library.
| rtype | raid personality of the new software raid | |
| devs | list with physical devices for the new software raid | |
| device | device name of created software raid device |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeMd | ( | const string & | name, | |
| bool | destroySb | |||
| ) | [pure virtual] |
Remove a Software raid device.
| name | name of software raid device to remove (e.g. /dev/md0) | |
| destroySb | flag if the MD superblocks on the physical devices should be destroyed after md device is deleted |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::extendMd | ( | const string & | name, | |
| const string & | dev | |||
| ) | [pure virtual] |
Add a partition to a raid device. This can only be done before the raid is created on disk.
| name | name of software raid device (e.g. /dev/md0) | |
| dev | partition to add to that raid |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::shrinkMd | ( | const string & | name, | |
| const string & | dev | |||
| ) | [pure virtual] |
Remove a partition from a raid device. This can only be done before the raid is created on disk.
| name | name of software raid device (e.g. /dev/md0) | |
| dev | partition to remove from that raid |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeMdType | ( | const string & | name, | |
| MdType | rtype | |||
| ) | [pure virtual] |
Change raid type of a raid device. This can only be done before the raid is created on disk.
| name | name of software raid device (e.g. /dev/md0) | |
| rtype | new raid personality of the software raid |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeMdChunk | ( | const string & | name, | |
| unsigned long | chunk | |||
| ) | [pure virtual] |
Change chunk size of a raid device. This can only be done before the raid is created on disk.
| name | name of software raid device (e.g. /dev/md0) | |
| chunk | new chunk size of the software raid |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::changeMdParity | ( | const string & | name, | |
| MdParity | ptype | |||
| ) | [pure virtual] |
Change parity of a raid device with raid type raid5. This can only be done before the raid is created on disk.
| name | name of software raid device (e.g. /dev/md0) | |
| ptype | new parity of the software raid |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::checkMd | ( | const string & | name | ) | [pure virtual] |
Check if a raid device is valid
| name | name of software raid device (e.g. /dev/md0) |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::addNfsDevice | ( | const string & | nfsDev, | |
| const string & | opts, | |||
| unsigned long long | sizeK, | |||
| const string & | mp | |||
| ) | [pure virtual] |
Add knowledge about existence of nfs device.
| nfsDev | name of nfs device | |
| sizeK | size of the nfs device | |
| opts | mount options for nfs mount | |
| mp | mount point of the nfs device |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::checkNfsDevice | ( | const string & | nfsDev, | |
| const string & | opts, | |||
| unsigned long long & | sizeK | |||
| ) | [pure virtual] |
Check accessibility and size of nfs device.
| nfsDev | name of nfs device | |
| opts | mount options for nfs mount | |
| sizeK | size of the nfs device |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createFileLoop | ( | const string & | lname, | |
| bool | reuseExisting, | |||
| unsigned long long | sizeK, | |||
| const string & | mp, | |||
| const string & | pwd, | |||
| string & | device | |||
| ) | [pure virtual] |
Create a file based loop device. Encryption is automatically activated on the loop device.
| lname | name of file the loop device is based on | |
| reuseExisting | if true an already existing file will be reused. if false the file will be created new. if false the format flag for the device is set by default. | |
| sizeK | size of the created file, this parameter is ignored if reuseExisting is true and a file already exists. | |
| mp | mount point of the file based loop device | |
| pwd | crypt password for the loop device, encryption type is determined automatically by the system | |
| device | the name of the created loop device |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::modifyFileLoop | ( | const string & | device, | |
| const string & | lname, | |||
| bool | reuseExisting, | |||
| unsigned long long | sizeK | |||
| ) | [pure virtual] |
Modify size and pathname of a file based loop device. This function can only be used between the creation of a device and the next call to commit(). Containers that are already created cannot have these properties changed. The size has only a meaning if reuseExisting is true, otherwise it is ignored.
| device | device name of the loop device | |
| lname | name of file the loop device is based on | |
| reuseExisting | if true an already existing file will be reused. if false the file will be created new. if false the format flag for the device is set by default. | |
| sizeK | size of the created file, this parameter is ignored if reuseExisting is false |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeFileLoop | ( | const string & | lname, | |
| bool | removeFile | |||
| ) | [pure virtual] |
Remove a file based loop device from the system.
| lname | name of file the loop device is based on | |
| removeFile | if true the file is removed together with the based loop device. If false the file is not touched. |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeDmraid | ( | const string & | name | ) | [pure virtual] |
Remove a Software raid device.
| name | name of dmraid device to remove (e.g. pdc_dabaheedj) |
Implemented in storage::Storage.
| virtual deque<string> storage::StorageInterface::getCommitActions | ( | bool | mark_destructive | ) | [pure virtual] |
Gets a list of string describing the actions to be executed after next call to commit()
| mark_destructive | if true use <red> around </red> destructive actions (like e.g. deletion, formatting, ...) |
Implemented in storage::Storage.
| virtual const string& storage::StorageInterface::getLastAction | ( | ) | const [pure virtual] |
Gets action performed last during previous call to commit()
Implemented in storage::Storage.
| virtual const string& storage::StorageInterface::getExtendedErrorMessage | ( | ) | const [pure virtual] |
Gets a possible existing extended error message describing failure of to last call commit()
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setCallbackProgressBar | ( | CallbackProgressBar | pfnc | ) | [pure virtual] |
Sets the callback function called on progress bar events
| pfnc | pointer to function |
Implemented in storage::Storage.
| virtual CallbackProgressBar storage::StorageInterface::getCallbackProgressBar | ( | ) | const [pure virtual] |
Query the callback function called on progress bar events
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setCallbackShowInstallInfo | ( | CallbackShowInstallInfo | pfnc | ) | [pure virtual] |
Sets the callback function called to display install info
| pfnc | pointer to function |
Implemented in storage::Storage.
| virtual CallbackShowInstallInfo storage::StorageInterface::getCallbackShowInstallInfo | ( | ) | const [pure virtual] |
Query the callback function called to display install info
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setCallbackInfoPopup | ( | CallbackInfoPopup | pfnc | ) | [pure virtual] |
Sets the callback function called to display a info popup to the user
| pfnc | pointer to function |
Implemented in storage::Storage.
| virtual CallbackInfoPopup storage::StorageInterface::getCallbackInfoPopup | ( | ) | const [pure virtual] |
Query the callback function called to display info popup to the user
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setCallbackYesNoPopup | ( | CallbackYesNoPopup | pfnc | ) | [pure virtual] |
Sets the callback function called to get a Yes/No decision by the user.
| pfnc | pointer to function |
Implemented in storage::Storage.
| virtual CallbackYesNoPopup storage::StorageInterface::getCallbackYesNoPopup | ( | ) | const [pure virtual] |
Query the callback function called to get a Yes/No decision by the user.
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setCacheChanges | ( | bool | cache | ) | [pure virtual] |
With the function setCacheChanges you can turn the caching mode on and off. Turning of caching mode will cause all changes done so far to be committed upto the next modifying function.
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::isCacheChanges | ( | ) | const [pure virtual] |
Query the caching mode.
Implemented in storage::Storage.
| virtual int storage::StorageInterface::commit | ( | ) | [pure virtual] |
Commit the current state to the system. Only useful in caching mode.
Implemented in storage::Storage.
| virtual int storage::StorageInterface::createBackupState | ( | const string & | name | ) | [pure virtual] |
Create backup of current state of all containers
| name | name under which the backup should be created |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::restoreBackupState | ( | const string & | name | ) | [pure virtual] |
Restore state to a previously created backup
| name | name of the backup to restore |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::checkBackupState | ( | const string & | name | ) | [pure virtual] |
Checks if a backup with a certain name already exists
| name | name of the backup to check |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::equalBackupStates | ( | const string & | lhs, | |
| const string & | rhs, | |||
| bool | verbose_log | |||
| ) | const [pure virtual] |
Compare two backup states
| lhs | name of backup to compare, empty string means active state | |
| rhs | name of backup to compare, empty string means active state | |
| verbose_log | flag if differences should be logged in detail |
Implemented in storage::Storage.
| virtual int storage::StorageInterface::removeBackupState | ( | const string & | name | ) | [pure virtual] |
Remove existing backup state
| name | name of backup to remove, empty string means to remove all existing backup states |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::checkDeviceMounted | ( | const string & | device, | |
| string & | mp | |||
| ) | [pure virtual] |
Determine if the given device is known and mounted somewhere
| device | device name to check (checks also all alias names) | |
| mp | set to current mount point if mounted |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::umountDevice | ( | const string & | device | ) | [pure virtual] |
Umount the given device and do what is necessary to remove underlying volume (e.g. do losetup -d if loop is set up) The function umounts at once, /etc/fstab is unaffected
| device | device name to umount |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::mountDevice | ( | const string & | device, | |
| const string & | mp | |||
| ) | [pure virtual] |
Mount the given device and do what is necessary to access volume (e.g. do losetup if loop is set up) The function mounts at once, /etc/fstab is unaffected
| device | device name to mount | |
| mp | mount point to mount to |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::mountDeviceOpts | ( | const string & | device, | |
| const string & | mp, | |||
| const string & | opts | |||
| ) | [pure virtual] |
Mount the given device with given options and do what is necessary to access volume (e.g. do losetup if loop is set up) The function mounts at once, /etc/fstab is unaffected
| device | device name to mount | |
| mp | mount point to mount to | |
| opts | options to use for mount |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::mountDeviceRo | ( | const string & | device, | |
| const string & | mp, | |||
| const string & | opts | |||
| ) | [pure virtual] |
Mount the given device readonly and do what is necessary to access volume (e.g. do losetup if loop is set up) The function mounts at once, /etc/fstab is unaffected
| device | device name to mount | |
| mp | mount point to mount to | |
| opts | options to use for mount |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::checkDmMapsTo | ( | const string & | device | ) | [pure virtual] |
Check if there are dm maps to a given device
| device | device name for which dm maps should be checked |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::removeDmTableTo | ( | const string & | device | ) | [pure virtual] |
Remove all possibly existing dm maps to a given device
| device | device name for which dm maps should be removed |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::getFreeInfo | ( | const string & | device, | |
| unsigned long long & | resize_free, | |||
| unsigned long long & | df_free, | |||
| unsigned long long & | used, | |||
| bool & | win, | |||
| bool & | efi, | |||
| bool | use_cache | |||
| ) | [pure virtual] |
Detect potentially available free space on a partition
| device | device to check | |
| resize_free | free space in kilobytes available for resize | |
| df_free | free space in kilobytes available in filesystem | |
| used | used space in kilobytes for filesystem | |
| win | flag if partition contains a windows installation | |
| use_cache | function should return cached data if available |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::readFstab | ( | const string & | dir, | |
| deque< VolumeInfo > & | infos | |||
| ) | [pure virtual] |
Read fstab and cryptotab, if existent, from a specified directory and return the volumes found in fstab and cryptotab
| dir | directory where fstab and cryptotab are read from | |
| infos | list of records that get filled with volume info |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::setNoEvms | ( | bool | val | ) | [pure virtual] |
Possibility to switch Evms handling off or on in libstorage. This function must be called prior to libstorage initialisation. Default is on.
| val | determines if Evms is switched off or on |
Implemented in storage::Storage.
| virtual bool storage::StorageInterface::getNoEvms | ( | ) | [pure virtual] |
Returns the state of Evms handling in libstorage.
| val | determines if Evms is switched off or on |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::activateHld | ( | bool | val | ) | [pure virtual] |
Activate or deactivate higher level devices as MD,LVM,DM,EVMS
| val | flag if devices should be activated or deactivated |
Implemented in storage::Storage.
| virtual void storage::StorageInterface::rescanEverything | ( | ) | [pure virtual] |
Rescan all disks. All currently detected objects are forgotten and a new scan for all type of objects (disks, LVM, EVMS, MD) is initiated. This function makes sense to be called after something outside of libstorage changed disk layout or created storage objects. Any changes already cached are lost.
Implemented in storage::Storage.
| virtual void storage::StorageInterface::dumpObjectList | ( | ) | [pure virtual] |
Dump list of all objects to log file.
Implemented in storage::Storage.
| virtual int storage::StorageInterface::getContVolInfo | ( | const string & | dev, | |
| ContVolInfo & | info | |||
| ) | [pure virtual] |
Split volume device name up into container name and a volume name. For Containers where this is appropriate (e.g. disks, MD, loop) also a volume number is provided.
| disk | device name of volume, e.g. /dev/hda1 | |
| info | record that get filled with split data |
Implemented in storage::Storage.
1.5.5