storage::Storage Class Reference

Main class to access libstorage functionality. More...

#include <Storage.h>

Inheritance diagram for storage::Storage:

storage::StorageInterface

List of all members.

Public Types

typedef DerefIterator
< ConstContPIterator, const
Container
ConstContIterator
typedef IterPair
< ConstContIterator
ConstContPair
typedef DerefIterator
< ConstDiskPIterator, const
Disk
ConstDiskIterator
typedef IterPair
< ConstDiskIterator
ConstDiskPair
typedef DerefIterator
< ConstLvmVgPIterator, const
LvmVg
ConstLvmVgIterator
typedef IterPair
< ConstLvmVgIterator
ConstLvmVgPair
typedef DerefIterator
< ConstDmPartCoPIterator,
const DmPartCo
ConstDmPartCoIterator
typedef IterPair
< ConstDmPartCoIterator
ConstDmPartCoPair
typedef DerefIterator
< ConstDmraidCoPIterator,
const DmraidCo
ConstDmraidCoIterator
typedef IterPair
< ConstDmraidCoIterator
ConstDmraidCoPair
typedef DerefIterator
< ConstDmmultipathCoPIterator,
const DmmultipathCo
ConstDmmultipathCoIterator
typedef IterPair
< ConstDmmultipathCoIterator
ConstDmmultipathCoPair
typedef DerefIterator
< ConstMdPartCoPIterator,
const MdPartCo
ConstMdPartCoIterator
typedef IterPair
< ConstMdPartCoIterator
ConstMdPartCoPair
typedef DerefIterator
< ConstVolPIterator, const
Volume
ConstVolIterator
typedef IterPair
< ConstVolIterator
ConstVolPair
typedef DerefIterator
< ConstPartPIterator, const
Partition
ConstPartIterator
typedef IterPair
< ConstPartIterator
ConstPartPair
typedef DerefIterator
< ConstLvmLvPIterator, const
LvmLv
ConstLvmLvIterator
typedef IterPair
< ConstLvmLvIterator
ConstLvmLvPair
typedef DerefIterator
< ConstMdPIterator, const Md
ConstMdIterator
typedef IterPair< ConstMdIteratorConstMdPair
typedef DerefIterator
< ConstMdPartPIterator, const
MdPart
ConstMdPartIterator
typedef IterPair
< ConstMdPartIterator
ConstMdPartPair
typedef DerefIterator
< ConstLoopPIterator, const
Loop
ConstLoopIterator
typedef IterPair
< ConstLoopIterator
ConstLoopPair
typedef DerefIterator
< ConstBtrfsPIterator, const
Btrfs
ConstBtrfsIterator
typedef IterPair
< ConstBtrfsIterator
ConstBtrfsPair
typedef DerefIterator
< ConstTmpfsPIterator, const
Tmpfs
ConstTmpfsIterator
typedef IterPair
< ConstTmpfsIterator
ConstTmpfsPair
typedef DerefIterator
< ConstNfsPIterator, const Nfs
ConstNfsIterator
typedef IterPair
< ConstNfsIterator
ConstNfsPair
typedef DerefIterator
< ConstDmPIterator, const Dm
ConstDmIterator
typedef IterPair< ConstDmIteratorConstDmPair
typedef DerefIterator
< ConstDmraidPIterator, const
Dmraid
ConstDmraidIterator
typedef IterPair
< ConstDmraidIterator
ConstDmraidPair
typedef DerefIterator
< ConstDmmultipathPIterator,
const Dmmultipath
ConstDmmultipathIterator
typedef IterPair
< ConstDmmultipathIterator
ConstDmmultipathPair

Public Member Functions

 Storage (const Environment &env)
bool readonly () const
bool testmode () const
bool autodetect () const
bool instsys () const
string logdir () const
string testdir () const
void setCacheChanges (bool val=true)
bool isCacheChanges () const
void assertInit ()
void rescanEverything ()
bool rescanCryptedObjects ()
int checkCache ()
const string & root () const
string prependRoot (const string &mp) const
const string & tmpDir () const
bool hasIScsiDisks () const
string bootMount () const
const ArchInfogetArchInfo () const
EtcFstabgetFstab ()
EtcMdadmgetMdadm ()
void handleLogFile (const string &name) const
void printInfo (std::ostream &str) const
void logCo (const Container *c) const
void logProcData (const string &str="") const
void clearUsedBy (const string &dev)
void clearUsedBy (const list< string > &devs)
void setUsedBy (const string &dev, UsedByType type, const string &device)
void setUsedBy (const list< string > &devs, UsedByType type, const string &device)
void setUsedByBtrfs (const string &dev, const string &uuid)
void addUsedBy (const string &dev, UsedByType type, const string &device)
void addUsedBy (const list< string > &devs, UsedByType type, const string &device)
void removeUsedBy (const string &dev, UsedByType type, const string &device)
void removeUsedBy (const list< string > &devs, UsedByType type, const string &device)
bool isUsedBy (const string &dev)
bool isUsedBy (const string &dev, UsedByType type)
bool isUsedBySingleBtrfs (const Volume &vol) const
bool isUsedBySingleBtrfs (const Volume &vol, const Volume **btrfs) const
bool canRemove (const Volume &vol) const
void fetchDanglingUsedBy (const string &dev, list< UsedBy > &uby)
bool canUseDevice (const string &dev, bool disks_allowed=false)
bool knownDevice (const string &dev, bool disks_allowed=false)
bool setDmcryptData (const string &dev, const string &dm, unsigned dmnum, unsigned long long siz, storage::EncryptType typ)
bool deletedDevice (const string &dev) const
bool isDisk (const string &dev)
const VolumegetVolume (const string &dev)
unsigned long long deviceSize (const string &dev)
string deviceByNumber (const string &majmin) const
const DevicedeviceByNumber (unsigned long maj, unsigned long min) const
void syncMdadm ()
void rootMounted ()
bool isRootMounted () const
string findNormalDevice (const string &device)
bool findVolume (const string &device, Volume const *&vol, bool no_btrfsc=false)
bool findDm (const string &device, const Dm *&dm)
bool findDmUsing (const string &device, const Dm *&dm)
bool findDevice (const string &dev, const Device *&vol, bool search_by_minor=false)
bool removeDm (const string &device)
int unaccessDev (const string &device)
virtual ~Storage ()
void getContainers (deque< storage::ContainerInfo > &infos)
int getDiskInfo (const string &disk, storage::DiskInfo &info)
int getLvmVgInfo (const string &name, storage::LvmVgInfo &info)
int getDmraidCoInfo (const string &name, storage::DmraidCoInfo &info)
int getDmmultipathCoInfo (const string &name, storage::DmmultipathCoInfo &info)
int getContDiskInfo (const string &disk, storage::ContainerInfo &cinfo, storage::DiskInfo &info)
int getContLvmVgInfo (const string &name, storage::ContainerInfo &cinfo, storage::LvmVgInfo &info)
int getContDmraidCoInfo (const string &name, storage::ContainerInfo &cinfo, storage::DmraidCoInfo &info)
int getContDmmultipathCoInfo (const string &name, storage::ContainerInfo &cinfo, storage::DmmultipathCoInfo &info)
void getVolumes (deque< storage::VolumeInfo > &vlist)
int getVolume (const string &device, storage::VolumeInfo &info)
int getPartitionInfo (const string &disk, deque< storage::PartitionInfo > &plist)
int getLvmLvInfo (const string &name, deque< storage::LvmLvInfo > &plist)
int getMdInfo (deque< storage::MdInfo > &plist)
int getMdPartInfo (const string &device, deque< storage::MdPartInfo > &plist)
int getDmInfo (deque< storage::DmInfo > &plist)
int getNfsInfo (deque< storage::NfsInfo > &plist)
int getLoopInfo (deque< storage::LoopInfo > &plist)
int getBtrfsInfo (deque< storage::BtrfsInfo > &plist)
int getTmpfsInfo (deque< storage::TmpfsInfo > &plist)
int getDmraidInfo (const string &name, deque< storage::DmraidInfo > &plist)
int getDmmultipathInfo (const string &name, deque< storage::DmmultipathInfo > &plist)
int getContVolInfo (const string &dev, ContVolInfo &info)
bool getFsCapabilities (storage::FsType fstype, storage::FsCapabilities &fscapabilities) const
bool getDlabelCapabilities (const string &dlabel, storage::DlabelCapabilities &dlabelcapabilities) const
list< string > getAllUsedFs () const
void setExtError (const string &txt)
int createPartition (const string &disk, storage::PartitionType type, unsigned long start, unsigned long size, string &device)
int resizePartition (const string &device, unsigned long sizeCyl)
int resizePartitionNoFs (const string &device, unsigned long sizeCyl)
int nextFreePartition (const string &disk, storage::PartitionType type, unsigned &nr, string &device)
int updatePartitionArea (const string &device, unsigned long start, unsigned long size)
int freeCylindersAroundPartition (const string &device, unsigned long &freeCylsBefore, unsigned long &freeCylsAfter)
int createPartitionKb (const string &disk, storage::PartitionType type, unsigned long long start, unsigned long long sizek, string &device)
int createPartitionAny (const string &disk, unsigned long long size, string &device)
int createPartitionMax (const string &disk, storage::PartitionType type, string &device)
unsigned long kbToCylinder (const string &disk, unsigned long long size)
unsigned long long cylinderToKb (const string &disk, unsigned long size)
int removePartition (const string &partition)
int changePartitionId (const string &partition, unsigned id)
int forgetChangePartitionId (const string &partition)
string getPartitionPrefix (const string &disk)
string getPartitionName (const string &disk, int partition_no)
int getUnusedPartitionSlots (const string &disk, list< PartitionSlotInfo > &slots)
int destroyPartitionTable (const string &disk, const string &label)
int initializeDisk (const string &disk, bool value)
string defaultDiskLabel (const string &device)
int changeFormatVolume (const string &device, bool format, storage::FsType fs)
int changeLabelVolume (const string &device, const string &label)
int eraseLabelVolume (const string &device)
int changeMkfsOptVolume (const string &device, const string &opts)
int changeTunefsOptVolume (const string &device, const string &opts)
int changeDescText (const string &device, const string &txt)
int changeMountPoint (const string &device, const string &mount)
int getMountPoint (const string &device, string &mount)
int changeMountBy (const string &device, storage::MountByType mby)
int getMountBy (const string &device, storage::MountByType &mby)
int changeFstabOptions (const string &, const string &options)
int getFstabOptions (const string &device, string &options)
int addFstabOptions (const string &, const string &options)
int removeFstabOptions (const string &, const string &options)
int setCryptPassword (const string &device, const string &pwd)
int verifyCryptPassword (const string &device, const string &pwd, bool erase)
int verifyCryptFilePassword (const string &file, const string &pwd)
bool needCryptPassword (const string &device)
int forgetCryptPassword (const string &device)
int getCryptPassword (const string &device, string &pwd)
int setCrypt (const string &device, bool val)
int setCryptType (const string &device, bool val, EncryptType typ)
int getCrypt (const string &device, bool &val)
int setIgnoreFstab (const string &device, bool val)
int getIgnoreFstab (const string &device, bool &val)
int addFstabEntry (const string &device, const string &mount, const string &vfs, const string &options, unsigned freq, unsigned passno)
int resizeVolume (const string &device, unsigned long long newSizeK)
int resizeVolumeNoFs (const string &device, unsigned long long newSizeK)
int forgetResizeVolume (const string &device)
void setRecursiveRemoval (bool val=true)
bool getRecursiveRemoval () const
int getRecursiveUsing (const string &device, list< string > &devices)
int getRecursiveUsingHelper (const string &device, list< string > &devices)
int getRecursiveUsedBy (const list< string > &device, bool itself, list< string > &usedby_devices)
int getRecursiveUsedByHelper (const string &device, bool itself, list< string > &usedby_devices)
void setZeroNewPartitions (bool val=true)
bool getZeroNewPartitions () const
void setPartitionAlignment (PartAlign val)
PartAlign getPartitionAlignment () const
void setDefaultMountBy (MountByType mby)
MountByType getDefaultMountBy () const
void setDefaultFs (FsType fs)
FsType getDefaultFs () const
void setDefaultSubvolName (const string &val)
string getDefaultSubvolName () const
void setDetectMountedVolumes (bool val=true)
bool getDetectMountedVolumes () const
bool getEfiBoot ()
void setRootPrefix (const string &root)
string getRootPrefix () const
int removeVolume (const string &device)
int removeUsing (const string &device, const list< UsedBy > &uby)
bool checkDeviceMounted (const string &device, list< string > &mps)
bool umountDevice (const string &device)
bool umountDev (const string &device, bool dounsetup=false)
bool mountDev (const string &device, const string &mp, bool ro=true, const string &opts="")
bool mountDevice (const string &device, const string &mp)
bool mountDeviceOpts (const string &device, const string &mp, const string &opts)
bool mountDeviceRo (const string &device, const string &mp, const string &opts)
int activateEncryption (const string &device, bool on)
bool readFstab (const string &dir, deque< storage::VolumeInfo > &infos)
bool getFreeInfo (const string &device, bool get_resize, ResizeInfo &resize_info, bool get_content, ContentInfo &content_info, bool use_cache)
int createBackupState (const string &name)
int removeBackupState (const string &name)
int restoreBackupState (const string &name)
bool checkBackupState (const string &name) const
bool equalBackupStates (const string &lhs, const string &rhs, bool verbose_log) const
int createLvmVg (const string &name, unsigned long long peSizeK, bool lvm1, const deque< string > &devs)
int removeLvmVg (const string &name)
int extendLvmVg (const string &name, const deque< string > &devs)
int shrinkLvmVg (const string &name, const deque< string > &devs)
int createLvmLv (const string &vg, const string &name, unsigned long long sizeK, unsigned stripes, string &device)
int removeLvmLvByDevice (const string &device)
int removeLvmLv (const string &vg, const string &name)
int changeLvStripeCount (const string &vg, const string &name, unsigned long stripes)
int changeLvStripeSize (const string &vg, const string &name, unsigned long long stripeSize)
int createLvmLvSnapshot (const string &vg, const string &origin, const string &name, unsigned long long cowSizeK, string &device)
int removeLvmLvSnapshot (const string &vg, const string &name)
int getLvmLvSnapshotStateInfo (const string &vg, const string &name, LvmLvSnapshotStateInfo &info)
int nextFreeMd (unsigned &nr, string &device)
bool checkMdNumber (unsigned num)
int createMd (const string &name, MdType rtype, const list< string > &devs, const list< string > &spares)
int createMdAny (MdType rtype, const list< string > &devs, const list< string > &spares, string &device)
int removeMd (const string &name, bool destroySb=true)
int extendMd (const string &name, const list< string > &devs, const list< string > &spares)
int shrinkMd (const string &name, const list< string > &devs, const list< string > &spares)
int changeMdType (const string &name, storage::MdType rtype)
int changeMdChunk (const string &name, unsigned long chunk)
int changeMdParity (const string &name, storage::MdParity ptype)
int checkMd (const string &name)
int getMdStateInfo (const string &name, MdStateInfo &info)
int computeMdSize (MdType md_type, const list< string > &devices, const list< string > &spares, unsigned long long &sizeK)
list< int > getMdAllowedParity (MdType md_type, unsigned devices)
void setImsmDriver (ImsmDriver val)
ImsmDriver getImsmDriver () const
void setMultipathAutostart (MultipathAutostart val)
MultipathAutostart getMultipathAutostart () const
int getMdPartCoInfo (const string &name, MdPartCoInfo &info)
int getContMdPartCoInfo (const string &name, ContainerInfo &cinfo, MdPartCoInfo &info)
int getMdPartCoStateInfo (const string &name, MdPartCoStateInfo &info)
int removeMdPartCo (const string &devName, bool destroySb)
int addNfsDevice (const string &nfsDev, const string &opts, unsigned long long sizeK, const string &mp, bool nfs4)
int checkNfsDevice (const string &nfsDev, const string &opts, bool nfs4, unsigned long long &sizeK)
int createFileLoop (const string &lname, bool reuseExisting, unsigned long long sizeK, const string &mp, const string &pwd, string &device)
int modifyFileLoop (const string &device, const string &lname, bool reuseExisting, unsigned long long sizeK)
int removeFileLoop (const string &lname, bool removeFile)
int removeDmraid (const string &name)
bool existSubvolume (const string &device, const string &name)
int createSubvolume (const string &device, const string &name)
int removeSubvolume (const string &device, const string &name)
int extendBtrfsVolume (const string &device, const string &dev)
int extendBtrfsVolume (const string &device, const deque< string > &devs)
int shrinkBtrfsVolume (const string &device, const string &dev)
int shrinkBtrfsVolume (const string &device, const deque< string > &devs)
void setBtrfsUsedBy (const Btrfs *bt)
int addTmpfsMount (const string &mp, const string &opts)
int removeTmpfsMount (const string &mp)
void getCommitInfos (list< CommitInfo > &infos) const
const string & getLastAction () const
const string & getExtendedErrorMessage () const
void eraseCachedFreeInfo (const string &device)
void getDiskList (bool(*CheckFnc)(const Disk &), std::list< Disk * > &dl)
void changeDeviceName (const string &old, const string &nw)
int commit ()
string getErrorString (int error) const
void handleHald (bool stop)
void activateHld (bool val=true)
void activateMultipath (bool val=true)
void removeDmTableTo (const Volume &vol)
void removeDmTableTo (const string &device)
void removeDmTableTo (unsigned long mjr, unsigned long mnr)
bool removeDmTable (const string &table)
bool removeDmMapsTo (const string &dev)
bool checkDmMapsTo (const string &dev)
void updateDmEmptyPeMap ()
void dumpObjectList ()
void dumpCommitInfos () const
bool mountTmpRo (const Volume *vol, string &mp, const string &opts="")
bool mountTmp (const Volume *vol, string &mp, const string &opts="")
void setCallbackProgressBar (CallbackProgressBar pfnc)
CallbackProgressBar getCallbackProgressBar () const
void setCallbackShowInstallInfo (CallbackShowInstallInfo pfnc)
CallbackShowInstallInfo getCallbackShowInstallInfo () const
void setCallbackInfoPopup (CallbackInfoPopup pfnc)
CallbackInfoPopup getCallbackInfoPopup () const
void setCallbackYesNoPopup (CallbackYesNoPopup pfnc)
CallbackYesNoPopup getCallbackYesNoPopup () const
void setCallbackCommitErrorPopup (CallbackCommitErrorPopup pfnc)
CallbackCommitErrorPopup getCallbackCommitErrorPopup () const
void setCallbackPasswordPopup (CallbackPasswordPopup pfnc)
CallbackPasswordPopup getCallbackPasswordPopup () const
void addInfoPopupText (const string &disk, const Text &txt)
CallbackProgressBar getCallbackProgressBarTheOne () const
CallbackShowInstallInfo getCallbackShowInstallInfoTheOne () const
CallbackInfoPopup getCallbackInfoPopupTheOne () const
CallbackYesNoPopup getCallbackYesNoPopupTheOne () const
CallbackCommitErrorPopup getCallbackCommitErrorPopupTheOne () const
CallbackPasswordPopup getCallbackPasswordPopupTheOne () const
void progressBarCb (const string &id, unsigned cur, unsigned max) const
void showInfoCb (const Text &info, bool quiet)
void infoPopupCb (const Text &info) const
bool yesnoPopupCb (const Text &info) const
bool commitErrorPopupCb (int error, const Text &last_action, const string &extended_message) const
bool passwordPopupCb (const string &device, int attempts, string &password) const
ConstContPair contPair (bool(*CheckFnc)(const Container &)=NULL) const
ConstContIterator contBegin (bool(*CheckFnc)(const Container &)=NULL) const
ConstContIterator contEnd (bool(*CheckFnc)(const Container &)=NULL) const
template<class Pred>
ContCondIPair< Pred >::type contCondPair (const Pred &p) const
template<class Pred>
ConstContainerI< Pred >::type contCondBegin (const Pred &p) const
template<class Pred>
ConstContainerI< Pred >::type contCondEnd (const Pred &p) const
ConstDiskPair diskPair (bool(*CheckFnc)(const Disk &)=NULL) const
ConstDiskIterator diskBegin (bool(*CheckFnc)(const Disk &)=NULL) const
ConstDiskIterator diskEnd (bool(*CheckFnc)(const Disk &)=NULL) const
template<class Pred>
DiskCondIPair< Pred >::type diskCondPair (const Pred &p) const
template<class Pred>
ConstDiskI< Pred >::type diskCondBegin (const Pred &p) const
template<class Pred>
ConstDiskI< Pred >::type diskCondEnd (const Pred &p) const
ConstLvmVgPair lvmVgPair (bool(*CheckFnc)(const LvmVg &)=NULL) const
ConstLvmVgIterator lvmVgBegin (bool(*CheckFnc)(const LvmVg &)=NULL) const
ConstLvmVgIterator lvmVgEnd (bool(*CheckFnc)(const LvmVg &)=NULL) const
template<class Pred>
LvmVgCondIPair< Pred >::type lvmVgCondPair (const Pred &p) const
template<class Pred>
ConstLvmVgI< Pred >::type lvmVgCondBegin (const Pred &p) const
template<class Pred>
ConstLvmVgI< Pred >::type lvmVgCondEnd (const Pred &p) const
ConstDmPartCoPair dmpartCoPair (bool(*CheckFnc)(const DmPartCo &)=NULL) const
ConstDmPartCoIterator dmpartCoBegin (bool(*CheckFnc)(const DmPartCo &)=NULL) const
ConstDmPartCoIterator dmpartCoEnd (bool(*CheckFnc)(const DmPartCo &)=NULL) const
template<class Pred>
DmPartCoCondIPair< Pred >::type dmPartCoCondPair (const Pred &p) const
template<class Pred>
ConstDmPartCoI< Pred >::type dmpartCoCondBegin (const Pred &p) const
template<class Pred>
ConstDmPartCoI< Pred >::type dmpartCoCondEnd (const Pred &p) const
ConstDmraidCoPair dmraidCoPair (bool(*CheckFnc)(const DmraidCo &)=NULL) const
ConstDmraidCoIterator dmraidCoBegin (bool(*CheckFnc)(const DmraidCo &)=NULL) const
ConstDmraidCoIterator dmraidCoEnd (bool(*CheckFnc)(const DmraidCo &)=NULL) const
template<class Pred>
DmraidCoCondIPair< Pred >::type dmraidCoCondPair (const Pred &p) const
template<class Pred>
ConstDmraidCoI< Pred >::type dmraidCoCondBegin (const Pred &p) const
template<class Pred>
ConstDmraidCoI< Pred >::type dmraidCoCondEnd (const Pred &p) const
ConstDmmultipathCoPair dmmultipathCoPair (bool(*CheckFnc)(const DmmultipathCo &)=NULL) const
ConstDmmultipathCoIterator dmmultipathCoBegin (bool(*CheckFnc)(const DmmultipathCo &)=NULL) const
ConstDmmultipathCoIterator dmmultipathCoEnd (bool(*CheckFnc)(const DmmultipathCo &)=NULL) const
template<class Pred>
DmmultipathCoCondIPair< Pred >
::type 
dmmultipathCoCondPair (const Pred &p) const
template<class Pred>
ConstDmmultipathCoI< Pred >::type dmmultipathCoCondBegin (const Pred &p) const
template<class Pred>
ConstDmmultipathCoI< Pred >::type dmmultipathCoCondEnd (const Pred &p) const
ConstMdPartCoPair mdpartCoPair (bool(*CheckFnc)(const MdPartCo &)=NULL) const
ConstMdPartCoIterator mdpartCoBegin (bool(*CheckFnc)(const MdPartCo &)=NULL) const
ConstMdPartCoIterator mdpartCoEnd (bool(*CheckFnc)(const MdPartCo &)=NULL) const
template<class Pred>
MdPartCoCondIPair< Pred >::type mdPartCoCondPair (const Pred &p) const
template<class Pred>
ConstMdPartCoI< Pred >::type mdpartCoCondBegin (const Pred &p) const
template<class Pred>
ConstMdPartCoI< Pred >::type mdpartCoCondEnd (const Pred &p) const
ConstVolPair volPair (bool(*CheckCnt)(const Container &)) const
ConstVolPair volPair (bool(*CheckVol)(const Volume &)=NULL, bool(*CheckCnt)(const Container &)=NULL) const
ConstVolIterator volBegin (bool(*CheckCnt)(const Container &)) const
ConstVolIterator volBegin (bool(*CheckVol)(const Volume &)=NULL, bool(*CheckCnt)(const Container &)=NULL) const
ConstVolIterator volEnd (bool(*CheckCnt)(const Container &)) const
ConstVolIterator volEnd (bool(*CheckVol)(const Volume &)=NULL, bool(*CheckCnt)(const Container &)=NULL) const
template<class Pred>
VolCondIPair< Pred >::type volCondPair (const Pred &p) const
template<class Pred>
ConstVolumeI< Pred >::type volCondBegin (const Pred &p) const
template<class Pred>
ConstVolumeI< Pred >::type volCondEnd (const Pred &p) const
ConstPartPair partPair (bool(*CheckCnt)(const Disk &)) const
ConstPartPair partPair (bool(*CheckPart)(const Partition &)=NULL, bool(*CheckCnt)(const Disk &)=NULL) const
ConstPartIterator partBegin (bool(*CheckDisk)(const Disk &)) const
ConstPartIterator partBegin (bool(*CheckPart)(const Partition &)=NULL, bool(*CheckDisk)(const Disk &)=NULL) const
ConstPartIterator partEnd (bool(*CheckDisk)(const Disk &)) const
ConstPartIterator partEnd (bool(*CheckPart)(const Partition &)=NULL, bool(*CheckDisk)(const Disk &)=NULL) const
template<class Pred>
PartCondIPair< Pred >::type partCondPair (const Pred &p) const
template<class Pred>
ConstPartitionI< Pred >::type partCondBegin (const Pred &p) const
template<class Pred>
ConstPartitionI< Pred >::type partCondEnd (const Pred &p) const
ConstLvmLvPair lvmLvPair (bool(*CheckLvmVg)(const LvmVg &)) const
ConstLvmLvPair lvmLvPair (bool(*CheckLvmLv)(const LvmLv &)=NULL, bool(*CheckLvmVg)(const LvmVg &)=NULL) const
ConstLvmLvIterator lvmLvBegin (bool(*CheckLvmVg)(const LvmVg &)) const
ConstLvmLvIterator lvmLvBegin (bool(*CheckLvmLv)(const LvmLv &)=NULL, bool(*CheckLvmVg)(const LvmVg &)=NULL) const
ConstLvmLvIterator lvmLvEnd (bool(*CheckLvmVg)(const LvmVg &)) const
ConstLvmLvIterator lvmLvEnd (bool(*CheckLvmLv)(const LvmLv &)=NULL, bool(*CheckLvmVg)(const LvmVg &)=NULL) const
template<class Pred>
LvmLvCondIPair< Pred >::type lvmLvCondPair (const Pred &p) const
template<class Pred>
ConstLvmLvI< Pred >::type lvmLvCondBegin (const Pred &p) const
template<class Pred>
ConstLvmLvI< Pred >::type lvmLvCondEnd (const Pred &p) const
ConstMdPair mdPair (bool(*CheckMd)(const Md &)=NULL) const
ConstMdIterator mdBegin (bool(*CheckMd)(const Md &)=NULL) const
ConstMdIterator mdEnd (bool(*CheckMd)(const Md &)=NULL) const
template<class Pred>
MdCondIPair< Pred >::type mdCondPair (const Pred &p) const
template<class Pred>
ConstMdI< Pred >::type mdCondBegin (const Pred &p) const
template<class Pred>
ConstMdI< Pred >::type mdCondEnd (const Pred &p) const
ConstMdPartPair mdPartPair (bool(*CheckMdPart)(const MdPart &)=NULL) const
ConstMdPartIterator mdPartBegin (bool(*CheckMdPart)(const MdPart &)=NULL) const
ConstMdPartIterator mdPartEnd (bool(*CheckMdPart)(const MdPart &)=NULL) const
template<class Pred>
MdPartCondIPair< Pred >::type mdPartCondPair (const Pred &p) const
template<class Pred>
ConstMdPartI< Pred >::type mdPartCondBegin (const Pred &p) const
template<class Pred>
ConstMdPartI< Pred >::type mdPartCondEnd (const Pred &p) const
ConstLoopPair loopPair (bool(*CheckLoop)(const Loop &)=NULL) const
ConstLoopIterator loopBegin (bool(*CheckLoop)(const Loop &)=NULL) const
ConstLoopIterator loopEnd (bool(*CheckLoop)(const Loop &)=NULL) const
template<class Pred>
LoopCondIPair< Pred >::type loopCondPair (const Pred &p) const
template<class Pred>
ConstLoopI< Pred >::type loopCondBegin (const Pred &p) const
template<class Pred>
ConstLoopI< Pred >::type loopCondEnd (const Pred &p) const
ConstBtrfsPair btrfsPair (bool(*CheckBtrfs)(const Btrfs &)=NULL) const
ConstBtrfsIterator btrfsBegin (bool(*CheckBtrfs)(const Btrfs &)=NULL) const
ConstBtrfsIterator btrfsEnd (bool(*CheckBtrfs)(const Btrfs &)=NULL) const
template<class Pred>
BtrfsCondIPair< Pred >::type btrfsCondPair (const Pred &p) const
template<class Pred>
ConstBtrfsI< Pred >::type btrfsCondBegin (const Pred &p) const
template<class Pred>
ConstBtrfsI< Pred >::type btrfsCondEnd (const Pred &p) const
ConstTmpfsPair tmpfsPair (bool(*CheckTmpfs)(const Tmpfs &)=NULL) const
ConstTmpfsIterator tmpfsBegin (bool(*CheckTmpfs)(const Tmpfs &)=NULL) const
ConstTmpfsIterator tmpfsEnd (bool(*CheckTmpfs)(const Tmpfs &)=NULL) const
template<class Pred>
TmpfsCondIPair< Pred >::type tmpfsCondPair (const Pred &p) const
template<class Pred>
ConstTmpfsI< Pred >::type tmpfsCondBegin (const Pred &p) const
template<class Pred>
ConstTmpfsI< Pred >::type tmpfsCondEnd (const Pred &p) const
ConstNfsPair nfsPair (bool(*CheckNfs)(const Nfs &)=NULL) const
ConstNfsIterator nfsBegin (bool(*CheckNfs)(const Nfs &)=NULL) const
ConstNfsIterator nfsEnd (bool(*CheckNfs)(const Nfs &)=NULL) const
template<class Pred>
NfsCondIPair< Pred >::type nfsCondPair (const Pred &p) const
template<class Pred>
ConstNfsI< Pred >::type nfsCondBegin (const Pred &p) const
template<class Pred>
ConstNfsI< Pred >::type nfsCondEnd (const Pred &p) const
ConstDmPair dmPair (bool(*CheckDm)(const Dm &)=NULL) const
ConstDmIterator dmBegin (bool(*CheckDm)(const Dm &)=NULL) const
ConstDmIterator dmEnd (bool(*CheckDm)(const Dm &)=NULL) const
template<class Pred>
DmCondIPair< Pred >::type dmCondPair (const Pred &p) const
template<class Pred>
ConstDmI< Pred >::type dmCondBegin (const Pred &p) const
template<class Pred>
ConstDmI< Pred >::type dmCondEnd (const Pred &p) const
ConstDmraidPair dmrPair (bool(*CheckDmraidCo)(const DmraidCo &)) const
ConstDmraidPair dmrPair (bool(*CheckDmraid)(const Dmraid &)=NULL, bool(*CheckDmraidCo)(const DmraidCo &)=NULL) const
ConstDmraidIterator dmrBegin (bool(*CheckDmraidCo)(const DmraidCo &)) const
ConstDmraidIterator dmrBegin (bool(*CheckDmraid)(const Dmraid &)=NULL, bool(*CheckDmraidCo)(const DmraidCo &)=NULL) const
ConstDmraidIterator dmrEnd (bool(*CheckDmraidCo)(const DmraidCo &)) const
ConstDmraidIterator dmrEnd (bool(*CheckDmraid)(const Dmraid &)=NULL, bool(*CheckDmraidCo)(const DmraidCo &)=NULL) const
template<class Pred>
DmraidCondIPair< Pred >::type dmrCondPair (const Pred &p) const
template<class Pred>
ConstDmraidI< Pred >::type dmrCondBegin (const Pred &p) const
template<class Pred>
ConstDmraidI< Pred >::type dmrCondEnd (const Pred &p) const
ConstDmmultipathPair dmmPair (bool(*CheckDmmultipathCo)(const DmmultipathCo &)) const
ConstDmmultipathPair dmmPair (bool(*CheckDmmultipath)(const Dmmultipath &)=NULL, bool(*CheckDmmultipathCo)(const DmmultipathCo &)=NULL) const
ConstDmmultipathIterator dmmBegin (bool(*CheckDmmultipathCo)(const DmmultipathCo &)) const
ConstDmmultipathIterator dmmBegin (bool(*CheckDmmultipath)(const Dmmultipath &)=NULL, bool(*CheckDmmultipathCo)(const DmmultipathCo &)=NULL) const
ConstDmmultipathIterator dmmEnd (bool(*CheckDmmultipathCo)(const DmmultipathCo &)) const
ConstDmmultipathIterator dmmEnd (bool(*CheckDmmultipath)(const Dmmultipath &)=NULL, bool(*CheckDmmultipathCo)(const DmmultipathCo &)=NULL) const
template<class Pred>
DmmultipathCondIPair< Pred >::type dmmCondPair (const Pred &p) const
template<class Pred>
ConstDmmultipathI< Pred >::type dmmCondBegin (const Pred &p) const
template<class Pred>
ConstDmmultipathI< Pred >::type dmmCondEnd (const Pred &p) const

