summaryrefslogtreecommitdiffstats
path: root/python/guestfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/guestfs.py')
-rw-r--r--python/guestfs.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/guestfs.py b/python/guestfs.py
index 237e62d4..a82c8cba 100644
--- a/python/guestfs.py
+++ b/python/guestfs.py
@@ -1433,6 +1433,13 @@ class GuestFS:
def resize2fs (self, device):
u"""This resizes an ext2 or ext3 filesystem to match the
size of the underlying device.
+
+ *Note:* It is sometimes required that you run
+ "g.e2fsck_f" on the "device" before calling this
+ command. For unknown reasons "resize2fs" sometimes gives
+ an error about this and sometimes not. In any case, it
+ is always safe to call "g.e2fsck_f" before calling this
+ function.
"""
return libguestfsmod.resize2fs (self._o, device)
@@ -1467,3 +1474,13 @@ class GuestFS:
"""
return libguestfsmod.find (self._o, directory)
+ def e2fsck_f (self, device):
+ u"""This runs "e2fsck -p -f device", ie. runs the ext2/ext3
+ filesystem checker on "device", noninteractively ("-p"),
+ even if the filesystem appears to be clean ("-f").
+
+ This command is only needed because of "g.resize2fs"
+ (q.v.). Normally you should use "g.fsck".
+ """
+ return libguestfsmod.e2fsck_f (self._o, device)
+