2005-12-16 12:55:40

by Szloboda Zsolt

[permalink] [raw]
Subject: raid over sata - write barrier

I've found that ext3 + sata + kernel 2.6.12 supports the write barrier mount
option (-o barrier=1)
(found it here: http://marc.10east.com/?l=linux-scsi&m=112019898711806)

is write barrier supported with RAID (md) over sata, with ext3? (which
kernel version?)
(or we have to disable write cache in HD in this case?)

thanks


2005-12-18 20:48:08

by NeilBrown

[permalink] [raw]
Subject: Re: raid over sata - write barrier

On Friday December 16, [email protected] wrote:
> I've found that ext3 + sata + kernel 2.6.12 supports the write barrier mount
> option (-o barrier=1)
> (found it here: http://marc.10east.com/?l=linux-scsi&m=112019898711806)
>
> is write barrier supported with RAID (md) over sata, with ext3? (which
> kernel version?)
> (or we have to disable write cache in HD in this case?)

From 2.6.14 md has at least minimal support for write barriers.
'Minimal support' means that it will tell the filesystem, that write
barriers aren't supported so it should do explicit cache flushes
(however I don't believe that all filesystems to the explicit cache
flushes that they should).

From 2.6.15, md/raid1 has better support for write barriers, in that
if every underlying device supports them, it will preserve the
write-barrier flag in requests passed down.

So you should be ok with the write cache if you use raid1 and 2.6.15
(which isn't out yet, I know, but a late -rc should be fine). But if
you want a different raid level, you should ask the ext3 developers
if there is a reason they don't call blkdev_issue_flush if barriers
aren't supported...

NeilBrown

2005-12-18 21:24:16

by Szloboda Zsolt

[permalink] [raw]
Subject: RE: raid over sata - write barrier

with kernel 2.6.15, raid1
do I have to use the
-o barrier=1
mount option (or something else) when I mount the md device?

2005-12-18 22:27:00

by NeilBrown

[permalink] [raw]
Subject: RE: raid over sata - write barrier

On Sunday December 18, [email protected] wrote:
> with kernel 2.6.15, raid1
> do I have to use the
> -o barrier=1
> mount option (or something else) when I mount the md device?

You don't have to do anything special to the raid1.

If the filesystem requires "-o barrier=1" (which I believe it does),
then you need to use that no-matter what device the filesystem is
mounted from.

NeilBrown

2006-02-25 02:43:45

by Szloboda Zsolt

[permalink] [raw]
Subject: RE: raid over sata - write barrier

now we have 2.6.15
and I've mounted my ext3 file system with barrier=1 in fstab

is there a way to check if the whole stack (ext3 -> md > sd) actually
appreciates this setting?

2006-02-25 11:25:41

by Sander

[permalink] [raw]
Subject: Re: raid over sata - write barrier

Szloboda Zsolt wrote (ao):
> now we have 2.6.15
> and I've mounted my ext3 file system with barrier=1 in fstab
>
> is there a way to check if the whole stack (ext3 -> md > sd) actually
> appreciates this setting?

If it doesn't work you'll see a message in dmesg about barrier being
disabled. I don't have the exact message handy right now.

Sander

--
Humilis IT Services and Solutions
http://www.humilis.net