diff options
author | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:53 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-05-18 20:22:53 +0100 |
commit | ca49c50e06834bbc68e21630a5552c57494f2b53 (patch) | |
tree | 0d1c98fd038abf05d7491f044c8affbfb461ce00 /perl | |
parent | 0695593702b8612b500ff0b3bf800e5934f9b56e (diff) | |
download | libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.gz libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.tar.xz libguestfs-ca49c50e06834bbc68e21630a5552c57494f2b53.zip |
Generated code for lvresize, resize2fs.
Diffstat (limited to 'perl')
-rw-r--r-- | perl/Guestfs.xs | 23 | ||||
-rw-r--r-- | perl/lib/Sys/Guestfs.pm | 11 |
2 files changed, 34 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index 374a40d1..5a6cf364 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -1894,3 +1894,26 @@ PREINIT: if (r == -1) croak ("vg_activate: %s", guestfs_last_error (g)); +void +lvresize (g, device, mbytes) + guestfs_h *g; + char *device; + int mbytes; +PREINIT: + int r; + PPCODE: + r = guestfs_lvresize (g, device, mbytes); + if (r == -1) + croak ("lvresize: %s", guestfs_last_error (g)); + +void +resize2fs (g, device) + guestfs_h *g; + char *device; +PREINIT: + int r; + PPCODE: + r = guestfs_resize2fs (g, device); + if (r == -1) + croak ("resize2fs: %s", guestfs_last_error (g)); + diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 0e4dde4d..62f3e7b0 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -740,6 +740,12 @@ the path to the LV, such as C</dev/VG/LV>. You can also remove all LVs in a volume group by specifying the VG name, C</dev/VG>. +=item $h->lvresize ($device, $mbytes); + +This resizes (expands or shrinks) an existing LVM logical +volume to C<mbytes>. When reducing, data in the reduced part +is lost. + =item @logvols = $h->lvs (); List all the logical volumes detected. This is the equivalent @@ -872,6 +878,11 @@ Note that this function cannot correctly handle binary files as end of line). For those you need to use the C<$h-E<gt>read_file> function which has a more complex interface. +=item $h->resize2fs ($device); + +This resizes an ext2 or ext3 filesystem to match the size of +the underlying device. + =item $h->rm ($path); Remove the single file C<path>. |