#include <StorageInterface.h>
Inheritance diagram for storage::StorageInterface:
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 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 | getLoopInfo (deque< LoopInfo > &plist)=0 |
virtual int | getDmInfo (deque< DmInfo > &plist)=0 |
virtual bool | getFsCapabilities (FsType fstype, FsCapabilities &fscapabilities) const =0 |
virtual void | printInfo (std::ostream &str)=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 | 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 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 | 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 | 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 | 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 | 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 | 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 | changeEvmsStripeSize (const string &coname, const string &name, unsigned long long stripeSize)=0 |
virtual int | evmsActivate ()=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 | 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 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 | checkDmMapsTo (const string &device)=0 |
virtual bool | removeDmMapsTo (const string &device, bool also_evms)=0 |
virtual bool | getFreeInfo (const string &device, unsigned long long &resize_free, unsigned long long &df_free, unsigned long long &used, bool &win, bool use_cache)=0 |
virtual bool | readFstab (const string &dir, deque< VolumeInfo > &infos)=0 |
virtual void | activateHld (bool val)=0 |
virtual void | rescanEverything ()=0 |
virtual void | dumpObjectList ()=0 |
|
|
|
|
|
Activate or deactivate higher level devices as MD,LVM,DM,EVMS
Implemented in storage::Storage. |
|
Adds the specified entry to /etc/fstab
Implemented in storage::Storage. |
|
Add to the fstab options of a volume
Implemented in storage::Storage. |
|
Change strip size of a EVMS volume. This can only be before the volume is created on disk.
Implemented in storage::Storage. |
|
Sets or unsets the format flag for the given volume.
Implemented in storage::Storage. |
|
Changes the fstab options of a volume
Implemented in storage::Storage. |
|
Sets the value of the filesystem label.
Implemented in storage::Storage. |
|
Change stripe size of a LVM logical volume. This can only be before the volume is created on disk.
Implemented in storage::Storage. |
|
Change chunk size of a raid device. This can only be done before the raid is created on disk.
Implemented in storage::Storage. |
|
Change parity of a raid device with raid type raid5. This can only be done before the raid is created on disk.
Implemented in storage::Storage. |
|
Change raid type of a raid device. This can only be done before the raid is created on disk.
Implemented in storage::Storage. |
|
Sets the value of mkfs options.
Implemented in storage::Storage. |
|
Changes mount by value in fstab of a volume
Implemented in storage::Storage. |
|
Changes the mount point of a volume
Implemented in storage::Storage. |
|
Change partition id of a partition
Implemented in storage::Storage. |
|
Checks if a backup with a certain name already exists
Implemented in storage::Storage. |
|
Determine if the given device is known and mounted somewhere
Implemented in storage::Storage. |
|
Check if there are dm maps to a given device
Implemented in storage::Storage. |
|
Check if a raid device is valid
Implemented in storage::Storage. |
|
Commit the current state to the system. Only useful in caching mode. Implemented in storage::Storage. |
|
Create backup of current state of all containers
Implemented in storage::Storage. |
|
Create a EVMS container
Implemented in storage::Storage. |
|
Create a EVMS volume within a EVMS container
Implemented in storage::Storage. |
|
Create a file based loop device. Encryption is automatically activated on the loop device.
Implemented in storage::Storage. |
|
Create a LVM logical volume
Implemented in storage::Storage. |
|
Create a LVM volume group
Implemented in storage::Storage. |
|
Create a Software raid device by name
Implemented in storage::Storage. |
|
Create a Software raid device. Name determined by library.
Implemented in storage::Storage. |
|
Create a new partition. Units given in disk cylinders.
Implemented in storage::Storage. |
|
Create a new partition of any type anywhere on the disk. Units given in Kilobytes.
Implemented in storage::Storage. |
|
Create a new partition. Units given in Kilobytes.
Implemented in storage::Storage. |
|
Create a new partition of given type as large as possible.
Implemented in storage::Storage. |
|
Compute number of kilobytes of a given number of disk cylinders
Implemented in storage::Storage. |
|
Query the default disk label of the architecture of the machine (e.g. msdos for ix86, gpt for ia64, ...)
Implemented in storage::Storage. |
|
Destroys the partition table of a disk. An empty disk label of the given type without any partition is created.
Implemented in storage::Storage. |
|
Dump list of all objects to log file. Implemented in storage::Storage. |
|
Compare two backup states
Implemented in storage::Storage. |
|
Activate EVMS devices on the system. This is only neseccary on systems where EVMS is not activated during system startup. This command is executed immediately, there is no need for a call to commit().
Implemented in storage::Storage. |
|
Extend a EVMS container with additional physical devices
Implemented in storage::Storage. |
|
Extend a LVM volume group with additional physical devices
Implemented in storage::Storage. |
|
Add a partition to a raid device. This can only be done before the raid is created on disk.
Implemented in storage::Storage. |
|
Forget previouly issued change of partition id
Implemented in storage::Storage. |
|
Mkes library forgt a crypt password of a volume
Implemented in storage::Storage. |
|
Forget about possible resize of an volume.
Implemented in storage::Storage. |
|
Query the callback function called to display info popup to the user
Implemented in storage::Storage. |
|
Query the callback function called on progress bar events
Implemented in storage::Storage. |
|
Query the callback function called to display install info
Implemented in storage::Storage. |
|
Query the callback function called to get a Yes/No decision by the user.
Implemented in storage::Storage. |
|
Gets a list of string describing the actions to be executed after next call to commit()
Implemented in storage::Storage. |
|
Query all containers found in system |
|
Query disk info for a disk device
Implemented in storage::Storage. |
|
Query container info for a EVMS container
Implemented in storage::Storage. |
|
Query info for a LVM volume group
Implemented in storage::Storage. |
|
Get encryption state of a volume
Implemented in storage::Storage. |
|
Get crypt password of a volume
Implemented in storage::Storage. |
|
Implemented in storage::Storage. |
|
Get value of the flag for detection of mounted volumes.
Implemented in storage::Storage. |
|
Query disk info for a disk device
Implemented in storage::Storage. |
|
Query infos for dm devices in system
|
|
Query container info for a EVMS container
Implemented in storage::Storage. |
|
Query infos for EVMS volumes of a EVMS container
|
|
Gets a possible existing extended error message describing failure of to last call commit()
Implemented in storage::Storage. |
|
Detect potentially available free space on a partition
Implemented in storage::Storage. |
|
Query capabilities of a filesystem type. Implemented in storage::Storage. |
|
Get the fstab options of a volume
Implemented in storage::Storage. |
|
Get fstab handling state of a volume.
Implemented in storage::Storage. |
|
Gets action performed last during previous call to commit()
Implemented in storage::Storage. |
|
Query infos for file based loop devices in system
|
|
Query infos for LVM LVs of a LVM VG
|
|
Query info for a LVM volume group
Implemented in storage::Storage. |
|
Query infos for software raid devices in system
|
|
Get mount by value in fstab of a volume
Implemented in storage::Storage. |
|
Get the mount point of a volume
Implemented in storage::Storage. |
|
Query infos for partitions of a disk
|
|
Get value of the flag for recursive removal
Implemented in storage::Storage. |
|
Query a volume by device name found in system
Implemented in storage::Storage. |
|
Query all volumes found in system
|
|
Get value of the flag for zeroing newly created partitions
Implemented in storage::Storage. |
|
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.
Implemented in storage::Storage. |
|
Query the caching mode. Implemented in storage::Storage. |
|
Compute number of disk cylinders needed for given space
Implemented in storage::Storage. |
|
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.
Implemented in storage::Storage. |
|
Modify size and pathname of a file based loop device. This function can only be used between the creation of a devce 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.
Implemented in storage::Storage. |
|
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
Implemented in storage::Storage. |
|
Determine the device name of the next created partition
Implemented in storage::Storage. |
|
Print detected entities on a stream. Exact output format may change between releases. Function mainly meant for debugging purposes.
Implemented in storage::Storage. |
|
Read fstab and cryptotab, if existent, from a specified directory and return the volumes found in fstab and cryptotab
|
|
Remove existing backup state
Implemented in storage::Storage. |
|
Remove all possibly existing dm maps to a given device
Implemented in storage::Storage. |
|
Remove a EVMS container. If the container contains logical volumes, these are automatically also removed.
Implemented in storage::Storage. |
|
Remove a EVMS volume from a EVMS container
Implemented in storage::Storage. |
|
Remove a EVMS volume
Implemented in storage::Storage. |
|
Remove a file based loop device from the system.
Implemented in storage::Storage. |
|
Remove from the fstab options of a volume
Implemented in storage::Storage. |
|
Remove a LVM logical volume
Implemented in storage::Storage. |
|
Remove a LVM logical volume
Implemented in storage::Storage. |
|
Remove a LVM volume group. If the volume group contains logical volumes, these are automatically also removed.
Implemented in storage::Storage. |
|
Remove a Software raid device.
Implemented in storage::Storage. |
|
Remove a partition
Implemented in storage::Storage. |
|
Removes a volume from the system. This function can be used for removing all types of volumes (partitions, LVM LVs, MD devices ...)
Implemented in storage::Storage. |
|
Rescan all disks. Alle 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. |
|
Resize an existing disk partition. Units given in disk cylinders.
Implemented in storage::Storage. |
|
Resizes a volume while keeping the data on the filesystem
Implemented in storage::Storage. |
|
Restore state to a previously created backup
Implemented in storage::Storage. |
|
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. |
|
Sets the callback function called to display a info popup to the user
Implemented in storage::Storage. |
|
Sets the callback function called on progress bar events
Implemented in storage::Storage. |
|
Sets the callback function called to display install info
Implemented in storage::Storage. |
|
Sets the callback function called to get a Yes/No decision by the user.
Implemented in storage::Storage. |
|
Set encryption state of a volume
Implemented in storage::Storage. |
|
Set crypt password of a volume
Implemented in storage::Storage. |
|
Implemented in storage::Storage. |
|
Determine of libstorage should detect mounted volumes.
Implemented in storage::Storage. |
|
Set fstab handling state of a volume. This way one can make libstorage ignore fstab handling for a volume. Use this with care.
Implemented in storage::Storage. |
|
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.
Implemented in storage::Storage. |
|
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.
Implemented in storage::Storage. |
|
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.
Implemented in storage::Storage. |
|
Shrink a EVMS container
Implemented in storage::Storage. |
|
Shrink a LVM volume group
Implemented in storage::Storage. |
|
Remove a partition from a raid device. This can only be done before the raid is created on disk.
Implemented in storage::Storage. |
|
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
Implemented in storage::Storage. |
|
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.
Implemented in storage::Storage. |