Static Public Member Functions

static bool isDmPart (const Container &d)
static bool isMdPart (const Container &d)
static bool testFilesEqual (const string &n1, const string &n2)
static void waitForDevice ()
static int waitForDevice (const string &device)
static int zeroDevice (const string &device, bool random=false, unsigned long long beginK=200, unsigned long long endK=10)
static unsigned long long sizeK (const string &device)

Protected Types

typedef std::list< Container * > CCont
typedef CCont::iterator CIter
typedef CCont::const_iterator CCIter
typedef CheckFnc< const ContainerCheckFncCont
typedef CheckerIterator
< CheckFncCont,
ConstContainerPI< CheckFncCont >
::type, CCIter, Container
ConstContPIterator
typedef CheckerIterator
< CheckFncCont, ContainerPI
< CheckFncCont >::type, CIter,
Container
ContPIterator
typedef DerefIterator
< ContPIterator, Container
ContIterator
typedef IterPair< ContIteratorCPair
typedef CastCheckIterator
< CCIter, storage::DISK, const
Disk * > 
ContainerCDiskIter
typedef CastCheckIterator
< CIter, storage::DISK, Disk * > 
ContainerDiskIter
typedef CheckFnc< const DiskCheckFncDisk
typedef CheckerIterator
< CheckFncDisk, ConstDiskPI
< CheckFncDisk >::type,
ContainerCDiskIter, Disk
ConstDiskPIterator
typedef CheckerIterator
< CheckFncDisk, DiskPI
< CheckFncDisk >::type,
ContainerDiskIter, Disk
DiskPIterator
typedef DerefIterator
< DiskPIterator, Disk
DiskIterator
typedef IterPair< DiskIteratorDiskPair
typedef CastCheckIterator
< CCIter, storage::LVM, const
LvmVg * > 
ContainerCLvmVgIter
typedef CastCheckIterator
< CIter, storage::LVM, LvmVg * > 
ContainerLvmVgIter
typedef CheckFnc< const LvmVgCheckFncLvmVg
typedef CheckerIterator
< CheckFncLvmVg, ConstLvmVgPI
< CheckFncLvmVg >::type,
ContainerCLvmVgIter, LvmVg
ConstLvmVgPIterator
typedef CheckerIterator
< CheckFncLvmVg, LvmVgPI
< CheckFncLvmVg >::type,
ContainerLvmVgIter, LvmVg
LvmVgPIterator
typedef DerefIterator
< LvmVgPIterator, LvmVg
LvmVgIterator
typedef IterPair< LvmVgIteratorLvmVgPair
typedef CastCheckFncIterator
< CCIter, isDmPart, const
DmPartCo * > 
ContainerCDmPartIter
typedef CastCheckFncIterator
< CIter, isDmPart, DmPartCo * > 
ContainerDmPartIter
typedef CheckFnc< const DmPartCoCheckFncDmPartCo
typedef CheckerIterator
< CheckFncDmPartCo,
ConstDmPartCoPI
< CheckFncDmPartCo >::type,
ContainerCDmPartIter, DmPartCo
ConstDmPartCoPIterator
typedef CheckerIterator
< CheckFncDmPartCo, DmPartCoPI
< CheckFncDmPartCo >::type,
ContainerDmPartIter, DmPartCo
DmPartCoPIterator
typedef DerefIterator
< DmPartCoPIterator, DmPartCo
DmPartCoIterator
typedef IterPair
< DmPartCoIterator
DmPartCoPair
typedef CastCheckIterator
< CCIter, storage::DMRAID,
const DmraidCo * > 
ContainerCDmraidIter
typedef CastCheckIterator
< CIter, storage::DMRAID,
DmraidCo * > 
ContainerDmraidIter
typedef CheckFnc< const DmraidCoCheckFncDmraidCo
typedef CheckerIterator
< CheckFncDmraidCo,
ConstDmraidCoPI
< CheckFncDmraidCo >::type,
ContainerCDmraidIter, DmraidCo
ConstDmraidCoPIterator
typedef CheckerIterator
< CheckFncDmraidCo, DmraidCoPI
< CheckFncDmraidCo >::type,
ContainerDmraidIter, DmraidCo
DmraidCoPIterator
typedef DerefIterator
< DmraidCoPIterator, DmraidCo
DmraidCoIterator
typedef IterPair
< DmraidCoIterator
DmraidCoPair
typedef CastCheckIterator
< CCIter, storage::DMMULTIPATH,
const DmmultipathCo * > 
ContainerCDmmultipathIter
typedef CastCheckIterator
< CIter, storage::DMMULTIPATH,
DmmultipathCo * > 
ContainerDmmultipathIter
typedef CheckFnc< const
DmmultipathCo
CheckFncDmmultipathCo
typedef CheckerIterator
< CheckFncDmmultipathCo,
ConstDmmultipathCoPI
< CheckFncDmmultipathCo >
::type,
ContainerCDmmultipathIter,
DmmultipathCo
ConstDmmultipathCoPIterator
typedef CheckerIterator
< CheckFncDmmultipathCo,
DmmultipathCoPI
< CheckFncDmmultipathCo >
::type,
ContainerDmmultipathIter,
DmmultipathCo
DmmultipathCoPIterator
typedef DerefIterator
< DmmultipathCoPIterator,
DmmultipathCo
DmmultipathCoIterator
typedef IterPair
< DmmultipathCoIterator
DmmultipathCoPair
typedef CastCheckFncIterator
< CCIter, isMdPart, const
MdPartCo * > 
ContainerCMdPartIter
typedef CastCheckFncIterator
< CIter, isMdPart, MdPartCo * > 
ContainerMdPartIter
typedef CheckFnc< const MdPartCoCheckFncMdPartCo
typedef CheckerIterator
< CheckFncMdPartCo,
ConstMdPartCoPI
< CheckFncMdPartCo >::type,
ContainerCMdPartIter, MdPartCo
ConstMdPartCoPIterator
typedef CheckerIterator
< CheckFncMdPartCo, MdPartCoPI
< CheckFncMdPartCo >::type,
ContainerMdPartIter, MdPartCo
MdPartCoPIterator
typedef DerefIterator
< MdPartCoPIterator, MdPartCo
MdPartCoIterator
typedef IterPair
< MdPartCoIterator
MdPartCoPair
typedef ListListIterator
< Container::ConstPlainIterator,
ConstContIterator
ConstVolInter
typedef CheckFnc< const VolumeCheckFncVol
typedef CheckerIterator
< CheckFncVol, ConstVolumePI
< CheckFncVol >::type,
ConstVolInter, Volume
ConstVolPIterator
typedef ListListIterator
< Container::PlainIterator,
ContIterator
VolPart
typedef CheckerIterator
< CheckFncVol, VolumeI
< CheckFncVol >::type, VolPart,
Volume
VolPIterator
typedef DerefIterator
< VolPIterator, Volume
VolIterator
typedef IterPair< VolIteratorVPair
typedef ListListIterator
< Container::ConstPlainIterator,
ConstDiskIterator
ConstPartInter
typedef CastIterator
< ConstPartInter, Partition * > 
ConstPartInter2
typedef CheckFnc< const PartitionCheckFncPartition
typedef CheckerIterator
< CheckFncPartition,
ConstPartitionPI
< CheckFncPartition >::type,
ConstPartInter2, Partition
ConstPartPIterator
typedef ListListIterator
< Container::ConstPlainIterator,
ConstLvmVgIterator
ConstLvmLvInter
typedef CastIterator
< ConstLvmLvInter, LvmLv * > 
ConstLvmLvInter2
typedef CheckFnc< const LvmLvCheckFncLvmLv
typedef CheckerIterator
< CheckFncLvmLv, ConstLvmLvPI
< CheckFncLvmLv >::type,
ConstLvmLvInter2, LvmLv
ConstLvmLvPIterator
typedef CastIterator
< ConstVolInter, Md * > 
ConstMdInter
typedef CheckFnc< const MdCheckFncMd
typedef CheckerIterator
< CheckFncMd, ConstMdPI
< CheckFncMd >::type,
ConstMdInter, Md
ConstMdPIterator
typedef CastIterator
< ConstVolInter, MdPart * > 
ConstMdPartInter
typedef CheckFnc< const MdPartCheckFncMdPart
typedef CheckerIterator
< CheckFncMdPart,
ConstMdPartPI< CheckFncMdPart >
::type, ConstMdPartInter,
MdPart
ConstMdPartPIterator
typedef CastIterator
< ConstVolInter, Loop * > 
ConstLoopInter
typedef CheckFnc< const LoopCheckFncLoop
typedef CheckerIterator
< CheckFncLoop, ConstLoopPI
< CheckFncLoop >::type,
ConstLoopInter, Loop
ConstLoopPIterator
typedef CastIterator
< ConstVolInter, Btrfs * > 
ConstBtrfsInter
typedef CheckFnc< const BtrfsCheckFncBtrfs
typedef CheckerIterator
< CheckFncBtrfs, ConstBtrfsPI
< CheckFncBtrfs >::type,
ConstBtrfsInter, Btrfs
ConstBtrfsPIterator
typedef CastIterator
< ConstVolInter, Tmpfs * > 
ConstTmpfsInter
typedef CheckFnc< const TmpfsCheckFncTmpfs
typedef CheckerIterator
< CheckFncTmpfs, ConstTmpfsPI
< CheckFncTmpfs >::type,
ConstTmpfsInter, Tmpfs
ConstTmpfsPIterator
typedef CastIterator
< ConstVolInter, Nfs * > 
ConstNfsInter
typedef CheckFnc< const NfsCheckFncNfs
typedef CheckerIterator
< CheckFncNfs, ConstNfsPI
< CheckFncNfs >::type,
ConstNfsInter, Nfs
ConstNfsPIterator
typedef CastIterator
< ConstVolInter, Dm * > 
ConstDmInter
typedef CheckFnc< const DmCheckFncDm
typedef CheckerIterator
< CheckFncDm, ConstDmPI
< CheckFncDm >::type,
ConstDmInter, Dm
ConstDmPIterator
typedef ListListIterator
< Container::ConstPlainIterator,
ConstDmraidCoIterator
ConstDmraidInter
typedef CastIterator
< ConstDmraidInter, Dmraid * > 
ConstDmraidInter2
typedef CheckFnc< const DmraidCheckFncDmraid
typedef CheckerIterator
< CheckFncDmraid,
ConstDmraidPI< CheckFncDmraid >
::type, ConstDmraidInter2,
Dmraid
ConstDmraidPIterator
typedef ListListIterator
< Container::ConstPlainIterator,
ConstDmmultipathCoIterator
ConstDmmultipathInter
typedef CastIterator
< ConstDmmultipathInter,
Dmmultipath * > 
ConstDmmultipathInter2
typedef CheckFnc< const
Dmmultipath
CheckFncDmmultipath
typedef CheckerIterator
< CheckFncDmmultipath,
ConstDmmultipathPI
< CheckFncDmmultipath >::type,
ConstDmmultipathInter2,
Dmmultipath
ConstDmmultipathPIterator

