[Top] [All Lists]

Re: Alignment size?

To: Michael Tokarev <mjt@xxxxxxxxxx>
Subject: Re: Alignment size?
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 09:49:11 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4C64715F.8060000@xxxxxxxxxxxxxxxx>
References: <4C64715F.8060000@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Aug 13, 2010 at 02:10:39AM +0400, Michael Tokarev wrote:
> Hello.
> I used XFS for a long time on many different
> servers, and it works well.  But now I encountered
> an.. unexpected problem.
> The question is: on one of our servers, XFS requires
> different alignment size for O_DIRECT operations than
> on others.  Usually it's 512 bytes, but on this server
> it is 4096 - both min_io and alignment (this is from

It'll be a filesystem set up with a 4k sector size, then.  Check the
output of xfs_info.

> I'm not sure what the reason for this is.
> On this server, the underlying block device is raid5
> (linux sw raid), but we had other machines with raid5
> which didn't have that alignment requiriments.
> The problem with that is that Oracle db, which we use
> with XFS alot, refuses to work on this machine, or,
> rather, XFS refuses to process I/O in 512-byte chunks
> from oracle (control files and redolog files).

A clear case of application failure. I guess Oracle have some work
to do to support 4k sector drives where they won't be able to do 512
byte direct IOs at all....

> Is there a way to remedy this somehow, without
> reformatting whole 600+ gb?

Not really. If it is 4k sector size, then there is some extremely
dangerous voodoo that you could do to realign and resize the AG
headers, followed by a full xfs_repair run to fix up all the block
accounting. This is not something I'd recommend anyone ever does,
and for only 600GB of data it would probably take more time to work
out how to do it correctly (using disposable filesystem images) than
it would to dump, mkfs and restore...


Dave Chinner

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