Skip to contentSkip to conversation

e2scrub_all: fix "e2scurb_all -r"

PATCH New Theodore Ts'o 1 participant 1 message Jul 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e2scrub_all: fix "e2scurb_all -r"

The e2scrub_all program was broken by commit c7d6525ecaab ("e2scrub_all: refactor device probe loop") so that it would use the path of the snapshot volume instead of the base volume. This caused "e2scrub_all -r" to pass the wrong pathname to e2scrub, with the result that e2scrub would abort with an error instead of removing the snapshot volume.

Fixes c7d6525ecaab ("e2scrub_all: refactor device probe loop")

Addresses-Debian-Bug: #931679

---
 scrub/e2scrub_all.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scrub/e2scrub_all.in +2 -1
index 24b2c681..f342faf2 100644
@@ -115,7 +115,8 @@ ls_scan_targets() {
 
 # Find leftover scrub snapshots
 ls_reap_targets() {
-	lvs -o lv_path -S lv_role=snapshot -S lv_name=~\(e2scrub$\) --noheadings
+    lvs -o lv_path -S lv_role=snapshot -S lv_name=~\(e2scrub$\) \
+	--noheadings | sed -e 's/.e2scrub$//'
 }
 
 # Figure out what we're targeting
Signature · 1 line
2.22.0