From: Jason Warr <jason-/cow75dQlsI@public.gmane.org>
To: Vasiliy Tolstov <v.tolstov-+9FY0jupvH6HXe+LvDLADg@public.gmane.org>
Cc: Gabriel de Perthuis
<g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: software raid and bcache
Date: Wed, 03 Jul 2013 12:40:42 -0500 [thread overview]
Message-ID: <51D4621A.505@warr.net> (raw)
In-Reply-To: <CACaajQsSL6kdjgWhr+v9QxAKdPK=UvUd6NUn7YDESjYYJ_tiDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 07/03/2013 12:15 PM, Vasiliy Tolstov wrote:
> 2013/7/3 Jason Warr <jason-/cow75dQlsI@public.gmane.org>:
>> If you want md0 to be a raid1 device in the future you need to create it
>> as a 2 device array with a missing drive:
>>
>> mdadm -C /dev/md0 -l1 -n2 /dev/sda missing
>>
>> You can then add in the other device whenever you can/want. The key
>> though would be to make sure the size in blocks of the first device is =
>> or smaller than the second device will be. What I would do is create a
>> fd type partition that is 1% smaller than total raw device size on
>> /dev/sda just to give your self a small margin of error.
>>
>> parted /dev/sda mkpart primary 1.0 99% --align optimal
>> parted /dev/sda set 1 raid on
>> mdadm -C /dev/md0 -l1 -n2 /dev/sda1 missing
>>
>> That way down the road you can add in a disk of about the same size to
>> the existing raid1 completely transparent of bcache with a single command.
>>
>> mdadm /dev/md1 -a /dev/sdX1
>
> Thanks. But as i understand if the second drive bigger then first i
> can sync raid1 and after thet grow /dev/md0 to new size...
In a mirror your raid device can only be as big as the smallest device.
So if you put in a secondary device that is larger than the first you
still cannot go beyond the size of the first unless you then replace it
after syncing the second.
> --
> Vasiliy Tolstov,
> e-mail: v.tolstov-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
> jabber: vase-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
next prev parent reply other threads:[~2013-07-03 17:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 15:43 software raid and bcache Vasiliy Tolstov
[not found] ` <1372868105.17096.YahooMailNeo@web181504.mail.ne1.yahoo.com>
[not found] ` <1372868105.17096.YahooMailNeo-XYahOdtEMNkbWpotXP+qY5OW+3bF1jUfVpNB7YpNyf8@public.gmane.org>
2013-07-03 16:23 ` Vasiliy Tolstov
2013-07-03 16:41 ` Gabriel de Perthuis
2013-07-03 16:50 ` Vasiliy Tolstov
2013-07-03 16:56 ` Gabriel de Perthuis
[not found] ` <CACaajQv2A8XkOpmwYU47qCwPVXKsTR+T=ETA5AA701bOr=767w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-03 17:02 ` Jason Warr
[not found] ` <51D45919.40400-/cow75dQlsI@public.gmane.org>
2013-07-03 17:15 ` Vasiliy Tolstov
[not found] ` <CACaajQsSL6kdjgWhr+v9QxAKdPK=UvUd6NUn7YDESjYYJ_tiDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-03 17:40 ` Jason Warr [this message]
[not found] ` <51D4621A.505-/cow75dQlsI@public.gmane.org>
2013-07-03 17:57 ` Vasiliy Tolstov
2013-07-03 18:03 ` Gabriel de Perthuis
2013-07-03 18:17 ` Vasiliy Tolstov
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=51D4621A.505@warr.net \
--to=jason-/cow75dqlsi@public.gmane.org \
--cc=g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=v.tolstov-+9FY0jupvH6HXe+LvDLADg@public.gmane.org \
/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