Protected Member Functions

CPair cPair (bool(*CheckFnc)(const Container &)=NULL)
ContIterator cBegin (bool(*CheckFnc)(const Container &)=NULL)
ContIterator cEnd (bool(*CheckFnc)(const Container &)=NULL)
DiskPair dPair (bool(*CheckFnc)(const Disk &)=NULL)
DiskIterator dBegin (bool(*CheckFnc)(const Disk &)=NULL)
DiskIterator dEnd (bool(*CheckFnc)(const Disk &)=NULL)
LvmVgPair lvgPair (bool(*CheckFnc)(const LvmVg &)=NULL)
LvmVgIterator lvgBegin (bool(*CheckFnc)(const LvmVg &)=NULL)
LvmVgIterator lvgEnd (bool(*CheckFnc)(const LvmVg &)=NULL)
DmPartCoPair dmpCoPair (bool(*CheckFnc)(const DmPartCo &)=NULL)
DmPartCoIterator dmpCoBegin (bool(*CheckFnc)(const DmPartCo &)=NULL)
DmPartCoIterator dmpCoEnd (bool(*CheckFnc)(const DmPartCo &)=NULL)
DmraidCoPair dmrCoPair (bool(*CheckFnc)(const DmraidCo &)=NULL)
DmraidCoIterator dmrCoBegin (bool(*CheckFnc)(const DmraidCo &)=NULL)
DmraidCoIterator dmrCoEnd (bool(*CheckFnc)(const DmraidCo &)=NULL)
DmmultipathCoPair dmmCoPair (bool(*CheckFnc)(const DmmultipathCo &)=NULL)
DmmultipathCoIterator dmmCoBegin (bool(*CheckFnc)(const DmmultipathCo &)=NULL)
DmmultipathCoIterator dmmCoEnd (bool(*CheckFnc)(const DmmultipathCo &)=NULL)
MdPartCoPair mdpCoPair (bool(*CheckFnc)(const MdPartCo &)=NULL)
MdPartCoIterator mdpCoBegin (bool(*CheckFnc)(const MdPartCo &)=NULL)
MdPartCoIterator mdpCoEnd (bool(*CheckFnc)(const MdPartCo &)=NULL)
VPair vPair (bool(*CheckCnt)(const Container &))
VPair vPair (bool(*CheckVol)(const Volume &)=NULL, bool(*CheckCnt)(const Container &)=NULL)
VolIterator vBegin (bool(*CheckCnt)(const Container &))
VolIterator vBegin (bool(*CheckVol)(const Volume &)=NULL, bool(*CheckCnt)(const Container &)=NULL)
VolIterator vEnd (bool(*CheckCnt)(const Container &))
VolIterator vEnd (bool(*CheckVol)(const Volume &)=NULL, bool(*CheckCnt)(const Container &)=NULL)
void initialize ()
void logSystemInfo () const
void detectDisks (SystemInfo &systeminfo)
void autodetectDisks (SystemInfo &systeminfo)
void detectMds (SystemInfo &systeminfo)
void detectBtrfs (SystemInfo &systeminfo)
void detectMdParts (SystemInfo &systeminfo)
void decideMultipath ()
bool discoverMdPVols ()
void detectLoops (SystemInfo &systeminfo)
void detectNfs (const EtcFstab &fstab, SystemInfo &systeminfo)
void detectTmpfs (const EtcFstab &fstab, SystemInfo &systeminfo)
void detectLvmVgs (SystemInfo &systeminfo)
void detectDmraid (SystemInfo &systeminfo)
void detectDmmultipath (SystemInfo &systeminfo)
void detectDm (SystemInfo &systeminfo, bool only_crypt)
void initDisk (list< DiskData > &dl, SystemInfo &systeminfo)
void detectFsData (const VolIterator &begin, const VolIterator &end, SystemInfo &systeminfo)
int updatePartitionArea (const string &device, unsigned long start, unsigned long size, bool noBtrfs)
int resizeVolume (const string &device, unsigned long long newSizeK, bool ignore_fs)
int resizeVolume (const string &device, unsigned long long newSizeK, bool ignore_fs, bool noBtrfs)
int resizePartition (const string &device, unsigned long sizeCyl, bool ignore_fs)
int resizePartition (const string &device, unsigned long sizeCyl, bool ignoreFs, bool noBtrfs)
void addToList (Container *e)
DiskIterator findDisk (const string &disk)
DiskIterator findDiskId (const string &id)
DiskIterator findDiskPath (const string &path)
LvmVgIterator findLvmVg (const string &name)
DmraidCoIterator findDmraidCo (const string &name)
DmmultipathCoIterator findDmmultipathCo (const string &name)
DmPartCoIterator findDmPartCo (const string &name)
MdPartCoIterator findMdPartCo (const string &name)
bool findVolume (const string &device, ContIterator &c, VolIterator &v, bool no_btrfs=false)
bool findVolume (const string &device, ConstContIterator &c, ConstVolIterator &v, bool no_btrfs=false)
bool findVolume (const string &device, VolIterator &v, bool also_del=false, bool no_btrfs=false)
bool findVolume (const string &device, ConstVolIterator &v, bool also_del=false, bool no_btrfs=false)
bool findContainer (const string &device, ContIterator &c)
bool findContainer (const string &device, ConstContIterator &c)
DevicefindDevice (const string &dev, bool no_btrfs=false)
void checkPwdBuf (const string &device)
bool haveMd (MdCo *&md)
list< unsigned > getMdPartMdNums () const
bool haveDm (DmCo *&dm)
bool haveNfs (NfsCo *&co)
bool haveLoop (LoopCo *&loop)
bool haveBtrfs (BtrfsCo *&co)
bool haveTmpfs (TmpfsCo *&co)
int removeContainer (Container *val)
void logContainersAndVolumes (const string &Dir) const
int commitPair (CPair &p, bool(*fnc)(const Container &))
void sortCommitLists (storage::CommitStage stage, list< const Container * > &co, list< const Volume * > &vl, list< commitAction > &todo) const
bool ignoreError (int error, list< commitAction >::const_iterator ca) const
string backupStates () const
void detectObjects ()
void deleteBackups ()
void setCachedFreeInfo (const string &device, bool resize_cached, const ResizeInfo &resize_info, bool content_cached, const ContentInfo &content_info)
bool getCachedFreeInfo (const string &device, bool get_resize, ResizeInfo &resize_info, bool get_content, ContentInfo &content_info) const
void logFreeInfo (const string &Dir) const
void readFreeInfo (const string &file)
void logArchInfo (const string &Dir) const
void readArchInfo (const string &file)
list< commitActiongetCommitActions () const

Static Protected Member Functions

static bool isMd (const Container &d)
static bool isLoop (const Container &d)
static bool isNfs (const Container &d)
static bool isDm (const Container &d)
static bool isBtrfs (const Container &d)
static bool isNotBtrfs (const Container &d)
static bool isTmpfs (const Container &d)

Protected Attributes

const Environment env
Lock lock
bool cache
bool initialized
bool recursiveRemove
bool zeroNewPartitions
PartAlign partAlignment
MountByType defaultMountBy
FsType defaultFs
string defaultSubvolName
bool detectMounted
bool root_mounted
string tempdir
string rootprefix
unsigned hald_pid
ArchInfo archinfo
CCont cont
EtcFstabfstab
EtcMdadmmdadm
ImsmDriver imsm_driver
MultipathAutostart multipath_autostart
CallbackProgressBar progress_bar_cb
CallbackShowInstallInfo install_info_cb
CallbackInfoPopup info_popup_cb
CallbackYesNoPopup yesno_popup_cb
CallbackCommitErrorPopup commit_error_popup_cb
CallbackPasswordPopup password_popup_cb

Friends

std::ostream & operator<< (std::ostream &s, const Storage &v)
std::ostream & operator<< (std::ostream &s, Storage &v)

Classes

struct  BtrfsCondIPair
struct  ConstBtrfsI
struct  ConstBtrfsPI
struct  ConstContainerI
struct  ConstContainerPI
struct  ConstDiskI
struct  ConstDiskPI
struct  ConstDmI
struct  ConstDmmultipathCoI
struct  ConstDmmultipathCoPI
struct  ConstDmmultipathI
struct  ConstDmmultipathPI
struct  ConstDmPartCoI
struct  ConstDmPartCoPI
struct  ConstDmPI
struct  ConstDmraidCoI
struct  ConstDmraidCoPI
struct  ConstDmraidI
struct  ConstDmraidPI
struct  ConstLoopI
struct  ConstLoopPI
struct  ConstLvmLvI
struct  ConstLvmLvPI
struct  ConstLvmVgI
struct  ConstLvmVgPI
struct  ConstMdI
struct  ConstMdPartCoI
struct  ConstMdPartCoPI
struct  ConstMdPartI
struct  ConstMdPartPI
struct  ConstMdPI
struct  ConstNfsI
struct  ConstNfsPI
struct  ConstPartitionI
struct  ConstPartitionPI
struct  ConstTmpfsI
struct  ConstTmpfsPI
struct  ConstVolumeI
struct  ConstVolumePI
struct  ContainerI
struct  ContainerPI
struct  ContCondIPair
struct  DiskCondIPair
struct  DiskI
struct  DiskPI
struct  DmCondIPair
struct  DmmultipathCoCondIPair
struct  DmmultipathCoI
struct  DmmultipathCondIPair
struct  DmmultipathCoPI
struct  DmPartCoCondIPair
struct  DmPartCoI
struct  DmPartCoPI
struct  DmraidCoCondIPair
struct  DmraidCoI
struct  DmraidCondIPair
struct  DmraidCoPI
struct  LoopCondIPair
struct  LvmLvCondIPair
struct  LvmVgCondIPair
struct  LvmVgI
struct  LvmVgPI
struct  MdCondIPair
struct  MdPartCoCondIPair
struct  MdPartCoI
struct  MdPartCondIPair
struct  MdPartCoPI
struct  NfsCondIPair
struct  PartCondIPair
struct  TmpfsCondIPair
struct  VolCondIPair
struct  VolumeI


Detailed Description

Main class to access libstorage functionality.

This is the main class with that one can get access to the functionality provided by libstorage. It contains a list of container objects.

All modifying member functions of the storage library will go through Storage class. This is the central place where things like readonly access, locking, testmode, inst-sys etc. are handled. It has the additional advantage the the complete class hierarchy below Storage could be changed without affecting the user interface of libstorage.


Member Typedef Documentation

typedef std::list<Container*> storage::Storage::CCont [protected]

typedef CCont::iterator storage::Storage::CIter [protected]

typedef CCont::const_iterator storage::Storage::CCIter [protected]

typedef CastCheckIterator<CCIter, storage::DISK, const Disk *> storage::Storage::ContainerCDiskIter [protected]

typedef CastCheckIterator<CIter, storage::DISK, Disk *> storage::Storage::ContainerDiskIter [protected]

typedef CheckFnc<const Disk> storage::Storage::CheckFncDisk [protected]

typedef CastCheckIterator<CCIter, storage::LVM, const LvmVg *> storage::Storage::ContainerCLvmVgIter [protected]

typedef CastCheckIterator<CIter, storage::LVM, LvmVg *> storage::Storage::ContainerLvmVgIter [protected]

typedef CheckFnc<const LvmVg> storage::Storage::CheckFncLvmVg [protected]

typedef CastCheckIterator<CCIter, storage::DMRAID, const DmraidCo *> storage::Storage::ContainerCDmraidIter [protected]

typedef CastCheckIterator<CIter, storage::DMRAID, DmraidCo *> storage::Storage::ContainerDmraidIter [protected]

typedef CastCheckIterator<CCIter, storage::DMMULTIPATH, const DmmultipathCo *> storage::Storage::ContainerCDmmultipathIter [protected]

typedef CheckFnc<const Volume> storage::Storage::CheckFncVol [protected]

typedef CheckFnc<const LvmLv> storage::Storage::CheckFncLvmLv [protected]

typedef CheckFnc<const Md> storage::Storage::CheckFncMd [protected]

typedef CheckFnc<const MdPart> storage::Storage::CheckFncMdPart [protected]

typedef CheckFnc<const Loop> storage::Storage::CheckFncLoop [protected]

typedef CheckFnc<const Btrfs> storage::Storage::CheckFncBtrfs [protected]

typedef CheckFnc<const Tmpfs> storage::Storage::CheckFncTmpfs [protected]

typedef CheckFnc<const Nfs> storage::Storage::CheckFncNfs [protected]

typedef CheckFnc<const Dm> storage::Storage::CheckFncDm [protected]

typedef CheckFnc<const Dmraid> storage::Storage::CheckFncDmraid [protected]


Constructor & Destructor Documentation

storage::Storage::Storage ( const Environment env  ) 

storage::Storage::~Storage (  )  [virtual]


Member Function Documentation

static bool storage::Storage::isMd ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isLoop ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isNfs ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isDm ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isBtrfs ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isNotBtrfs ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isTmpfs ( const Container d  )  [inline, static, protected]

static bool storage::Storage::isDmPart ( const Container d  )  [inline, static]

static bool storage::Storage::isMdPart ( const Container d  )  [inline, static]

bool storage::Storage::readonly (  )  const [inline]

bool storage::Storage::testmode (  )  const [inline]

bool storage::Storage::autodetect (  )  const [inline]

bool storage::Storage::instsys (  )  const [inline]

string storage::Storage::logdir (  )  const [inline]

References env, and storage::Environment::logdir.

Referenced by detectObjects(), and ~Storage().

string storage::Storage::testdir (  )  const [inline]

