Re: Reason for md raid 01 blksize limited to 4 KiB?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 May 2012 14:35:57 +0200 Sebastian Riemer
<sebastian.riemer@xxxxxxxxxxxxxxxx> wrote:

> Hi Neil,
> 
> On 22/05/12 01:28, NeilBrown wrote:
> > 
> > This should be fixed in linux 3.4 with commit 6b740b8d79252f13bcb7e5d3c1d
> > 
> 
> I've tested the RAID 01 with kernel 3.4 and it isn't fixed. It is even
> worse, because direct IO doesn't work any more on the raid1 device (with
> kernel 3.2 it worked).

What do you mean by "doesn't work"?  Returns errors? crashes? hangs? kills
you cat?

It works for me.

When I use 32K direct writes to a RAID1, both underlying RAID0 arrays see
64-sector writes.

(when I do normal buffered writes I see 8-sector writes which seems odd,
 but clearly md/RAID1 is allowing large writes through)

NeilBrown


> 
> There are still 4k chunks which aren't merged in the raid0 devices below
> (blkparse -i md100 -i md200 -i md300 | less).
> Could you also check this on your setup, please?
> 
> Cheers,
> Sebastian
> 
> 
> Btw. this is my test script:
> 
> #!/bin/bash
> if [ "`lsmod | grep brd`" == "" ]; then
>         modprobe brd rd_nr=4 rd_size=524288
> fi
> mdadm -C /dev/md100 --force --assume-clean -n 2 -l raid0 /dev/ram0 /dev/ram1
> mdadm -C /dev/md200 --force --assume-clean -n 2 -l raid0 /dev/ram2 /dev/ram3
> blktrace /dev/md100 &
> pid=$!
> dd if=/dev/zero of=/dev/md100 bs=1M oflag=direct
> kill -2 $pid
> blktrace /dev/md200 &
> pid=$!
> dd if=/dev/zero of=/dev/md200 bs=1M oflag=direct
> kill -2 $pid
> mv md100* r0_only/
> mv md200* r0_only/
> 
> mdadm -C /dev/md300 --force --assume-clean -n 2 -l raid1 /dev/md100
> /dev/md200
> blktrace -d /dev/md100 -d /dev/md200 -d /dev/md300 -b 4096 &
> pid=$!
> # Kernel 3.4 doesn't support direct IO on the md300 device
> dd if=/dev/zero of=/dev/md300 bs=1M
> kill -2 $pid
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux