linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Mike Myers <mikesm559@yahoo.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Nested raid operation and disk sizes
Date: Wed, 6 Aug 2008 11:55:18 +1000	[thread overview]
Message-ID: <18585.1158.151051.791210@notabene.brown> (raw)
In-Reply-To: message from Mike Myers on Tuesday August 5

On Tuesday August 5, mikesm559@yahoo.com wrote:

> Hi.  I friend asked me a question about reconfiguring his linux
> software raid system, and I think I know the answer, but thought I
> would ask here to make sure since I'd never done this before. 

Sensible.

> 
> My friend has 2 raid5 disk sets right now, one with 8 500 GB saegate
> 7200.10 disks, and the other with 5 1 TB Hitachi 7K1000 disks. 
> 
> He just bought 5 new seagate 7200.11 1 TB disks, and will format
> them as new raid5 set.  He then plans to use lvm to move the data
> off the  8x500GB set to the new 5x1TB set, destroy the 8x500 set,
> and then use group 6 of the 500 GB disks into 3 raid0 sets of 2x500
> each, and then add the raid0 sets as members of the new 1TB raid set
> by expanding the array. 
> 
That should work.

> This enables him to replace the 500 GB drives later with 1TB disks
> as the price of the disks gets cheaper as make the best use of the
> SATA sleds that his case has.  The new 7200.11's have 1,953,525,168
> 512 byte sectors each.  The existing segate 500 GB drives have
> 976,773,168 512 byte sectors.  If he combines two of the 500's
> together into a raid0, he should have a total of 1,953,546,336
> sectors available, which is greater number of sectors than the 1 TB
> drives, so there should be no problem using the 2 disk raid0 set as
> a member of the 7200.11 1 TB disk raid5 set, right?   

Take the size of the 500GB drives, subtract 128K for overhead, then
divide by your chunksize (e.g.64K) and double to get the number of
chunks that will be available to the raid5.
Compare this with the size of the 1TB device divided by the chunk
size.

2 500GB get 7631038 64K chunks each, or 15262076 total.
1 1TB has 15261915.  So the 2*500GB is still bigger, which is good.

If you want to be extra sure, you could create the raid5 on the 1TB
devices with a smaller size. e.g. --size 950000000
Then when all the devices are in place use "--grow --size=max",
and then grow the filesystem to use all the available size.

As you probably realise, you one need a single step to grow from 5
devices to 8.  Just add the 3 raid0s as spares and "mdadm -G /dev/md0 -n8"

NeilBrown

  parent reply	other threads:[~2008-08-06  1:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05 18:47 Nested raid operation and disk sizes Mike Myers
2008-08-05 20:35 ` Peter Grandi
2008-08-06  1:55 ` Neil Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-06 17:30 Mike Myers

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=18585.1158.151051.791210@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=mikesm559@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).