void storage::Storage::setCacheChanges ( bool  cache = true  )  [inline, 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.

Implements storage::StorageInterface.

References cache.

bool storage::Storage::isCacheChanges (  )  const [inline, virtual]

Query the caching mode.

Implements storage::StorageInterface.

References cache.

Referenced by checkCache().

void storage::Storage::assertInit (  )  [inline]

References initialize(), and initialized.

Referenced by activateEncryption(), addFstabEntry(), addFstabOptions(), addNfsDevice(), addTmpfsMount(), changeDescText(), changeFormatVolume(), changeFstabOptions(), changeLabelVolume(), changeLvStripeCount(), changeLvStripeSize(), changeMdChunk(), changeMdParity(), changeMdType(), changeMkfsOptVolume(), changeMountBy(), changeMountPoint(), changePartitionId(), changeTunefsOptVolume(), checkDeviceMounted(), checkMd(), checkMdNumber(), checkNfsDevice(), commit(), createBackupState(), createFileLoop(), createLvmLv(), createLvmLvSnapshot(), createLvmVg(), createMd(), createMdAny(), createPartition(), createPartitionAny(), createPartitionKb(), createPartitionMax(), createSubvolume(), cylinderToKb(), defaultDiskLabel(), destroyPartitionTable(), dumpObjectList(), eraseLabelVolume(), existSubvolume(), extendBtrfsVolume(), extendLvmVg(), extendMd(), findDisk(), findDiskId(), findDiskPath(), findDmmultipathCo(), findDmPartCo(), findDmraidCo(), findLvmVg(), findMdPartCo(), forgetChangePartitionId(), forgetCryptPassword(), forgetResizeVolume(), freeCylindersAroundPartition(), getBtrfsInfo(), getContainers(), getContDiskInfo(), getContDmmultipathCoInfo(), getContDmraidCoInfo(), getContLvmVgInfo(), getContMdPartCoInfo(), getContVolInfo(), getCrypt(), getCryptPassword(), getDiskInfo(), getDmInfo(), getDmmultipathCoInfo(), getDmmultipathInfo(), getDmraidCoInfo(), getDmraidInfo(), getEfiBoot(), getFreeInfo(), getFstabOptions(), getIgnoreFstab(), getLoopInfo(), getLvmLvInfo(), getLvmLvSnapshotStateInfo(), getLvmVgInfo(), getMdInfo(), getMdPartCoInfo(), getMdPartInfo(), getMdStateInfo(), getMountBy(), getMountPoint(), getNfsInfo(), getPartitionInfo(), getRecursiveUsedBy(), getRecursiveUsing(), getTmpfsInfo(), getUnusedPartitionSlots(), getVolumes(), initializeDisk(), kbToCylinder(), modifyFileLoop(), mountDev(), needCryptPassword(), nextFreeMd(), nextFreePartition(), storage::operator<<(), readFstab(), removeBackupState(), removeDmraid(), removeFileLoop(), removeFstabOptions(), removeLvmLv(), removeLvmLvSnapshot(), removeLvmVg(), removeMd(), removePartition(), removeSubvolume(), removeTmpfsMount(), removeVolume(), resizePartition(), resizeVolume(), restoreBackupState(), setCryptPassword(), setCryptType(), setIgnoreFstab(), shrinkBtrfsVolume(), shrinkLvmVg(), shrinkMd(), umountDev(), updatePartitionArea(), verifyCryptFilePassword(), and verifyCryptPassword().

void storage::Storage::rescanEverything (  )  [virtual]

Rescan all disks. All currently detected objects are forgotten and a new scan for all type of objects (disks, LVM, 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.

Implements storage::StorageInterface.

References storage::Dm::activate(), storage::DmmultipathCo::activate(), storage::DmraidCo::activate(), storage::MdPartCo::activate(), storage::MdCo::activate(), storage::LvmVg::activate(), storage::clearPointerList(), cont, detectObjects(), storage::DmmultipathCo::getMultipaths(), instsys(), storage::DmmultipathCo::isActive(), tmpDir(), and y2mil.

bool storage::Storage::rescanCryptedObjects (  )  [virtual]

Rescan after unlocked encrypted volume. Rescan for objects that might be newly found after at least one encrypted volume has been unlocked. Currently the only supported containers on an decrypted volume is a LVM Volume Group.

Returns:
true if at least on encrypted container has been found

Implements storage::StorageInterface.

References storage::LvmVg::activate(), addToList(), storage::PeContainer::checkConsistency(), dumpObjectList(), findLvmVg(), storage::LvmVg::getVgs(), lvgEnd(), storage::LvmVg::lvmLvBegin(), storage::LvmVg::lvmLvEnd(), storage::LvmVg::normalizeDmDevices(), and y2mil.

int storage::Storage::checkCache (  ) 

const string& storage::Storage::root (  )  const [inline]

string storage::Storage::prependRoot ( const string &  mp  )  const

const string& storage::Storage::tmpDir (  )  const [inline]

bool storage::Storage::hasIScsiDisks (  )  const

string storage::Storage::bootMount (  )  const

const ArchInfo& storage::Storage::getArchInfo (  )  const [inline]

EtcFstab* storage::Storage::getFstab (  )  [inline]

EtcMdadm* storage::Storage::getMdadm (  )  [inline]

void storage::Storage::handleLogFile ( const string &  name  )  const

bool storage::Storage::testFilesEqual ( const string &  n1,
const string &  n2 
) [static]

References y2deb.

Referenced by handleLogFile().

void storage::Storage::printInfo ( std::ostream &  str  )  const

void storage::Storage::logCo ( const Container c  )  const

void storage::Storage::logProcData ( const string &  str = ""  )  const

void storage::Storage::clearUsedBy ( const string &  dev  ) 

void storage::Storage::clearUsedBy ( const list< string > &  devs  ) 

References clearUsedBy().

void storage::Storage::setUsedBy ( const string &  dev,
UsedByType  type,
const string &  device 
)

void storage::Storage::setUsedBy ( const list< string > &  devs,
UsedByType  type,
const string &  device 
)

References setUsedBy().

void storage::Storage::setUsedByBtrfs ( const string &  dev,
const string &  uuid 
)

void storage::Storage::addUsedBy ( const string &  dev,
UsedByType  type,
const string &  device 
)

void storage::Storage::addUsedBy ( const list< string > &  devs,
UsedByType  type,
const string &  device 
)

References addUsedBy().

void storage::Storage::removeUsedBy ( const string &  dev,
UsedByType  type,
const string &  device 
)

void storage::Storage::removeUsedBy ( const list< string > &  devs,
UsedByType  type,
const string &  device 
)

References removeUsedBy().

bool storage::Storage::isUsedBy ( const string &  dev  ) 

bool storage::Storage::isUsedBy ( const string &  dev,
UsedByType  type 
)

bool storage::Storage::isUsedBySingleBtrfs ( const Volume vol  )  const

bool storage::Storage::isUsedBySingleBtrfs ( const Volume vol,
const Volume **  btrfs 
) const

bool storage::Storage::canRemove ( const Volume vol  )  const

void storage::Storage::fetchDanglingUsedBy ( const string &  dev,
list< UsedBy > &  uby 
)

References y2mil.

Referenced by storage::Dm::Dm(), and storage::Md::Md().

bool storage::Storage::canUseDevice ( const string &  dev,
bool  disks_allowed = false 
)

bool storage::Storage::knownDevice ( const string &  dev,
bool  disks_allowed = false 
)

bool storage::Storage::setDmcryptData ( const string &  dev,
const string &  dm,
unsigned  dmnum,
unsigned long long  siz,
storage::EncryptType  typ 
)

bool storage::Storage::deletedDevice ( const string &  dev  )  const

bool storage::Storage::isDisk ( const string &  dev  ) 

const Volume * storage::Storage::getVolume ( const string &  dev  ) 

unsigned long long storage::Storage::deviceSize ( const string &  dev  ) 

References dEnd(), findDisk(), findVolume(), and y2mil.

Referenced by storage::LvmVg::extendVg().

string storage::Storage::deviceByNumber ( const string &  majmin  )  const

const Device * storage::Storage::deviceByNumber ( unsigned long  maj,
unsigned long  min 
) const

void storage::Storage::syncMdadm (  ) 

void storage::Storage::rootMounted (  ) 

bool storage::Storage::isRootMounted (  )  const [inline]

References root_mounted.

Referenced by addFstabEntry(), and detectObjects().

string storage::Storage::findNormalDevice ( const string &  device  ) 

References findVolume(), and y2mil.

bool storage::Storage::findVolume ( const string &  device,
Volume const *&  vol,
bool  no_btrfsc = false 
)

bool storage::Storage::findDm ( const string &  device,
const Dm *&  dm 
)

bool storage::Storage::findDmUsing ( const string &  device,
const Dm *&  dm 
)

bool storage::Storage::findDevice ( const string &  dev,
const Device *&  vol,
bool  search_by_minor = false 
)

bool storage::Storage::removeDm ( const string &  device  ) 

int storage::Storage::unaccessDev ( const string &  device  ) 

void storage::Storage::getContainers ( deque< storage::ContainerInfo > &  infos  )  [virtual]

int storage::Storage::getDiskInfo ( const string &  disk,
storage::DiskInfo info 
) [virtual]

Query disk info for a disk device

Parameters:
disk device name of disk, e.g. /dev/hda
info record that get filled with disk special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dEnd(), findDisk(), and storage::STORAGE_DISK_NOT_FOUND.

int storage::Storage::getLvmVgInfo ( const string &  name,
storage::LvmVgInfo info 
) [virtual]

Query info for a LVM volume group

Parameters:
name name of volume group, e.g. system
info record that gets filled with LVM VG special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findLvmVg(), lvgEnd(), and storage::STORAGE_LVM_VG_NOT_FOUND.

int storage::Storage::getDmraidCoInfo ( const string &  name,
storage::DmraidCoInfo info 
) [virtual]

Query container info for a DMRAID container

Parameters:
name name of container, e.g. pdc_ccaihgii
info record that gets filled with DMRAID Container special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dmrCoEnd(), findDmraidCo(), and storage::STORAGE_DMRAID_CO_NOT_FOUND.

int storage::Storage::getDmmultipathCoInfo ( const string &  name,
storage::DmmultipathCoInfo info 
) [virtual]

Query container info for a DMMULTIPATH container

Parameters:
name name of container, e.g. 3600508b400105f590000900000300000
info record that gets filled with DMMULTIPATH Container special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dmmCoEnd(), findDmmultipathCo(), and storage::STORAGE_DMMULTIPATH_CO_NOT_FOUND.

int storage::Storage::getContDiskInfo ( const string &  disk,
storage::ContainerInfo cinfo,
storage::DiskInfo info 
) [virtual]

Query disk info for a disk device

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dEnd(), findDisk(), and storage::STORAGE_DISK_NOT_FOUND.

int storage::Storage::getContLvmVgInfo ( const string &  name,
storage::ContainerInfo cinfo,
storage::LvmVgInfo info 
) [virtual]

Query info for a LVM volume group

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findLvmVg(), lvgEnd(), and storage::STORAGE_LVM_VG_NOT_FOUND.

int storage::Storage::getContDmraidCoInfo ( const string &  name,
storage::ContainerInfo cinfo,
storage::DmraidCoInfo info 
) [virtual]

Query container info for a DMRAID container

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dmrCoEnd(), findDmraidCo(), and storage::STORAGE_DMRAID_CO_NOT_FOUND.

int storage::Storage::getContDmmultipathCoInfo ( const string &  name,
storage::ContainerInfo cinfo,
storage::DmmultipathCoInfo info 
) [virtual]

Query container info for a DMMULTIPATH container

Parameters:
name name of container, e.g. 3600508b400105f590000900000300000
cinfo record that gets filled with container general data
info record that gets filled with DMMULTIPATH Container special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dmmCoEnd(), findDmmultipathCo(), and storage::STORAGE_DMMULTIPATH_CO_NOT_FOUND.

void storage::Storage::getVolumes ( deque< storage::VolumeInfo > &  infos  )  [virtual]

Query all volumes found in system

Parameters:
infos list of records that get filled with volume info

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::Volume::notDeleted(), and volPair().

int storage::Storage::getVolume ( const string &  device,
storage::VolumeInfo info 
) [virtual]

Query a volume by device name found in system

Parameters:
device device name , e.g. /dev/hda1
info record that gets filled with data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References findVolume(), and storage::STORAGE_VOLUME_NOT_FOUND.

int storage::Storage::getPartitionInfo ( const string &  disk,
deque< storage::PartitionInfo > &  plist 
) [virtual]

Query infos for partitions of a disk

Parameters:
disk device name of disk, e.g. /dev/hda
plist list of records that get filled with partition specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), dEnd(), storage::IterPair< Iter >::end(), findDisk(), storage::Partition::notDeleted(), and storage::STORAGE_DISK_NOT_FOUND.

int storage::Storage::getLvmLvInfo ( const string &  name,
deque< storage::LvmLvInfo > &  plist 
) [virtual]

Query infos for LVM LVs of a LVM VG

Parameters:
name name of volume group, e.g. system
plist list of records that get filled with LV specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), findLvmVg(), lvgEnd(), storage::LvmLv::notDeleted(), and storage::STORAGE_LVM_VG_NOT_FOUND.

int storage::Storage::getMdInfo ( deque< storage::MdInfo > &  plist  )  [virtual]

Query infos for software raid devices in system

Parameters:
plist list of records that get filled with MD specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), mdPair(), and storage::Md::notDeleted().

int storage::Storage::getMdPartInfo ( const string &  device,
deque< storage::MdPartInfo > &  plist 
) [virtual]

Query infos for partitions on raid device in system

Parameters:
device device name of the parent MdPartCo, e.g. /dev/md125
plist list of records that get filled with MdPart specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), findMdPartCo(), mdpCoEnd(), storage::MdPart::notDeleted(), and storage::STORAGE_MDPART_CO_NOT_FOUND.

int storage::Storage::getDmInfo ( deque< storage::DmInfo > &  plist  )  [virtual]

Query infos for dm devices in system

Parameters:
plist list of records that get filled with dm specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), dmPair(), storage::IterPair< Iter >::end(), and storage::Dm::notDeleted().

int storage::Storage::getNfsInfo ( deque< storage::NfsInfo > &  plist  )  [virtual]

Query infos for nfs devices in system

Parameters:
plist list of records that get filled with nfs info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), nfsPair(), and storage::Nfs::notDeleted().

int storage::Storage::getLoopInfo ( deque< storage::LoopInfo > &  plist  )  [virtual]

Query infos for file based loop devices in system

Parameters:
plist list of records that get filled with loop specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), loopPair(), and storage::Loop::notDeleted().

int storage::Storage::getBtrfsInfo ( deque< storage::BtrfsInfo > &  plist  )  [virtual]

Query infos for btrfs devices in system

Parameters:
plist list of records that get filled with btrfs specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), btrfsPair(), storage::IterPair< Iter >::end(), and storage::Btrfs::notDeleted().

int storage::Storage::getTmpfsInfo ( deque< storage::TmpfsInfo > &  plist  )  [virtual]

Query infos for tmpfs devices in system

Parameters:
plist list of records that get filled with tmpfs specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::Tmpfs::notDeleted(), and tmpfsPair().

int storage::Storage::getDmraidInfo ( const string &  name,
deque< storage::DmraidInfo > &  plist 
) [virtual]

Query infos for dmraid devices in system

Parameters:
plist list of records that get filled with dmraid specific info
name name of dmraid, e.g. pdc_igeeeadj
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), dmrCoEnd(), storage::IterPair< Iter >::end(), findDmraidCo(), storage::Dmraid::notDeleted(), and storage::STORAGE_DMRAID_CO_NOT_FOUND.

int storage::Storage::getDmmultipathInfo ( const string &  name,
deque< storage::DmmultipathInfo > &  plist 
) [virtual]

Query infos for dmmultipath devices in system

Parameters:
plist list of records that get filled with dmmultipath specific info
name name of dmmultipath, e.g. 3600508b400105f590000900000300000
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), dmmCoEnd(), storage::IterPair< Iter >::end(), findDmmultipathCo(), storage::Dmmultipath::notDeleted(), and storage::STORAGE_DMMULTIPATH_CO_NOT_FOUND.

int storage::Storage::getContVolInfo ( const string &  dev,
ContVolInfo info 
) [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.

Parameters:
dev device name of volume, e.g. /dev/hda1
info record that get filled with split data
Returns:
zero if all is ok, negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::BTRFSC, storage::ContVolInfo::cdevice, storage::ContVolInfo::cname, storage::ContVolInfo::ctype, storage::CUNKNOWN, storage::Device::device(), findContainer(), findVolume(), storage::Btrfs::getDevices(), storage::ContVolInfo::num, storage::STORAGE_VOLUME_NOT_FOUND, storage::ContVolInfo::vdevice, storage::ContVolInfo::vname, and y2mil.

bool storage::Storage::getFsCapabilities ( storage::FsType  fstype,
storage::FsCapabilities fscapabilities 
) const [virtual]

bool storage::Storage::getDlabelCapabilities ( const string &  dlabel,
storage::DlabelCapabilities dlabelcapabilities 
) const [virtual]

Query capabilities of a disk label.

Implements storage::StorageInterface.

References storage::Disk::getDlabelCapabilities().

list< string > storage::Storage::getAllUsedFs (  )  const [virtual]

void storage::Storage::setExtError ( const string &  txt  ) 

int storage::Storage::createPartition ( const string &  disk,
storage::PartitionType  type,
unsigned long  startCyl,
unsigned long  sizeCyl,
string &  device 
) [virtual]

Create a new partition. Units given in disk cylinders.

Parameters:
disk device name of disk, e.g. /dev/hda
type type of partition to create, e.g. primary or extended
startCyl 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.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), checkPwdBuf(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_DISK_NOT_FOUND, storage::STORAGE_DISK_USED_BY, storage::toString(), and y2mil.

int storage::Storage::resizePartition ( const string &  device,
unsigned long  sizeCyl 
) [virtual]

Resize an existing disk partition. Units given in disk cylinders. Filesystem data is resized accordingly.

Parameters:
device device name of partition
sizeCyl new size of partition in disk cylinders
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

Referenced by resizePartition(), and resizePartitionNoFs().

int storage::Storage::resizePartitionNoFs ( const string &  device,
unsigned long  sizeCyl 
) [virtual]

Resize an existing disk partition. Units given in disk cylinders. Filesystem data is ignored.

Parameters:
device device name of partition
sizeCyl new size of partition in disk cylinders
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References resizePartition().

int storage::Storage::nextFreePartition ( const string &  disk,
storage::PartitionType  type,
unsigned &  nr,
string &  device 
) [virtual]

Determine the device name of the next created partition

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), storage::STORAGE_DISK_NOT_FOUND, storage::toString(), and y2mil.

int storage::Storage::updatePartitionArea ( const string &  device,
unsigned long  startCyl,
unsigned long  sizeCyl 
) [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.

Parameters:
device device name of partition, e.g. /dev/hda1
startCyl cylinder number of partition start (cylinders are numbered starting with 0)
sizeCyl size of partition in disk cylinders
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

Referenced by updatePartitionArea().

int storage::Storage::freeCylindersAroundPartition ( const string &  device,
unsigned long &  freeCylsBefore,
unsigned long &  freeCylsAfter 
) [virtual]

Return the number of free cylinders before and after a partition.

Parameters:
device device name of partition, e.g. /dev/sda1
freeCylsBefore is set to the number of free cylinders before the partition
freeCylsAfter is set to the number of free cylinders after the partition
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), cont, storage::DISK, storage::DMMULTIPATH, storage::DMRAID, findVolume(), storage::MdPartCo::freeCylindersAroundPartition(), storage::DmPartCo::freeCylindersAroundPartition(), storage::Disk::freeCylindersAroundPartition(), storage::MDPART, storage::STORAGE_RESIZE_INVALID_CONTAINER, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::createPartitionKb ( const string &  disk,
storage::PartitionType  type,
unsigned long long  startK,
unsigned long long  sizeK,
string &  device 
) [virtual]

Create a new partition. Units given in Kilobytes.

Parameters:
disk device name of disk, e.g. /dev/hda
type type of partition to create, e.g. primary or extended
startK offset in kilobytes from start of disk
sizeK 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.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_DISK_NOT_FOUND, storage::STORAGE_DISK_USED_BY, storage::toString(), and y2mil.

int storage::Storage::createPartitionAny ( const string &  disk,
unsigned long long  sizeK,
string &  device 
) [virtual]

Create a new partition of any type anywhere on the disk. Units given in Kilobytes.

Parameters:
disk device name of disk, e.g. /dev/hda
sizeK 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.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_DISK_NOT_FOUND, storage::STORAGE_DISK_USED_BY, and y2mil.

int storage::Storage::createPartitionMax ( const string &  disk,
storage::PartitionType  type,
string &  device 
) [virtual]

Create a new partition of given type as large as possible.

Parameters:
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.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_DISK_NOT_FOUND, storage::STORAGE_DISK_USED_BY, storage::toString(), and y2mil.

unsigned long storage::Storage::kbToCylinder ( const string &  disk,
unsigned long long  sizeK 
) [virtual]

Compute number of disk cylinders needed for given space

Parameters:
disk device name of disk, e.g. /dev/hda
sizeK number of kilobytes
Returns:
number of disk cylinders needed

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), and y2mil.

unsigned long long storage::Storage::cylinderToKb ( const string &  disk,
unsigned long  sizeCyl 
) [virtual]

Compute number of kilobytes of a given number of disk cylinders

Parameters:
disk device name of disk, e.g. /dev/hda
sizeCyl number of disk cylinders
Returns:
number of kilobytes of given cylinders

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), and y2mil.

int storage::Storage::removePartition ( const string &  partition  )  [virtual]

int storage::Storage::changePartitionId ( const string &  partition,
unsigned  id 
) [virtual]

Change partition id of a partition

Parameters:
partition name of partition, e.g. /dev/hda1
id new partition id (e.g. 0x82 swap, 0x8e for lvm, ...)
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::MdPartCo::changePartitionId(), storage::DmPartCo::changePartitionId(), storage::Disk::changePartitionId(), checkCache(), cont, storage::DISK, storage::DMMULTIPATH, storage::DMRAID, findVolume(), storage::MDPART, readonly(), storage::STORAGE_CHANGE_PARTITION_ID_INVALID_CONTAINER, storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::forgetChangePartitionId ( const string &  partition  )  [virtual]

string storage::Storage::getPartitionPrefix ( const string &  disk  )  [virtual]

Return the prefix that is inserted between the disk name and the partition number.

Parameters:
disk name of disk, e.g. /dev/sda
Returns:
prefix for partitions, e.g. "", "p" or "_part"

Implements storage::StorageInterface.

References storage::Disk::partNaming().

string storage::Storage::getPartitionName ( const string &  disk,
int  partition_no 
) [virtual]

Construct the device name for a partiton from the disk name and partiton number.

Parameters:
disk name of disk, e.g. /dev/sda
partition_no number of partition, e.g. 1
Returns:
device name of partition, e.g. /dev/sda1

Implements storage::StorageInterface.

References storage::decString(), and storage::Disk::partNaming().

int storage::Storage::getUnusedPartitionSlots ( const string &  disk,
list< PartitionSlotInfo > &  slots 
) [virtual]

Query unused slots on a disk suitable for creating partitions.

