X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=python%2Fguestfs.py;h=a82c8cba48878fea56dbd003b19f44b7d2d570e2;hb=6b668620681ada82857e09922a0feb004ee65882;hp=237e62d4024fb548cbe7bde1cd40ae556948dc73;hpb=1fc41b39dac877ccec1284da8bb14baa4df368b8;p=libguestfs.git diff --git a/python/guestfs.py b/python/guestfs.py index 237e62d..a82c8cb 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) +