libstorage-ng
|
The storage namespace. More...
Classes | |
class | Aborted |
class | Actiongraph |
class | ActivateCallbacks |
Other storage subsystems are activated automatically, e.g. More... | |
class | AlignError |
class | Alignment |
A class to calculate partition alignment based on hardware topology. More... | |
class | Bcache |
A bcache device. More... | |
class | BcacheCset |
A bcache cache set. More... | |
class | BlkDevice |
An abstract Block Device. More... | |
class | BlkFilesystem |
class | Btrfs |
class | BtrfsSubvolume |
Class to represent a btrfs subvolume. More... | |
class | BtrfsSubvolumeNotFoundByPath |
class | CheckCallbacks |
class | CodeLocation |
Helper class for UI exceptions: Store BASE_FILE, FUNCTION and LINE. More... | |
class | CommitCallbacks |
class | ContentInfo |
class | Dasd |
A physical DASD device. More... | |
class | DasdPt |
struct | DeactivateStatus |
Provides information whether deactivate() was able to deactivate subsystems. More... | |
class | Device |
An abstract base class of storage devices, and a vertex in the Devicegraph. More... | |
class | Devicegraph |
The master container of the libstorage. More... | |
class | DeviceHasWrongType |
class | DeviceNotFound |
class | DeviceNotFoundByName |
class | DeviceNotFoundBySid |
class | DeviceNotFoundByUuid |
class | DifferentBlockSizes |
class | Disk |
A physical disk device. More... | |
class | DmRaid |
A DM RAID device. More... | |
class | Encryption |
An encryption layer on a blk device. More... | |
class | Environment |
class | Exception |
Base class for storage exceptions. More... | |
class | Ext |
Abstract base class for Ext2, Ext3 and Ext4. More... | |
class | Ext2 |
class | Ext3 |
class | Ext4 |
class | Filesystem |
class | FilesystemUser |
class | Gpt |
class | Holder |
class | HolderAlreadyExists |
class | HolderHasWrongType |
class | HolderNotFound |
class | HolderNotFoundBySids |
class | ImplicitPt |
Class to represent implicit partition table. More... | |
class | IndexOutOfRangeException |
Exception class for "index out of range". More... | |
class | InvalidBlockSize |
class | InvalidExtentSize |
class | InvalidMountPointPath |
class | IOException |
Exception class for IO errors. More... | |
class | Iso9660 |
Class for ISO9660 filesystem. More... | |
class | Jfs |
class | LockException |
Exception indicating that getting the lock failed. More... | |
class | Logger |
The Logger class. More... | |
class | LogicException |
Exception class for faulty logic within the program. More... | |
class | Luks |
An luks encryption layer on a block device. More... | |
class | LvmLv |
A Logical Volume of the Logical Volume Manager (LVM). More... | |
class | LvmLvNotFoundByLvName |
class | LvmPv |
class | LvmVg |
A Volume Group of the Logical Volume Manager (LVM). More... | |
class | LvmVgNotFoundByVgName |
class | Md |
A MD device. More... | |
class | MdContainer |
A MD Container. More... | |
class | MdMember |
A MD member. More... | |
class | MdSubdevice |
Holder from a MdContainer to a MdMember. More... | |
class | MdUser |
class | Mountable |
class | MountPoint |
Class to represent a mount point. More... | |
class | Msdos |
class | Multipath |
A multipath device. More... | |
class | Nfs |
Class to represent a NFS mount. More... | |
class | NfsNotFoundByServerAndPath |
class | NoIntersection |
class | NotInside |
class | Ntfs |
class | NullPointerException |
Exception class for generic null pointer exceptions. More... | |
class | OutOfMemoryException |
Exception class for "out of memory". More... | |
class | OverflowException |
Exception class for "overflow". More... | |
class | ParseException |
Exception class for parse errors, e.g. More... | |
class | Partition |
A partition of a Partitionable, e.g. Disk or Md. More... | |
class | Partitionable |
class | PartitionSlot |
Number and name are only valid if one of the possible flags is true. More... | |
class | PartitionTable |
class | ProbeCallbacks |
class | Region |
A start/length pair with a block size. More... | |
class | Reiserfs |
class | RemoteCallbacks |
struct | RemoteCommand |
A result of an unnamed command: stdout + stderr + exit_code. More... | |
struct | RemoteFile |
Contents of an unnamed file (vector of lines) More... | |
class | ResizeInfo |
class | Silencer |
Class to make some exceptions log-level DEBUG instead of WARNING. More... | |
struct | SimpleEtcCrypttabEntry |
A simple struct to hold the information from one line in crypttab. More... | |
struct | SimpleEtcFstabEntry |
A simple struct to hold the information from one line in fstab. More... | |
class | SpaceInfo |
class | Storage |
The main entry point to libstorage. More... | |
class | StrayBlkDevice |
This class represents stray block devices. More... | |
class | Subdevice |
class | Swap |
class | Topology |
A class to represent hardware alignment information. More... | |
class | Udf |
Class for UDF filesystem. More... | |
class | UnsupportedException |
Exception class for unsupported features and operations. More... | |
class | User |
class | Vfat |
class | WrongNumberOfChildren |
class | WrongNumberOfParents |
class | Xfs |
Typedefs | |
typedef unsigned int | sid_t |
An integer storage ID. More... | |
Enumerations | |
enum | Side { LHS, RHS } |
enum | ProbeMode { STANDARD, STANDARD_WRITE_DEVICEGRAPH, STANDARD_WRITE_MOCKUP, NONE, READ_DEVICEGRAPH, READ_MOCKUP } |
How to probe the system. | |
enum | TargetMode { DIRECT, CHROOT, IMAGE } |
Is the target a disk, chroot, or image? | |
enum | : uint32_t { RB_RESIZE_NOT_SUPPORTED_BY_DEVICE = 1 << 0, RB_MIN_MAX_ERROR = 1 << 1, RB_SHRINK_NOT_SUPPORTED_BY_FILESYSTEM = 1 << 2, RB_GROW_NOT_SUPPORTED_BY_FILESYSTEM = 1 << 3, RB_FILESYSTEM_INCONSISTENT = 1 << 4, RB_MIN_SIZE_FOR_FILESYSTEM = 1 << 5, RB_MAX_SIZE_FOR_FILESYSTEM = 1 << 6, RB_FILESYSTEM_FULL = 1 << 7, RB_NO_SPACE_BEHIND_PARTITION = 1 << 8, RB_MIN_SIZE_FOR_PARTITION = 1 << 9, RB_EXTENDED_PARTITION = 1 << 10, RB_ON_IMPLICIT_PARTITION_TABLE = 1 << 11, RB_SHRINK_NOT_SUPPORTED_FOR_LVM_LV_TYPE = 1 << 12, RB_RESIZE_NOT_SUPPORTED_FOR_LVM_LV_TYPE = 1 << 13, RB_NO_SPACE_IN_LVM_VG = 1 << 14, RB_MIN_SIZE_FOR_LVM_LV = 1 << 15, RB_MAX_SIZE_FOR_LVM_LV_THIN = 1 << 16 } |
Resize blockers. More... | |
enum | GraphvizFlags : unsigned int { NONE = 0, CLASSNAME = 1 << 0, PRETTY_CLASSNAME = 1 << 1, NAME = 1 << 2, SID = 1 << 3, SIZE = 1 << 4, ACTIVE = 1 << 5, IN_ETC = 1 << 6, DISPLAYNAME = 1 << 7 } |
Bitfield to control graphviz output. More... | |
enum | : uint64_t { UF_EXT2 = 1 << 0, UF_EXT3 = 1 << 1, UF_EXT4 = 1 << 2, UF_BTRFS = 1 << 3, UF_XFS = 1 << 4, UF_REISERFS = 1 << 5, UF_SWAP = 1 << 6, UF_NTFS = 1 << 7, UF_VFAT = 1 << 8, UF_NFS = 1 << 9, UF_JFS = 1 << 10, UF_LUKS = 1 << 11, UF_LVM = 1 << 12, UF_MDRAID = 1 << 13, UF_DMRAID = 1 << 14, UF_MULTIPATH = 1 << 15, UF_BCACHE = 1 << 16, UF_ISCSI = 1 << 17, UF_FCOE = 1 << 18, UF_FC = 1 << 19, UF_DASD = 1 << 20, UF_QUOTA = 1 << 21, UF_SNAPSHOTS = 1 << 22 } |
enum | DasdType { UNKNOWN, ECKD, FBA } |
The DASD type. | |
enum | DasdFormat { NONE, LDL, CDL } |
The layout with which the ECKD DASD was formatted. | |
enum | Transport { UNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE } |
Data Transport Layer. | |
enum | EncryptionType { NONE, TWOFISH, TWOFISH_OLD, TWOFISH256_OLD, LUKS, UNKNOWN } |
enum | LvType { UNKNOWN, NORMAL, THIN_POOL, THIN, RAID } |
LVM logical volume types, see lvs(8). | |
enum | MdLevel { UNKNOWN, RAID0, RAID1, RAID4, RAID5, RAID6, RAID10, CONTAINER } |
enum | MdParity { DEFAULT, LEFT_ASYMMETRIC, LEFT_SYMMETRIC, RIGHT_ASYMMETRIC, RIGHT_SYMMETRIC, FIRST, LAST, LEFT_ASYMMETRIC_6, LEFT_SYMMETRIC_6, RIGHT_ASYMMETRIC_6, RIGHT_SYMMETRIC_6, FIRST_6, NEAR_2, OFFSET_2, FAR_2, NEAR_3, OFFSET_3, FAR_3 } |
enum | PartitionType { PRIMARY, EXTENDED, LOGICAL } |
Partition type (primary, extended, logical) | |
enum | IdNum : unsigned int { ID_DOS12 = 0x01, ID_DOS16 = 0x06, ID_DOS32 = 0x0c, ID_NTFS = 0x07, ID_EXTENDED = 0x0f, ID_DIAG = 0x12, ID_PREP = 0x41, ID_LINUX = 0x83, ID_SWAP = 0x82, ID_LVM = 0x8e, ID_RAID = 0xfd, ID_ESP = 0xef, ID_UNKNOWN = 0x100, ID_BIOS_BOOT = 0x101, ID_WINDOWS_BASIC_DATA = 0x102, ID_MICROSOFT_RESERVED = 0x103 } |
Enum with values used as partition ids. More... | |
enum | PtType { UNKNOWN, LOOP, MSDOS, GPT, DASD, MAC, IMPLICIT } |
Partition Table Type. | |
enum | FsType { UNKNOWN, AUTO, REISERFS, EXT2, EXT3, EXT4, BTRFS, VFAT, XFS, JFS, HFS, NTFS, SWAP, HFSPLUS, NFS, NFS4, TMPFS, ISO9660, UDF, NILFS2, MINIX, NTFS3G } |
enum | MountByType { MountByType::DEVICE, MountByType::UUID, MountByType::LABEL, MountByType::ID, MountByType::PATH } |
The key by which the mount program identifies a mountable. More... | |
enum | AlignType { AlignType::REQUIRED, AlignType::OPTIMAL } |
enum | AlignPolicy { AlignPolicy::ALIGN_START_AND_END = 0, ST_DEPRECATED = 0, AlignPolicy::ALIGN_START_KEEP_END = 1, ST_DEPRECATED = 1, AlignPolicy::ALIGN_START_KEEP_SIZE = 2, ST_DEPRECATED = 2, AlignPolicy::KEEP_START_ALIGN_END = 3 } |
enum | LogLevel { DEBUG = 0, MILESTONE = 1, WARNING = 2, ERROR = 3 } |
Functions | |
GraphvizFlags | operator| (GraphvizFlags a, GraphvizFlags b) |
GraphvizFlags | operator & (GraphvizFlags a, GraphvizFlags b) |
bool | operator && (GraphvizFlags a, GraphvizFlags b) |
std::vector< SimpleEtcCrypttabEntry > | read_simple_etc_crypttab (const std::string &filename) |
Read a crypttab file. More... | |
std::vector< SimpleEtcFstabEntry > | read_simple_etc_fstab (const std::string &filename) |
Read a fstab file. More... | |
bool | is_bcache (const Device *device) |
Bcache * | to_bcache (Device *device) |
Converts pointer to Device to pointer to Bcache. More... | |
const Bcache * | to_bcache (const Device *device) |
Converts pointer to Device to pointer to Bcache. More... | |
bool | is_bcache_cset (const Device *device) |
BcacheCset * | to_bcache_cset (Device *device) |
Converts pointer to Device to pointer to BcacheCset. More... | |
const BcacheCset * | to_bcache_cset (const Device *device) |
Converts pointer to Device to pointer to BcacheCset. More... | |
bool | is_blk_device (const Device *device) |
BlkDevice * | to_blk_device (Device *device) |
Converts pointer to Device to pointer to BlkDevice. More... | |
const BlkDevice * | to_blk_device (const Device *device) |
Converts pointer to Device to pointer to BlkDevice. More... | |
bool | is_dasd (const Device *device) |
Dasd * | to_dasd (Device *device) |
Converts pointer to Device to pointer to Dasd. More... | |
const Dasd * | to_dasd (const Device *device) |
Converts pointer to Device to pointer to Dasd. More... | |
bool | is_dasd_pt (const Device *device) |
DasdPt * | to_dasd_pt (Device *device) |
Converts pointer to Device to pointer to DasdPt. More... | |
const DasdPt * | to_dasd_pt (const Device *device) |
Converts pointer to Device to pointer to DasdPt. More... | |
std::string | get_transport_name (Transport transport) |
bool | is_disk (const Device *device) |
Disk * | to_disk (Device *device) |
Converts pointer to Device to pointer to Disk. More... | |
const Disk * | to_disk (const Device *device) |
Converts pointer to Device to pointer to Disk. More... | |
bool | is_dm_raid (const Device *device) |
DmRaid * | to_dm_raid (Device *device) |
Converts pointer to Device to pointer to DmRaid. More... | |
const DmRaid * | to_dm_raid (const Device *device) |
Converts pointer to Device to pointer to DmRaid. More... | |
bool | is_encryption (const Device *device) |
Encryption * | to_encryption (Device *device) |
Converts pointer to Device to pointer to Encryption. More... | |
const Encryption * | to_encryption (const Device *device) |
Converts pointer to Device to pointer to Encryption. More... | |
bool | is_gpt (const Device *device) |
Gpt * | to_gpt (Device *device) |
Converts pointer to Device to pointer to Gpt. More... | |
const Gpt * | to_gpt (const Device *device) |
Converts pointer to Device to pointer to Gpt. More... | |
bool | is_implicit_pt (const Device *device) |
ImplicitPt * | to_implicit_pt (Device *device) |
Converts pointer to Device to pointer to ImplicitPt. More... | |
const ImplicitPt * | to_implicit_pt (const Device *device) |
Converts pointer to Device to pointer to ImplicitPt. More... | |
bool | is_luks (const Device *device) |
Luks * | to_luks (Device *device) |
Converts pointer to Device to pointer to Luks. More... | |
const Luks * | to_luks (const Device *device) |
Converts pointer to Device to pointer to Luks. More... | |
bool | is_lvm_lv (const Device *device) |
LvmLv * | to_lvm_lv (Device *device) |
Converts pointer to Device to pointer to LvmLv. More... | |
const LvmLv * | to_lvm_lv (const Device *device) |
Converts pointer to Device to pointer to LvmLv. More... | |
bool | is_lvm_pv (const Device *device) |
LvmPv * | to_lvm_pv (Device *device) |
Converts pointer to Device to pointer to LvmPv. More... | |
const LvmPv * | to_lvm_pv (const Device *device) |
Converts pointer to Device to pointer to LvmPv. More... | |
bool | is_lvm_vg (const Device *device) |
LvmVg * | to_lvm_vg (Device *device) |
Converts pointer to Device to pointer to LvmVg. More... | |
const LvmVg * | to_lvm_vg (const Device *device) |
Converts pointer to Device to pointer to LvmVg. More... | |
std::string | get_md_level_name (MdLevel md_level) |
std::string | get_md_parity_name (MdParity md_parity) |
bool | is_md (const Device *device) |
Md * | to_md (Device *device) |
Converts pointer to Device to pointer to Md. More... | |
const Md * | to_md (const Device *device) |
Converts pointer to Device to pointer to Md. More... | |
bool | is_md_container (const Device *device) |
MdContainer * | to_md_container (Device *device) |
Converts pointer to Device to pointer to MdContainer. More... | |
const MdContainer * | to_md_container (const Device *device) |
Converts pointer to Device to pointer to MdContainer. More... | |
bool | is_md_member (const Device *device) |
MdMember * | to_md_member (Device *device) |
Converts pointer to Device to pointer to MdMember. More... | |
const MdMember * | to_md_member (const Device *device) |
Converts pointer to Device to pointer to MdMember. More... | |
bool | is_msdos (const Device *device) |
Msdos * | to_msdos (Device *device) |
Converts pointer to Device to pointer to Msdos. More... | |
const Msdos * | to_msdos (const Device *device) |
Converts pointer to Device to pointer to Msdos. More... | |
bool | is_multipath (const Device *device) |
Multipath * | to_multipath (Device *device) |
Converts pointer to Device to pointer to Multipath. More... | |
const Multipath * | to_multipath (const Device *device) |
Converts pointer to Device to pointer to Multipath. More... | |
std::string | get_partition_type_name (PartitionType partition_type) |
bool | is_partition (const Device *device) |
Partition * | to_partition (Device *device) |
Converts pointer to Device to pointer to Partition. More... | |
const Partition * | to_partition (const Device *device) |
Converts pointer to Device to pointer to Partition. More... | |
bool | is_partitionable (const Device *device) |
Partitionable * | to_partitionable (Device *device) |
Converts pointer to Device to pointer to Partitionable. More... | |
const Partitionable * | to_partitionable (const Device *device) |
Converts pointer to Device to pointer to Partitionable. More... | |
std::string | get_pt_type_name (PtType pt_type) |
bool | is_partition_table (const Device *device) |
PartitionTable * | to_partition_table (Device *device) |
Converts pointer to Device to pointer to PartitionTable. More... | |
const PartitionTable * | to_partition_table (const Device *device) |
Converts pointer to Device to pointer to PartitionTable. More... | |
bool | is_stray_blk_device (const Device *device) |
StrayBlkDevice * | to_stray_blk_device (Device *device) |
Converts pointer to Device to pointer to StrayBlkDevice. More... | |
const StrayBlkDevice * | to_stray_blk_device (const Device *device) |
Converts pointer to Device to pointer to StrayBlkDevice. More... | |
bool | is_blk_filesystem (const Device *device) |
BlkFilesystem * | to_blk_filesystem (Device *device) |
Converts pointer to Device to pointer to BlkFilesystem. More... | |
const BlkFilesystem * | to_blk_filesystem (const Device *device) |
Converts pointer to Device to pointer to BlkFilesystem. More... | |
bool | is_btrfs (const Device *device) |
Btrfs * | to_btrfs (Device *device) |
Converts pointer to Device to pointer to Btrfs. More... | |
const Btrfs * | to_btrfs (const Device *device) |
Converts pointer to Device to pointer to Btrfs. More... | |
bool | is_btrfs_subvolume (const Device *device) |
BtrfsSubvolume * | to_btrfs_subvolume (Device *device) |
Converts pointer to Device to pointer to BtrfsSubvolume. More... | |
const BtrfsSubvolume * | to_btrfs_subvolume (const Device *device) |
Converts pointer to Device to pointer to BtrfsSubvolume. More... | |
bool | is_ext (const Device *device) |
Ext * | to_ext (Device *device) |
Converts pointer to Device to pointer to Ext. More... | |
const Ext * | to_ext (const Device *device) |
Converts pointer to Device to pointer to Ext. More... | |
bool | is_ext2 (const Device *device) |
Ext2 * | to_ext2 (Device *device) |
Converts pointer to Device to pointer to Ext2. More... | |
const Ext2 * | to_ext2 (const Device *device) |
Converts pointer to Device to pointer to Ext2. More... | |
bool | is_ext3 (const Device *device) |
Ext3 * | to_ext3 (Device *device) |
Converts pointer to Device to pointer to Ext3. More... | |
const Ext3 * | to_ext3 (const Device *device) |
Converts pointer to Device to pointer to Ext3. More... | |
bool | is_ext4 (const Device *device) |
Ext4 * | to_ext4 (Device *device) |
Converts pointer to Device to pointer to Ext4. More... | |
const Ext4 * | to_ext4 (const Device *device) |
Converts pointer to Device to pointer to Ext4. More... | |
bool | is_filesystem (const Device *device) |
Filesystem * | to_filesystem (Device *device) |
Converts pointer to Device to pointer to Filesystem. More... | |
const Filesystem * | to_filesystem (const Device *device) |
Converts pointer to Device to pointer to Filesystem. More... | |
bool | is_iso9660 (const Device *device) |
Iso9660 * | to_iso9660 (Device *device) |
Converts pointer to Device to pointer to Iso9660. More... | |
const Iso9660 * | to_iso9660 (const Device *device) |
Converts pointer to Device to pointer to Iso9660. More... | |
bool | is_jfs (const Device *device) |
Jfs * | to_jfs (Device *device) |
Converts pointer to Device to pointer to Jfs. More... | |
const Jfs * | to_jfs (const Device *device) |
Converts pointer to Device to pointer to Jfs. More... | |
std::string | get_fs_type_name (FsType fs_type) |
std::string | get_mount_by_name (MountByType mount_by_type) |
bool | is_mountable (const Device *device) |
Mountable * | to_mountable (Device *device) |
Converts pointer to Device to pointer to Mountable. More... | |
const Mountable * | to_mountable (const Device *device) |
Converts pointer to Device to pointer to Mountable. More... | |
bool | is_mount_point (const Device *device) |
MountPoint * | to_mount_point (Device *device) |
Converts pointer to Device to pointer to Mountpoint. More... | |
const MountPoint * | to_mount_point (const Device *device) |
Converts pointer to Device to pointer to Mountpoint. More... | |
bool | is_nfs (const Device *device) |
Nfs * | to_nfs (Device *device) |
Converts pointer to Device to pointer to Nfs. More... | |
const Nfs * | to_nfs (const Device *device) |
Converts pointer to Device to pointer to Nfs. More... | |
bool | is_ntfs (const Device *device) |
Ntfs * | to_ntfs (Device *device) |
Converts pointer to Device to pointer to Ntfs. More... | |
const Ntfs * | to_ntfs (const Device *device) |
Converts pointer to Device to pointer to Ntfs. More... | |
bool | is_reiserfs (const Device *device) |
Reiserfs * | to_reiserfs (Device *device) |
Converts pointer to Device to pointer to Reiserfs. More... | |
const Reiserfs * | to_reiserfs (const Device *device) |
Converts pointer to Device to pointer to Reiserfs. More... | |
bool | is_swap (const Device *device) |
Swap * | to_swap (Device *device) |
Converts pointer to Device to pointer to Swap. More... | |
const Swap * | to_swap (const Device *device) |
Converts pointer to Device to pointer to Swap. More... | |
bool | is_udf (const Device *device) |
Udf * | to_udf (Device *device) |
Converts pointer to Device to pointer to Udf. More... | |
const Udf * | to_udf (const Device *device) |
Converts pointer to Device to pointer to Udf. More... | |
bool | is_vfat (const Device *device) |
Vfat * | to_vfat (Device *device) |
Converts pointer to Device to pointer to Vfat. More... | |
const Vfat * | to_vfat (const Device *device) |
Converts pointer to Device to pointer to Vfat. More... | |
bool | is_xfs (const Device *device) |
Xfs * | to_xfs (Device *device) |
Converts pointer to Device to pointer to Xfs. More... | |
const Xfs * | to_xfs (const Device *device) |
Converts pointer to Device to pointer to Xfs. More... | |
bool | is_filesystem_user (const Holder *holder) |
FilesystemUser * | to_filesystem_user (Holder *holder) |
Converts pointer to Holder to pointer to FilesystemUser. More... | |
const FilesystemUser * | to_filesystem_user (const Holder *holder) |
Converts pointer to Holder to pointer to FilesystemUser. More... | |
bool | is_md_subdevice (const Holder *holder) |
MdSubdevice * | to_md_subdevice (Holder *holder) |
Converts pointer to Holder to pointer to MdSubdevice. More... | |
const MdSubdevice * | to_md_subdevice (const Holder *holder) |
Converts pointer to Holder to pointer to MdSubdevice. More... | |
bool | is_md_user (const Holder *holder) |
MdUser * | to_md_user (Holder *holder) |
Converts pointer to Holder to pointer to MdUser. More... | |
const MdUser * | to_md_user (const Holder *holder) |
Converts pointer to Holder to pointer to MdUser. More... | |
bool | is_subdevice (const Holder *holder) |
Subdevice * | to_subdevice (Holder *holder) |
Converts pointer to Holder to pointer to Subdevice. More... | |
const Subdevice * | to_subdevice (const Holder *holder) |
Converts pointer to Holder to pointer to User. More... | |
bool | is_user (const Holder *holder) |
User * | to_user (Holder *holder) |
Converts pointer to Holder to pointer to User. More... | |
const User * | to_user (const Holder *holder) |
Converts pointer to Holder to pointer to User. More... | |
std::ostream & | operator<< (std::ostream &str, const CodeLocation &obj) |
CodeLocation stream output. More... | |
std::ostream & | operator<< (std::ostream &str, const Exception &obj) |
Exception stream output. | |
int | num_suffixes () |
Return number of suffixes. More... | |
std::string | get_suffix (int i, bool classic) |
Return a suffix. More... | |
std::string | byte_to_humanstring (unsigned long long size, bool classic, int precision, bool omit_zeroes) |
Return a pretty description of a size with required precision and using B, KiB, MiB, GiB, TiB, PiB or EiB as unit as appropriate. More... | |
unsigned long long | humanstring_to_byte (const std::string &str, bool classic) |
Converts a size description using B, KiB, KB, MiB, MB, GiB, GB, TiB, TB, PiB, PB, EiB or EB into an integer. More... | |
bool | light_probe () |
This function does some very light probing and returns true iff some disks or DASDs were found in the system. More... | |
Logger * | get_logger () |
Get the current logger object. | |
void | set_logger (Logger *logger) |
Set the current logger object. More... | |
Logger * | get_stdout_logger () |
Returns a Logger that logs to stdout. More... | |
Logger * | get_logfile_logger (const std::string &filename="/var/log/libstorage.log") |
Returns a Logger that logs to the standard libstorage log file ("/var/log/libstorage.log") or to a given file. More... | |
const RemoteCallbacks * | get_remote_callbacks () |
void | set_remote_callbacks (const RemoteCallbacks *remote_callbacks) |
The storage namespace.
typedef unsigned int storage::sid_t |
An integer storage ID.
The storage id (sid) is used to identify devices. The sid is copied when copying the device graph. When adding a device it gets a unique sid (across all device graphs). By using the storage id instead of a device name we can easily identify devices where the device name changed, e.g. renumbered logical partitions or renamed logical volumes. Also some devices do not have a intrinsic device name, e.g. btrfs. We could even have objects for unused space, e.g. space between partitions or unallocated space of a volume group.
Whenever possible use the storage id to find objects instead of e.g. the name since only the storage id guarantees uniqueness.
anonymous enum : uint32_t |
Resize blockers.
Some resize operations are not supported by the system (e.g. shrink LVM thin pool) while others are not supported by the library (e.g. resize extended partition).
Enumerator | |
---|---|
RB_RESIZE_NOT_SUPPORTED_BY_DEVICE | The device or one of its descendants that also needs resizing does not support resizing. This is the case for Disks, Dasds, Mds, DmRaids, Multipaths, PartitionTables, LvmVgs, Bcaches, BcacheCsets, BtrfsSubvolumes, Nfses MountPoints, so basically everything except Partitions, LvmLvs and Lukses. Blocks shrink and grow. |
RB_MIN_MAX_ERROR | Several limitations were combined, e.g. limitations from partition and filesystem, and the result does not allow any resize. Blocks shrink and grow. |
RB_SHRINK_NOT_SUPPORTED_BY_FILESYSTEM | The filesystem does not support shrink. Blocks shrink. |
RB_GROW_NOT_SUPPORTED_BY_FILESYSTEM | The filesystem does not support grow. Blocks grow. |
RB_FILESYSTEM_INCONSISTENT | The filesystem seems to be inconsistent or checking filesystem consistency failed. Blocks shrink and grow. |
RB_MIN_SIZE_FOR_FILESYSTEM | The filesystem has already the minimal possible size. Blocks shrink. |
RB_MAX_SIZE_FOR_FILESYSTEM | The filesystem has already the maximal possible size. Blocks grow. |
RB_FILESYSTEM_FULL | The filesystem is full and cannot be shrunk. Blocks shrink. |
RB_NO_SPACE_BEHIND_PARTITION | No space behind partition. There can be several reasons: 1. other partition, 2. end of disk, 3. end of extended partition, 4. space not addressable by partition table. Blocks grow. |
RB_MIN_SIZE_FOR_PARTITION | The partition has already the minimal possible size. Blocks shrink. |
RB_EXTENDED_PARTITION | Extended partitions cannot be resized. Blocks shrink and grow. |
RB_ON_IMPLICIT_PARTITION_TABLE | Partition on an implicit partition table cannot be resized. Blocks shrink and grow. |
RB_SHRINK_NOT_SUPPORTED_FOR_LVM_LV_TYPE | Shrink of LVM logical volume of this type not supported, e.g. thin pools and raids. Blocks shrink. |
RB_RESIZE_NOT_SUPPORTED_FOR_LVM_LV_TYPE | Resize of LVM logical volume of this type not supported, e.g. raids. Blocks shrink and grow. |
RB_NO_SPACE_IN_LVM_VG | No space left in LVM volume group. Blocks grow. |
RB_MIN_SIZE_FOR_LVM_LV | The LVM logical volume has already the minimal possible size. Blocks shrink. |
RB_MAX_SIZE_FOR_LVM_LV_THIN | LVM thin logical volume has already maximal size. Blocks grow. |
|
strong |
|
strong |
|
strong |
Bitfield to control graphviz output.
Not all flags apply to all graphs or all objects (devices, holders and actions).
enum storage::IdNum : unsigned int |
Enum with values used as partition ids.
For MS-DOS the value of the enum is equal to the partition type byte. For GPT, DASD and Implicit the value has no special meaning.
For MS-DOS any value between 0 and 255 is possible, while for the other partition tables only those specified are possible.
For details about the ids see e.g. https://en.wikipedia.org/wiki/Partition_type and https://en.wikipedia.org/wiki/GUID_Partition_Table.
Enumerator | |
---|---|
ID_DOS12 | Only for MS-DOS. |
ID_DOS16 | Only for MS-DOS. |
ID_DOS32 | Only for MS-DOS. |
ID_NTFS | Only for MS-DOS. |
ID_EXTENDED | Only for MS-DOS. |
ID_DIAG | For MS-DOS and GPT. |
ID_PREP | PPC PReP Boot partition, for MS-DOS and GPT. |
ID_LINUX | For MS-DOS, GPT, DASD and implicit. |
ID_SWAP | Swap partition, for MS-DOS, GPT and DASD. |
ID_LVM | LVM partition, for MS-DOS, GPT and DASD. |
ID_RAID | RAID partition, for MS-DOS, GPT and DASD. |
ID_ESP | EFI System Partition, for MS-DOS and GPT. |
ID_UNKNOWN | Only set during probing. For MS-DOS, GPT, DASD and implicit. |
ID_BIOS_BOOT | BIOS boot partition (https://en.wikipedia.org/wiki/BIOS_boot_partition), only for GPT. |
ID_WINDOWS_BASIC_DATA | Windows basic data partition, only for GPT. |
ID_MICROSOFT_RESERVED | Microsoft reserved partition, only for GPT. |
|
strong |
The key by which the mount program identifies a mountable.
Some types address the filesystem while others address the underlying device.
Enumerator | |
---|---|
DEVICE | The kernel device name or a link in /dev (but not in /dev/disk). For NFS the server and path. |
UUID | Filesystem UUID. |
LABEL | Filesystem label. |
ID | One of the links in /dev/disk/by-id. |
PATH | One of the links in /dev/disk/by-path. |
std::string storage::byte_to_humanstring | ( | unsigned long long | size, |
bool | classic, | ||
int | precision, | ||
bool | omit_zeroes | ||
) |
Return a pretty description of a size with required precision and using B, KiB, MiB, GiB, TiB, PiB or EiB as unit as appropriate.
Supported range is 0 B to (16 EiB - 1 B).
size | size in bytes |
classic | use classic locale instead of global C++ locale |
precision | number of fraction digits in output |
omit_zeroes | if true omit trailing zeroes for exact values |
Logger* storage::get_logfile_logger | ( | const std::string & | filename = "/var/log/libstorage.log" | ) |
Returns a Logger that logs to the standard libstorage log file ("/var/log/libstorage.log") or to a given file.
Do not use this function for production code but only for examples and test-cases.
Note that this method only uses the given filename the first time that is called.
Logger* storage::get_stdout_logger | ( | ) |
Returns a Logger that logs to stdout.
Do not use this function for production code but only for examples and test-cases.
std::string storage::get_suffix | ( | int | i, |
bool | classic | ||
) |
Return a suffix.
i | index of suffix |
classic | use classic locale instead of global C++ locale |
unsigned long long storage::humanstring_to_byte | ( | const std::string & | str, |
bool | classic | ||
) |
Converts a size description using B, KiB, KB, MiB, MB, GiB, GB, TiB, TB, PiB, PB, EiB or EB into an integer.
Decimal suffixes are treated as binary. Supported range is 0 B to (16 EiB - 1 B).
str | size string |
classic | use classic locale instead of global C++ locale |
The conversion is always case-insensitive. With classic set to false the conversion is also sloppy concerning omission of 'B'.
ParseException,OverflowException |
bool storage::light_probe | ( | ) |
This function does some very light probing and returns true iff some disks or DASDs were found in the system.
No devicegraph is generated. The exact type of devices probed may change.
Exception |
int storage::num_suffixes | ( | ) |
Return number of suffixes.
std::ostream& storage::operator<< | ( | std::ostream & | str, |
const CodeLocation & | obj | ||
) |
CodeLocation stream output.
Stream output.
std::vector<SimpleEtcCrypttabEntry> storage::read_simple_etc_crypttab | ( | const std::string & | filename | ) |
Read a crypttab file.
Whether the function returns an empty vector or throws an exception if reading or parsing is undefined.
Exception |
std::vector<SimpleEtcFstabEntry> storage::read_simple_etc_fstab | ( | const std::string & | filename | ) |
Read a fstab file.
Whether the function returns an empty vector or throws an exception if reading or parsing is undefined.
Exception |
void storage::set_logger | ( | Logger * | logger | ) |
Set the current logger object.
The logger object must be valid until replaced by another logger object.
Converts pointer to Device to pointer to Bcache.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Bcache.
DeviceHasWrongType,NullPointerException |
BcacheCset* storage::to_bcache_cset | ( | Device * | device | ) |
Converts pointer to Device to pointer to BcacheCset.
DeviceHasWrongType,NullPointerException |
const BcacheCset* storage::to_bcache_cset | ( | const Device * | device | ) |
Converts pointer to Device to pointer to BcacheCset.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to BlkDevice.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to BlkDevice.
DeviceHasWrongType,NullPointerException |
BlkFilesystem* storage::to_blk_filesystem | ( | Device * | device | ) |
Converts pointer to Device to pointer to BlkFilesystem.
DeviceHasWrongType,NullPointerException |
const BlkFilesystem* storage::to_blk_filesystem | ( | const Device * | device | ) |
Converts pointer to Device to pointer to BlkFilesystem.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Btrfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Btrfs.
DeviceHasWrongType,NullPointerException |
BtrfsSubvolume* storage::to_btrfs_subvolume | ( | Device * | device | ) |
Converts pointer to Device to pointer to BtrfsSubvolume.
DeviceHasWrongType,NullPointerException |
const BtrfsSubvolume* storage::to_btrfs_subvolume | ( | const Device * | device | ) |
Converts pointer to Device to pointer to BtrfsSubvolume.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Dasd.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Dasd.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to DasdPt.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to DasdPt.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Disk.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Disk.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to DmRaid.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to DmRaid.
DeviceHasWrongType,NullPointerException |
Encryption* storage::to_encryption | ( | Device * | device | ) |
Converts pointer to Device to pointer to Encryption.
DeviceHasWrongType,NullPointerException |
const Encryption* storage::to_encryption | ( | const Device * | device | ) |
Converts pointer to Device to pointer to Encryption.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext2.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext2.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext3.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext3.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext4.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ext4.
DeviceHasWrongType,NullPointerException |
Filesystem* storage::to_filesystem | ( | Device * | device | ) |
Converts pointer to Device to pointer to Filesystem.
DeviceHasWrongType,NullPointerException |
const Filesystem* storage::to_filesystem | ( | const Device * | device | ) |
Converts pointer to Device to pointer to Filesystem.
DeviceHasWrongType,NullPointerException |
FilesystemUser* storage::to_filesystem_user | ( | Holder * | holder | ) |
Converts pointer to Holder to pointer to FilesystemUser.
HolderHasWrongType,NullPointerException |
const FilesystemUser* storage::to_filesystem_user | ( | const Holder * | holder | ) |
Converts pointer to Holder to pointer to FilesystemUser.
HolderHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Gpt.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Gpt.
DeviceHasWrongType,NullPointerException |
ImplicitPt* storage::to_implicit_pt | ( | Device * | device | ) |
Converts pointer to Device to pointer to ImplicitPt.
DeviceHasWrongType,NullPointerException |
const ImplicitPt* storage::to_implicit_pt | ( | const Device * | device | ) |
Converts pointer to Device to pointer to ImplicitPt.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Iso9660.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Iso9660.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Jfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Jfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Luks.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Luks.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to LvmLv.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to LvmLv.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to LvmPv.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to LvmPv.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to LvmVg.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to LvmVg.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Md.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Md.
DeviceHasWrongType,NullPointerException |
MdContainer* storage::to_md_container | ( | Device * | device | ) |
Converts pointer to Device to pointer to MdContainer.
DeviceHasWrongType,NullPointerException |
const MdContainer* storage::to_md_container | ( | const Device * | device | ) |
Converts pointer to Device to pointer to MdContainer.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to MdMember.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to MdMember.
DeviceHasWrongType,NullPointerException |
MdSubdevice* storage::to_md_subdevice | ( | Holder * | holder | ) |
Converts pointer to Holder to pointer to MdSubdevice.
HolderHasWrongType,NullPointerException |
const MdSubdevice* storage::to_md_subdevice | ( | const Holder * | holder | ) |
Converts pointer to Holder to pointer to MdSubdevice.
HolderHasWrongType,NullPointerException |
Converts pointer to Holder to pointer to MdUser.
HolderHasWrongType,NullPointerException |
Converts pointer to Holder to pointer to MdUser.
HolderHasWrongType,NullPointerException |
MountPoint* storage::to_mount_point | ( | Device * | device | ) |
Converts pointer to Device to pointer to Mountpoint.
DeviceHasWrongType,NullPointerException |
const MountPoint* storage::to_mount_point | ( | const Device * | device | ) |
Converts pointer to Device to pointer to Mountpoint.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Mountable.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Mountable.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Msdos.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Msdos.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Multipath.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Multipath.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Nfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Nfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ntfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Ntfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Partition.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Partition.
DeviceHasWrongType,NullPointerException |
PartitionTable* storage::to_partition_table | ( | Device * | device | ) |
Converts pointer to Device to pointer to PartitionTable.
DeviceHasWrongType,NullPointerException |
const PartitionTable* storage::to_partition_table | ( | const Device * | device | ) |
Converts pointer to Device to pointer to PartitionTable.
DeviceHasWrongType,NullPointerException |
Partitionable* storage::to_partitionable | ( | Device * | device | ) |
Converts pointer to Device to pointer to Partitionable.
DeviceHasWrongType,NullPointerException |
const Partitionable* storage::to_partitionable | ( | const Device * | device | ) |
Converts pointer to Device to pointer to Partitionable.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Reiserfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Reiserfs.
DeviceHasWrongType,NullPointerException |
StrayBlkDevice* storage::to_stray_blk_device | ( | Device * | device | ) |
Converts pointer to Device to pointer to StrayBlkDevice.
DeviceHasWrongType,NullPointerException |
const StrayBlkDevice* storage::to_stray_blk_device | ( | const Device * | device | ) |
Converts pointer to Device to pointer to StrayBlkDevice.
DeviceHasWrongType,NullPointerException |
Converts pointer to Holder to pointer to Subdevice.
HolderHasWrongType,NullPointerException |
Converts pointer to Holder to pointer to User.
HolderHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Swap.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Swap.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Udf.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Udf.
DeviceHasWrongType,NullPointerException |
Converts pointer to Holder to pointer to User.
HolderHasWrongType,NullPointerException |
Converts pointer to Holder to pointer to User.
HolderHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Vfat.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Vfat.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Xfs.
DeviceHasWrongType,NullPointerException |
Converts pointer to Device to pointer to Xfs.
DeviceHasWrongType,NullPointerException |