Parameters:
disk name of disk, e.g. /dev/hda1
slots list of records that get filled with partition slot specific info
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::PartitionSlotInfo::cylSize, storage::PartitionSlotInfo::cylStart, dEnd(), dmpCoEnd(), storage::PartitionSlotInfo::extendedPossible, storage::PartitionSlotInfo::extendedSlot, findDisk(), findDmPartCo(), findMdPartCo(), storage::PartitionSlotInfo::logicalPossible, storage::PartitionSlotInfo::logicalSlot, mdpCoEnd(), storage::PartitionSlotInfo::primaryPossible, storage::PartitionSlotInfo::primarySlot, storage::STORAGE_DISK_NOT_FOUND, and y2mil.

int storage::Storage::destroyPartitionTable ( const string &  disk,
const string &  label 
) [virtual]

Destroys the partition table of a disk. An empty disk label of the given type without any partition is created.

Parameters:
disk device name of disk, e.g. /dev/hda
label disk label to create on disk, e.g. msdos, gpt, ...
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_DISK_NOT_FOUND, and y2mil.

int storage::Storage::initializeDisk ( const string &  disk,
bool  value 
) [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.

Parameters:
disk device name of disk, e.g. /dev/hda
value toggle if disk should be initialized or not
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), dEnd(), storage::DISK_INIT_NOT_POSSIBLE, dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), mdpCoEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_DISK_NOT_FOUND, and y2mil.

string storage::Storage::defaultDiskLabel ( const string &  device  )  [virtual]

Query the default disk label of the architecture of the machine (e.g. msdos for ix86, gpt for ia64, ...) for a disk

Parameters:
device device of disk
Returns:
default disk label of the disk

Implements storage::StorageInterface.

References assertInit(), dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), and mdpCoEnd().

int storage::Storage::changeFormatVolume ( const string &  device,
bool  format,
storage::FsType  fs 
) [virtual]

Sets or unsets the format flag for the given volume.

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References storage::BtrfsCo::addFromVolume(), addToList(), assertInit(), storage::BTRFS, storage::BTRFSC, checkCache(), storage::BtrfsCo::eraseVolume(), findVolume(), haveBtrfs(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MEMORY_EXHAUSTED, storage::STORAGE_VOLUME_NOT_FOUND, storage::toString(), storage::UB_BTRFS, y2mil, and y2war.

Referenced by storage::MdCo::extendMd(), storage::LvmVg::extendVg(), and storage::Btrfs::extendVolume().

int storage::Storage::changeLabelVolume ( const string &  device,
const string &  label 
) [virtual]

Sets the value of the filesystem label.

Parameters:
device name of volume, e.g. /dev/hda1
label value of the label
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::eraseLabelVolume ( const string &  device  ) 

int storage::Storage::changeMkfsOptVolume ( const string &  device,
const string &  opts 
) [virtual]

Sets the value of mkfs options.

Parameters:
device name of volume, e.g. /dev/hda1
opts options for mkfs command
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::changeTunefsOptVolume ( const string &  device,
const string &  opts 
) [virtual]

Sets the value of tunefs options.

Parameters:
device name of volume, e.g. /dev/hda1
opts options for tunefs command
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::changeDescText ( const string &  device,
const string &  txt 
) [virtual]

Sets the value of description text. This text will be returned together with the text returned by getCommitInfos().

Parameters:
device name of volume, e.g. /dev/hda1
txt description text for this partition
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::changeMountPoint ( const string &  device,
const string &  mount 
) [virtual]

Changes the mount point of a volume

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::getMountPoint ( const string &  device,
string &  mount 
) [virtual]

Get the mount point of a volume

Parameters:
device name of volume, e.g. /dev/hda1
mount will be set to the mount point of the volume (e.g. /home).
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), cont, findVolume(), storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::changeMountBy ( const string &  device,
storage::MountByType  mby 
) [virtual]

Changes mount by value in fstab of a volume

Parameters:
device name of volume, e.g. /dev/hda1
mby new mount by value of the volume.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, storage::toString(), and y2mil.

int storage::Storage::getMountBy ( const string &  device,
storage::MountByType mby 
) [virtual]

Get mount by value in fstab of a volume

Parameters:
device name of volume, e.g. /dev/hda1
mby will be set to the mount by value of the volume.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), cont, defaultMountBy, dEnd(), dmpCoEnd(), findDisk(), findDmPartCo(), findMdPartCo(), findVolume(), storage::Disk::getDiskPartition(), mdpCoEnd(), storage::MOUNTBY_DEVICE, storage::MOUNTBY_ID, storage::MOUNTBY_PATH, storage::STORAGE_VOLUME_NOT_FOUND, storage::toString(), and y2mil.

int storage::Storage::changeFstabOptions ( const string &  device,
const string &  options 
) [virtual]

Changes the fstab options of a volume

Parameters:
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.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::getFstabOptions ( const string &  device,
string &  options 
) [virtual]

Get the fstab options of a volume

Parameters:
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 ",".
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), cont, findVolume(), storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::addFstabOptions ( const string &  device,
const string &  options 
) [virtual]

Add to the fstab options of a volume

Parameters:
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 ",".
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::splitString(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::removeFstabOptions ( const string &  device,
const string &  options 
) [virtual]

Remove from the fstab options of a volume

Parameters:
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=".
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::splitString(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::setCryptPassword ( const string &  device,
const string &  pwd 
) [virtual]

Set crypt password of a volume

Parameters:
device name of volume, e.g. /dev/hda1
pwd crypt password for this volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findVolume(), storage::mapInsertOrReplace(), readonly(), storage::STORAGE_CHANGE_READONLY, and y2mil.

int storage::Storage::verifyCryptPassword ( const string &  device,
const string &  pwd,
bool  erase 
) [virtual]

Verify password of a volume

Parameters:
device name of volume, e.g. /dev/hda1
pwd crypt password for this volume
erase if true remove password even after successful verification
Returns:
zero if password is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::ENC_UNKNOWN, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, verifyCryptFilePassword(), storage::VOLUME_CRYPT_NOT_DETECTED, and y2mil.

int storage::Storage::verifyCryptFilePassword ( const string &  file,
const string &  pwd 
)

bool storage::Storage::needCryptPassword ( const string &  device  )  [virtual]

Check if crypt password is required

Parameters:
device name of volume, e.g. /dev/hda1
Returns:
true if password is required, false otherwise

Implements storage::StorageInterface.

References assertInit(), storage::IterPair< Iter >::begin(), storage::checkNormalFile(), storage::IterPair< Iter >::end(), findVolume(), loopPair(), storage::Loop::notDeleted(), and y2mil.

int storage::Storage::forgetCryptPassword ( const string &  device  )  [virtual]

Makes library forget a crypt password of a volume

Parameters:
device name of volume, e.g. /dev/hda1
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::getCryptPassword ( const string &  device,
string &  pwd 
) [virtual]

Get crypt password of a volume

Parameters:
device name of volume, e.g. /dev/hda1
pwd crypt password for this volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findVolume(), storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::setCrypt ( const string &  device,
bool  val 
) [virtual]

Set encryption state of a volume

Parameters:
device name of volume, e.g. /dev/hda1
val flag if encryption should be activated
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References storage::ENC_LUKS, setCryptType(), and y2mil.

int storage::Storage::setCryptType ( const string &  device,
bool  val,
EncryptType  typ 
) [virtual]

Set encryption state of a volume

Parameters:
device name of volume, e.g. /dev/hda1
val flag if encryption should be activated
typ type of encryption to set up
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, storage::toString(), and y2mil.

Referenced by setCrypt().

int storage::Storage::getCrypt ( const string &  device,
bool &  val 
) [virtual]

Get encryption state of a volume

Parameters:
device name of volume, e.g. /dev/hda1
val will be set if encryption is activated
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), cont, findVolume(), storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::setIgnoreFstab ( const string &  device,
bool  val 
) [virtual]

Set fstab handling state of a volume. This way one can make libstorage ignore fstab handling for a volume. Use this with care.

Parameters:
device name of volume, e.g. /dev/hda1
val flag if fstab should be ignored for this volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::getIgnoreFstab ( const string &  device,
bool &  val 
) [virtual]

Get fstab handling state of a volume.

Parameters:
device name of volume, e.g. /dev/hda1
val will be set if fstab should be ignored for this volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), cont, findVolume(), storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

int storage::Storage::addFstabEntry ( const string &  device,
const string &  mount,
const string &  vfs,
const string &  options,
unsigned  freq,
unsigned  passno 
) [virtual]

Adds the specified entry to /etc/fstab

This function does not cache the changes but writes them immediately.

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References storage::EtcFstab::addEntry(), assertInit(), storage::createPath(), storage::FstabChange::dentry, storage::FstabChange::device, storage::EtcFstab::flush(), storage::FstabChange::freq, storage::FstabChange::fs, fstab, isRootMounted(), storage::FstabChange::mount, storage::FstabChange::opts, storage::FstabChange::passno, prependRoot(), readonly(), storage::splitString(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_INVALID_FSTAB_VALUE, storage::STORAGE_NO_FSTAB_PTR, and y2mil.

int storage::Storage::resizeVolume ( const string &  device,
unsigned long long  newSizeK 
) [virtual]

Resizes a volume while keeping the data on the filesystem

Parameters:
device name of volume, e.g. /dev/hda1
newSizeK new size desired volume in kilobytes
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

Referenced by resizeVolume(), and resizeVolumeNoFs().

int storage::Storage::resizeVolumeNoFs ( const string &  device,
unsigned long long  newSizeK 
) [virtual]

Resizes a volume while ignoring the data on the filesystem

Parameters:
device name of volume, e.g. /dev/hda1
newSizeK new size desired volume in kilobytes
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References resizeVolume().

int storage::Storage::forgetResizeVolume ( const string &  device  )  [virtual]

Forget about possible resize of an volume.

Parameters:
device device name of volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), cont, findVolume(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

void storage::Storage::setRecursiveRemoval ( bool  val = true  )  [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.

Parameters:
val flag if removal is done recursive

Implements storage::StorageInterface.

References recursiveRemove, and y2mil.

Referenced by storage::MdPartCo::destroyPartitionTable(), storage::DmPartCo::destroyPartitionTable(), and storage::Disk::destroyPartitionTable().

bool storage::Storage::getRecursiveRemoval (  )  const [inline, virtual]

Get value of the flag for recursive removal

Returns:
value of the flag for recursive removal

Implements storage::StorageInterface.

References recursiveRemove.

Referenced by storage::MdPartCo::destroyPartitionTable(), storage::DmPartCo::destroyPartitionTable(), storage::Disk::destroyPartitionTable(), and storage::LvmVg::removeLv().

int storage::Storage::getRecursiveUsing ( const string &  device,
list< string > &  devices 
) [virtual]

Recursively get all devices using device. Volumes of containers are also considered as using the devices.

Parameters:
device name of device, e.g. /dev/sda
devices name of devices using device, e.g. /dev/sda1 /dev/sda2
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), getRecursiveUsingHelper(), and y2mil.

int storage::Storage::getRecursiveUsingHelper ( const string &  device,
list< string > &  devices 
)

int storage::Storage::getRecursiveUsedBy ( const list< string > &  devices,
bool  itself,
list< string > &  usedby_devices 
) [virtual]

Recursively get all devices used by devices. Containers of volumes are also considered as used by the devices.

Parameters:
devices list of name of devices, e.g. /dev/sda1
itself whether the device itself is included in the result
usedby_devices name of devices used by devices, e.g. /dev/sda
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), getRecursiveUsedByHelper(), and y2mil.

int storage::Storage::getRecursiveUsedByHelper ( const string &  device,
bool  itself,
list< string > &  usedby_devices 
)

