uint64_t vg_extent_count(const struct volume_group *vg);
uint64_t vg_free_count(const struct volume_group *vg);
uint64_t vg_pv_count(const struct volume_group *vg);
+uint64_t vg_max_pv(const struct volume_group *vg);
+uint64_t vg_max_lv(const struct volume_group *vg);
int vg_check_write_mode(struct volume_group *vg);
#define vg_is_clustered(vg) (vg_status((vg)) & CLUSTERED)
return (uint64_t) vg->pv_count;
}
+uint64_t vg_max_pv(const struct volume_group *vg)
+{
+ return (uint64_t) vg->max_pv;
+}
+
+uint64_t vg_max_lv(const struct volume_group *vg)
+{
+ return (uint64_t) vg->max_lv;
+}
+
uint64_t lv_size(const struct logical_volume *lv)
{
return lv->size;
*/
uint64_t lvm_vg_get_pv_count(const vg_t vg);
+/**
+ * Get the maximum number of physical volumes allowed in a volume group.
+ *
+ * \param vg
+ * VG handle obtained from lvm_vg_create or lvm_vg_open.
+ *
+ * \return
+ * Maximum number of physical volumes allowed in a volume group.
+ */
+uint64_t lvm_vg_get_max_pv(const vg_t vg);
+
+/**
+ * Get the maximum number of logical volumes allowed in a volume group.
+ *
+ * \param vg
+ * VG handle obtained from lvm_vg_create or lvm_vg_open.
+ *
+ * \return
+ * Maximum number of logical volumes allowed in a volume group.
+ */
+uint64_t lvm_vg_get_max_lv(const vg_t vg);
+
/************************** logical volume handling *************************/
/**
return vg_pv_count(vg);
}
+uint64_t lvm_vg_get_max_pv(const vg_t vg)
+{
+ return vg_max_pv(vg);
+}
+
+uint64_t lvm_vg_get_max_lv(const vg_t vg)
+{
+ return vg_max_lv(vg);
+}
+
char *lvm_vg_get_uuid(const vg_t vg)
{
char uuid[64] __attribute((aligned(8)));