23 #ifndef STORAGE_LVM_VG_H 24 #define STORAGE_LVM_VG_H 27 #include "storage/Devices/Device.h" 28 #include "storage/Devicegraph.h" 63 const std::string& get_vg_name()
const;
64 void set_vg_name(
const std::string& vg_name);
66 const Region& get_region()
const;
68 unsigned long long get_size()
const;
70 std::string get_size_string()
const;
77 unsigned long long get_extent_size()
const;
85 void set_extent_size(
unsigned long long extent_size);
90 unsigned long long number_of_extents()
const;
96 unsigned long long number_of_used_extents()
const;
101 unsigned long long number_of_free_extents()
const;
114 void remove_lvm_pv(
BlkDevice* blk_device);
119 LvmLv* create_lvm_lv(
const std::string& lv_name,
unsigned long long size);
125 void delete_lvm_lv(
LvmLv* lvm_lv);
130 static std::vector<LvmVg*> get_all(
Devicegraph* devicegraph);
135 static std::vector<const LvmVg*> get_all(
const Devicegraph* devicegraph);
140 static LvmVg* find_by_vg_name(
Devicegraph* devicegraph,
const std::string& vg_name);
145 static const LvmVg* find_by_vg_name(
const Devicegraph* devicegraph,
const std::string& vg_name);
147 std::vector<LvmPv*> get_lvm_pvs();
148 std::vector<const LvmPv*> get_lvm_pvs()
const;
150 LvmLv* get_lvm_lv(
const std::string& lv_name);
152 std::vector<LvmLv*> get_lvm_lvs();
153 std::vector<const LvmLv*> get_lvm_lvs()
const;
160 const Impl& get_impl()
const;
162 virtual LvmVg* clone()
const override;
171 bool is_lvm_vg(
const Device* device);
A Logical Volume of the Logical Volume Manager (LVM).
Definition: LvmLv.h:38
A Volume Group of the Logical Volume Manager (LVM).
Definition: LvmVg.h:53
A start/length pair with a block size.
Definition: Region.h:71
The master container of the libstorage.
Definition: Devicegraph.h:133
An abstract Block Device.
Definition: BlkDevice.h:40
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:73
Base class for storage exceptions.
Definition: Exception.h:113
The storage namespace.
Definition: Actiongraph.h:36
Definition: Devicegraph.h:46