All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joachim Otahal <Jou@gmx.net>
To: rj <ratnadeep@gmail.com>
Cc: Beolach <beolach@gmail.com>, Mdadm <linux-raid@vger.kernel.org>
Subject: Re: RAID0 on disks with different sizes
Date: Mon, 15 Mar 2010 18:46:55 +0100	[thread overview]
Message-ID: <4B9E728F.1000503@gmx.net> (raw)
In-Reply-To: <d19eda751003150931h47d9509t9525e7768f025383@mail.gmail.com>

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

      reply	other threads:[~2010-03-15 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9E728F.1000503@gmx.net \
    --to=jou@gmx.net \
    --cc=beolach@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=ratnadeep@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.