* RAID0 on disks with different sizes @ 2010-03-15 6:26 rj 2010-03-15 6:45 ` Joachim Otahal 2010-03-15 7:58 ` Beolach 0 siblings, 2 replies; 5+ messages in thread From: rj @ 2010-03-15 6:26 UTC (permalink / raw) To: Mdadm Hi, How does MD RAID0 layer support disks with different sizes? 1. Does it take the size of smallest disk and do the striping accordingly? This way there would be wastage of space in bigger disks. Or 2. Does it stripe across all the space of disks? This way, if striping is not possible for a disk because it has exhausted the space, striping will continue or remaining devices (although with compromising performance for these stripes because they have one disk less). What approach md chooses? Also, what approach is taken for RAID5 in such cases? Thanks in advance. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RAID0 on disks with different sizes 2010-03-15 6:26 RAID0 on disks with different sizes rj @ 2010-03-15 6:45 ` Joachim Otahal 2010-03-15 7:58 ` Beolach 1 sibling, 0 replies; 5+ messages in thread From: Joachim Otahal @ 2010-03-15 6:45 UTC (permalink / raw) To: rj; +Cc: Mdadm rj schrieb: > Hi, > > How does MD RAID0 layer support disks with different sizes? > All PARTITIONS to create a RAID0 device should be the same size, else the smallest is the one that counts. If you have 250GB+500GB+750GB: Create RAID0 with threee drive using the space from 0-250 GB, then a RAID1 with the space from 251 to 500, and the last one just normal (or linear). You can combine them with LVM. You _could_ create 6 partitions with 250 GB and create a RAID0 across all of them, but that will hurt the performance a lot. Best for all in one RAID is possible with "linear" = JBOD. > 1. Does it take the size of smallest disk and do the striping > accordingly? This way there would be wastage of space in bigger > disks. > Or > 2. Does it stripe across all the space of disks? This way, if striping > is not possible for a disk because it has exhausted the space, > striping will continue or remaining devices (although with > compromising performance for these stripes because they have one disk > less). > > What approach md chooses? Also, what approach is taken for RAID5 in such cases? > md does not choose on it's own, you set it up. When using disks like the example above: RAID 5 across the spave of 0-250 GB. > Thanks in advance. > -- > To unsubscribe from this list: send the line "unsubscribe linux-raid" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RAID0 on disks with different sizes 2010-03-15 6:26 RAID0 on disks with different sizes rj 2010-03-15 6:45 ` Joachim Otahal @ 2010-03-15 7:58 ` Beolach 2010-03-15 16:31 ` rj 1 sibling, 1 reply; 5+ messages in thread From: Beolach @ 2010-03-15 7:58 UTC (permalink / raw) To: rj; +Cc: Mdadm On Sun, Mar 14, 2010 at 23:26, rj <ratnadeep@gmail.com> wrote: > Hi, > > How does MD RAID0 layer support disks with different sizes? > 1. Does it take the size of smallest disk and do the striping > accordingly? This way there would be wastage of space in bigger > disks. > Or > 2. Does it stripe across all the space of disks? This way, if striping > is not possible for a disk because it has exhausted the space, > striping will continue or remaining devices (although with > compromising performance for these stripes because they have one disk > less). > > What approach md chooses? Also, what approach is taken for RAID5 in such cases? > MD RAID0 follows #2; 4/5/6 follow #1. From the man page for md: RAID0 <snip> If devices in the array are not all the same size, then once the small‐ est device has been exhausted, the RAID0 driver starts collecting chunks into smaller stripes that only span the drives which still have remaining space. RAID1 <snip> All devices in a RAID1 array should be the same size. If they are not, then only the amount of space available on the smallest device is used (any extra space on other devices is wasted). <snip> RAID4 <snip> Unlike RAID0, RAID4 also requires that all stripes span all drives, so extra space on devices that are larger than the smallest is wasted. <snip> My understanding is that this is why MD RAID0 does not yet support --grow, while MD RAID456 does - since they take different striping approaches, it's much harder to reuse the --grow algorithm. Good luck, Conway S. Smith -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RAID0 on disks with different sizes 2010-03-15 7:58 ` Beolach @ 2010-03-15 16:31 ` rj 2010-03-15 17:46 ` Joachim Otahal 0 siblings, 1 reply; 5+ messages in thread From: rj @ 2010-03-15 16:31 UTC (permalink / raw) To: Beolach; +Cc: Mdadm Okay, not it is confusing.. having two different answers to this question :) Which answer is correct? RAID0 takes approach 1 or approach2? On Mon, Mar 15, 2010 at 1:28 PM, Beolach <beolach@gmail.com> wrote: > On Sun, Mar 14, 2010 at 23:26, rj <ratnadeep@gmail.com> wrote: >> Hi, >> >> How does MD RAID0 layer support disks with different sizes? >> 1. Does it take the size of smallest disk and do the striping >> accordingly? This way there would be wastage of space in bigger >> disks. >> Or >> 2. Does it stripe across all the space of disks? This way, if striping >> is not possible for a disk because it has exhausted the space, >> striping will continue or remaining devices (although with >> compromising performance for these stripes because they have one disk >> less). >> >> What approach md chooses? Also, what approach is taken for RAID5 in such cases? >> > > MD RAID0 follows #2; 4/5/6 follow #1. From the man page for md: > > RAID0 > <snip> > If devices in the array are not all the same size, then once the small‐ > est device has been exhausted, the RAID0 driver starts collecting > chunks into smaller stripes that only span the drives which still have > remaining space. > > RAID1 > <snip> > All devices in a RAID1 array should be the same size. If they are not, > then only the amount of space available on the smallest device is used > (any extra space on other devices is wasted). > <snip> > > RAID4 > <snip> > Unlike RAID0, RAID4 also requires that all stripes span all drives, so > extra space on devices that are larger than the smallest is wasted. > <snip> > > My understanding is that this is why MD RAID0 does not yet support > --grow, while MD RAID456 does - since they take different striping > approaches, it's much harder to reuse the --grow algorithm. > > > Good luck, > Conway S. Smith > -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RAID0 on disks with different sizes 2010-03-15 16:31 ` rj @ 2010-03-15 17:46 ` Joachim Otahal 0 siblings, 0 replies; 5+ messages in thread From: Joachim Otahal @ 2010-03-15 17:46 UTC (permalink / raw) To: rj; +Cc: Beolach, Mdadm My RAID0 answer was outdated. All space is used as described by "Beolach". In the example with 250/500/750 GB: It would automatically stripe on all three for the for the first 250 GB, then switch to two drives on the 250GB to 500GB space, and to one drive for the rest. I would play with it on files used via loopback first though. Joachim Otahal rj schrieb: > Okay, not it is confusing.. having two different answers to this > question :) Which answer is correct? > RAID0 takes approach 1 or approach2? > > On Mon, Mar 15, 2010 at 1:28 PM, Beolach<beolach@gmail.com> wrote: > >> On Sun, Mar 14, 2010 at 23:26, rj<ratnadeep@gmail.com> wrote: >> >>> Hi, >>> >>> How does MD RAID0 layer support disks with different sizes? >>> 1. Does it take the size of smallest disk and do the striping >>> accordingly? This way there would be wastage of space in bigger >>> disks. >>> Or >>> 2. Does it stripe across all the space of disks? This way, if striping >>> is not possible for a disk because it has exhausted the space, >>> striping will continue or remaining devices (although with >>> compromising performance for these stripes because they have one disk >>> less). >>> >>> What approach md chooses? Also, what approach is taken for RAID5 in such cases? >>> >>> >> MD RAID0 follows #2; 4/5/6 follow #1. From the man page for md: >> >> RAID0 >> <snip> >> If devices in the array are not all the same size, then once the small‐ >> est device has been exhausted, the RAID0 driver starts collecting >> chunks into smaller stripes that only span the drives which still have >> remaining space. >> >> RAID1 >> <snip> >> All devices in a RAID1 array should be the same size. If they are not, >> then only the amount of space available on the smallest device is used >> (any extra space on other devices is wasted). >> <snip> >> >> RAID4 >> <snip> >> Unlike RAID0, RAID4 also requires that all stripes span all drives, so >> extra space on devices that are larger than the smallest is wasted. >> <snip> >> >> My understanding is that this is why MD RAID0 does not yet support >> --grow, while MD RAID456 does - since they take different striping >> approaches, it's much harder to reuse the --grow algorithm. >> >> >> Good luck, >> Conway S. Smith >> >> -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-03-15 17:46 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-15 6:26 RAID0 on disks with different sizes rj 2010-03-15 6:45 ` Joachim Otahal 2010-03-15 7:58 ` Beolach 2010-03-15 16:31 ` rj 2010-03-15 17:46 ` Joachim Otahal
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.