On Sat, 14 Sep 2019 23:03:25 +0000 (UTC) Thorsten Glaser <t...@mirbsd.de> wrote:
> Hi Ted,
> 
> >I believe this is a bug in cron or lvm, in that cron fd 3 open for
> >some unknown reason.  And then LVM whines about it.  See:
> 
> Indeed, I think this is most likely a bug in cron.
> It’s (while annoying) okay for LVM to complain (IceWM also does, IIRC).
> 
> >The simplest way to work around this should be to add to the following
> >command to the beginning of /sbin/e2scrub_all:
> >
> >exec 3<&-
> >
> >Can you confirm this fixes things for you?
> 
> Yes, it does. (The Korn shell (when not in POSIX mode) also closes
> those fds by default, but given none is in base, this fix is easier
> than switching to #!/bin/mksh ☻)

Hello Thorsten, hello Theodore,
I am another user who began receiving the same error messages from cron
on a box with LVM, but without systemd.

I can also confirm that applying the attached trivial patch makes lvm
stop complaining.
While waiting for a more radical fix (in cron or in lvm), do you think
this workaround should be included in the next Debian revision of
e2fsprogs?



-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE
diff -ruN a/e2scrub_all b/e2scrub_all
--- a/e2scrub_all	2019-08-06 21:22:30.000000000 +0200
+++ b/e2scrub_all	2019-09-18 22:30:10.072358145 +0200
@@ -25,6 +25,10 @@
     exit 1
 fi
 
+# close file descriptor 3, in order to prevent lvm from complaining
+# see <https://bugs.debian.org/940240> for more info
+exec 3<&-
+
 periodic_e2scrub=0
 scrub_all=0
 snap_size_mb=256

Attachment: pgp5DzjfmzKpE.pgp
Description: PGP signature

Reply via email to