void storage::Storage::setZeroNewPartitions ( bool  val = true  )  [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.

Parameters:
val flag if newly created partitions should be zeroed

Implements storage::StorageInterface.

References y2mil, and zeroNewPartitions.

bool storage::Storage::getZeroNewPartitions (  )  const [inline, virtual]

Get value of the flag for zeroing newly created partitions

Returns:
value of the flag for zeroing newly created partitions

Implements storage::StorageInterface.

References zeroNewPartitions.

Referenced by storage::Partition::zeroIfNeeded().

void storage::Storage::setPartitionAlignment ( PartAlign  val  )  [virtual]

Set alignment of newly created partitions. PartAlign has value ALIGN_OPTIMAL or ALIGN_CYLINDER. ALIGN_CYLINDER aligns partiton start to cylinder boundaries like it was traditionally for a long time. ALIGN_OPTIMAL aligns according to values provided by kernel. Default alignment is to multiples of 2048 sectors which is compatible to partition layout of Windows Vista and Windows 7.

Parameters:
val value of new alignment type

Implements storage::StorageInterface.

References partAlignment, storage::toString(), and y2mil.

Referenced by initialize().

PartAlign storage::Storage::getPartitionAlignment (  )  const [inline, virtual]

Get value for the alignment of newly created partitions

Returns:
value for the alignment

Implements storage::StorageInterface.

References partAlignment.

void storage::Storage::setDefaultMountBy ( MountByType  val  )  [virtual]

Set default value for mount by.

Parameters:
val new default mount by value.

Implements storage::StorageInterface.

References defaultMountBy, storage::toString(), and y2mil.

Referenced by initialize().

MountByType storage::Storage::getDefaultMountBy (  )  const [inline, virtual]

Get default value for mount by.

Returns:
default value for mount by

Implements storage::StorageInterface.

References defaultMountBy.

Referenced by storage::Volume::defaultMountBy().

void storage::Storage::setDefaultFs ( FsType  val  )  [virtual]

Set default filesystem.

Parameters:
val new default filesystem.

Implements storage::StorageInterface.

References defaultFs, storage::toString(), and y2mil.

Referenced by initialize().

FsType storage::Storage::getDefaultFs (  )  const [inline, virtual]

Get default filesystem.

Returns:
default filesystem.

Implements storage::StorageInterface.

References defaultFs.

void storage::Storage::setDefaultSubvolName ( const string &  val  )  [virtual]

Set default subvolume name.

Parameters:
val new default subvolume name.

Implements storage::StorageInterface.

References defaultSubvolName, and y2mil.

string storage::Storage::getDefaultSubvolName (  )  const [inline, virtual]

Get default filesystem.

Returns:
default filesystem.

Implements storage::StorageInterface.

References defaultSubvolName.

Referenced by storage::Volume::doFormatBtrfs().

void storage::Storage::setDetectMountedVolumes ( bool  val = true  )  [virtual]

Determine of libstorage should detect mounted volumes.

Parameters:
val flag if mounted volumes should be detected

Implements storage::StorageInterface.

References detectMounted, and y2mil.

bool storage::Storage::getDetectMountedVolumes (  )  const [inline, virtual]

Get value of the flag for detection of mounted volumes.

Returns:
value of the flag for detection of mounted volumes

Implements storage::StorageInterface.

References detectMounted.

bool storage::Storage::getEfiBoot (  )  [virtual]

Get value for EFI boot.

Returns:
value for efi boot

Implements storage::StorageInterface.

References archinfo, assertInit(), and storage::ArchInfo::is_efiboot.

void storage::Storage::setRootPrefix ( const string &  root  )  [virtual]

Set value for root prefix.

This value is appended to all mount points of volumes, when changes are commited. Config files fstab, crypttab and mdadm.conf are also created relative to this prefix. This variable must be set before first call to commit.

Parameters:
root new value for root prefix

Implements storage::StorageInterface.

References rootprefix, and y2mil.

string storage::Storage::getRootPrefix (  )  const [inline, virtual]

Get value for root prefix.

Returns:
value for root prefix

Implements storage::StorageInterface.

References rootprefix.

int storage::Storage::removeVolume ( const string &  device  )  [virtual]

Removes a volume from the system. This function can be used for removing all types of volumes (partitions, LVM LVs, MD devices ...)

Parameters:
device name of volume, e.g. /dev/hda1
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), canRemove(), checkCache(), cont, findVolume(), readonly(), removeUsing(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_REMOVE_USED_VOLUME, storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

Referenced by storage::MdPartCo::destroyPartitionTable(), storage::DmPartCo::destroyPartitionTable(), storage::Disk::destroyPartitionTable(), and removeUsing().

int storage::Storage::removeUsing ( const string &  device,
const list< UsedBy > &  uby 
)

bool storage::Storage::checkDeviceMounted ( const string &  device,
list< string > &  mps 
) [virtual]

Determine if the given device is known and mounted somewhere

Parameters:
device device name to check (checks also all alias names)
mps set to current mount points if mounted
Returns:
bool that is true if device is mounted

Implements storage::StorageInterface.

References assertInit(), findVolume(), storage::ProcMounts::getAllMounts(), and y2mil.

bool storage::Storage::umountDevice ( const string &  device  )  [inline, 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

Parameters:
device device name to umount
Returns:
bool if umount succeeded

Implements storage::StorageInterface.

References umountDev().

Referenced by getFreeInfo().

bool storage::Storage::umountDev ( const string &  device,
bool  dounsetup = false 
)

bool storage::Storage::mountDev ( const string &  device,
const string &  mp,
bool  ro = true,
const string &  opts = "" 
)

bool storage::Storage::mountDevice ( const string &  device,
const string &  mp 
) [inline, 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

Parameters:
device device name to mount
mp mount point to mount to
Returns:
bool if mount succeeded

Implements storage::StorageInterface.

References mountDev().

bool storage::Storage::mountDeviceOpts ( const string &  device,
const string &  mp,
const string &  opts 
) [inline, 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

Parameters:
device device name to mount
mp mount point to mount to
opts options to use for mount
Returns:
bool if mount succeeded

Implements storage::StorageInterface.

References mountDev().

bool storage::Storage::mountDeviceRo ( const string &  device,
const string &  mp,
const string &  opts 
) [inline, 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

Parameters:
device device name to mount
mp mount point to mount to
opts options to use for mount
Returns:
bool if mount succeeded

Implements storage::StorageInterface.

References mountDev().

int storage::Storage::activateEncryption ( const string &  device,
bool  on 
) [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

Parameters:
device device name
on if true activate access to encrypted data, otherwise deactivate it
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findVolume(), readonly(), storage::STORAGE_VOLUME_NOT_FOUND, and y2mil.

bool storage::Storage::readFstab ( const string &  dir,
deque< storage::VolumeInfo > &  infos 
) [virtual]

bool storage::Storage::getFreeInfo ( const string &  device,
bool  get_resize,
ResizeInfo resize_info,
bool  get_content,
ContentInfo content_info,
bool  use_cache 
) [virtual]

Detect potentially available free space on a partition

Parameters:
device device to check
get_resize flag to indicate that resize_info should be queried
resize_info struct that gets filled with resize info
get_content flag to indicate that content_info should be queried
content_info struct that gets filled with content info
use_cache function should return cached data if available
Returns:
bool if values could be successfully determined

Implements storage::StorageInterface.

References assertInit(), storage::FreeInfo::detectContentInfo(), storage::FreeInfo::detectResizeInfo(), findVolume(), storage::FSNONE, storage::FSUNKNOWN, getCachedFreeInfo(), isUsedBySingleBtrfs(), mountTmpRo(), storage::NTFS, setCachedFreeInfo(), storage::SWAP, testmode(), umountDevice(), and y2mil.

int storage::Storage::createBackupState ( const string &  name  )  [virtual]

Create backup of current state of all containers

Parameters:
name name under which the backup should be created
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), backupStates(), checkBackupState(), cont, equalBackupStates(), readonly(), removeBackupState(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_INVALID_BACKUP_STATE_NAME, and y2mil.

int storage::Storage::removeBackupState ( const string &  name  )  [virtual]

Remove existing backup state

Parameters:
name name of backup to remove, empty string means to remove all existing backup states
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), backupStates(), storage::clearPointerList(), deleteBackups(), readonly(), storage::STORAGE_BACKUP_STATE_NOT_FOUND, storage::STORAGE_CHANGE_READONLY, and y2mil.

Referenced by createBackupState().

int storage::Storage::restoreBackupState ( const string &  name  )  [virtual]

Restore state to a previously created backup

Parameters:
name name of the backup to restore
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::clearPointerList(), cont, readonly(), storage::STORAGE_BACKUP_STATE_NOT_FOUND, storage::STORAGE_CHANGE_READONLY, and y2mil.

bool storage::Storage::checkBackupState ( const string &  name  )  const [virtual]

Checks if a backup with a certain name already exists

Parameters:
name name of the backup to check
Returns:
true if the backup exists

Implements storage::StorageInterface.

References y2mil.

Referenced by createBackupState().

bool storage::Storage::equalBackupStates ( const string &  lhs,
const string &  rhs,
bool  verbose_log 
) const [virtual]

Compare two backup states

Parameters:
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
Returns:
true if states are equal

Implements storage::StorageInterface.

References cont, storage::find_if(), and y2mil.

Referenced by createBackupState().

int storage::Storage::createLvmVg ( const string &  name,
unsigned long long  peSizeK,
bool  lvm1,
const deque< string > &  devs 
) [virtual]

Create a LVM volume group

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References addToList(), assertInit(), checkCache(), storage::LvmVg::extendVg(), findLvmVg(), lvgEnd(), readonly(), storage::LvmVg::setPeSize(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_EXISTS, storage::STORAGE_VG_INVALID_NAME, and y2mil.

int storage::Storage::removeLvmVg ( const string &  name  )  [virtual]

Remove a LVM volume group. If the volume group contains logical volumes, these are automatically also removed.

Parameters:
name name of volume group
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), removeContainer(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

Referenced by removeUsing().

int storage::Storage::extendLvmVg ( const string &  name,
const deque< string > &  devs 
) [virtual]

Extend a LVM volume group with additional physical devices

Parameters:
name name of volume group
devs list with physical devices to add to that volume group
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::shrinkLvmVg ( const string &  name,
const deque< string > &  devs 
) [virtual]

Shrink a LVM volume group

Parameters:
name name of volume group
devs list with physical devices to remove from that volume group
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::createLvmLv ( const string &  vg,
const string &  name,
unsigned long long  sizeK,
unsigned  stripes,
string &  device 
) [virtual]

Create a LVM logical volume

Parameters:
vg name of volume group
name of logical volume
sizeK size of logical volume in kilobytes
stripes 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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), checkPwdBuf(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::removeLvmLvByDevice ( const string &  device  )  [virtual]

Remove a LVM logical volume

Parameters:
device name of logical volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References removeLvmLv(), storage::STORAGE_LVM_INVALID_DEVICE, storage::undevDevice(), and y2mil.

int storage::Storage::removeLvmLv ( const string &  vg,
const string &  name 
) [virtual]

Remove a LVM logical volume

Parameters:
vg name of volume group
name of logical volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

Referenced by removeLvmLvByDevice().

int storage::Storage::changeLvStripeCount ( const string &  vg,
const string &  name,
unsigned long  stripes 
) [virtual]

Change stripe count of a LVM logical volume. This can only be before the volume is created on disk.

Parameters:
vg name of volume group
name of logical volume
stripes new stripe count of logical volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::changeLvStripeSize ( const string &  vg,
const string &  name,
unsigned long long  stripeSizeK 
) [virtual]

Change stripe size of a LVM logical volume. This can only be before the volume is created on disk.

Parameters:
vg name of volume group
name of logical volume
stripeSizeK new stripe size of logical volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::createLvmLvSnapshot ( const string &  vg,
const string &  origin,
const string &  name,
unsigned long long  cowSizeK,
string &  device 
) [virtual]

Create a LVM logical volume snapshot

Parameters:
vg name of volume group
origin name of logical volume origin
name of logical volume snapshot
cowSizeK size of snapshot in kilobytes
device is set to the device name of the new snapshot
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::removeLvmLvSnapshot ( const string &  vg,
const string &  name 
) [virtual]

Remove a LVM logical volume snapshot

Parameters:
vg name of volume group
name name of logical volume snapshot
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), findLvmVg(), lvgEnd(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::getLvmLvSnapshotStateInfo ( const string &  vg,
const string &  name,
LvmLvSnapshotStateInfo info 
) [virtual]

Get state of a LVM logical volume snapshot

Precondition:
This can only be done after the snapshot has been created on disk.
Parameters:
vg name of volume group
name name of logical volume snapshot
info record that gets filled with snapshot special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findLvmVg(), lvgEnd(), storage::STORAGE_LVM_VG_NOT_FOUND, and y2mil.

int storage::Storage::nextFreeMd ( unsigned &  nr,
string &  device 
) [virtual]

Determine the device name of the next created software raid device

Parameters:
nr is set to the number of the next created software raid device
device is set to the device name of the next created software raid device
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::decString(), getMdPartMdNums(), haveMd(), storage::MD_UNKNOWN_NUMBER, storage::MdCo::usedNumbers(), and y2mil.

Referenced by createMdAny().

bool storage::Storage::checkMdNumber ( unsigned  num  ) 

int storage::Storage::createMd ( const string &  name,
MdType  md_type,
const list< string > &  devices,
const list< string > &  spares 
) [virtual]

Create a Software raid device by name

Parameters:
name name of software raid device to create (e.g. /dev/md0)
md_type raid personality of the new software raid
devices list with physical devices for the new software raid
spares list with spare physical devices for the new software raid
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References addToList(), assertInit(), checkCache(), checkMdNumber(), checkPwdBuf(), storage::MdCo::createMd(), haveMd(), storage::MD_DUPLICATE_NUMBER, storage::Md::mdDevice(), storage::Md::mdStringNum(), storage::normalizeDevices(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::toString(), and y2mil.

int storage::Storage::createMdAny ( MdType  md_type,
const list< string > &  devices,
const list< string > &  spares,
string &  device 
) [virtual]

Create a Software raid device. Name determined by library.

Parameters:
md_type raid personality of the new software raid
devices list with physical devices for the new software raid
spares list with spare physical devices for the new software raid
device device name of created software raid device
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References addToList(), assertInit(), checkCache(), checkPwdBuf(), storage::MdCo::createMd(), haveMd(), storage::Md::mdDevice(), nextFreeMd(), storage::normalizeDevices(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MEMORY_EXHAUSTED, storage::toString(), and y2mil.

int storage::Storage::removeMd ( const string &  name,
bool  destroySb = true 
) [virtual]

Remove a Software raid device.

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), haveMd(), storage::Md::mdStringNum(), readonly(), storage::MdCo::removeMd(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, and y2mil.

int storage::Storage::extendMd ( const string &  name,
const list< string > &  devices,
const list< string > &  spares 
) [virtual]

Add a partition to a raid device. This can only be done before the raid is created on disk.

Parameters:
name name of software raid device (e.g. /dev/md0)
devices list with physical devices to add to the raid
spares list with spare physical devices to add to the raid
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), storage::MdCo::extendMd(), haveMd(), storage::Md::mdStringNum(), storage::normalizeDevices(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, and y2mil.

int storage::Storage::shrinkMd ( const string &  name,
const list< string > &  devices,
const list< string > &  spares 
) [virtual]

Remove a partition from a raid device. This can only be done before the raid is created on disk.

Parameters:
name name of software raid device (e.g. /dev/md0)
devices list of physical devices to remove from the raid
spares list of spare physical devices to remove from the raid
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), haveMd(), storage::Md::mdStringNum(), storage::normalizeDevices(), readonly(), storage::MdCo::shrinkMd(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, and y2mil.

int storage::Storage::changeMdType ( const string &  name,
storage::MdType  md_type 
) [virtual]

Change raid type of a raid device. This can only be done before the raid is created on disk.

Parameters:
name name of software raid device (e.g. /dev/md0)
md_type new raid personality of the software raid
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::MdCo::changeMdType(), checkCache(), haveMd(), storage::Md::mdStringNum(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, storage::toString(), and y2mil.

int storage::Storage::changeMdChunk ( const string &  name,
unsigned long  chunkSizeK 
) [virtual]

Change chunk size of a raid device. This can only be done before the raid is created on disk.

Parameters:
name name of software raid device (e.g. /dev/md0)
chunkSizeK new chunk size of the software raid
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::MdCo::changeMdChunk(), checkCache(), haveMd(), storage::Md::mdStringNum(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, and y2mil.

int storage::Storage::changeMdParity ( const string &  name,
storage::MdParity  ptype 
) [virtual]

Change parity of a raid device with raid type raid5, raid6 or raid10. This can only be done before the raid is created on disk.

Parameters:
name name of software raid device (e.g. /dev/md0)
ptype new parity of the software raid
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::MdCo::changeMdParity(), checkCache(), haveMd(), storage::Md::mdStringNum(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, storage::toString(), and y2mil.

int storage::Storage::checkMd ( const string &  name  )  [virtual]

Check if a raid device is valid

Parameters:
name name of software raid device (e.g. /dev/md0)
Returns:
true if all is ok, a false to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::MdCo::checkMd(), haveMd(), storage::Md::mdStringNum(), storage::STORAGE_MD_NOT_FOUND, and y2mil.

int storage::Storage::getMdStateInfo ( const string &  name,
MdStateInfo info 
) [virtual]

Get state of a raid device.

Precondition:
This can only be done after the raid has been created on disk.
Parameters:
name name of software raid device (e.g. /dev/md0)
info record that gets filled with raid special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::MdCo::getMdState(), haveMd(), storage::Md::mdStringNum(), storage::STORAGE_MD_INVALID_NAME, storage::STORAGE_MD_NOT_FOUND, and y2mil.

int storage::Storage::computeMdSize ( MdType  md_type,
const list< string > &  devices,
const list< string > &  spares,
unsigned long long &  sizeK 
) [virtual]

Compute the size of a raid device.

The size compute may not be accurate. It must not be used for further computations. Do not used in new code.

Parameters:
md_type raid type of the software raid
devices list with physical devices for the software raid
spares list with spare physical devices for the software raid
sizeK will contain the computed size in kilobytes
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References getVolume(), storage::MD_TOO_FEW_DEVICES, storage::MULTIPATH, storage::RAID0, storage::RAID1, storage::RAID10, storage::RAID5, storage::RAID6, storage::Device::sizeK(), storage::STORAGE_VOLUME_NOT_FOUND, storage::toString(), and y2mil.

Referenced by storage::Md::computeSize().

list< int > storage::Storage::getMdAllowedParity ( MdType  md_type,
unsigned  devnr 
) [virtual]

void storage::Storage::setImsmDriver ( ImsmDriver  driver  )  [inline, virtual]

Set which driver should be used for IMSM Software RAIDs.

Parameters:
driver driver to use for IMSM Software RAIDs.

Implements storage::StorageInterface.

References imsm_driver.

Referenced by discoverMdPVols().

ImsmDriver storage::Storage::getImsmDriver (  )  const [inline, virtual]

Query which driver is used for IMSM Software RAIDs.

Returns:
driver used for IMSM Software RAIDs.

Implements storage::StorageInterface.

References imsm_driver.

Referenced by activateHld(), detectObjects(), and discoverMdPVols().

void storage::Storage::setMultipathAutostart ( MultipathAutostart  multipath_autostart  )  [inline, virtual]

Set whether multipath should be started automatically if detected.

Parameters:
multipath_autostart value for automatically start of multipath.

Implements storage::StorageInterface.

References multipath_autostart.

MultipathAutostart storage::Storage::getMultipathAutostart (  )  const [inline, virtual]

Query whether multipath should be started automatically if detected.

Returns:
value for automatically start of multipath.

Implements storage::StorageInterface.

References multipath_autostart.

int storage::Storage::getMdPartCoInfo ( const string &  name,
MdPartCoInfo info 
) [virtual]

Query container info for a MDPART container

Parameters:
name name of container, e.g. md126
info record that gets filled with MDPART Container special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findMdPartCo(), mdpCoEnd(), and storage::STORAGE_MDPART_CO_NOT_FOUND.

int storage::Storage::getContMdPartCoInfo ( const string &  name,
ContainerInfo cinfo,
MdPartCoInfo info 
) [virtual]

Query container info for a MDPART container

Parameters:
name name of container, e.g. md126
cinfo record that gets filled with container general data
info record that gets filled with MDPART Container special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), findMdPartCo(), mdpCoEnd(), and storage::STORAGE_MDPART_CO_NOT_FOUND.

int storage::Storage::getMdPartCoStateInfo ( const string &  name,
MdPartCoStateInfo info 
) [virtual]

Get state of a MD software raid device.

Precondition:
This can only be done after the raid has been created on disk.
Parameters:
name name of software raid device (e.g. /dev/md125)
info record that gets filled with raid special data
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References findMdPartCo(), mdpCoEnd(), and storage::STORAGE_MDPART_CO_NOT_FOUND.

int storage::Storage::removeMdPartCo ( const string &  name,
bool  destroySb 
) [virtual]

Remove a Partitionable Software raid device.

Only RAID with persistent superblock can be removed. IMSM and DDF RAIDs cannot be removed.

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References checkCache(), findMdPartCo(), storage::MDPART_DEVICE_NOT_FOUND, storage::MDPART_NO_REMOVE, mdpCoEnd(), storage::MdPartCoInfo::sb_ver, y2mil, and y2war.

Referenced by removeUsing().

int storage::Storage::addNfsDevice ( const string &  nfsDev,
const string &  opts,
unsigned long long  sizeK,
const string &  mp,
bool  nfs4 
) [virtual]

Add knowledge about existence of nfs device.

Parameters:
nfsDev name of nfs device
sizeK size of the nfs device
opts mount options for nfs mount
mp mount point of the nfs device
nfs4 use NFS4 for device
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References storage::NfsCo::addNfs(), addToList(), assertInit(), checkCache(), checkNfsDevice(), haveNfs(), readonly(), storage::STORAGE_CHANGE_READONLY, and y2mil.

int storage::Storage::checkNfsDevice ( const string &  nfsDev,
const string &  opts,
bool  nfs4,
unsigned long long &  sizeK 
) [virtual]

Check accessibility and size of nfs device.

Parameters:
nfsDev name of nfs device
opts mount options for nfs mount
nfs4 use NFS4 for device
sizeK size of the nfs device
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References storage::NfsCo::addNfs(), assertInit(), storage::checkNormalFile(), storage::SystemCmd::execute(), storage::getStatVfs(), instsys(), storage::StatVfs::sizeK, tmpDir(), storage::Container::vBegin(), and y2mil.

Referenced by addNfsDevice().

int storage::Storage::createFileLoop ( const string &  lname,
bool  reuseExisting,
unsigned long long  sizeK,
const string &  mp,
const string &  pwd,
string &  device 
) [virtual]

Create a file based loop device. Encryption is automatically activated on the loop device.

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References addToList(), assertInit(), storage::Volume::changeMount(), checkCache(), storage::LoopCo::createLoop(), storage::EXT3, storage::Container::findVolume(), haveLoop(), readonly(), root(), storage::Volume::setCryptPwd(), storage::Volume::setEncryption(), storage::Volume::setFormat(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_CREATED_LOOP_NOT_FOUND, storage::STORAGE_MEMORY_EXHAUSTED, and y2mil.

int storage::Storage::modifyFileLoop ( const string &  device,
const string &  lname,
bool  reuseExisting,
unsigned long long  sizeK 
) [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.

Parameters:
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
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), haveLoop(), readonly(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LOOP_NOT_FOUND, storage::LoopCo::updateLoop(), and y2mil.

int storage::Storage::removeFileLoop ( const string &  lname,
bool  removeFile 
) [virtual]

Remove a file based loop device from the system.

Parameters:
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.
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), haveLoop(), readonly(), storage::LoopCo::removeLoop(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_LOOP_NOT_FOUND, and y2mil.

int storage::Storage::removeDmraid ( const string &  name  )  [virtual]

Remove a Software raid device.

Parameters:
name name of dmraid device to remove (e.g. pdc_dabaheedj)
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), dmrCoEnd(), findDmraidCo(), readonly(), storage::STORAGE_CHANGE_READONLY, and storage::STORAGE_DMRAID_CO_NOT_FOUND.

bool storage::Storage::existSubvolume ( const string &  device,
const string &  name 
) [virtual]

Check for existence of a BTRFS subvolume

Parameters:
device of the main BTRFS volume
name of subvolume
Returns:
true if subvolume exists, false otherwise

Implements storage::StorageInterface.

References assertInit(), storage::BtrfsCo::existSubvolume(), haveBtrfs(), and y2mil.

int storage::Storage::createSubvolume ( const string &  device,
const string &  name 
) [virtual]

Create a BTRFS subvolume

Parameters:
device of the main BTRFS volume
name of subvolume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), storage::BtrfsCo::createSubvolume(), haveBtrfs(), readonly(), storage::STORAGE_BTRFS_CO_NOT_FOUND, storage::STORAGE_CHANGE_READONLY, and y2mil.

int storage::Storage::removeSubvolume ( const string &  device,
const string &  name 
) [virtual]

Remove a BTRFS subvolume

Parameters:
device of the main BTRFS volume
name of subvolume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), haveBtrfs(), readonly(), storage::BtrfsCo::removeSubvolume(), storage::STORAGE_BTRFS_CO_NOT_FOUND, storage::STORAGE_CHANGE_READONLY, and y2mil.

int storage::Storage::extendBtrfsVolume ( const string &  device,
const string &  dev 
)

int storage::Storage::extendBtrfsVolume ( const string &  name,
const deque< string > &  devs 
) [virtual]

Extend a BTRFS volume with additional devices

Parameters:
name name of BTRFS volume (this can contain a device name or be specified as "UUID=<uuid>")
devs list with devices to add to that BTRFS volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::BTRFS_LIST_EMPTY, checkCache(), storage::BtrfsCo::extendVolume(), haveBtrfs(), readonly(), storage::STORAGE_BTRFS_CO_NOT_FOUND, storage::STORAGE_CHANGE_READONLY, and y2mil.

int storage::Storage::shrinkBtrfsVolume ( const string &  device,
const string &  dev 
)

int storage::Storage::shrinkBtrfsVolume ( const string &  name,
const deque< string > &  devs 
) [virtual]

Shrink a BTRFS volume by some devices

Parameters:
name name of BTRFS volume (this can contain a device name or be specified as "UUID=<uuid>")
devs list with devices to remove from that BTRFS volume
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), storage::BTRFS_LIST_EMPTY, checkCache(), haveBtrfs(), readonly(), storage::BtrfsCo::shrinkVolume(), storage::STORAGE_BTRFS_CO_NOT_FOUND, storage::STORAGE_CHANGE_READONLY, and y2mil.

void storage::Storage::setBtrfsUsedBy ( const Btrfs bt  ) 

int storage::Storage::addTmpfsMount ( const string &  mp,
const string &  opts 
) [virtual]

Add new tmpfs filesystem

Parameters:
mp mount point for the tmpfs
opts mount options for tmpfs mount
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References storage::TmpfsCo::addTmpfs(), addToList(), assertInit(), checkCache(), haveTmpfs(), readonly(), storage::STORAGE_CHANGE_READONLY, and y2mil.

int storage::Storage::removeTmpfsMount ( const string &  mp  )  [virtual]

Remove tmpfs filesystem

Parameters:
mp mount point for the tmpfs
Returns:
zero if all is ok, a negative number to indicate an error

Implements storage::StorageInterface.

References assertInit(), checkCache(), haveTmpfs(), readonly(), storage::TmpfsCo::removeTmpfs(), storage::STORAGE_CHANGE_READONLY, storage::STORAGE_TMPFS_CO_NOT_FOUND, and y2mil.

void storage::Storage::getCommitInfos ( list< CommitInfo > &  infos  )  const [virtual]

Gets info about actions to be executed after next call to commit().

Parameters:
infos list of records that gets filled with infos

Implements storage::StorageInterface.

References storage::CommitInfo::destructive, getCommitActions(), storage::Volume::getDescText(), storage::CommitInfo::text, and y2mil.

const string& storage::Storage::getLastAction (  )  const [inline, virtual]

Gets action performed last during previous call to commit()

Returns:
string presentable to the user

Implements storage::StorageInterface.

const string& storage::Storage::getExtendedErrorMessage (  )  const [inline, virtual]

Gets a possible existing extended error message describing failure of to last call commit()

Returns:
string error text provided by external program

Implements storage::StorageInterface.

void storage::Storage::eraseCachedFreeInfo ( const string &  device  ) 

void storage::Storage::waitForDevice (  )  [static]

int storage::Storage::waitForDevice ( const string &  device  )  [static]

int storage::Storage::zeroDevice ( const string &  device,
bool  random = false,
unsigned long long  beginK = 200,
unsigned long long  endK = 10 
) [static]

unsigned long long storage::Storage::sizeK ( const string &  device  )  [static]

References y2mil.

Referenced by zeroDevice().

void storage::Storage::getDiskList ( bool(*)(const Disk &)  CheckFnc,
std::list< Disk * > &  dl 
)

void storage::Storage::changeDeviceName ( const string &  old,
const string &  nw 
)

int storage::Storage::commit (  )  [virtual]

string storage::Storage::getErrorString ( int  error  )  const [virtual]

Get a textual message for an error code. Can be empty.

Implements storage::StorageInterface.

References storage::_(), storage::Text::text, and storage::VOLUME_UMOUNT_FAILED.

void storage::Storage::handleHald ( bool  stop  ) 

void storage::Storage::activateHld ( bool  val = true  )  [virtual]

Activate or deactivate higher level devices as MD, LVM, DM

Multipath is not activate by this function. Only use in instsys mode.

Parameters:
val flag if devices should be activated or deactivated
Returns:
bool if values could be successfully determined

Implements storage::StorageInterface.

References storage::LvmVg::activate(), storage::Dm::activate(), storage::MdPartCo::activate(), getImsmDriver(), storage::IMSM_MDADM, tmpDir(), and y2mil.

void storage::Storage::activateMultipath ( bool  val = true  )  [virtual]

Activate or deactivate multipath

Only use in instsys mode.

Parameters:
val flag if multipath should be activated or deactivated
Returns:
bool if values could be successfully determined

Implements storage::StorageInterface.

References storage::DmmultipathCo::activate(), and y2mil.

void storage::Storage::removeDmTableTo ( const Volume vol  ) 

void storage::Storage::removeDmTableTo ( const string &  device  )  [virtual]

Remove all possibly existing dm maps to a given device

Parameters:
device device name for which dm maps should be removed

Implements storage::StorageInterface.

References findVolume(), removeDmTableTo(), and y2mil.

void storage::Storage::removeDmTableTo ( unsigned long  mjr,
unsigned long  mnr 
)

bool storage::Storage::removeDmTable ( const string &  table  ) 

bool storage::Storage::removeDmMapsTo ( const string &  dev  ) 

bool storage::Storage::checkDmMapsTo ( const string &  device  )  [virtual]

Check if there are dm maps to a given device

Parameters:
device device name for which dm maps should be checked
Returns:
bool true if there are map to device

Implements storage::StorageInterface.

References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), storage::isDmContainer(), storage::Dm::mapsTo(), vPair(), and y2mil.

void storage::Storage::updateDmEmptyPeMap (  ) 

void storage::Storage::dumpObjectList (  )  [virtual]

Dump list of all objects to log file.

Implements storage::StorageInterface.

References assertInit(), storage::prepareLogStream(), printInfo(), and y2mil.

Referenced by commit(), detectObjects(), and rescanCryptedObjects().

void storage::Storage::dumpCommitInfos (  )  const [virtual]

Dump list of commit actions to log file.

Implements storage::StorageInterface.

References getCommitActions(), and y2mil.

Referenced by commit().

bool storage::Storage::mountTmpRo ( const Volume vol,
string &  mp,
const string &  opts = "" 
)

bool storage::Storage::mountTmp ( const Volume vol,
string &  mp,
const string &  opts = "" 
)

void storage::Storage::setCallbackProgressBar ( CallbackProgressBar  pfnc  )  [inline, virtual]

Sets the callback function called on progress bar events

Parameters:
pfnc pointer to function

Implements storage::StorageInterface.

References progress_bar_cb.

CallbackProgressBar storage::Storage::getCallbackProgressBar (  )  const [inline, virtual]

Query the callback function called on progress bar events

Returns:
pointer to function currently called for progress bar events

Implements storage::StorageInterface.

References progress_bar_cb.

void storage::Storage::setCallbackShowInstallInfo ( CallbackShowInstallInfo  pfnc  )  [inline, virtual]

Sets the callback function called to display install info

Parameters:
pfnc pointer to function

Implements storage::StorageInterface.

References install_info_cb.

CallbackShowInstallInfo storage::Storage::getCallbackShowInstallInfo (  )  const [inline, virtual]

Query the callback function called to display install info

Returns:
pointer to function currently called for progress bar events

Implements storage::StorageInterface.

References install_info_cb.

void storage::Storage::setCallbackInfoPopup ( CallbackInfoPopup  pfnc  )  [inline, virtual]

Sets the callback function called to display a info popup to the user

Parameters:
pfnc pointer to function

Implements storage::StorageInterface.

References info_popup_cb.

CallbackInfoPopup storage::Storage::getCallbackInfoPopup (  )  const [inline, virtual]

Query the callback function called to display info popup to the user

Returns:
pointer to function currently called for progress bar events

Implements storage::StorageInterface.

References info_popup_cb.

void storage::Storage::setCallbackYesNoPopup ( CallbackYesNoPopup  pfnc  )  [inline, virtual]

Sets the callback function called to get a Yes/No decision by the user.

Parameters:
pfnc pointer to function

Implements storage::StorageInterface.

References yesno_popup_cb.

CallbackYesNoPopup storage::Storage::getCallbackYesNoPopup (  )  const [inline, virtual]

Query the callback function called to get a Yes/No decision by the user.

Returns:
pointer to function currently called for progress bar events

Implements storage::StorageInterface.

References yesno_popup_cb.

void storage::Storage::setCallbackCommitErrorPopup ( CallbackCommitErrorPopup  pfnc  )  [inline, virtual]

Sets the callback function called for errors during commit.

Parameters:
pfnc pointer to function

Implements storage::StorageInterface.

References commit_error_popup_cb.

CallbackCommitErrorPopup storage::Storage::getCallbackCommitErrorPopup (  )  const [inline, virtual]

Query the callback function called for errors during commit.

Returns:
pointer to function currently called for progress bar events

Implements storage::StorageInterface.

References commit_error_popup_cb.

void storage::Storage::setCallbackPasswordPopup ( CallbackPasswordPopup  pfnc  )  [inline, virtual]

Sets the callback function called to query a password by the user.

Parameters:
pfnc pointer to function.

Implements storage::StorageInterface.

References password_popup_cb.

CallbackPasswordPopup storage::Storage::getCallbackPasswordPopup (  )  const [inline, virtual]

Query the callback function called to query a password from the user.

Returns:
pointer to function currently called for password queries.

Implements storage::StorageInterface.

References password_popup_cb.

void storage::Storage::addInfoPopupText ( const string &  disk,
const Text txt 
)

CallbackProgressBar storage::Storage::getCallbackProgressBarTheOne (  )  const [inline]

CallbackShowInstallInfo storage::Storage::getCallbackShowInstallInfoTheOne (  )  const [inline]

CallbackInfoPopup storage::Storage::getCallbackInfoPopupTheOne (  )  const [inline]

References info_popup_cb, and storage::info_popup_cb_ycp.

Referenced by infoPopupCb().

CallbackYesNoPopup storage::Storage::getCallbackYesNoPopupTheOne (  )  const [inline]

CallbackCommitErrorPopup storage::Storage::getCallbackCommitErrorPopupTheOne (  )  const [inline]

CallbackPasswordPopup storage::Storage::getCallbackPasswordPopupTheOne (  )  const [inline]

void storage::Storage::progressBarCb ( const string &  id,
unsigned  cur,
unsigned  max 
) const

void storage::Storage::showInfoCb ( const Text info,
bool  quiet 
)

void storage::Storage::infoPopupCb ( const Text info  )  const

bool storage::Storage::yesnoPopupCb ( const Text info  )  const

bool storage::Storage::commitErrorPopupCb ( int  error,
const Text last_action,
const string &  extended_message 
) const

bool storage::Storage::passwordPopupCb ( const string &  device,
int  attempts,
string &  password 
) const

ConstContPair storage::Storage::contPair ( bool(*)(const Container &)  CheckFnc = NULL  )  const [inline]

ConstContIterator storage::Storage::contBegin ( bool(*)(const Container &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by contPair().

ConstContIterator storage::Storage::contEnd ( bool(*)(const Container &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by contPair().

template<class Pred>
ContCondIPair<Pred>::type storage::Storage::contCondPair ( const Pred &  p  )  const [inline]

References contCondBegin(), and contCondEnd().

template<class Pred>
ConstContainerI<Pred>::type storage::Storage::contCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by contCondPair().

template<class Pred>
ConstContainerI<Pred>::type storage::Storage::contCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by contCondPair().

CPair storage::Storage::cPair ( bool(*)(const Container &)  CheckFnc = NULL  )  [inline, protected]

ContIterator storage::Storage::cBegin ( bool(*)(const Container &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by cPair().

ContIterator storage::Storage::cEnd ( bool(*)(const Container &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by cPair().

ConstDiskPair storage::Storage::diskPair ( bool(*)(const Disk &)  CheckFnc = NULL  )  const [inline]

ConstDiskIterator storage::Storage::diskBegin ( bool(*)(const Disk &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by diskPair().

ConstDiskIterator storage::Storage::diskEnd ( bool(*)(const Disk &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by diskPair().

template<class Pred>
DiskCondIPair<Pred>::type storage::Storage::diskCondPair ( const Pred &  p  )  const [inline]

References diskCondBegin(), and diskCondEnd().

template<class Pred>
ConstDiskI<Pred>::type storage::Storage::diskCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by diskCondPair().

template<class Pred>
ConstDiskI<Pred>::type storage::Storage::diskCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by diskCondPair().

DiskPair storage::Storage::dPair ( bool(*)(const Disk &)  CheckFnc = NULL  )  [inline, protected]

References dBegin(), and dEnd().

Referenced by findDisk(), findDiskId(), findDiskPath(), and getDiskList().

DiskIterator storage::Storage::dBegin ( bool(*)(const Disk &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by dPair().

DiskIterator storage::Storage::dEnd ( bool(*)(const Disk &)  CheckFnc = NULL  )  [inline, protected]

ConstLvmVgPair storage::Storage::lvmVgPair ( bool(*)(const LvmVg &)  CheckFnc = NULL  )  const [inline]

ConstLvmVgIterator storage::Storage::lvmVgBegin ( bool(*)(const LvmVg &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by lvmVgPair().

ConstLvmVgIterator storage::Storage::lvmVgEnd ( bool(*)(const LvmVg &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by lvmVgPair().

template<class Pred>
LvmVgCondIPair<Pred>::type storage::Storage::lvmVgCondPair ( const Pred &  p  )  const [inline]

References lvmVgCondBegin(), and lvmVgCondEnd().

template<class Pred>
ConstLvmVgI<Pred>::type storage::Storage::lvmVgCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by lvmVgCondPair().

template<class Pred>
ConstLvmVgI<Pred>::type storage::Storage::lvmVgCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by lvmVgCondPair().

LvmVgPair storage::Storage::lvgPair ( bool(*)(const LvmVg &)  CheckFnc = NULL  )  [inline, protected]

References lvgBegin(), and lvgEnd().

Referenced by detectObjects(), and findLvmVg().

LvmVgIterator storage::Storage::lvgBegin ( bool(*)(const LvmVg &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by lvgPair().

LvmVgIterator storage::Storage::lvgEnd ( bool(*)(const LvmVg &)  CheckFnc = NULL  )  [inline, protected]

ConstDmPartCoPair storage::Storage::dmpartCoPair ( bool(*)(const DmPartCo &)  CheckFnc = NULL  )  const [inline]

References dmpartCoBegin(), and dmpartCoEnd().

ConstDmPartCoIterator storage::Storage::dmpartCoBegin ( bool(*)(const DmPartCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by dmpartCoPair().

ConstDmPartCoIterator storage::Storage::dmpartCoEnd ( bool(*)(const DmPartCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by dmpartCoPair().

template<class Pred>
DmPartCoCondIPair<Pred>::type storage::Storage::dmPartCoCondPair ( const Pred &  p  )  const [inline]

template<class Pred>
ConstDmPartCoI<Pred>::type storage::Storage::dmpartCoCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by dmPartCoCondPair().

template<class Pred>
ConstDmPartCoI<Pred>::type storage::Storage::dmpartCoCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by dmPartCoCondPair().

DmPartCoPair storage::Storage::dmpCoPair ( bool(*)(const DmPartCo &)  CheckFnc = NULL  )  [inline, protected]

References dmpCoBegin(), and dmpCoEnd().

Referenced by findDmPartCo().

DmPartCoIterator storage::Storage::dmpCoBegin ( bool(*)(const DmPartCo &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by dmpCoPair().

DmPartCoIterator storage::Storage::dmpCoEnd ( bool(*)(const DmPartCo &)  CheckFnc = NULL  )  [inline, protected]

ConstDmraidCoPair storage::Storage::dmraidCoPair ( bool(*)(const DmraidCo &)  CheckFnc = NULL  )  const [inline]

ConstDmraidCoIterator storage::Storage::dmraidCoBegin ( bool(*)(const DmraidCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by dmraidCoPair().

ConstDmraidCoIterator storage::Storage::dmraidCoEnd ( bool(*)(const DmraidCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by dmraidCoPair().

template<class Pred>
DmraidCoCondIPair<Pred>::type storage::Storage::dmraidCoCondPair ( const Pred &  p  )  const [inline]

template<class Pred>
ConstDmraidCoI<Pred>::type storage::Storage::dmraidCoCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by dmraidCoCondPair().

template<class Pred>
ConstDmraidCoI<Pred>::type storage::Storage::dmraidCoCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by dmraidCoCondPair().

DmraidCoPair storage::Storage::dmrCoPair ( bool(*)(const DmraidCo &)  CheckFnc = NULL  )  [inline, protected]

References dmrCoBegin(), and dmrCoEnd().

Referenced by dmrCondEnd(), and findDmraidCo().

DmraidCoIterator storage::Storage::dmrCoBegin ( bool(*)(const DmraidCo &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by dmrCoPair().

DmraidCoIterator storage::Storage::dmrCoEnd ( bool(*)(const DmraidCo &)  CheckFnc = NULL  )  [inline, protected]

ConstDmmultipathCoPair storage::Storage::dmmultipathCoPair ( bool(*)(const DmmultipathCo &)  CheckFnc = NULL  )  const [inline]

ConstDmmultipathCoIterator storage::Storage::dmmultipathCoBegin ( bool(*)(const DmmultipathCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by dmmultipathCoPair().

ConstDmmultipathCoIterator storage::Storage::dmmultipathCoEnd ( bool(*)(const DmmultipathCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by dmmultipathCoPair().

template<class Pred>
DmmultipathCoCondIPair<Pred>::type storage::Storage::dmmultipathCoCondPair ( const Pred &  p  )  const [inline]

template<class Pred>
ConstDmmultipathCoI<Pred>::type storage::Storage::dmmultipathCoCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by dmmultipathCoCondPair().

template<class Pred>
ConstDmmultipathCoI<Pred>::type storage::Storage::dmmultipathCoCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by dmmultipathCoCondPair().

DmmultipathCoPair storage::Storage::dmmCoPair ( bool(*)(const DmmultipathCo &)  CheckFnc = NULL  )  [inline, protected]

References dmmCoBegin(), and dmmCoEnd().

Referenced by dmmCondEnd(), and findDmmultipathCo().

DmmultipathCoIterator storage::Storage::dmmCoBegin ( bool(*)(const DmmultipathCo &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by dmmCoPair().

DmmultipathCoIterator storage::Storage::dmmCoEnd ( bool(*)(const DmmultipathCo &)  CheckFnc = NULL  )  [inline, protected]

ConstMdPartCoPair storage::Storage::mdpartCoPair ( bool(*)(const MdPartCo &)  CheckFnc = NULL  )  const [inline]

ConstMdPartCoIterator storage::Storage::mdpartCoBegin ( bool(*)(const MdPartCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by mdpartCoPair().

ConstMdPartCoIterator storage::Storage::mdpartCoEnd ( bool(*)(const MdPartCo &)  CheckFnc = NULL  )  const [inline]

References cont.

Referenced by mdpartCoPair().

template<class Pred>
MdPartCoCondIPair<Pred>::type storage::Storage::mdPartCoCondPair ( const Pred &  p  )  const [inline]

template<class Pred>
ConstMdPartCoI<Pred>::type storage::Storage::mdpartCoCondBegin ( const Pred &  p  )  const [inline]

References cont.

Referenced by mdPartCoCondPair().

template<class Pred>
ConstMdPartCoI<Pred>::type storage::Storage::mdpartCoCondEnd ( const Pred &  p  )  const [inline]

References cont.

Referenced by mdPartCoCondPair().

MdPartCoPair storage::Storage::mdpCoPair ( bool(*)(const MdPartCo &)  CheckFnc = NULL  )  [inline, protected]

References mdpCoBegin(), and mdpCoEnd().

Referenced by findMdPartCo(), and syncMdadm().

MdPartCoIterator storage::Storage::mdpCoBegin ( bool(*)(const MdPartCo &)  CheckFnc = NULL  )  [inline, protected]

References cont.

Referenced by mdpCoPair().

MdPartCoIterator storage::Storage::mdpCoEnd ( bool(*)(const MdPartCo &)  CheckFnc = NULL  )  [inline, protected]

ConstVolPair storage::Storage::volPair ( bool(*)(const Container &)  CheckCnt  )  const [inline]

ConstVolPair storage::Storage::volPair ( bool(*)(const Volume &)  CheckVol = NULL,
bool(*)(const Container &)  CheckCnt = NULL 
) const [inline]

References volBegin(), and volEnd().

ConstVolIterator storage::Storage::volBegin ( bool(*)(const Container &)  CheckCnt  )  const [inline]

Referenced by volPair().

ConstVolIterator storage::Storage::volBegin ( bool(*)(const Volume &)  CheckVol = NULL,
bool(*)(const Container &)  CheckCnt = NULL 
) const [inline]

References contPair().

ConstVolIterator storage::Storage::volEnd ( bool(*)(const Container &)  CheckCnt  )  const [inline]

Referenced by volPair().

ConstVolIterator storage::Storage::volEnd ( bool(*)(const Volume &)  CheckVol = NULL,
bool(*)(const Container &)  CheckCnt = NULL 
) const [inline]

References contPair().

template<class Pred>
VolCondIPair<Pred>::type storage::Storage::volCondPair ( const Pred &  p  )  const [inline]

References volCondBegin(), and volCondEnd().

template<class Pred>
ConstVolumeI<Pred>::type storage::Storage::volCondBegin ( const Pred &  p  )  const [inline]

References contPair().

Referenced by volCondPair().

template<class Pred>
ConstVolumeI<Pred>::type storage::Storage::volCondEnd ( const Pred &  p  )  const [inline]

References contPair().

Referenced by volCondPair().

VPair storage::Storage::vPair ( bool(*)(const Container &)  CheckCnt  )  [inline, protected]

VPair storage::Storage::vPair ( bool(*)(const Volume &)  CheckVol = NULL,
bool(*)(const Container &)  CheckCnt = NULL 
) [inline, protected]

References vBegin(), and vEnd().

VolIterator storage::Storage::vBegin ( bool(*)(const Container &)  CheckCnt  )  [inline, protected]

Referenced by detectObjects(), and vPair().

VolIterator storage::Storage::vBegin ( bool(*)(const Volume &)  CheckVol = NULL,
bool(*)(const Container &)  CheckCnt = NULL 
) [inline, protected]

References cPair().

VolIterator storage::Storage::vEnd ( bool(*)(const Container &)  CheckCnt  )  [inline, protected]

Referenced by detectObjects(), and vPair().

VolIterator storage::Storage::vEnd ( bool(*)(const Volume &)  CheckVol = NULL,
bool(*)(const Container &)  CheckCnt = NULL 
) [inline, protected]

References cPair().

ConstPartPair storage::Storage::partPair ( bool(*)(const Disk &)  CheckCnt  )  const [inline]

References partBegin(), and partEnd().

ConstPartPair storage::Storage::partPair ( bool(*)(const Partition &)  CheckPart = NULL,
bool(*)(const Disk &)  CheckCnt = NULL 
) const [inline]

References partBegin(), and partEnd().

ConstPartIterator storage::Storage::partBegin ( bool(*)(const Disk &)  CheckDisk  )  const [inline]

Referenced by partPair().

ConstPartIterator storage::Storage::partBegin ( bool(*)(const Partition &)  CheckPart = NULL,
bool(*)(const Disk &)  CheckDisk = NULL 
) const [inline]

References diskPair().

ConstPartIterator storage::Storage::partEnd ( bool(*)(const Disk &)  CheckDisk  )  const [inline]

Referenced by partPair().

ConstPartIterator storage::Storage::partEnd ( bool(*)(const Partition &)  CheckPart = NULL,
bool(*)(const Disk &)  CheckDisk = NULL 
) const [inline]

References diskPair().

template<class Pred>
PartCondIPair<Pred>::type storage::Storage::partCondPair ( const Pred &  p  )  const [inline]

References partCondBegin(), and partCondEnd().

template<class Pred>
ConstPartitionI<Pred>::type storage::Storage::partCondBegin ( const Pred &  p  )  const [inline]

References diskPair().

Referenced by partCondPair().

template<class Pred>
ConstPartitionI<Pred>::type storage::Storage::partCondEnd ( const Pred &  p  )  const [inline]

References diskPair().

Referenced by partCondPair().

ConstLvmLvPair storage::Storage::lvmLvPair ( bool(*)(const LvmVg &)  CheckLvmVg  )  const [inline]

References lvmLvBegin(), and lvmLvEnd().

Referenced by storage::DmCo::getDmData().

ConstLvmLvPair storage::Storage::lvmLvPair ( bool(*)(const LvmLv &)  CheckLvmLv = NULL,
bool(*)(const LvmVg &)  CheckLvmVg = NULL 
) const [inline]

References lvmLvBegin(), and lvmLvEnd().

ConstLvmLvIterator storage::Storage::lvmLvBegin ( bool(*)(const LvmVg &)  CheckLvmVg  )  const [inline]

Referenced by lvmLvPair().

ConstLvmLvIterator storage::Storage::lvmLvBegin ( bool(*)(const LvmLv &)  CheckLvmLv = NULL,
bool(*)(const LvmVg &)  CheckLvmVg = NULL 
) const [inline]

References lvmVgPair().

ConstLvmLvIterator storage::Storage::lvmLvEnd ( bool(*)(const LvmVg &)  CheckLvmVg  )  const [inline]

Referenced by lvmLvPair().

ConstLvmLvIterator storage::Storage::lvmLvEnd ( bool(*)(const LvmLv &)  CheckLvmLv = NULL,
bool(*)(const LvmVg &)  CheckLvmVg = NULL 
) const [inline]

References lvmVgPair().

template<class Pred>
LvmLvCondIPair<Pred>::type storage::Storage::lvmLvCondPair ( const Pred &  p  )  const [inline]

References lvmLvCondBegin(), and lvmLvCondEnd().

template<class Pred>
ConstLvmLvI<Pred>::type storage::Storage::lvmLvCondBegin ( const Pred &  p  )  const [inline]

References lvmVgPair().

Referenced by lvmLvCondPair().

template<class Pred>
ConstLvmLvI<Pred>::type storage::Storage::lvmLvCondEnd ( const Pred &  p  )  const [inline]

References lvmVgPair().

Referenced by lvmLvCondPair().

ConstMdPair storage::Storage::mdPair ( bool(*)(const Md &)  CheckMd = NULL  )  const [inline]

References mdBegin(), and mdEnd().

Referenced by getMdInfo().

ConstMdIterator storage::Storage::mdBegin ( bool(*)(const Md &)  CheckMd = NULL  )  const [inline]

References contPair(), and isMd().

Referenced by mdPair().

ConstMdIterator storage::Storage::mdEnd ( bool(*)(const Md &)  CheckMd = NULL  )  const [inline]

References contPair(), and isMd().

Referenced by mdPair().

template<class Pred>
MdCondIPair<Pred>::type storage::Storage::mdCondPair ( const Pred &  p  )  const [inline]

References mdCondBegin(), and mdCondEnd().

template<class Pred>
ConstMdI<Pred>::type storage::Storage::mdCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isMd().

Referenced by mdCondPair().

template<class Pred>
ConstMdI<Pred>::type storage::Storage::mdCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isMd().

Referenced by mdCondPair().

ConstMdPartPair storage::Storage::mdPartPair ( bool(*)(const MdPart &)  CheckMdPart = NULL  )  const [inline]

References mdPartBegin(), and mdPartEnd().

ConstMdPartIterator storage::Storage::mdPartBegin ( bool(*)(const MdPart &)  CheckMdPart = NULL  )  const [inline]

References contPair(), and isMdPart().

Referenced by mdPartPair().

ConstMdPartIterator storage::Storage::mdPartEnd ( bool(*)(const MdPart &)  CheckMdPart = NULL  )  const [inline]

References contPair(), and isMdPart().

Referenced by mdPartPair().

template<class Pred>
MdPartCondIPair<Pred>::type storage::Storage::mdPartCondPair ( const Pred &  p  )  const [inline]

template<class Pred>
ConstMdPartI<Pred>::type storage::Storage::mdPartCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isMdPart().

Referenced by mdPartCondPair().

template<class Pred>
ConstMdPartI<Pred>::type storage::Storage::mdPartCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isMdPart().

Referenced by mdPartCondPair().

ConstLoopPair storage::Storage::loopPair ( bool(*)(const Loop &)  CheckLoop = NULL  )  const [inline]

References loopBegin(), and loopEnd().

Referenced by getLoopInfo(), and needCryptPassword().

ConstLoopIterator storage::Storage::loopBegin ( bool(*)(const Loop &)  CheckLoop = NULL  )  const [inline]

References contPair(), and isLoop().

Referenced by loopPair().

ConstLoopIterator storage::Storage::loopEnd ( bool(*)(const Loop &)  CheckLoop = NULL  )  const [inline]

References contPair(), and isLoop().

Referenced by loopPair().

template<class Pred>
LoopCondIPair<Pred>::type storage::Storage::loopCondPair ( const Pred &  p  )  const [inline]

References loopCondBegin(), and loopCondEnd().

template<class Pred>
ConstLoopI<Pred>::type storage::Storage::loopCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isLoop().

Referenced by loopCondPair().

template<class Pred>
ConstLoopI<Pred>::type storage::Storage::loopCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isLoop().

Referenced by loopCondPair().

ConstBtrfsPair storage::Storage::btrfsPair ( bool(*)(const Btrfs &)  CheckBtrfs = NULL  )  const [inline]

References btrfsBegin(), and btrfsEnd().

Referenced by getBtrfsInfo(), and isUsedBySingleBtrfs().

ConstBtrfsIterator storage::Storage::btrfsBegin ( bool(*)(const Btrfs &)  CheckBtrfs = NULL  )  const [inline]

References contPair(), and isBtrfs().

Referenced by btrfsPair().

ConstBtrfsIterator storage::Storage::btrfsEnd ( bool(*)(const Btrfs &)  CheckBtrfs = NULL  )  const [inline]

References contPair(), and isBtrfs().

Referenced by btrfsPair().

template<class Pred>
BtrfsCondIPair<Pred>::type storage::Storage::btrfsCondPair ( const Pred &  p  )  const [inline]

References btrfsCondBegin(), and btrfsCondEnd().

template<class Pred>
ConstBtrfsI<Pred>::type storage::Storage::btrfsCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isBtrfs().

Referenced by btrfsCondPair().

template<class Pred>
ConstBtrfsI<Pred>::type storage::Storage::btrfsCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isBtrfs().

Referenced by btrfsCondPair().

ConstTmpfsPair storage::Storage::tmpfsPair ( bool(*)(const Tmpfs &)  CheckTmpfs = NULL  )  const [inline]

References tmpfsBegin(), and tmpfsEnd().

Referenced by getTmpfsInfo().

ConstTmpfsIterator storage::Storage::tmpfsBegin ( bool(*)(const Tmpfs &)  CheckTmpfs = NULL  )  const [inline]

References contPair(), and isTmpfs().

Referenced by tmpfsPair().

ConstTmpfsIterator storage::Storage::tmpfsEnd ( bool(*)(const Tmpfs &)  CheckTmpfs = NULL  )  const [inline]

References contPair(), and isTmpfs().

Referenced by tmpfsPair().

template<class Pred>
TmpfsCondIPair<Pred>::type storage::Storage::tmpfsCondPair ( const Pred &  p  )  const [inline]

References tmpfsCondBegin(), and tmpfsCondEnd().

template<class Pred>
ConstTmpfsI<Pred>::type storage::Storage::tmpfsCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isTmpfs().

Referenced by tmpfsCondPair().

template<class Pred>
ConstTmpfsI<Pred>::type storage::Storage::tmpfsCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isTmpfs().

Referenced by tmpfsCondPair().

ConstNfsPair storage::Storage::nfsPair ( bool(*)(const Nfs &)  CheckNfs = NULL  )  const [inline]

References nfsBegin(), and nfsEnd().

Referenced by getNfsInfo().

ConstNfsIterator storage::Storage::nfsBegin ( bool(*)(const Nfs &)  CheckNfs = NULL  )  const [inline]

References contPair(), and isNfs().

Referenced by nfsPair().

ConstNfsIterator storage::Storage::nfsEnd ( bool(*)(const Nfs &)  CheckNfs = NULL  )  const [inline]

References contPair(), and isNfs().

Referenced by nfsPair().

template<class Pred>
NfsCondIPair<Pred>::type storage::Storage::nfsCondPair ( const Pred &  p  )  const [inline]

References nfsCondBegin(), and nfsCondEnd().

template<class Pred>
ConstNfsI<Pred>::type storage::Storage::nfsCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isNfs().

Referenced by nfsCondPair().

template<class Pred>
ConstNfsI<Pred>::type storage::Storage::nfsCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isNfs().

Referenced by nfsCondPair().

ConstDmPair storage::Storage::dmPair ( bool(*)(const Dm &)  CheckDm = NULL  )  const [inline]

References dmBegin(), and dmEnd().

Referenced by findDm(), findDmUsing(), and getDmInfo().

ConstDmIterator storage::Storage::dmBegin ( bool(*)(const Dm &)  CheckDm = NULL  )  const [inline]

References contPair(), and isDm().

Referenced by dmPair().

ConstDmIterator storage::Storage::dmEnd ( bool(*)(const Dm &)  CheckDm = NULL  )  const [inline]

References contPair(), and isDm().

Referenced by dmPair().

template<class Pred>
DmCondIPair<Pred>::type storage::Storage::dmCondPair ( const Pred &  p  )  const [inline]

References dmCondBegin(), and dmCondEnd().

template<class Pred>
ConstDmI<Pred>::type storage::Storage::dmCondBegin ( const Pred &  p  )  const [inline]

References contPair(), and isDm().

Referenced by dmCondPair().

template<class Pred>
ConstDmI<Pred>::type storage::Storage::dmCondEnd ( const Pred &  p  )  const [inline]

References contPair(), and isDm().

Referenced by dmCondPair().

ConstDmraidPair storage::Storage::dmrPair ( bool(*)(const DmraidCo &)  CheckDmraidCo  )  const [inline]

References dmrBegin(), and dmrEnd().

Referenced by storage::DmCo::getDmData().

ConstDmraidPair storage::Storage::dmrPair ( bool(*)(const Dmraid &)  CheckDmraid = NULL,
bool(*)(const DmraidCo &)  CheckDmraidCo = NULL 
) const [inline]

References dmrBegin(), and dmrEnd().

ConstDmraidIterator storage::Storage::dmrBegin ( bool(*)(const DmraidCo &)  CheckDmraidCo  )  const [inline]

Referenced by dmrPair().

ConstDmraidIterator storage::Storage::dmrBegin ( bool(*)(const Dmraid &)  CheckDmraid = NULL,
bool(*)(const DmraidCo &)  CheckDmraidCo = NULL 
) const [inline]

References dmraidCoPair().

ConstDmraidIterator storage::Storage::dmrEnd ( bool(*)(const DmraidCo &)  CheckDmraidCo  )  const [inline]

Referenced by dmrPair().

ConstDmraidIterator storage::Storage::dmrEnd ( bool(*)(const Dmraid &)  CheckDmraid = NULL,
bool(*)(const DmraidCo &)  CheckDmraidCo = NULL 
) const [inline]

References dmraidCoPair().

template<class Pred>
DmraidCondIPair<Pred>::type storage::Storage::dmrCondPair ( const Pred &  p  )  const [inline]

References dmrCondBegin(), and dmrCondEnd().

template<class Pred>
ConstDmraidI<Pred>::type storage::Storage::dmrCondBegin ( const Pred &  p  )  const [inline]

References dmraidCoPair().

Referenced by dmrCondPair().

template<class Pred>
ConstDmraidI<Pred>::type storage::Storage::dmrCondEnd ( const Pred &  p  )  const [inline]

References dmrCoPair().

Referenced by dmrCondPair().

ConstDmmultipathPair storage::Storage::dmmPair ( bool(*)(const DmmultipathCo &)  CheckDmmultipathCo  )  const [inline]

References dmmBegin(), and dmmEnd().

Referenced by storage::DmCo::getDmData().

ConstDmmultipathPair storage::Storage::dmmPair ( bool(*)(const Dmmultipath &)  CheckDmmultipath = NULL,
bool(*)(const DmmultipathCo &)  CheckDmmultipathCo = NULL 
) const [inline]

References dmmBegin(), and dmmEnd().

ConstDmmultipathIterator storage::Storage::dmmBegin ( bool(*)(const DmmultipathCo &)  CheckDmmultipathCo  )  const [inline]

Referenced by dmmPair().

ConstDmmultipathIterator storage::Storage::dmmBegin ( bool(*)(const Dmmultipath &)  CheckDmmultipath = NULL,
bool(*)(const DmmultipathCo &)  CheckDmmultipathCo = NULL 
) const [inline]

References dmmultipathCoPair().

ConstDmmultipathIterator storage::Storage::dmmEnd ( bool(*)(const DmmultipathCo &)  CheckDmmultipathCo  )  const [inline]

Referenced by dmmPair().

ConstDmmultipathIterator storage::Storage::dmmEnd ( bool(*)(const Dmmultipath &)  CheckDmmultipath = NULL,
bool(*)(const DmmultipathCo &)  CheckDmmultipathCo = NULL 
) const [inline]

References dmmultipathCoPair().

template<class Pred>
DmmultipathCondIPair<Pred>::type storage::Storage::dmmCondPair ( const Pred &  p  )  const [inline]

References dmmCondBegin(), and dmmCondEnd().

template<class Pred>
ConstDmmultipathI<Pred>::type storage::Storage::dmmCondBegin ( const Pred &  p  )  const [inline]

References dmmultipathCoPair().

Referenced by dmmCondPair().

template<class Pred>
ConstDmmultipathI<Pred>::type storage::Storage::dmmCondEnd ( const Pred &  p  )  const [inline]

References dmmCoPair().

Referenced by dmmCondPair().

void storage::Storage::initialize (  )  [protected]

void storage::Storage::logSystemInfo (  )  const [protected]

References LSBIN, and testmode().

Referenced by Storage().

void storage::Storage::detectDisks ( SystemInfo systeminfo  )  [protected]

void storage::Storage::autodetectDisks ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectMds ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectBtrfs ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectMdParts ( SystemInfo systeminfo  )  [protected]

void storage::Storage::decideMultipath (  )  [protected]

bool storage::Storage::discoverMdPVols (  )  [protected]

void storage::Storage::detectLoops ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectNfs ( const EtcFstab fstab,
SystemInfo systeminfo 
) [protected]

void storage::Storage::detectTmpfs ( const EtcFstab fstab,
SystemInfo systeminfo 
) [protected]

void storage::Storage::detectLvmVgs ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectDmraid ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectDmmultipath ( SystemInfo systeminfo  )  [protected]

void storage::Storage::detectDm ( SystemInfo systeminfo,
bool  only_crypt 
) [protected]

void storage::Storage::initDisk ( list< DiskData > &  dl,
SystemInfo systeminfo 
) [protected]

void storage::Storage::detectFsData ( const VolIterator begin,
const VolIterator end,
SystemInfo systeminfo 
) [protected]

int storage::Storage::updatePartitionArea ( const string &  device,
unsigned long  start,
unsigned long  size,
bool  noBtrfs 
) [protected]

int storage::Storage::resizeVolume ( const string &  device,
unsigned long long  newSizeK,
bool  ignore_fs 
) [protected]

References resizeVolume().

int storage::Storage::resizeVolume ( const string &  device,
unsigned long long  newSizeK,
bool  ignore_fs,
bool  noBtrfs 
) [protected]

int storage::Storage::resizePartition ( const string &  device,
unsigned long  sizeCyl,
bool  ignore_fs 
) [protected]

References resizePartition().

int storage::Storage::resizePartition ( const string &  device,
unsigned long  sizeCyl,
bool  ignoreFs,
bool  noBtrfs 
) [protected]

void storage::Storage::addToList ( Container e  )  [protected]

Storage::DiskIterator storage::Storage::findDisk ( const string &  disk  )  [protected]

Storage::DiskIterator storage::Storage::findDiskId ( const string &  id  )  [protected]

Storage::DiskIterator storage::Storage::findDiskPath ( const string &  path  )  [protected]

Storage::LvmVgIterator storage::Storage::findLvmVg ( const string &  name  )  [protected]

Storage::DmraidCoIterator storage::Storage::findDmraidCo ( const string &  name  )  [protected]

Storage::DmmultipathCoIterator storage::Storage::findDmmultipathCo ( const string &  name  )  [protected]

Storage::DmPartCoIterator storage::Storage::findDmPartCo ( const string &  name  )  [protected]

Storage::MdPartCoIterator storage::Storage::findMdPartCo ( const string &  name  )  [protected]

bool storage::Storage::findVolume ( const string &  device,
ContIterator c,
VolIterator v,
bool  no_btrfs = false 
) [protected]

References findVolume().

bool storage::Storage::findVolume ( const string &  device,
ConstContIterator c,
ConstVolIterator v,
bool  no_btrfs = false 
) [protected]

bool storage::Storage::findVolume ( const string &  device,
VolIterator v,
bool  also_del = false,
bool  no_btrfs = false 
) [protected]

References findVolume().

bool storage::Storage::findVolume ( const string &  device,
ConstVolIterator v,
bool  also_del = false,
bool  no_btrfs = false 
) [protected]

bool storage::Storage::findContainer ( const string &  device,
ContIterator c 
) [protected]

bool storage::Storage::findContainer ( const string &  device,
ConstContIterator c 
) [protected]

Device * storage::Storage::findDevice ( const string &  dev,
bool  no_btrfs = false 
) [protected]

References findContainer(), and findVolume().

void storage::Storage::checkPwdBuf ( const string &  device  )  [protected]

bool storage::Storage::haveMd ( MdCo *&  md  )  [protected]

list< unsigned > storage::Storage::getMdPartMdNums (  )  const [protected]

bool storage::Storage::haveDm ( DmCo *&  dm  )  [protected]

bool storage::Storage::haveNfs ( NfsCo *&  co  )  [protected]

bool storage::Storage::haveLoop ( LoopCo *&  loop  )  [protected]

bool storage::Storage::haveBtrfs ( BtrfsCo *&  co  )  [protected]

bool storage::Storage::haveTmpfs ( TmpfsCo *&  co  )  [protected]

int storage::Storage::removeContainer ( Container val  )  [protected]

void storage::Storage::logContainersAndVolumes ( const string &  Dir  )  const [protected]

int storage::Storage::commitPair ( CPair p,
bool(*)(const Container &)  fnc 
) [protected]

void storage::Storage::sortCommitLists ( storage::CommitStage  stage,
list< const Container * > &  co,
list< const Volume * > &  vl,
list< commitAction > &  todo 
) const [protected]

bool storage::Storage::ignoreError ( int  error,
list< commitAction >::const_iterator  ca 
) const [protected]

References commitErrorPopupCb(), and y2mil.

Referenced by commitPair().

string storage::Storage::backupStates (  )  const [protected]

void storage::Storage::detectObjects (  )  [protected]

void storage::Storage::deleteBackups (  )  [protected]

void storage::Storage::setCachedFreeInfo ( const string &  device,
bool  resize_cached,
const ResizeInfo resize_info,
bool  content_cached,
const ContentInfo content_info 
) [protected]

Referenced by getFreeInfo().

bool storage::Storage::getCachedFreeInfo ( const string &  device,
bool  get_resize,
ResizeInfo resize_info,
bool  get_content,
ContentInfo content_info 
) const [protected]

References y2mil.

Referenced by getFreeInfo().

void storage::Storage::logFreeInfo ( const string &  Dir  )  const [protected]

void storage::Storage::readFreeInfo ( const string &  file  )  [protected]

void storage::Storage::logArchInfo ( const string &  Dir  )  const [protected]

void storage::Storage::readArchInfo ( const string &  file  )  [protected]

list< commitAction > storage::Storage::getCommitActions (  )  const [protected]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const Storage v 
) [friend]

std::ostream& operator<< ( std::ostream &  s,
Storage v 
) [friend]


Member Data Documentation

bool storage::Storage::cache [protected]

Referenced by isCacheChanges(), and setCacheChanges().

Referenced by assertInit(), and initialize().

Referenced by getDefaultFs(), and setDefaultFs().

Referenced by isRootMounted(), and rootMounted().

string storage::Storage::tempdir [protected]

Referenced by initialize(), tmpDir(), and ~Storage().

string storage::Storage::rootprefix [protected]

unsigned storage::Storage::hald_pid [protected]

Referenced by handleHald(), and Storage().


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

Generated on Mon Feb 6 10:42:58 2012 for yast2-storage by  doxygen 1.5.6