diff options
author | Richard Jones <rjones@redhat.com> | 2009-05-21 16:17:38 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-05-21 16:17:38 +0100 |
commit | 0f81d0941a2705d49bc129f69924265fa60d9677 (patch) | |
tree | 45abfd6c73660ff293f8a5efb4eb54521be1c73d /src | |
parent | 2a042d9844ca203ccea28a5d533c18f2dbdfcfa7 (diff) | |
download | libguestfs-0f81d0941a2705d49bc129f69924265fa60d9677.tar.gz libguestfs-0f81d0941a2705d49bc129f69924265fa60d9677.tar.xz libguestfs-0f81d0941a2705d49bc129f69924265fa60d9677.zip |
Add e2fsck_f command, and modify lvresize test to use it (RHBZ 502018).
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/generator.ml b/src/generator.ml index 5eb61223..d2451f02 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2114,6 +2114,7 @@ are activated or deactivated."); ["write_file"; "/new"; "test content"; "0"]; ["umount"; "/"]; ["lvresize"; "/dev/VG/LV"; "20"]; + ["e2fsck_f"; "/dev/VG/LV"]; ["resize2fs"; "/dev/VG/LV"]; ["mount"; "/dev/VG/LV"; "/"]; ["cat"; "/new"]], "test content")], @@ -2128,7 +2129,13 @@ is lost."); "resize an ext2/ext3 filesystem", "\ This resizes an ext2 or ext3 filesystem to match the size of -the underlying device."); +the underlying device. + +I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> +on the C<device> before calling this command. For unknown reasons +C<resize2fs> sometimes gives an error about this and sometimes not. +In any case, it is always safe to call C<guestfs_e2fsck_f> before +calling this function."); ("find", (RStringList "names", [String "directory"]), 107, [], [InitBasicFS, Always, TestOutputList ( @@ -2169,6 +2176,17 @@ an error. The returned list is sorted."); + ("e2fsck_f", (RErr, [String "device"]), 108, [], + [], (* lvresize tests this *) + "check an ext2/ext3 filesystem", + "\ +This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 +filesystem checker on C<device>, noninteractively (C<-p>), +even if the filesystem appears to be clean (C<-f>). + +This command is only needed because of C<guestfs_resize2fs> +(q.v.). Normally you should use C<guestfs_fsck>."); + ] let all_functions = non_daemon_functions @ daemon_functions |