diff options
Diffstat (limited to 'perl/examples/lvs.pl')
-rwxr-xr-x | perl/examples/lvs.pl | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/perl/examples/lvs.pl b/perl/examples/lvs.pl deleted file mode 100755 index 1755c899..00000000 --- a/perl/examples/lvs.pl +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl -w - -use strict; - -use Sys::Guestfs; - -# Look for LVM LVs, VGs and PVs in a guest image. - -die "Usage: lvs.pl guest.img\n" if @ARGV != 1 || ! -f $ARGV[0]; - -print "Creating the libguestfs handle\n"; -my $h = Sys::Guestfs->new (); -$h->add_drive_opts ($ARGV[0], format => "raw"); - -print "Launching, this can take a few seconds\n"; -$h->launch (); - -print "Looking for PVs on the disk image\n"; -my @pvs = $h->pvs (); -print "PVs found: (", join (", ", @pvs), ")\n"; - -print "Looking for VGs on the disk image\n"; -my @vgs = $h->vgs (); -print "VGs found: (", join (", ", @vgs), ")\n"; - -print "Looking for LVs on the disk image\n"; -my @lvs = $h->lvs (); -print "LVs found: (", join (", ", @lvs), ")\n"; |