From patchwork Thu Jan 12 19:34:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9514097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2816360476 for ; Thu, 12 Jan 2017 19:34:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12A3727F8F for ; Thu, 12 Jan 2017 19:34:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03F5B28420; Thu, 12 Jan 2017 19:34:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AFD027F8F for ; Thu, 12 Jan 2017 19:34:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750750AbdALTet (ORCPT ); Thu, 12 Jan 2017 14:34:49 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:17759 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734AbdALTet (ORCPT ); Thu, 12 Jan 2017 14:34:49 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0CJYkOK019284 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jan 2017 19:34:46 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v0CJYjaA018112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jan 2017 19:34:46 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v0CJYjQS021817; Thu, 12 Jan 2017 19:34:45 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Jan 2017 11:34:45 -0800 Date: Thu, 12 Jan 2017 11:34:44 -0800 From: "Darrick J. Wong" To: sandeen@redhat.com Cc: linux-xfs@vger.kernel.org Subject: [PATCH 7/5] xfs_repair.8: document dirty log conditions Message-ID: <20170112193444.GY14038@birch.djwong.org> References: <148419038856.32674.6479634718673149751.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <148419038856.32674.6479634718673149751.stgit@birch.djwong.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a section describing what is a dirty log, why xfs_repair won't touch such things, and what one can do to clear the condition and check the filesystem. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- man/man8/xfs_repair.8 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/man/man8/xfs_repair.8 b/man/man8/xfs_repair.8 index 1b4d9e3..e4ca88e 100644 --- a/man/man8/xfs_repair.8 +++ b/man/man8/xfs_repair.8 @@ -510,6 +510,25 @@ will return a status of 1 if filesystem corruption was detected and 0 if no filesystem corruption was detected. .B xfs_repair run without the \-n option will always return a status code of 0. +.SH DIRTY LOGS +Due to the design of the XFS log, a dirty log can only be replayed on a +machine having the same CPU architecture as the machine which was +writing to the log. +xfs_repair cannot replay a dirty log and will return a status code of 2 +when it detects a dirty log. +.PP +In this situation, the log can be replayed by mounting and immediately +unmounting the filesystem on the same class of machine that crashed. +Please make sure that the machine's hardware is reliable before +replaying to avoid compounding the problems. +.PP +If mounting fails, the log can be erased by running xfs_repair with the +-L option. +All metadata updates in progress at the time of the crash will be lost, +which may cause significant filesystem damage. +This should +.B only +be used as a last resort. .SH BUGS The filesystem to be checked and repaired must have been unmounted cleanly using normal system administration procedures