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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170722003018.GF4211@magnolia>
Date:   Fri, 21 Jul 2017 17:30:18 -0700
From:   "Darrick J. Wong" <darrick.wong@...cle.com>
To:     "Theodore Ts'o" <tytso@....edu>
Cc:     linux-ext4 <linux-ext4@...r.kernel.org>
Subject: [RFC 2/3] scripts to find eligible lv ext4 filesystems

/sbin/online-fsck-all:

#!/bin/bash

types="ext2,ext3,ext4"

# Scrub any fs on lvm by creating a snapshot and fscking that.
lvs --noheadings 2> /dev/null | while read lv vg junk; do
	dev="/dev/${vg}/${lv}"
	blkid -p -n "${types}" "${dev}" > /dev/null 2>&1 || continue

	${DBG} systemctl start "online-fsck@...ev}" 2> /dev/null
	res=$?
	if [ "${res}" -eq 0 ] || [ "${res}" -eq 1 ]; then
		if [ "${res}" -gt 150 ]; then
			res="$((res - 150))"
		fi
		echo "Scrubbing ${dev} done, (err=${res})"
	else
		${DBG} /sbin/online-fsck "${dev}"
	fi
done

# Stupid journald bug where the process still has to exist for
# the last few messages to get tagged to the service...
test -n "${SERVICE_MODE}" && sleep 2

exit 0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