diff --git a/secondary.py b/secondary.py index a973b8b3ccdd657da799cb4d15e984a5b1d22182..89b7c210886bf99e23227e5d19acec4a78bcc605 100644 --- a/secondary.py +++ b/secondary.py @@ -122,6 +122,9 @@ class Backup: stat = os.statvfs(self.dst_root) free = stat.f_frsize * stat.f_bavail need = size + stat.f_frsize + if stat.f_bavail == stat.f_bfree: + # Probably on xfs, make sure we alway have 1 MB extra + need += 1024*1024 if path: need += stat.f_frsize * len(path.split('/')) return (free, need)