xfs
[Top] [All Lists]

Xfs_repair and journalling

To: xfs@xxxxxxxxxxx
Subject: Xfs_repair and journalling
From: Subranshu Patel <spatel.ml@xxxxxxxxx>
Date: Sat, 16 Mar 2013 21:26:47 +0530
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=gEhVWLCjA8Sfzj38X8v3h442y3wyQjB8c+xMe5lAdYM=; b=qtltk+vqYAngMK7vS2gO0axC2X+LJ0PzCiScyOHAWeQfnc93vyBkw3hUMfUPrkHN+O Ud16JAUJcpdPSuv5Fmwo5+DlCp6OO6ylX3P5G9q+fpeXE+a2j0sXdnpkcPI6IoCz3Tre QKe3srcE42s+MUmNAHtULN1NFxr9/3A4kMaCViy4Wat4whW08waVsZtXEJ6VQdK4pzNK TMqIAsXjEqcElBVFuQ/NkQ+pClfGOFSTa1pobbBn+wY+3g9YaFpocL5TfRZqYC1duCr6 /eS+8jdBNTm7acEN+Pjp76RlYGNB43lZ9XNJHGQgq0jnQ4I3lLzLHzFmw9f19VQyvbII H3wA==
This question is related to xfs_repair (recovery) and journalling.

I powered off (improper shut down) the system when the IO was
undergoing on mounted XFS filesystem.

Then I tried to recover the inconsistent filesystem using xfs_repair,
after powering on the same machine.

The XFS filesystem didnât get recovered which was not expected. The
output displayed by xfs_repair is as follows:

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

The question that arises here is that why xfs_repair should be re-run
after mounting and unmounting the XFS filesystem. According to my
understanding, when we perform mount operation, recovery is
automatically done if the filesystem is in inconsistent state. Then
what is the need of re-running xfs_repair after mount is being
performed? Does xfs_repair recovers something indifferent from the one
recovered on mount? What exactly happens when we mount and unmount XFS
filesystem?

This is not observed in EXT4, fsck successfully recovers without
mounting the filesystem.

<Prev in Thread] Current Thread [Next in Thread>