[ale] Ubuntu Linux Defrag EXT4
Ed Cashin
ecashin at noserose.net
Mon Sep 13 10:13:55 EDT 2010
On Mon, Sep 13, 2010 at 6:53 AM, Paul Cartwright <ale at pcartwright.com> wrote:
...
> mount
> /dev/sda6 on / type ext3 (rw,usrquota,grpquota,errors=remount-ro)
> /dev/sda7 on /home type ext3 (rw)
...
> # e2fsck -n -E fragcheck /dev/sda6
...
> Free blocks count wrong (1395294, counted=1395257).
> Fix? no
For a mounted filesystem, part of the data about the filesystem is
in RAM, and part is on disk, but the e2fsck program only looks at
the on-disk data. It's expected to be inconsistent when mounted and
in active use, because some updates are still in RAM and haven't
yet been flushed to disk yet.
So "no" is a great answer to "Fix?". The e2fsck tool only sees
half the picture.
I know you might know all this stuff, but I feel like I should mention
it, since some folks here might try "-E fragcheck" on a mounted
fs without understanding that part of the fs metadata on disk is
obsoleted by changes still only in RAM or else missing entirely.
The read-only check shouldn't be dangerous (although googling
revealed one claimed case where they were prompted and answered
"Yes", resulting in corruption), but it might be confusing. I suspect
that running "sync" during a period of relative inactivity would reduce
the discrepancy between the metadata on disk and the stuff in RAM.
--
Ed Cashin <ecashin at noserose.net>
http://noserose.net/e/
http://www.coraid.com/
More information about the Ale
mailing list