<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.skytech.dk/index.php?action=history&amp;feed=atom&amp;title=Mdadm</id>
	<title>Mdadm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.skytech.dk/index.php?action=history&amp;feed=atom&amp;title=Mdadm"/>
	<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Mdadm&amp;action=history"/>
	<updated>2026-07-05T07:57:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.skytech.dk/index.php?title=Mdadm&amp;diff=1866&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;Category:Linux  = Optimal chunksizes for raid5,6 =  = ext3,4 optimal formatting values = &lt;pre&gt;  ext2, ext3, and ext4  There are special options available when formatting R...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Mdadm&amp;diff=1866&amp;oldid=prev"/>
		<updated>2012-11-28T15:47:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;  = Optimal chunksizes for raid5,6 =  = ext3,4 optimal formatting values = &amp;lt;pre&amp;gt;  ext2, ext3, and ext4  There are special options available when formatting R...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
&lt;br /&gt;
= Optimal chunksizes for raid5,6 =&lt;br /&gt;
&lt;br /&gt;
= ext3,4 optimal formatting values =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ext2, ext3, and ext4&lt;br /&gt;
&lt;br /&gt;
There are special options available when formatting RAID-4 or -5 devices with mke2fs or mkfs. The -E stride=nn,stripe-width=mm options will allow mke2fs to better place different ext2/ext3 specific data-structures in an intelligent way on the RAID device.&lt;br /&gt;
Note: The commands mkfs or mkfs.ext3 or mkfs.ext2 are all versions of the same command, with the same options; use whichever is supported, and decide whether you are using ext2 or ext3 (non-journaled vs journaled). See the two versions of the same command below; each makes a different filesystem type.&lt;br /&gt;
Here is an example, with its explanation below:&lt;br /&gt;
   mke2fs -v -m .1 -b 4096 -E stride=32,stripe-width=64 /dev/md0&lt;br /&gt;
   or&lt;br /&gt;
   mkfs.ext3 -v -m .1 -b 4096 -E stride=32,stripe-width=64 /dev/md0&lt;br /&gt;
   Options explained:&lt;br /&gt;
     The first command makes a ext2 filesystem, the second makes a ext3 filesystem&lt;br /&gt;
     -v verbose&lt;br /&gt;
     -m .1 leave .1% of disk to root (so it doesnt fill and cause problems)&lt;br /&gt;
     -b 4096 block size of 4kb (recommended above for large-file systems)&lt;br /&gt;
     -E stride=32,stripe-width=64 see below calculation&lt;br /&gt;
Calculation&lt;br /&gt;
chunk size = 128kB (set by mdadm cmd, see chunk size advise above)&lt;br /&gt;
block size = 4kB (recommended for large files, and most of time)&lt;br /&gt;
stride = chunk / block = 128kB / 4k = 32&lt;br /&gt;
stripe-width = stride * ( (n disks in raid5) - 1 ) = 32 * ( (3) - 1 ) = 32 * 2 = 64&lt;br /&gt;
If the chunk-size is 128 kB, it means, that 128 kB of consecutive data will reside on one disk. If we want to build an ext2 filesystem with 4 kB block-size, we realize that there will be 32 filesystem blocks in one array chunk.&lt;br /&gt;
stripe-width=64 is calculated by multiplying the stride=32 value with the number of data disks in the array.&lt;br /&gt;
A raid5 with n disks has n-1 data disks, one being reserved for parity. (Note: the mke2fs man page incorrectly states n+1; this is a known bug in the man-page docs that is now fixed.) A raid10 (1+0) with n disks is actually a raid 0 of n/2 raid1 subarrays with 2 disks each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>