[Top] [All Lists]

Re: Xfs_repair and journalling

To: stan@xxxxxxxxxxxxxxxxx
Subject: Re: Xfs_repair and journalling
From: Subranshu Patel <spatel.ml@xxxxxxxxx>
Date: Sun, 17 Mar 2013 17:12:36 +0530
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=1ei5sHBlknatBhZxeKI6oYfkD6teSEXczK3sSWkKDdM=; b=ZCuTMdwc/NdNAZXr0GbV8Tg5ofZ1JeaMT/ofEs1MRURH2Euh5NutzxFtMb/lqbGwsc xBQDYcr1Aohqj4sT/Ejdn6CsEn/qFMBVlMWOUU7Ibz4d8AcSVX2QcPDFPGqpGhkQr2cN qZ+uAzl28C7ga/3wpbwywo8ow9DElssJFajzfnaFaWNnKOdQThmYjQd3OdC83sU/yi/x kQwpJhOVoZMKJGJ+MfrmpqfmHbaIZiK1Rd+iXMuJ5kR2jgPBSr+74n7kEOdOoXNA0u1F zdfXKVWuzrsNz3jTAMLUMvihfR/NAKvqqVojw9JYBrSs1jEzDya2yt0RYYKlhlZy+Yp8 9QiA==
In-reply-to: <51455408.4070801@xxxxxxxxxxxxxxxxx>
References: <CAEUQceh-Xcabr0KErxF6EAdafDDP1PY_AeHwgYB82QeUdyGp-g@xxxxxxxxxxxxxx> <51455408.4070801@xxxxxxxxxxxxxxxxx>
What I understand is that, XFS being a journalling filesystem makes running xfs_repair after a unclean unmount unnecessary.
After a system crash or force power down, one can mount the filesystem which causes the journal to be replayed and handles the half finished writes. This is one part. But there can be other file corruption as well and these can be handled by xfs_repair.
So the crux is to mount the filesystem so that journal will be replayed, and then unmount the filesystem and run xfs_repair. (Assuming xfs_repair may not be a mandatory step always)
In case of EXT4, journal will not be replayed on performing mount. One need to invoke fsck which performs journal playback and then other corruption checks/recovery.
Correct me if I am wrong.
On Sun, Mar 17, 2013 at 10:56 AM, Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx> wrote:
> On 3/16/2013 10:56 AM, Subranshu Patel wrote:
> > This is not observed in EXT4, fsck successfully recovers without
> > mounting the filesystem.
> And this is the real problem. ÂYou're *assuming* XFS should behave in
> the same manner as EXT4. ÂWhy would you assume a Ferrari should behave
> like a Tata Nano?
> XFS is far more sophisticated than EXT4 in many, many ways, including
> recovery after unclean shutdown. ÂXFS kernel code performs journal
> playback/recovery automatically when the filesystem is mounted.
> xfs_repair is a tool for fixing filesystems that are broken, not simply
> in need of journal playback. ÂThus xfs_repair has no code to perform
> journal recovery.
> EXT4 (and EXT3) lacks this sophistication and must call a user space
> tool, e2fsck, to perform journal playback/recovery.
> XFS is the Ferrari of Linux filesystems and EXT is the Tata. ÂKeep that
> in mind as you discover many of the other differences in the future.
> --
> Stan
<Prev in Thread] Current Thread [Next in Thread>