diff -Nurb liblinux-lvm-perl-0.13/Changes liblinux-lvm-perl-0.14/ChangeLog/Changes --- liblinux-lvm-perl-0.13/Changes 2003-04-10 18:18:39.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/Changes 1970-01-01 05:30:00.000000000 +0530 @@ -1,20 +0,0 @@ -Revision history for Perl extension Linux::LVM. - -0.01 Thu Apr 3 08:21:41 2003 - - original version; created by h2xs 1.22 with options - -X -n Linux::LVM - -0.11 Fri Apr 4 09:00:00 2003 - - First ready for prime time release. - -0.12 Mon Apr 7 07:45:00 2003 - - Added get_pv_info to fetch physical volume information by physical volume name. - - Added get_lv_info to fetch logical volume information by logical volume name. - - Made the get_vg_information routine public. - - Added some basic error checking. - -0.13 Mon Apr 10 07:45:00 2003 - - Reworked some of the regule expressions. - - Improved the source documentation. - - Added some examples of how to use the module. - diff -Nurb liblinux-lvm-perl-0.13/debian/changelog liblinux-lvm-perl-0.14/ChangeLog/debian/changelog --- liblinux-lvm-perl-0.13/debian/changelog 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/changelog 1970-01-01 05:30:00.000000000 +0530 @@ -1,16 +0,0 @@ -liblinux-lvm-perl (0.13-2) unstable; urgency=low - - * Added myself as an uploader - * Bumped up standards-version to 3.7.3 (no changes needed) - * Patched to accept (and ignore) leading whitespace from the external - command output (Closes: #460604) - * Added the pkg-perl group as the maintainer; Jeremiah joins me as an - uploader. - - -- Gunnar Wolf Mon, 26 May 2008 12:18:54 -0500 - -liblinux-lvm-perl (0.13-1) unstable; urgency=low - - * Initial Release. (closes: #447302). - - -- Jeremiah C. Foster Mon, 29 Oct 2007 16:44:36 +0100 diff -Nurb liblinux-lvm-perl-0.13/debian/compat liblinux-lvm-perl-0.14/ChangeLog/debian/compat --- liblinux-lvm-perl-0.13/debian/compat 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/compat 1970-01-01 05:30:00.000000000 +0530 @@ -1 +0,0 @@ -5 diff -Nurb liblinux-lvm-perl-0.13/debian/control liblinux-lvm-perl-0.14/ChangeLog/debian/control --- liblinux-lvm-perl-0.13/debian/control 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/control 1970-01-01 05:30:00.000000000 +0530 @@ -1,17 +0,0 @@ -Source: liblinux-lvm-perl -Section: perl -Priority: optional -Build-Depends: debhelper (>= 5.0.0), quilt -Build-Depends-Indep: perl (>= 5.8.8-11.1) -Maintainer: Debian Perl Group -Uploaders: Jeremiah C. Foster , Gunnar Wolf -Standards-Version: 3.7.3 -Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/liblinux-lvm-perl/ -Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/liblinux-lvm-perl/ -Homepage: http://search.cpan.org/dist/Linux::LVM/ - -Package: liblinux-lvm-perl -Architecture: all -Depends: ${perl:Depends} -Description: Perl extension for accessing Logical Volume Manager(LVM) - data structures on Linux. diff -Nurb liblinux-lvm-perl-0.13/debian/copyright liblinux-lvm-perl-0.14/ChangeLog/debian/copyright --- liblinux-lvm-perl-0.13/debian/copyright 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/copyright 1970-01-01 05:30:00.000000000 +0530 @@ -1,22 +0,0 @@ -This is the debian package for the Linux::LVM module. -It was created by Jeremiah C. Foster -using dh-make-perl. - -It was downloaded from http://search.cpan.org/dist/Linux-LVM/ - -The upstream author is: Chad Kerner, . - -Copyright (c) 2003 Chad Kerner - -This module is free software. It may be used, redistributed -and/or modified under the same terms as Perl itself. - -Perl is distributed under your choice of the GNU General Public License -or the Artistic License. On Debian GNU/Linux systems, the complete text -of the GNU General Public License can be found in -`/usr/share/common-licenses/GPL' and the Artistic Licence in -`/usr/share/common-licenses/Artistic'. - -The Debian packaging is (C) 2007, Jeremiah C. Foster - and is licensed under the same -terms as the software itself (see above). diff -Nurb liblinux-lvm-perl-0.13/debian/patches/process_whitespace_in_command_output liblinux-lvm-perl-0.14/ChangeLog/debian/patches/process_whitespace_in_command_output --- liblinux-lvm-perl-0.13/debian/patches/process_whitespace_in_command_output 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/patches/process_whitespace_in_command_output 1970-01-01 05:30:00.000000000 +0530 @@ -1,360 +0,0 @@ -Index: liblinux-lvm-perl/LVM.pm -=================================================================== ---- liblinux-lvm-perl.orig/LVM.pm 2008-05-26 11:52:05.000000000 -0500 -+++ liblinux-lvm-perl/LVM.pm 2008-05-26 11:53:06.000000000 -0500 -@@ -157,169 +157,169 @@ - VGINF: foreach(@vginfo) { - - # Parse the volume group name. -- if( m/^VG Name\s+(\S+)/ ) { -+ if( m/^\s*VG Name\s+(\S+)/ ) { - $vgn = $1; $vghash{$vgn}->{vgname} = $1; - next VGINF; } - - # Parse the volume group access. -- elsif( m/^VG Access\s+(\S+)/ ) { -+ elsif( m/^\s*VG Access\s+(\S+)/ ) { - $vghash{$vgn}->{access} = $1; - next VGINF; } - - # Parse the volume group status. -- elsif( m/^VG Status\s+(.+)/ ) { -+ elsif( m/^\s*VG Status\s+(.+)/ ) { - $vghash{$vgn}->{status} = $1; - next VGINF; } - - # Parse the volume group number. -- elsif( m/^VG #\s+(\S+)/ ) { -+ elsif( m/^\s*VG #\s+(\S+)/ ) { - $vghash{$vgn}->{vg_number} = $1; - next VGINF; } - - # Parse the maximum logical volume size and size unit for the volume group. -- elsif( m/^MAX LV Size\s+(\S+) (\S+)/ ) { -+ elsif( m/^\s*MAX LV Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{max_lv_size} = $1; - $vghash{$vgn}->{max_lv_size_unit} = $2; - next VGINF; } - - # Parse the maximum number of logical volumes for the volume group. -- elsif( m/^MAX LV\s+(\S+)/ ) { -+ elsif( m/^\s*MAX LV\s+(\S+)/ ) { - $vghash{$vgn}->{max_lv} = $1; - next VGINF; } - - # Parse the current number of logical volumes for the volume group. -- elsif( m/^Cur LV\s+(\S+)/ ) { -+ elsif( m/^\s*Cur LV\s+(\S+)/ ) { - $vghash{$vgn}->{cur_lv} = $1; - next VGINF; } - - # Parse the number of open logical volumes for the volume group. -- elsif( m/^Open LV\s+(\S+)/ ) { -+ elsif( m/^\s*Open LV\s+(\S+)/ ) { - $vghash{$vgn}->{open_lv} = $1; - next VGINF; } - - # Parse the number of physical volumes accessible to the volume group. -- elsif( m/^Max PV\s+(\S+)/ ) { -+ elsif( m/^\s*Max PV\s+(\S+)/ ) { - $vghash{$vgn}->{max_pv} = $1; - next VGINF; } - - # Parse the current number of physical volumes in the volume group. -- elsif( m/^Cur PV\s+(\S+)/ ) { -+ elsif( m/^\s*Cur PV\s+(\S+)/ ) { - $vghash{$vgn}->{cur_pv} = $1; - next VGINF; } - - # Parse the number of active physical volumes in the volume group. -- elsif( m/^Act PV\s+(\S+)/ ) { -+ elsif( m/^\s*Act PV\s+(\S+)/ ) { - $vghash{$vgn}->{act_pv} = $1; - next VGINF; } - - # Parse the size of the volume group. -- elsif( m/^VG Size\s+(\S+) (\S+)/ ) { -+ elsif( m/^\s*VG Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{vg_size} = $1; - $vghash{$vgn}->{vg_size_unit} = $2; - next VGINF; } - - # Parse the physical extent size and unit for one extent of volume group. -- elsif( m/^PE Size\s+(\S+) (\S+)/ ) { -+ elsif( m/^\s*PE Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{pe_size} = $1; - $vghash{$vgn}->{pe_size_unit} = $2; - next VGINF; } - - # Parse the total number and number of free physical extents from the physical disk. -- elsif( m/^Total PE \/ Free PE\s+(\S+) \/ (\S+)/m ) { -+ elsif( m/^\s*Total PE \/ Free PE\s+(\S+) \/ (\S+)/m ) { - $vghash{$vgn}->{pvols}->{$pvn}->{total_pe} = $1; - $vghash{$vgn}->{pvols}->{$pvn}->{free_pe} = $2; - next VGINF; } - - # Parse the total number of physical extents from the volume group. -- elsif( m/^Total PE\s+(\S+)/ ) { -+ elsif( m/^\s*Total PE\s+(\S+)/ ) { - $vghash{$vgn}->{total_pe} = $1; - next VGINF; } - - # Parse the number of allocated physical extents from the volume group. -- elsif( m/^Alloc PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { -+ elsif( m/^\s*Alloc PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { - $vghash{$vgn}->{alloc_pe} = $1; - $vghash{$vgn}->{alloc_pe_size} = $2; - $vghash{$vgn}->{alloc_pe_size_unit} = $3; - next VGINF; } - - # Parse the volume group name. -- elsif( m/^Free PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { -+ elsif( m/^\s*Free PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { - $vghash{$vgn}->{free_pe} = $1; - $vghash{$vgn}->{free_pe_size} = $2; - $vghash{$vgn}->{free_pe_size_unit} = $3; - next VGINF; } - - # Parse the volume group uuid. -- elsif( m/^VG UUID\s+(\S+)/ ) { -+ elsif( m/^\s*VG UUID\s+(\S+)/ ) { - $vghash{$vgn}->{uuid} = $1; - next VGINF; } - - # Parse the logical volume name. -- elsif( m/^LV Name\s+(\S+)/ ) { -+ elsif( m/^\s*LV Name\s+(\S+)/ ) { - $lvn = $1; - $vghash{$vgn}->{lvols}->{$lvn}->{name} = $1; - next VGINF; } - - # Parse the logical volume size and unit. -- elsif( m/^LV Size\s+(\S+) (\S+)/ ) { -+ elsif( m/^\s*LV Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{lv_size} = $1; - $vghash{$vgn}->{lvols}->{$lvn}->{lv_size_unit} = $2; - next VGINF; } - - # Parse the logical volume write access. -- elsif( m/^LV Write Access\s+(\S+)/ ) { -+ elsif( m/^\s*LV Write Access\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{write_access} = $1; - next VGINF; } - - # Parse the logical volume status. -- elsif( m/^LV Status\s+(.+)/ ) { -+ elsif( m/^\s*LV Status\s+(.+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{status} = $1; - next VGINF; } - - # Parse the number of logical extents in the logical volume. -- elsif( m/^Current LE\s+(\S+)/ ) { -+ elsif( m/^\s*Current LE\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{cur_le} = $1; - next VGINF; } - - # Parse the number of allocated logical extents in the logical volume. -- elsif( m/^Allocated LE\s+(\S+)/ ) { -+ elsif( m/^\s*Allocated LE\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{alloc_le} = $1; - next VGINF; } - - # Parse the allocation type for the logical volume. -- elsif( m/^Allocation\s+(.+)/ ) { -+ elsif( m/^\s*Allocation\s+(.+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{allocation} = $1; - next VGINF; } - - # Parse the volume number. -- elsif( m/^LV #\s+(\S+)/ ) { -+ elsif( m/^\s*LV #\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{lv_number} = $1; - next VGINF; } - - # Parse the number of times the logical volume is open. -- elsif( m/^# open\s+(\S+)/ ) { -+ elsif( m/^\s*# open\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{open_lv} = $1; - next VGINF; } - - # Parse the block device of the logical volume. -- elsif( m/^Block device\s+(\S+)/ ) { -+ elsif( m/^\s*Block device\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{device} = $1; - next VGINF; } - - # Parse the value for the read ahead sectors of the logical volume. -- elsif( m/^Read ahead sectors\s+(\S+)/ ) { -+ elsif( m/^\s*Read ahead sectors\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{read_ahead} = $1; - next VGINF; } - - # Parse the physical disk name. -- elsif( m/^PV Name \(\#\)\s+(\S+) \((\S)\)/ ) { -+ elsif( m/^\s*PV Name \(\#\)\s+(\S+) \((\S)\)/ ) { - $pvn = $2; - $vghash{$vgn}->{pvols}->{$pvn}->{device} = $1; - $vghash{$vgn}->{pvols}->{$pvn}->{pv_number} = $2; - next VGINF; } - - # Parse the status of the physical disk. -- elsif( m/^PV Status\s+(.+)/ ) { -+ elsif( m/^\s*PV Status\s+(.+)/ ) { - $vghash{$vgn}->{pvols}->{$pvn}->{status} = $1; - next VGINF; } - } -@@ -347,17 +347,17 @@ - - PVINF: foreach(@pvinfo) { - # Get the name of the physical volume. -- if( m/^PV Name\s+(\S+)/ ) { -+ if( m/^\s*PV Name\s+(\S+)/ ) { - $pvhash{pv_name} = $1; - next PVINF; } - - # Get the name of the volume group the physical volume belongs to. -- if( m/^VG Name\s+(\S+)/ ) { -+ if( m/^\s*VG Name\s+(\S+)/ ) { - $pvhash{vg_name} = $1; - next PVINF; } - - # Get the size information of the physical volume. -- if( m/^PV Size\s+(\S+) (\S+) \[(\S+) secs\] \/ (.+)/ ) { -+ if( m/^\s*PV Size\s+(\S+) (\S+) \[(\S+) secs\] \/ (.+)/ ) { - $pvhash{size} = $1; - $pvhash{size_unit} = $2; - $pvhash{sectors} = $3; -@@ -365,48 +365,48 @@ - next PVINF; } - - # Get the physical volume number. -- if( m/^PV\#\s+(\S+)/ ) { -+ if( m/^\s*PV\#\s+(\S+)/ ) { - $pvhash{pv_number} = $1; - next PVINF; } - - # Get the status of the physical volume. -- if( m/^PV Status\s+(.+)/ ) { -+ if( m/^\s*PV Status\s+(.+)/ ) { - $pvhash{status} = $1; - next PVINF; } - - # Get the allocation status of the physical volume. -- if( m/^Allocatable\s+(.+)/ ) { -+ if( m/^\s*Allocatable\s+(.+)/ ) { - $pvhash{allocatable} = $1; - next PVINF; } - - # Get the number of logical volumes on the physical volume. -- if( m/^Cur LV\s+(\S+)/ ) { -+ if( m/^\s*Cur LV\s+(\S+)/ ) { - $pvhash{num_lvols} = $1; - next PVINF; } - - # Get the physical extent size and unit of the physical volume. -- if( m/^PE Size \((\S+)\)\s+(\S+)/ ) { -+ if( m/^\s*PE Size \((\S+)\)\s+(\S+)/ ) { - $pvhash{pe_size} = $2; - $pvhash{pe_size_unit} = $1; - next PVINF; } - - # Get the total numver of physical extents on the physical volume. -- if( m/^Total PE\s+(\S+)/ ) { -+ if( m/^\s*Total PE\s+(\S+)/ ) { - $pvhash{total_pe} = $1; - next PVINF; } - - # Get the number of free extents on the physical volume. -- if( m/^Free PE\s+(\S+)/ ) { -+ if( m/^\s*Free PE\s+(\S+)/ ) { - $pvhash{free_pe} = $1; - next PVINF; } - - # Get the number of allocated physical extents on the physical volume. -- if( m/^Allocated PE\s+(\S+)/ ) { -+ if( m/^\s*Allocated PE\s+(\S+)/ ) { - $pvhash{alloc_pe} = $1; - next PVINF; } - - # Get the UUID of the physical volume. -- if( m/^PV UUID\s+(\S+)/ ) { -+ if( m/^\s*PV UUID\s+(\S+)/ ) { - $pvhash{uuid} = $1; - next PVINF; } - } -@@ -434,63 +434,63 @@ - LVINF: foreach(@lvinfo) { - - # Get the logical volume name. -- if( m/^LV Name\s+(\S+)/ ) { -+ if( m/^\s*LV Name\s+(\S+)/ ) { - $lvhash{lv_name} = $1; - next LVINF; } - - # Get the volume group name. -- if( m/^VG Name\s+(\S+)/ ) { -+ if( m/^\s*VG Name\s+(\S+)/ ) { - $lvhash{vg_name} = $1; - next LVINF; } - - # Get the logical volume write status. -- if( m/^LV Write Access\s+(.+)/ ) { -+ if( m/^\s*LV Write Access\s+(.+)/ ) { - $lvhash{access} = $1; - next LVINF; } - - # Get the logical volume status. -- if( m/^LV Status\s+(.+)/ ) { -+ if( m/^\s*LV Status\s+(.+)/ ) { - $lvhash{status} = $1; - next LVINF; } - - # Get the logical volume number. -- if( m/^LV \#\s+(\S+)/ ) { -+ if( m/^\s*LV \#\s+(\S+)/ ) { - $lvhash{lv_number} = $1; - next LVINF; } - - # Get the number of opens for the logical volume. -- if( m/^\# open\s+(\S+)/ ) { -+ if( m/^\s*\# open\s+(\S+)/ ) { - $lvhash{lv_open} = $1; - next LVINF; } - - # Get the logical volume size and size unit. -- if( m/^LV Size\s+(\S+) (\S+)/ ) { -+ if( m/^\s*LV Size\s+(\S+) (\S+)/ ) { - $lvhash{size} = $1; - $lvhash{size_unit} = $2; - next LVINF; } - - # Get the number of extents assigned to the logical volume. -- if( m/^Current LE\s+(\S+)/ ) { -+ if( m/^\s*Current LE\s+(\S+)/ ) { - $lvhash{current_le} = $1; - next LVINF; } - - # Get the number of extents allocated to the logical volume. -- if( m/^Allocated LE\s+(\S+)/ ) { -+ if( m/^\s*Allocated LE\s+(\S+)/ ) { - $lvhash{alloc_le} = $1; - next LVINF; } - - # Get the extent allocation type of the logical volume. -- if( m/^Allocation\s+(.+)/ ) { -+ if( m/^\s*Allocation\s+(.+)/ ) { - $lvhash{allocation} = $1; - next LVINF; } - - # Get the number of read ahead sectors for the logical volume. -- if( m/^Read ahead sectors\s+(\S+)/ ) { -+ if( m/^\s*Read ahead sectors\s+(\S+)/ ) { - $lvhash{read_ahead} = $1; - next LVINF; } - - # Get the block device of the logical volume. -- if( m/^Block device\s+(\S+)/ ) { -+ if( m/^\s*Block device\s+(\S+)/ ) { - $lvhash{block_device} = $1; - next LVINF; } - } diff -Nurb liblinux-lvm-perl-0.13/debian/patches/series liblinux-lvm-perl-0.14/ChangeLog/debian/patches/series --- liblinux-lvm-perl-0.13/debian/patches/series 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/patches/series 1970-01-01 05:30:00.000000000 +0530 @@ -1 +0,0 @@ -process_whitespace_in_command_output diff -Nurb liblinux-lvm-perl-0.13/debian/rules liblinux-lvm-perl-0.14/ChangeLog/debian/rules --- liblinux-lvm-perl-0.13/debian/rules 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/rules 1970-01-01 05:30:00.000000000 +0530 @@ -1,84 +0,0 @@ -#!/usr/bin/make -f -# This debian/rules file is provided as a template for normal perl -# packages. It was created by Marc Brockschmidt for -# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may -# be used freely wherever it is useful. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# If set to a true value then MakeMaker's prompt function will -# always return the default without waiting for user input. -export PERL_MM_USE_DEFAULT=1 - -PACKAGE=$(shell dh_listpackages) - -ifndef PERL -PERL = /usr/bin/perl -endif - -TMP =$(CURDIR)/debian/$(PACKAGE) - -include /usr/share/quilt/quilt.make - -build: build-stamp -build-stamp: patch - dh_testdir - - # As this is a architecture independent package, we are not - # supposed to install stuff to /usr/lib. MakeMaker creates - # the dirs, we prevent this by setting the INSTALLVENDORARCH - # and VENDORARCHEXP environment variables. - - # Add commands to compile the package here - $(PERL) Makefile.PL INSTALLDIRS=vendor \ - INSTALLVENDORARCH=/usr/share/perl5/ \ - VENDORARCHEXP=/usr/share/perl5/ - $(MAKE) - $(MAKE) test - - touch $@ - -clean: unpatch - dh_testdir - dh_testroot - - dh_clean build-stamp install-stamp - - # Add commands to clean up after the build process here - [ ! -f Makefile ] || $(MAKE) realclean - -install: build install-stamp -install-stamp: - dh_testdir - dh_testroot - dh_clean -k - - # Add commands to install the package into debian/$PACKAGE_NAME here - $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr - - touch $@ - -binary-arch: -# We have nothing to do here for an architecture-independent package - -binary-indep: build install - dh_testdir - dh_testroot - dh_installexamples examples/* - chmod a-x $(TMP)/usr/share/doc/$(PACKAGE)/examples/* - dh_installdocs README - dh_installchangelogs Changes - dh_perl - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary diff -Nurb liblinux-lvm-perl-0.13/debian/watch liblinux-lvm-perl-0.14/ChangeLog/debian/watch --- liblinux-lvm-perl-0.13/debian/watch 2008-09-07 19:05:54.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/debian/watch 1970-01-01 05:30:00.000000000 +0530 @@ -1,3 +0,0 @@ -# format version number, currently 3; this line is compulsory! -version=3 -http://search.cpan.org/dist/Linux-LVM/ .*/Linux-LVM-([\.\d]+)\.(?:tar\.gz|tar|tgz)$ diff -Nurb liblinux-lvm-perl-0.13/examples/get_lv_info.pl liblinux-lvm-perl-0.14/ChangeLog/examples/get_lv_info.pl --- liblinux-lvm-perl-0.13/examples/get_lv_info.pl 2003-04-10 18:15:53.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/examples/get_lv_info.pl 1970-01-01 05:30:00.000000000 +0530 @@ -1,8 +0,0 @@ - -use Linux::LVM; - -%hash = get_lv_info("/dev/vg00/code"); - -foreach(sort keys %hash) { - print "$_ = $hash{$_} \n"; -} diff -Nurb liblinux-lvm-perl-0.13/examples/get_pv_info.pl liblinux-lvm-perl-0.14/ChangeLog/examples/get_pv_info.pl --- liblinux-lvm-perl-0.13/examples/get_pv_info.pl 2003-04-10 18:17:13.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/examples/get_pv_info.pl 1970-01-01 05:30:00.000000000 +0530 @@ -1,8 +0,0 @@ - -use Linux::LVM; - -%hash = get_pv_info("/dev/hdb"); - -foreach(sort keys %hash) { - print "$_ = $hash{$_} \n"; -} diff -Nurb liblinux-lvm-perl-0.13/examples/prt_vg_info.pl liblinux-lvm-perl-0.14/ChangeLog/examples/prt_vg_info.pl --- liblinux-lvm-perl-0.13/examples/prt_vg_info.pl 2003-04-10 18:33:51.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/examples/prt_vg_info.pl 1970-01-01 05:30:00.000000000 +0530 @@ -1,25 +0,0 @@ - -use Linux::LVM; - -%vg = get_volume_group_information("vg00"); - -print "--- Volume group --- \n"; -printf("%-20s %-s\n","VG Name",$vg{vgname}); -printf("%-20s %-s\n","VG Access",$vg{access}); -printf("%-20s %-s\n","VG Status",$vg{status}); -printf("%-20s %-s\n","VG #",$vg{vg_number}); -printf("%-20s %-s\n","MAX LV",$vg{max_lv}); -printf("%-20s %-s\n","Cur LV",$vg{cur_lv}); -printf("%-20s %-s\n","Open LV",$vg{open_lv}); -printf("%-20s %-s %-s\n","MAX LV Size",$vg{max_lv_size},$vg{max_lv_size_unit}); -printf("%-20s %-s\n","MAX PV",$vg{max_pv}); -printf("%-20s %-s\n","Cur PV",$vg{cur_pv}); -printf("%-20s %-s\n","Act PV",$vg{act_pv}); -printf("%-20s %-s %-s\n","VG Size",$vg{vg_size},$vg{vg_size_unit}); -printf("%-20s %-s %-s\n","PE Size",$vg{pe_size},$vg{pe_size_unit}); -printf("%-20s %-s\n","Total PE",$vg{total_pe}); -printf("%-20s %-s / %-s %-s\n","Alloc PE / Size",$vg{alloc_pe},$vg{alloc_pe_size},$vg{alloc_pe_size_unit}); -printf("%-20s %-s / %-s %-s\n","Free PE / Size",$vg{free_pe},$vg{free_pe_size},$vg{free_pe_size_unit}); -printf("%-20s %-s\n","VG UUID",$vg{uuid}); -print "\n"; - diff -Nurb liblinux-lvm-perl-0.13/LVM.pm liblinux-lvm-perl-0.14/ChangeLog/LVM.pm --- liblinux-lvm-perl-0.13/LVM.pm 2003-04-10 01:25:57.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/LVM.pm 1970-01-01 05:30:00.000000000 +0530 @@ -1,784 +0,0 @@ -package Linux::LVM; - -use 5.006; -use strict; -use warnings; - -require Exporter; -use AutoLoader qw(AUTOLOAD); - -our @ISA = qw(Exporter); - -# Items to export into callers namespace by default. Note: do not export -# names by default without a very good reason. Use EXPORT_OK instead. -# Do not simply export all your public functions/methods/constants. - -# This allows declaration use Linux::LVM ':all'; -# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK -# will save memory. -our %EXPORT_TAGS = ( 'all' => [ qw( get_volume_group_list - get_volume_group_information - get_logical_volume_information - get_physical_volume_information - get_vg_information - get_pv_info - get_lv_info -) ] ); - -our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); - -our @EXPORT = qw( get_volume_group_list - get_volume_group_information - get_logical_volume_information - get_physical_volume_information - get_vg_information - get_pv_info - get_lv_info -); - -our $VERSION = '0.13'; - - -# Preloaded methods go here. - -# Autoload methods go after =cut, and are processed by the autosplit program. - -#-----------------------------------------------------------------------# -# Subroutine: get_volume_group_list # -#-----------------------------------------------------------------------# -# Description: This function will return a sorted list of all of the # -# active volume groups on the system. # -#-----------------------------------------------------------------------# -# Parameters: None # -#-----------------------------------------------------------------------# -# Return Values: On success, a array with the volume group names. # -#-----------------------------------------------------------------------# -sub get_volume_group_list() { - my %vg = get_vg_information(); - return (sort keys(%vg)); -} # End of the get_volume_group_list routine. - - -#-----------------------------------------------------------------------# -# Subroutine: get_volume_group_information # -#-----------------------------------------------------------------------# -# Description: This function will return a hash containing all of the # -# data about the specified volume group. # -#-----------------------------------------------------------------------# -# Parameters: A string containing a volume group name. # -#-----------------------------------------------------------------------# -# Return Values: On success, a hast with the volume group data. # -#-----------------------------------------------------------------------# -sub get_volume_group_information($) { - my $volume_group = $_[0]; - my %vg_info; - my %vg = get_vg_information(); - - foreach(sort keys %{$vg{$volume_group}}) { - if ( $_ eq "pvols" ) { next; } - elsif( $_ eq "lvols" ) { next; } - else { - $vg_info{$_} = $vg{$volume_group}->{$_}; - } - } - return %vg_info; -} # End of the get_volume_group_information routine. - - -#-----------------------------------------------------------------------# -# Subroutine: get_volume_group_information # -#-----------------------------------------------------------------------# -# Description: This function will return a hash containing all of the # -# data about the specified volume group. # -#-----------------------------------------------------------------------# -# Parameters: A string containing a volume group name. # -#-----------------------------------------------------------------------# -# Return Values: On success, a hast with the volume group data. # -#-----------------------------------------------------------------------# -sub get_logical_volume_information($) { - my $volume_group = $_[0]; - my %lv_info; - my $lvname; - my %vg = get_vg_information(); - - foreach $lvname (sort keys %{$vg{$volume_group}->{lvols}}) { - foreach(sort keys %{$vg{$volume_group}->{lvols}->{$lvname}}) { - $lv_info{$lvname}->{$_} = $vg{$volume_group}->{lvols}->{$lvname}->{$_}; - } - } - return %lv_info; -} # End of the get_logical_volume_information routine. - - -#-----------------------------------------------------------------------# -# Subroutine: get_volume_group_information # -#-----------------------------------------------------------------------# -# Description: This function will return a hash containing all of the # -# data about the specified volume group. # -#-----------------------------------------------------------------------# -# Parameters: A string containing a volume group name. # -#-----------------------------------------------------------------------# -# Return Values: On success, a hast with the volume group data. # -#-----------------------------------------------------------------------# -sub get_physical_volume_information($) { - my $volume_group = $_[0]; - my %pv_info; - my $pvname; - my %vg = get_vg_information(); - - foreach $pvname (sort keys %{$vg{$volume_group}->{pvols}}) { - foreach(sort keys %{$vg{$volume_group}->{pvols}->{$pvname}}) { - $pv_info{$pvname}->{$_} = $vg{$volume_group}->{pvols}->{$pvname}->{$_}; - } - } - return %pv_info; -} # End of the get_physical_volume_information routine. - - -#-----------------------------------------------------------------------# -# Subroutine: get_vg_information # -#-----------------------------------------------------------------------# -# Description: This function will return a hash containing all of the # -# volume group information for the system. # -#-----------------------------------------------------------------------# -# Parameters: None # -#-----------------------------------------------------------------------# -# Return Values: On success, a hash with all of the vg information. # -#-----------------------------------------------------------------------# -sub get_vg_information() { - my %vghash; - my $vgn; - my $lvn; - my $pvn; - - if( ! -e "/sbin/vgdisplay" ) { die("LVM utilities not installed in /sbin"); } - my @vginfo = `/sbin/vgdisplay -v`; - - VGINF: foreach(@vginfo) { - - # Parse the volume group name. - if( m/^VG Name\s+(\S+)/ ) { - $vgn = $1; $vghash{$vgn}->{vgname} = $1; - next VGINF; } - - # Parse the volume group access. - elsif( m/^VG Access\s+(\S+)/ ) { - $vghash{$vgn}->{access} = $1; - next VGINF; } - - # Parse the volume group status. - elsif( m/^VG Status\s+(.+)/ ) { - $vghash{$vgn}->{status} = $1; - next VGINF; } - - # Parse the volume group number. - elsif( m/^VG #\s+(\S+)/ ) { - $vghash{$vgn}->{vg_number} = $1; - next VGINF; } - - # Parse the maximum logical volume size and size unit for the volume group. - elsif( m/^MAX LV Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{max_lv_size} = $1; - $vghash{$vgn}->{max_lv_size_unit} = $2; - next VGINF; } - - # Parse the maximum number of logical volumes for the volume group. - elsif( m/^MAX LV\s+(\S+)/ ) { - $vghash{$vgn}->{max_lv} = $1; - next VGINF; } - - # Parse the current number of logical volumes for the volume group. - elsif( m/^Cur LV\s+(\S+)/ ) { - $vghash{$vgn}->{cur_lv} = $1; - next VGINF; } - - # Parse the number of open logical volumes for the volume group. - elsif( m/^Open LV\s+(\S+)/ ) { - $vghash{$vgn}->{open_lv} = $1; - next VGINF; } - - # Parse the number of physical volumes accessible to the volume group. - elsif( m/^Max PV\s+(\S+)/ ) { - $vghash{$vgn}->{max_pv} = $1; - next VGINF; } - - # Parse the current number of physical volumes in the volume group. - elsif( m/^Cur PV\s+(\S+)/ ) { - $vghash{$vgn}->{cur_pv} = $1; - next VGINF; } - - # Parse the number of active physical volumes in the volume group. - elsif( m/^Act PV\s+(\S+)/ ) { - $vghash{$vgn}->{act_pv} = $1; - next VGINF; } - - # Parse the size of the volume group. - elsif( m/^VG Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{vg_size} = $1; - $vghash{$vgn}->{vg_size_unit} = $2; - next VGINF; } - - # Parse the physical extent size and unit for one extent of volume group. - elsif( m/^PE Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{pe_size} = $1; - $vghash{$vgn}->{pe_size_unit} = $2; - next VGINF; } - - # Parse the total number and number of free physical extents from the physical disk. - elsif( m/^Total PE \/ Free PE\s+(\S+) \/ (\S+)/m ) { - $vghash{$vgn}->{pvols}->{$pvn}->{total_pe} = $1; - $vghash{$vgn}->{pvols}->{$pvn}->{free_pe} = $2; - next VGINF; } - - # Parse the total number of physical extents from the volume group. - elsif( m/^Total PE\s+(\S+)/ ) { - $vghash{$vgn}->{total_pe} = $1; - next VGINF; } - - # Parse the number of allocated physical extents from the volume group. - elsif( m/^Alloc PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { - $vghash{$vgn}->{alloc_pe} = $1; - $vghash{$vgn}->{alloc_pe_size} = $2; - $vghash{$vgn}->{alloc_pe_size_unit} = $3; - next VGINF; } - - # Parse the volume group name. - elsif( m/^Free PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) { - $vghash{$vgn}->{free_pe} = $1; - $vghash{$vgn}->{free_pe_size} = $2; - $vghash{$vgn}->{free_pe_size_unit} = $3; - next VGINF; } - - # Parse the volume group uuid. - elsif( m/^VG UUID\s+(\S+)/ ) { - $vghash{$vgn}->{uuid} = $1; - next VGINF; } - - # Parse the logical volume name. - elsif( m/^LV Name\s+(\S+)/ ) { - $lvn = $1; - $vghash{$vgn}->{lvols}->{$lvn}->{name} = $1; - next VGINF; } - - # Parse the logical volume size and unit. - elsif( m/^LV Size\s+(\S+) (\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{lv_size} = $1; - $vghash{$vgn}->{lvols}->{$lvn}->{lv_size_unit} = $2; - next VGINF; } - - # Parse the logical volume write access. - elsif( m/^LV Write Access\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{write_access} = $1; - next VGINF; } - - # Parse the logical volume status. - elsif( m/^LV Status\s+(.+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{status} = $1; - next VGINF; } - - # Parse the number of logical extents in the logical volume. - elsif( m/^Current LE\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{cur_le} = $1; - next VGINF; } - - # Parse the number of allocated logical extents in the logical volume. - elsif( m/^Allocated LE\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{alloc_le} = $1; - next VGINF; } - - # Parse the allocation type for the logical volume. - elsif( m/^Allocation\s+(.+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{allocation} = $1; - next VGINF; } - - # Parse the volume number. - elsif( m/^LV #\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{lv_number} = $1; - next VGINF; } - - # Parse the number of times the logical volume is open. - elsif( m/^# open\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{open_lv} = $1; - next VGINF; } - - # Parse the block device of the logical volume. - elsif( m/^Block device\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{device} = $1; - next VGINF; } - - # Parse the value for the read ahead sectors of the logical volume. - elsif( m/^Read ahead sectors\s+(\S+)/ ) { - $vghash{$vgn}->{lvols}->{$lvn}->{read_ahead} = $1; - next VGINF; } - - # Parse the physical disk name. - elsif( m/^PV Name \(\#\)\s+(\S+) \((\S)\)/ ) { - $pvn = $2; - $vghash{$vgn}->{pvols}->{$pvn}->{device} = $1; - $vghash{$vgn}->{pvols}->{$pvn}->{pv_number} = $2; - next VGINF; } - - # Parse the status of the physical disk. - elsif( m/^PV Status\s+(.+)/ ) { - $vghash{$vgn}->{pvols}->{$pvn}->{status} = $1; - next VGINF; } - } - return %vghash; -} # End of the get_vg_information routine. - - -#-----------------------------------------------------------------------# -# Subroutine: get_pv_info # -#-----------------------------------------------------------------------# -# Description: This function will return a hash containing all of the # -# information about the specified physical volume. # -#-----------------------------------------------------------------------# -# Parameters: None # -#-----------------------------------------------------------------------# -# Return Values: On success, a hash with all of the pv information. # -#-----------------------------------------------------------------------# -sub get_pv_info($) { - my $pvname = $_[0]; - my %pvhash; - - if( ! -e "$pvname" ) { die("Physical Disk: $pvname does not exist."); } - if( ! -e "/sbin/pvdisplay" ) { die("LVM utilities not installed in /sbin"); } - my @pvinfo = `/sbin/pvdisplay $pvname`; - - PVINF: foreach(@pvinfo) { - # Get the name of the physical volume. - if( m/^PV Name\s+(\S+)/ ) { - $pvhash{pv_name} = $1; - next PVINF; } - - # Get the name of the volume group the physical volume belongs to. - if( m/^VG Name\s+(\S+)/ ) { - $pvhash{vg_name} = $1; - next PVINF; } - - # Get the size information of the physical volume. - if( m/^PV Size\s+(\S+) (\S+) \[(\S+) secs\] \/ (.+)/ ) { - $pvhash{size} = $1; - $pvhash{size_unit} = $2; - $pvhash{sectors} = $3; - $pvhash{size_info} = $4; - next PVINF; } - - # Get the physical volume number. - if( m/^PV\#\s+(\S+)/ ) { - $pvhash{pv_number} = $1; - next PVINF; } - - # Get the status of the physical volume. - if( m/^PV Status\s+(.+)/ ) { - $pvhash{status} = $1; - next PVINF; } - - # Get the allocation status of the physical volume. - if( m/^Allocatable\s+(.+)/ ) { - $pvhash{allocatable} = $1; - next PVINF; } - - # Get the number of logical volumes on the physical volume. - if( m/^Cur LV\s+(\S+)/ ) { - $pvhash{num_lvols} = $1; - next PVINF; } - - # Get the physical extent size and unit of the physical volume. - if( m/^PE Size \((\S+)\)\s+(\S+)/ ) { - $pvhash{pe_size} = $2; - $pvhash{pe_size_unit} = $1; - next PVINF; } - - # Get the total numver of physical extents on the physical volume. - if( m/^Total PE\s+(\S+)/ ) { - $pvhash{total_pe} = $1; - next PVINF; } - - # Get the number of free extents on the physical volume. - if( m/^Free PE\s+(\S+)/ ) { - $pvhash{free_pe} = $1; - next PVINF; } - - # Get the number of allocated physical extents on the physical volume. - if( m/^Allocated PE\s+(\S+)/ ) { - $pvhash{alloc_pe} = $1; - next PVINF; } - - # Get the UUID of the physical volume. - if( m/^PV UUID\s+(\S+)/ ) { - $pvhash{uuid} = $1; - next PVINF; } - } - return %pvhash; -} # End of the get_pv_info routine. - - -#-----------------------------------------------------------------------# -# Subroutine: get_lv_info # -#-----------------------------------------------------------------------# -# Description: This function will return a hash containing all of the # -# information about the specified logical volume. # -#-----------------------------------------------------------------------# -# Parameters: None # -#-----------------------------------------------------------------------# -# Return Values: On success, a hash with all of the lv information. # -#-----------------------------------------------------------------------# -sub get_lv_info($) { - my $lvname = $_[0]; - my %lvhash; - if( ! -e "$lvname" ) { die("Logical Disk: $lvname does not exist."); } - if( ! -e "/sbin/lvdisplay" ) { die("LVM utilities not installed in /sbin"); } - my @lvinfo = `/sbin/lvdisplay $lvname`; - - LVINF: foreach(@lvinfo) { - - # Get the logical volume name. - if( m/^LV Name\s+(\S+)/ ) { - $lvhash{lv_name} = $1; - next LVINF; } - - # Get the volume group name. - if( m/^VG Name\s+(\S+)/ ) { - $lvhash{vg_name} = $1; - next LVINF; } - - # Get the logical volume write status. - if( m/^LV Write Access\s+(.+)/ ) { - $lvhash{access} = $1; - next LVINF; } - - # Get the logical volume status. - if( m/^LV Status\s+(.+)/ ) { - $lvhash{status} = $1; - next LVINF; } - - # Get the logical volume number. - if( m/^LV \#\s+(\S+)/ ) { - $lvhash{lv_number} = $1; - next LVINF; } - - # Get the number of opens for the logical volume. - if( m/^\# open\s+(\S+)/ ) { - $lvhash{lv_open} = $1; - next LVINF; } - - # Get the logical volume size and size unit. - if( m/^LV Size\s+(\S+) (\S+)/ ) { - $lvhash{size} = $1; - $lvhash{size_unit} = $2; - next LVINF; } - - # Get the number of extents assigned to the logical volume. - if( m/^Current LE\s+(\S+)/ ) { - $lvhash{current_le} = $1; - next LVINF; } - - # Get the number of extents allocated to the logical volume. - if( m/^Allocated LE\s+(\S+)/ ) { - $lvhash{alloc_le} = $1; - next LVINF; } - - # Get the extent allocation type of the logical volume. - if( m/^Allocation\s+(.+)/ ) { - $lvhash{allocation} = $1; - next LVINF; } - - # Get the number of read ahead sectors for the logical volume. - if( m/^Read ahead sectors\s+(\S+)/ ) { - $lvhash{read_ahead} = $1; - next LVINF; } - - # Get the block device of the logical volume. - if( m/^Block device\s+(\S+)/ ) { - $lvhash{block_device} = $1; - next LVINF; } - } - return %lvhash; -} # End of the get_lv_info routine. - - -1; -__END__ -# Below is stub documentation for your module. You'd better edit it! - -=head1 NAME - -Linux::LVM - Perl extension for accessing Logical Volume Manager(LVM) - data structures on Linux. - -=head1 SYNOPSIS - - use Linux::LVM; - - -=head1 ABSTRACT - - The live data used in the examples is included in the DESCRIPTION area - for your convenience and reference. - -=head1 DESCRIPTION - - get_volume_group_list() This routine will return an array that - contains the names of the volume groups. - - @vgs = get_volume_group_list(); print "@vgs \n"; - Would yield the following: vg00 - - - get_volume_group_information($) This routine will return all of - the volume group information about - the specified volume group. - - %vg = get_volume_group_information("vg00"); - foreach(sort keys %vg) { - print "$_ = $vg{$_}\n"; - } - Would yield the following: - access = read/write - act_pv = 2 - alloc_pe = 3840 - alloc_pe_size = 15 - alloc_pe_size_unit = GB - cur_lv = 3 - cur_pv = 2 - free_pe = 864 - free_pe_size = 3.38 - free_pe_size_unit = GB - max_lv = 256 - max_lv_size = 255.99 - max_lv_size_unit = GB - max_pv = 256 - open_lv = 0 - pe_size = 4 - pe_size_unit = MB - status = available/resizable - total_pe = 4704 - uuid = BBq8si-NyRR-9ZNW-3J5e-DoRO-RBHK-ckrszi - vg_number = 0 - vg_size = 18.38 - vg_size_unit = GB - vgname = vg00 - - - get_logical_volume_information($) This routine will return all of the - logical volume information associated - with the specified volume group. - - %lv = get_logical_volume_information("vg00"); - foreach $lvname (sort keys %lv) { - foreach(sort keys %{$lv{$lvname}}) { - print "$_ = $lv{$lvname}->{$_}\n"; - } - print "\n"; - } - Would yield the following results: - alloc_le = 1024 - allocation = next free - cur_le = 1024 - device = 58:0 - lv_number = 1 - lv_size = 4 - lv_size_unit = GB - name = /dev/vg00/lvol1 - open_lv = 0 - read_ahead = 1024 - status = available - write_access = read/write - - alloc_le = 1280 - allocation = next free - cur_le = 1280 - device = 58:1 - lv_number = 2 - lv_size = 5 - lv_size_unit = GB - name = /dev/vg00/lvol2 - open_lv = 0 - read_ahead = 1024 - status = available - write_access = read/write - - alloc_le = 1536 - allocation = next free - cur_le = 1536 - device = 58:2 - lv_number = 3 - lv_size = 6 - lv_size_unit = GB - name = /dev/vg00/lvol3 - open_lv = 0 - read_ahead = 1024 - status = available - write_access = read/write - - - get_physical_volume_information($) This routine will return all of the information - information about the physical volumes assigned - to the specified volume group. - - %pv = get_physical_volume_information("vg00"); - foreach $pvname (sort keys %pv) { - foreach(sort keys %{$pv{$pvname}}) { - print "$_ = $pv{$pvname}->{$_}\n"; - } - print "\n"; - } - Would yield the following results: - device = /dev/hda3 - free_pe = 0 - pv_number = 1 - status = available / allocatable - total_pe = 2160 - - device = /dev/hda4 - free_pe = 864 - pv_number = 2 - status = available / allocatable - total_pe = 2544 - - - get_lv_info($) This routine will return all of the information about the - specified logical volume. The information will be returned - in a hash. - - get_lv_info - %lv = get_lv_info("/dev/vg00/lvol1"); - foreach (sort keys %lv) { - print "$_ = $lv{$_} \n"; - } - Would yield the following results: - access = read/write - alloc_le = 1024 - allocation = next free - block_device = 58:0 - current_le = 1024 - lv_name = /dev/vg00/lvol1 - lv_number = 1 - lv_open = 0 - read_ahead = 1024 - size = 4 - size_unit = GB - status = available - vg_name = vg00 - - - - get_pv_info($) This routine will return all of the information about the - specified physical volume. The information will be returned - in a hash. - - %pv = get_pv_info("/dev/hda3"); - foreach (sort keys %pv) { - print "$_ = $pv{$_} \n"; - } - Would yield the following results: - alloc_pe = 2160 - allocatable = yes (but full) - free_pe = 0 - num_lvols = 2 - pe_size = 4096 - pe_size_unit = KByte - pv_name = /dev/hda3 - pv_number = 1 - sectors = 17703630 - size = 8.44 - size_info = NOT usable 4.19 MB [LVM: 136 KB] - size_unit = GB - status = available - total_pe = 2160 - uuid = 2c5ADu-oEdt-ovCe-rqp0-MWpF-I5u1-8XigH4 - vg_name = vg00 - - - - Command Output Used In The Above Examples: /sbin/vgdisplay -v - --- Volume group --- - VG Name vg00 - VG Access read/write - VG Status available/resizable - VG # 0 - MAX LV 256 - Cur LV 3 - Open LV 0 - MAX LV Size 255.99 GB - Max PV 256 - Cur PV 2 - Act PV 2 - VG Size 18.38 GB - PE Size 4 MB - Total PE 4704 - Alloc PE / Size 3840 / 15 GB - Free PE / Size 864 / 3.38 GB - VG UUID BBq8si-NyRR-9ZNW-3J5e-DoRO-RBHK-ckrszi - - --- Logical volume --- - LV Name /dev/vg00/lvol1 - VG Name vg00 - LV Write Access read/write - LV Status available - LV # 1 - # open 0 - LV Size 4 GB - Current LE 1024 - Allocated LE 1024 - Allocation next free - Read ahead sectors 1024 - Block device 58:0 - - --- Logical volume --- - LV Name /dev/vg00/lvol2 - VG Name vg00 - LV Write Access read/write - LV Status available - LV # 2 - # open 0 - LV Size 5 GB - Current LE 1280 - Allocated LE 1280 - Allocation next free - Read ahead sectors 1024 - Block device 58:1 - - --- Logical volume --- - LV Name /dev/vg00/lvol3 - VG Name vg00 - LV Write Access read/write - LV Status available - LV # 3 - # open 0 - LV Size 6 GB - Current LE 1536 - Allocated LE 1536 - Allocation next free - Read ahead sectors 1024 - Block device 58:2 - - --- Physical volumes --- - PV Name (#) /dev/hda3 (1) - PV Status available / allocatable - Total PE / Free PE 2160 / 0 - - PV Name (#) /dev/hda4 (2) - PV Status available / allocatable - Total PE / Free PE 2544 / 864 - - -=head1 SEE ALSO - -L(1M) -L(1M) -L(1M) - -=head1 AUTHOR - -Chad Kerner, Echadkerner@yahoo.comE - -=head1 COPYRIGHT AND LICENSE - -Copyright 2003 by Chad Kerner - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff -Nurb liblinux-lvm-perl-0.13/Makefile.PL liblinux-lvm-perl-0.14/ChangeLog/Makefile.PL --- liblinux-lvm-perl-0.13/Makefile.PL 2003-04-09 16:52:40.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/Makefile.PL 1970-01-01 05:30:00.000000000 +0530 @@ -1,12 +0,0 @@ -use 5.006; -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'Linux::LVM', - 'VERSION_FROM' => 'LVM.pm', # finds $VERSION - 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'LVM.pm', # retrieve abstract from module - AUTHOR => 'Chad Kerner ') : ()), -); diff -Nurb liblinux-lvm-perl-0.13/MANIFEST liblinux-lvm-perl-0.14/ChangeLog/MANIFEST --- liblinux-lvm-perl-0.13/MANIFEST 2003-04-10 18:34:05.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/MANIFEST 1970-01-01 05:30:00.000000000 +0530 @@ -1,9 +0,0 @@ -Changes -LVM.pm -Makefile.PL -MANIFEST -README -t/1.t -examples/get_lv_info.pl -examples/get_pv_info.pl -examples/prt_vg_info.pl diff -Nurb liblinux-lvm-perl-0.13/README liblinux-lvm-perl-0.14/ChangeLog/README --- liblinux-lvm-perl-0.13/README 2003-04-04 18:32:52.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/README 1970-01-01 05:30:00.000000000 +0530 @@ -1,29 +0,0 @@ -Linux/LVM version 0.01 -====================== - -This module was written so that I could create my own disk allocation -reports. I got tired of looking at vgdisplay's and lvdisplay's, so -now I can manipulate the data easily and produce customized reports. - - -INSTALLATION - -To install this module type the following: - - perl Makefile.PL - make - make test - make install - -DEPENDENCIES - -This module has no other dependencies. - - -COPYRIGHT AND LICENCE - -Copyright (C) 2003 Chad Kerner - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - diff -Nurb liblinux-lvm-perl-0.13/t/1.t liblinux-lvm-perl-0.14/ChangeLog/t/1.t --- liblinux-lvm-perl-0.13/t/1.t 2003-04-03 19:51:41.000000000 +0530 +++ liblinux-lvm-perl-0.14/ChangeLog/t/1.t 1970-01-01 05:30:00.000000000 +0530 @@ -1,15 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl 1.t' - -######################### - -# change 'tests => 1' to 'tests => last_test_to_print'; - -use Test::More tests => 1; -BEGIN { use_ok('Linux::LVM') }; - -######################### - -# Insert your test code below, the Test::More module is use()ed here so read -# its man page ( perldoc Test::More ) for help writing this test script. -