From 85ed8cef99c19b4143844991d14e0b848fecc5da Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 18 May 2009 17:16:24 +0100 Subject: Add vg-activate{,-all} commands, and resize recipe. --- perl/Guestfs.xs | 24 ++++++++++++++++++++++++ perl/lib/Sys/Guestfs.pm | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) (limited to 'perl') diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index ff7ca9e1..374a40d1 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -1870,3 +1870,27 @@ PREINIT: OUTPUT: RETVAL +void +vg_activate_all (g, activate) + guestfs_h *g; + int activate; +PREINIT: + int r; + PPCODE: + r = guestfs_vg_activate_all (g, activate); + if (r == -1) + croak ("vg_activate_all: %s", guestfs_last_error (g)); + +void +vg_activate (g, activate, volgroups) + guestfs_h *g; + int activate; + char **volgroups; +PREINIT: + int r; + PPCODE: + r = guestfs_vg_activate (g, activate, volgroups); + free (volgroups); + if (r == -1) + croak ("vg_activate: %s", guestfs_last_error (g)); + diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 0249a412..0e4dde4d 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -1141,6 +1141,29 @@ C can also be a named pipe. See also C<$h-Edownload>. +=item $h->vg_activate ($activate, \@volgroups); + +This command activates or (if C is false) deactivates +all logical volumes in the listed volume groups C. +If activated, then they are made known to the +kernel, ie. they appear as C devices. If deactivated, +then those devices disappear. + +This command is the same as running C + +Note that if C is an empty list then B volume groups +are activated or deactivated. + +=item $h->vg_activate_all ($activate); + +This command activates or (if C is false) deactivates +all logical volumes in all volume groups. +If activated, then they are made known to the +kernel, ie. they appear as C devices. If deactivated, +then those devices disappear. + +This command is the same as running C + =item $h->vgcreate ($volgroup, \@physvols); This creates an LVM volume group called C -- cgit