]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2scrub_all: allow scrubbing in vg's whose free space == snapshot size
authorTheodore Ts'o <tytso@mit.edu>
Sun, 18 Aug 2019 23:23:07 +0000 (19:23 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Aug 2019 23:23:07 +0000 (19:23 -0400)
If the volume group's free space is exactly the same as snapshot size,
e2scrub_all will skip those logical volumes in those volume groups.
Fix this by changing the test from '>' to '>='.

Fixes: c120312253 ("e2scrub_all: make sure there's enough free space...")
Addresses-Debian-Bug: #935009
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
scrub/e2scrub_all.in

index 5bdbd116867b8158c1d65e015c7d2ad9ac58d22d..2c563672efe52cf834f41a4b507071b3d3d23821 100644 (file)
@@ -103,7 +103,7 @@ fi
 
 # Find scrub targets, make sure we only do this once.
 ls_scan_targets() {
-    local devices=$(lvs -o lv_path --noheadings -S "lv_active=active,lv_role=public,lv_role!=snapshot,vg_free>${snap_size_mb}")
+    local devices=$(lvs -o lv_path --noheadings -S "lv_active=active,lv_role=public,lv_role!=snapshot,vg_free>=${snap_size_mb}")
 
     if [ -z "$devices" ]; then
        return 0;