From 73c74fe26eed7ddd6341c71c47b068cd480684a4 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 4 Jul 2019 11:39:45 -0400 Subject: [PATCH] e2scrub_all: correctly handle the case where LUKS is stacked on an LV We handle the case where an LVM's PV is stacked on top of a dm-crypt device, but not the case where it's the other way around, where a LVM LV contains a LUKS encrypted file system. Fix this oversight. Addresses-Debian-Bug: #931387 Reported-by: Marc Haber Signed-off-by: Theodore Ts'o --- scrub/e2scrub_all.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in index cdc37ce..24b2c68 100644 --- a/scrub/e2scrub_all.in +++ b/scrub/e2scrub_all.in @@ -102,8 +102,9 @@ ls_scan_targets() { if [ -z "$devices" ]; then return 0; fi - lsblk -o NAME,MOUNTPOINT,FSTYPE -P -n -p $devices | \ - grep FSTYPE=\"ext\[234\]\" | while read vars ; do + lsblk -o NAME,MOUNTPOINT,FSTYPE,TYPE -P -n -p $devices | \ + grep FSTYPE=\"ext\[234\]\" | grep TYPE=\"lvm\" | \ + while read vars ; do eval "${vars}" if [ "${scrub_all}" -eq 1 ] || [ -n "${MOUNTPOINT}" ]; then -- 1.8.3.1