xfs
[Top] [All Lists]

Re: XFS mount failuer on RAID5

To: Michael Monnerie <michael.monnerie@xxxxxxxxxxxxxxxxxxx>
Subject: Re: XFS mount failuer on RAID5
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 19 Oct 2009 12:30:18 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200910172327.05122@xxxxxx>
References: <389deec70910152009i7656aaf2s9d929b8b68e4e740@xxxxxxxxxxxxxx> <200910161019.10286@xxxxxx> <4AD890D1.4010208@xxxxxxxxxxx> <200910172327.05122@xxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Sat, Oct 17, 2009 at 11:27:04PM +0200, Michael Monnerie wrote:
> On Freitag 16 Oktober 2009 Eric Sandeen wrote:
> > Actually -ssize=4k is just fine even on 512 sector disks.
> 
> Oh funny. So what's the meaning of this argument then? Or why would one 
> set it to 4k? What's the diff with 512b?

A hardware sector is the atomic unit of IO. 4k sectors on 512b
hardware sectors means that a single 4k filesystem sector write is
not necessarily atomic. This can lead to problems with torn writes
at power loss or sub-filesystem-sector data loss/corruption when a
hardware sector goes bad. In general, these are detected no
differently to the same sector loss on a 512b filesystem sector
filesystem.

IIRC, the main reason for 4k sectors on MD RAID5/6 is that changing
the IO alignment from 4k to 512 byte IOs (i.e. sub-page sized)
causes MD to flush and invalidate the stripe cache. Hence every
time XFS writes a super block, AGF, AGFL or AGI, things go much
slower because of this flush/invalidate. By setting the sector size
to 4k, the SB/AGF/AGFL/AGI are all 4k in size and hence IO alignment
never changes and hence performance remains good.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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