Skip to content
Browse files

[lvmls] print space used by logical volume on pv on which provided LE…

… resides
  • Loading branch information...
1 parent 597d4a2 commit 6e45e66f7fdcaa48b9b9f8406ca0d4a6024c32bd @tomato42 committed Aug 2, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 lvmls.c
View
12 lvmls.c
@@ -528,7 +528,17 @@ int main(int argc, char **argv)
long int free_extents = get_free_extent_number(argv[1], pv_info->pv_name);
printf("vg: %s, pv: %s, free space: %lue (%luB)\n", argv[1],
pv_info->pv_name,
- free_extents, free_extents * get_pe_size(argv[1]));
+ free_extents,
+ free_extents * get_pe_size(argv[1]));
+
+ long int used_extents = get_used_space_on_pv(argv[1], argv[2],
+ pv_info->pv_name);
+ printf("Space used by lv %s on pv %s: %lue (%luB)\n",
+ argv[2],
+ pv_info->pv_name,
+ used_extents,
+ used_extents * get_pe_size(argv[1]));
+
pv_info_free(pv_info);

0 comments on commit 6e45e66

Please sign in to comment.
Something went wrong with that request. Please try again.