RAID5 + LVM and (varying) blocksizes

Jos Vos jos at xos.nl
Thu Sep 11 08:42:25 UTC 2003


Hi,

When using a LVM VG *on top of* a Linux RAID5 device (a *very* useful
combination, IMHO), I get tons of kernel messages like

 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 0 --> 1024
 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 0 --> 4096
 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 0 --> 1024
 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 1024 --> 4096
 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 0 --> 4096
 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 0 --> 1024
 Sep 11 10:33:22 xos040 kernel: raid5: switching cache buffer size, 1024 --> 4096

in the following cases:

(1)  While creating the LV.
(2)  While mke2fs'ing an ext3 fs on the LV.
(3)  Using an ext3 fs ob the LV when the blocksize is 1K (and the
     rest of the ext3 fs's on that VG have a 4K block size).

In the meantime I understood the reason (RAID5 always wants to see the
same blocksize for I/O operations).  Cases (1) and (2) are not a real
problem (although creating a 500 GB ext3 fs takes about 1 hour!!!),
because you do it only once, and (3) is avoidable, so my question is:

When I use LVM on top of RAID5 and I use it only for swap LV's (swap
devices use 4K pages anyway, isn't it?) and ext3 filesystems with a
block size of 4K, can I trust that this will cause no future problems
and will work efficiently?

Thanks,

--
--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204





More information about the devel mailing list