Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#931679: /sbin/e2scrub_all: e2scrub_all -r passes the snapshot, but e2scrub -r expects the original

43 views
Skip to first unread message

Trent W. Buck

unread,
Jul 9, 2019, 4:40:02 AM7/9/19
to
Package: e2fsprogs
Version: 1.45.2-1
Severity: minor
File: /sbin/e2scrub_all

e2scrub_all calls e2scrub with the wrong argument:

root@not-omega:~# e2scrub_all -A -r -n
Would execute: /sbin/e2scrub -r /dev/VG0/e2scrub-test-lv.e2scrub

root@not-omega:~# /sbin/e2scrub -r /dev/VG0/e2scrub-test-lv.e2scrub
/dev/VG0/e2scrub-test-lv.e2scrub: Not an ext[234] filesystem.

root@not-omega:~# /sbin/e2scrub -r /dev/VG0/e2scrub-test-lv
Logical volume "e2scrub-test-lv.e2scrub" successfully removed


-- System Information:
Debian Release: 10.0
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable-debug'), (500, 'stable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages e2fsprogs depends on:
ii libblkid1 2.33.1-0.1
ii libc6 2.28-10
ii libcom-err2 1.45.2-1
ii libext2fs2 1.45.2-1
ii libss2 1.45.2-1
ii libuuid1 2.33.1-0.1

Versions of packages e2fsprogs recommends:
pn e2fsprogs-l10n <none>

Versions of packages e2fsprogs suggests:
pn e2fsck-static <none>
pn fuse2fs <none>
pn gpart <none>
ii parted 3.2-25

-- Configuration Files:
/etc/e2scrub.conf changed:
recipient=root


-- no debconf information

Theodore Ts'o

unread,
Jul 11, 2019, 6:00:03 PM7/11/19
to
Control: tag -1 +pending

On Tue, Jul 09, 2019 at 06:36:03PM +1000, Trent W. Buck wrote:
> Package: e2fsprogs
> Version: 1.45.2-1
> Severity: minor
> File: /sbin/e2scrub_all
>
> e2scrub_all calls e2scrub with the wrong argument:

Thanks for the bug report! This will be fixed in the next release of
e2fsprogs.

- Ted

commit 9b2c33f9daaecc593755fa6d45b6d910f8fe2f7b
Author: Theodore Ts'o <ty...@mit.edu>
Date: Thu Jul 11 13:28:05 2019 -0400

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
Signed-off-by: Theodore Ts'o <ty...@mit.edu>

diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in
index 24b2c681..f342faf2 100644
--- a/scrub/e2scrub_all.in
+++ b/scrub/e2scrub_all.in
@@ -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
0 new messages