1Rex::Commands::LVM(3) User Contributed Perl DocumentationRex::Commands::LVM(3)
2
3
4
6 Rex::Commands::LVM - Get LVM Information
7
9 With this module you can get information of your lvm setup.
10
11 Version <= 1.0: All these functions will not be reported.
12
13 All these functions are not idempotent.
14
16 use Rex::Commands::LVM;
17
18 my @physical_devices = pvs;
19 my @volume_groups = vgs;
20 my @logical_volumes = lvs;
21
23 pvs
24 Get Information for all your physical volumes.
25
26 use Data::Dumper;
27 use Rex::Commands::LVM;
28
29 task "lvm", sub {
30 my @physical_volumes = pvs;
31
32 for my $physical_volume (@physical_volumes) {
33 say Dumper($physical_volume);
34 }
35 };
36
37 vgs
38 Get Information for all your volume groups.
39
40 use Data::Dumper;
41 use Rex::Commands::LVM;
42
43 task "lvm", sub {
44 my @volume_groups = vgs;
45
46 for my $volume_group (@volume_groups) {
47 say Dumper($volume_group);
48 }
49 };
50
51 lvs
52 Get Information for all your logical volumes.
53
54 use Data::Dumper;
55 use Rex::Commands::LVM;
56
57 task "lvm", sub {
58 my @logical_volumes = lvs;
59
60 for my $logical_volume (@logical_volumes) {
61 say Dumper($logical_volume);
62 }
63 };
64
65
66
67perl v5.34.0 2022-01-19 Rex::Commands::LVM(3)