striping and mirroring with only two disks
Hi!
Is it possible to both do striping and mirroring if you only have 2 disks?
I was thinking of having the chunks organized on each disk so that striping reads and writes could be done. Eg. by having
disk1: chunk0 chunk2 chunk4 ...... chunk1 chunk3 chunk5
disk2: chunk1 chunk3 chunk5 ...... chunk0 chunk2 chunk4
Would such a layout of chunks allow for striped reading and writing?
Best regards
keld
The reason people stripe is performance. The performance gain is by having more disk heads working. If you stripe a single disk (or 2 if mirrored), it will thrash! This will hurt/kill performance. Just mirror.
Oh, you could do it if you want. It will work. Create a mirror (RAID1) with each pair of chunks, 6 mirrors total (with your example). Then stripe the mirrors (RAID0).
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Keld Jørn Simonsen
Sent: Saturday, January 31, 2004 2:53 PM
To: [email protected]
Subject: striping and mirroring with only two disks
Hi!
Is it possible to both do striping and mirroring if you only have 2 disks?
I was thinking of having the chunks organized on each disk so that striping reads and writes could be done. Eg. by having
disk1: chunk0 chunk2 chunk4 ...... chunk1 chunk3 chunk5
disk2: chunk1 chunk3 chunk5 ...... chunk0 chunk2 chunk4
Would such a layout of chunks allow for striped reading and writing?
Best regards
keld
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Even if it were possible, your write performance would be TERRIBLE (imaging writing the chunks in order - 0, 1, 2, 3.... Your disk heads would be thrashing constantly). The RAID1 code already does read-balancing. Not the same thing as striping, but certainly increases performance on reads, especially when more than one read is being done at a time.
If you wanted to try it, I think you might be able to accomplish it with partitions. Partition your two disks in half, so you have:
disk1 a & b
disk2 a & b
Then mirror disk1a with disk2b (say as /dev/md0), and likewise mirror disk1b with disk2a (say as /dev/md1). Then create a RAID0 array (/dev/md2) from those two mirrors (md0 and md1).
You could also do it the other way:
create two raid0 arrays (disk1a+disk2a=/dev/md0) (disk1b+disk2b=/dev/md1) then mirror them as /dev/md2.
Quoted 10 lines · Keld Jørn Simonsen
Hi!
Is it possible to both do striping and mirroring if you only have 2 disks?
I was thinking of having the chunks organized on each disk so that striping reads and writes could be done. Eg. by having
disk1: chunk0 chunk2 chunk4 ...... chunk1 chunk3 chunk5
disk2: chunk1 chunk3 chunk5 ...... chunk0 chunk2 chunk4
Quoted 8 lines
Would such a layout of chunks allow for striped reading and writing?
Best regards
keld
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Nathan Lewis
Even if it were possible, your write performance would be TERRIBLE (imaging writing the chunks in order - 0, 1, 2, 3.... Your disk heads would be thrashing constantly).
Well, I am not sure that will be so. Most modern disks today have buffers of 2 MB - 8 MB on the unit, and writes would thus be buffered there, meaning that the drive would be striping.
Quoted 3 lines
The RAID1 code already does read-balancing. Not
the same thing as striping, but certainly increases performance on reads, especially when more than one read is being done at a time.
Yes, striping is best when there is only one read or write in operation. I think tho, that lonely sequential reads or writes are very common, even on servers.
Quoted 6 lines
If you wanted to try it, I think you might be able to accomplish it with partitions. Partition your two disks in half, so you have:
disk1 a & b
disk2 a & b
Quoted 7 lines
Then mirror disk1a with disk2b (say as
/dev/md0), and likewise mirror disk1b with disk2a (say as/dev/md1). Then create a RAID0 array (/dev/md2) from those two mirrors (md0 and md1).You could also do it the other way:
create two raid0 arrays (disk1a+disk2a=/dev/md0) (disk1b+disk2b=/dev/md1) then mirror them as/dev/md2.
I think that is a nice way to get what I was thinking of. Nice in the way that it is already possible with existing code. But will the mirroring work? Or, if one of the disks fails, can I be sure that the other will have all the data, and that I can recreate the combined md from the two parts?
Why has nobody thought of it before? All descriptions I have seen of RAID0+1 says that it needs 4 disks.
Best regards
keld
Quoted 13 lines
Quoted 10 lines · Keld Jørn Simonsen
Hi!
Is it possible to both do striping and mirroring if you only have 2 disks?
I was thinking of having the chunks organized on each disk so that striping reads and writes could be done. Eg. by having
disk1: chunk0 chunk2 chunk4 ...... chunk1 chunk3 chunk5
disk2: chunk1 chunk3 chunk5 ...... chunk0 chunk2 chunk4
Quoted 9 lines
Quoted 8 lines
Would such a layout of chunks allow for striped reading and writing?
Best regards
keld
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · On Sunday February 1, [email protected] wrote:
Why has nobody thought of it before? All descriptions I have seen of RAID0+1 says that it needs 4 disks.
Just because it hasn't been implemented doesn't mean it hasn't been thought of....
I started work on a "raid10" personality a while back, which could do what you describe, or could stripe/mirror across 3 drives and other combination.
It feel by the wayside as some things often do.
NeilBrown
Quoted 5 lines · Neil Brown
On Sunday February 1, [email protected] wrote:
I started work on a "raid10" personality a while back, which could do what you describe, or could stripe/mirror across 3 drives and other combination.
Sounds like the RAID1E and RAID5E of some of the IBM ServeRAID controllers...
1E: Works across minimum of 3 drives, with the stripes written as:
Drive: 1 2 3
a b c
b c a
d e f
e f d
Ie. you still lose half the disk space, but will work over unequal
number of wrives with still a single drive failure resilience and a full speed read.
5E: minimum 4drives, similar story just a tad different (No, I've mislaid the documentation :()