On Thu, Mar 15, 2018 at 7:49 PM, Darrick J. Wong <darrick.wong@xxxxxxxxxx> wrote: > On Thu, Mar 15, 2018 at 07:28:50PM +0100, Jan Tulak wrote: >> + >> +# get the right return code for fsck >> +function repair2fsck_code() { >> + case $1 in >> + 0) return 0 # everything is ok >> + ;; >> + 1) echo "$NAME error: xfs_repair could not fix the filesystem." 1>&2 >> + return 4 # errors left uncorrected >> + ;; >> + 2) echo "$NAME error: The filesystem to be checked must not be mounted." 1>&2 >> + return 4 # it should not me mounted during boot, something is wrong > > Sorry I missed this on the first go-round, but repair status 2 means the > log is dirty, so the admin must mount the fs to try to replay the log or > run xfs_repair -L to dump the log. It does not mean that the fs is > already mounted. > > "$NAME error: The filesystem log is dirty, either mount it to recover > the log. If that fails, run xfs_repair -L to clear the log." > Right, thanks for spotting it. But I wonder if telling the user to blindly use -L is safe. Maybe something like "run xfs_repair -L (can be dangerous, refer to manual pages)" would be better. Jan -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html