Package: e2fsprogs
Version: 1.45.2-1
Severity: normal
File: /sbin/e2scrub

Hi,

once in a while, I get mail from one of my systems saying that e2scrub
for /, /boot and a bunch of other filesystems has failed. The log says,
for example:

Jul  3 19:18:51 fan systemd[1]: Starting Online ext4 Metadata Check for /...
Jul  3 19:18:51 fan e2scrub@-[24727]: /: Not connnected to an LVM logical 
volume.
Jul  3 19:18:51 fan e2scrub@-[24727]: Usage: /sbin/e2scrub [OPTIONS] mountpoint 
| device
Jul  3 19:18:51 fan e2scrub@-[24727]: mountpoint must be on an LVM-managed 
block device
Jul  3 19:18:51 fan e2scrub@-[24727]: -n: Show what commands e2scrub would 
execute.
Jul  3 19:18:51 fan e2scrub@-[24727]: -r: Remove e2scrub snapshot and exit, do 
not check anything.
Jul  3 19:18:51 fan e2scrub@-[24727]: -t: Run fstrim if successful.
Jul  3 19:18:51 fan e2scrub@-[24727]: -V: Print version information and exit.
Jul  3 19:18:53 fan systemd[1]: e2scrub@-.service: Main process exited, 
code=exited, status=1/FAILURE
Jul  3 19:18:53 fan systemd[1]: e2scrub@-.service: Failed with result 
'exit-code'.
Jul  3 19:18:53 fan systemd[1]: Failed to start Online ext4 Metadata Check for 
/.
Jul  3 19:18:53 fan systemd[1]: e2scrub@-.service: Triggering OnFailure= 
dependencies.
Jul  3 19:18:53 fan systemd[1]: Starting Online ext4 Metadata Check Failure 
Reporting for /...
Jul  3 19:18:54 fan systemd[1]: Starting Online ext4 Metadata Check for /boot...
Jul  3 19:18:54 fan systemd[1]: e2scrub_fail@-.service: Succeeded.

The problem is that the error message is fully correct: / is not an LVM
logical volume, it's a LUKS device stored on an LVM logical volume:

32 [5/4992]mh@fan:~ $ lsblk /dev/sdb
NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdb                       8:16   0 931,5G  0 disk  
├─sdb1                    8:17   0  1007K  0 part  
├─sdb2                    8:18   0     1M  0 part  
└─sdb3                    8:19   0 931,5G  0 part  
  ├─fan-c_root          253:0    0 417,2G  0 lvm   
  │ └─root              253:28   0 417,2G  0 crypt /

To make things more complex, the whole thing seems to be invoked by
e2scrub_all.timer, which in turn calls e2scrub_all.service, which in
turn calls /sbin/e2scrub_all -C which runs just fine when invoked from
the shell:

|[8/4995]mh@fan:~ $ time sudo /sbin/e2scrub_all -C
|
|real    0m9,014s
|user    0m0,121s
|sys     0m0,069s
|[9/4996]mh@fan:~ $ 

... but ...

(additional issue #1)
the -C option is not mentioned in the e2scrub_all manual page,

... and ...

(additional issue #2)
e2scub_all -n reveals that it would actually invoke systemctl start
e2scrub@- which, manually invoked, gives some feedback about its
failure:

[11/4998]mh@fan:~ $ sudo systemctl start e2scrub@-
Job for e2scrub@-.service failed because the control process exited with error 
code.
See "systemctl status e2scrub@-.service" and "journalctl -xe" for details.
(exit code 1)

I think that this should be reported by e2scrub_all so that the user
isn't lured into "everything is fine".

I don't think that having an e2 file system on a LUKS device on an LVM
logical volume is such an exotic thing to have.

Please let me know if you want dedicated bug reports for the additional
issues #1 (minor) and additional issues #2 (normal).

Greetings
Marc

-- System Information:
Debian Release: 10.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.1.15-zgws1 (SMP w/6 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

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

-- no debconf information

Reply via email to