23 #ifndef STORAGE_LVM_LV_H 24 #define STORAGE_LVM_LV_H 27 #include "storage/Devices/BlkDevice.h" 28 #include "storage/Devicegraph.h" 42 UNKNOWN, NORMAL, THIN_POOL, THIN, RAID
63 const std::string& lv_name,
LvType lv_type);
80 void set_lv_name(
const std::string& lv_name);
82 LvType get_lv_type()
const;
84 unsigned int get_stripes()
const;
95 unsigned long long get_stripe_size()
const;
102 unsigned long long get_chunk_size()
const;
148 std::vector<LvmLv*> get_lvm_lvs();
149 std::vector<const LvmLv*> get_lvm_lvs()
const;
161 const Impl& get_impl()
const;
163 virtual LvmLv* clone()
const override;
172 bool is_lvm_lv(
const Device* device);
A Logical Volume of the Logical Volume Manager (LVM).
Definition: LvmLv.h:57
static bool compare_by_lv_name(const LvmLv *lhs, const LvmLv *rhs)
Compare (less than) two LvmLvs by lv-name.
const LvmVg * get_lvm_vg() const
Return volume group this logical volume belongs to.
LvmLv * get_lvm_lv(const std::string &lv_name)
const std::string & get_lv_name() const
Get logical volume name.
A Volume Group of the Logical Volume Manager (LVM).
Definition: LvmVg.h:59
LvmLv * create_lvm_lv(const std::string &lv_name, LvType lv_type, unsigned long long size)
Create a logical volume with name lv_name and type lv_type in the thin pool.
const LvmLv * get_thin_pool() const
Return the thin pool for a thin logical volume.
The master container of the libstorage.
Definition: Devicegraph.h:153
An abstract Block Device.
Definition: BlkDevice.h:41
unsigned long long max_size_for_lvm_lv(LvType lv_type) const
Return the max size in bytes for a new logical volume of type lv_type.
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:75
Definition: Devicegraph.h:48
void set_chunk_size(unsigned long long chunk_size)
Set the chunk size.
The storage namespace.
Definition: Actiongraph.h:37
LvType
LVM logical volume types, see lvs(8).
Definition: LvmLv.h:40
static std::vector< LvmLv * > get_all(Devicegraph *devicegraph)
Get all LvmLvs.
void set_stripes(unsigned int stripes)
Set the number of stripes.
LvmLv * to_lvm_lv(Device *device)
Converts pointer to Device to pointer to LvmLv.
void set_stripe_size(unsigned long long stripe_size)