/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@${dev}" 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