Package: util-linux
Version: 2.25.2-3
Severity: wishlist
File: /sbin/fsck
Tags: upstream

In the context of #773035, I am looking for a way to figure out
whether a reboot *now* would be likely to cause lengthy fsck routine
checks, e.g. due to the maximal mount count or days since last check
being reached on ext-filesystems.

I'd like to avoid parsing debug2fs or tune2fs output and comparing
numbers or timestamps in the text output, like
/usr/lib/update-notifier/update-motd-fsck-at-reboot seems to be
doing on Ubuntu.

Instead, I'd really like to just ask fsck.

  fsck -A -t ext2,ext3,ext4,… -N

is already very helpful showing me which filesystem-specific
commands it would run, but each of those is run unconditionally on
the filesystem and determines by itself whether a check is needed.

There is the -n option, and it does seem that the sought information
could be parsed from the output, but invoking fsck -n on a mounted
filesystem is quite unreliable and it'd be a hack too.

So instead, I envision a call such as:

  fsck -A -t ext2,ext3,ext4,… -q

or

  fsck -q /dev/mapper/vg-root

and it would exit 0 if a routine check was not going to happen, and
exit non-zero if a check would now happen (possibly encoding the
reason in the exit code). -V output could also be provided.

Thanks for your consideration.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.17-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages util-linux depends on:
ii  initscripts    2.88dsf-58
ii  libblkid1      2.25.2-3
ii  libc6          2.19-13
ii  libmount1      2.25.2-3
ii  libncurses5    5.9+20140913-1
ii  libpam0g       1.1.8-3.1
ii  libselinux1    2.3-2
ii  libslang2      2.3.0-2
ii  libsmartcols1  2.25.2-3
ii  libtinfo5      5.9+20140913-1
ii  libuuid1       2.25.2-3
ii  lsb-base       4.1+Debian13+nmu1
ii  tzdata         2014j-1
ii  zlib1g         1:1.2.8.dfsg-2

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  dosfstools          3.0.27-1
ii  kbd                 1.15.5-2
pn  util-linux-locales  <none>

-- debconf-show failed


-- 
 .''`.   martin f. krafft <madduck@d.o> @martinkrafft
: :'  :  proud Debian developer
`. `'`   http://people.debian.org/~madduck
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply via email to