lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 7 Dec 2017 15:50:19 -0700
From:   Andreas Dilger <adilger@...ger.ca>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 0/4] e2scrub: online fsck for ext4

On Dec 7, 2017, at 11:48 AM, Darrick J. Wong <darrick.wong@...cle.com> wrote:
> 
> Hi all,
> 
> This patch series develops more fully the e2croncheck contrib script.
> We start with a e2scrub command that, given an ext4 filesystem on a LVM
> volume, creates a snapshot if there's more than 256M free in the LVM
> group, runs e2fsck on the snapshot, and deletes the snapshot.  If the
> fsck ran cleanly, the fs last-check timestamp is updated and fstrim is
> run.  If corruption is found we mark the fs as needing a fsck and advise
> a reboot.  A udev rule file is used to prevent the creation of /dev/disk
> symlinks to the snapshot.
> 
> Next we create an e2scrub_all command that finds all ext4 filesystems
> living in LVM volumes and iteratively calls e2scrub on each of them.
> 
> The third patch creates a weekly cron job for automatic invocation as
> well as systemd service files so that we can (try to) sandbox the scrub
> process and run it with idle priority to reduce latency spikes in the
> main filesystem.

For reference, here is the lvcheck script that I've been using for the
past 10 years or so, occasionally sending it to the list (most recently
in July 2017).  To use it, just drop the script in /etc/cron.weekly,
or a simple wrapper like "exec /usr/local/sbin/lvcheck".

It automatically scans the LVs looking for filesystems it understands,
creates a snapshot, checks the snapshot, and updates the last check time
and mount count (for ext2/3/4) if the check is clean.

Caveat emptor, I have only used it with ext3/4, the XFS/JFS/Reiserfs
checking was contributed by others.  Might be good to get Btrfs in there...

Cheers, Andreas


Download attachment "lvcheck" of type "application/octet-stream" (13570 bytes)

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