diff options
author | Richard Jones <rjones@redhat.com> | 2010-04-12 16:33:46 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-04-12 18:55:18 +0100 |
commit | 2bec01ba1fcceb4880aa991e599920be9b68996a (patch) | |
tree | f117fbacd152dbcf656a4fe691028cb168be7398 /src | |
parent | 508f1ee87e816bf6b6fc8e629ccbb2d61a971169 (diff) | |
download | libguestfs-2bec01ba1fcceb4880aa991e599920be9b68996a.tar.gz libguestfs-2bec01ba1fcceb4880aa991e599920be9b68996a.tar.xz libguestfs-2bec01ba1fcceb4880aa991e599920be9b68996a.zip |
New API: lvresize-free to extend LVs into percentage of free space.
Diffstat (limited to 'src')
-rw-r--r-- | src/MAX_PROC_NR | 2 | ||||
-rwxr-xr-x | src/generator.ml | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 997def45..1cf253f9 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -237 +238 diff --git a/src/generator.ml b/src/generator.ml index 535c412b..532aba98 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4453,6 +4453,21 @@ This call computes the MD5, SHAx or CRC checksum of the contents of the device named C<device>. For the types of checksums supported see the C<guestfs_checksum> command."); + ("lvresize_free", (RErr, [Device "lv"; Int "percent"]), 238, [Optional "lvm2"], + [InitNone, Always, TestRun ( + [["part_disk"; "/dev/sda"; "mbr"]; + ["pvcreate"; "/dev/sda1"]; + ["vgcreate"; "VG"; "/dev/sda1"]; + ["lvcreate"; "LV"; "VG"; "10"]; + ["lvresize_free"; "/dev/VG/LV"; "100"]])], + "expand an LV to fill free space", + "\ +This expands an existing logical volume C<lv> so that it fills +C<pc>% of the remaining free space in the volume group. Commonly +you would call this with pc = 100 which expands the logical volume +as much as possible, using all remaining free space in the volume +group."); + ] let all_functions = non_daemon_functions @ daemon_functions |