* software raid and bcache
@ 2013-07-03 15:43 Vasiliy Tolstov
[not found] ` <1372868105.17096.YahooMailNeo@web181504.mail.ne1.yahoo.com>
2013-07-03 16:41 ` Gabriel de Perthuis
0 siblings, 2 replies; 11+ messages in thread
From: Vasiliy Tolstov @ 2013-07-03 15:43 UTC (permalink / raw)
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA
Hello. I'm newbie with bcache and stuck at drive configuration.
Now i have 1 sata 3Tb disk and one 240Gb ssd eMLC disk. I want to
create from 1 sata disk raid1 with missing 1 drive (i want to able to
sync pre failed sata disk with new by remove ssd disk and add sata)
What steps i need to do?
--
Vasiliy Tolstov,
e-mail: v.tolstov-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
jabber: vase-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
^ permalink raw reply [flat|nested] 11+ messages in thread[parent not found: <1372868105.17096.YahooMailNeo@web181504.mail.ne1.yahoo.com>]
* Re: software raid and bcache
2013-07-03 15:43 software raid and bcache Vasiliy Tolstov
[not found] ` <1372868105.17096.YahooMailNeo@web181504.mail.ne1.yahoo.com>
@ 2013-07-03 16:41 ` Gabriel de Perthuis
2013-07-03 16:50 ` Vasiliy Tolstov
1 sibling, 1 reply; 11+ messages in thread
From: Gabriel de Perthuis @ 2013-07-03 16:41 UTC (permalink / raw)
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA
On Wed, 03 Jul 2013 19:43:55 +0400, Vasiliy Tolstov wrote:
> Hello. I'm newbie with bcache and stuck at drive configuration.
> Now i have 1 sata 3Tb disk and one 240Gb ssd eMLC disk. I want to
> create from 1 sata disk raid1 with missing 1 drive (i want to able to
> sync pre failed sata disk with new by remove ssd disk and add sata)
>
> What steps i need to do?
Hello,
You could use `blocks to-lvm`[1] to convert your large disk to lvm,
and then `blocks to-bcache` to convert the lvm volume to bcache.
The lvm conversion will allow you to migrate the data off the
prefailed disk later, either by moving it (pvmove) or by converting
to raid1 (lvconvert).
The blocks README should guide you through converting. Right now it
doesn't include instructions on attaching the slow backing device to
the SSD cache device, I'll see about adding that, or you can refer
to the ATTACHING section of [2].
[1] https://github.com/g2p/blocks
[2] http://atlas.evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt?h=bcache-dev
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: software raid and bcache
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>
0 siblings, 2 replies; 11+ messages in thread
From: Vasiliy Tolstov @ 2013-07-03 16:50 UTC (permalink / raw)
To: Gabriel de Perthuis; +Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA
2013/7/3 Gabriel de Perthuis <g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> Hello,
>
> You could use `blocks to-lvm`[1] to convert your large disk to lvm,
> and then `blocks to-bcache` to convert the lvm volume to bcache.
> The lvm conversion will allow you to migrate the data off the
> prefailed disk later, either by moving it (pvmove) or by converting
> to raid1 (lvconvert).
Why i can't do :
create /dev/md0 with /dev/sda (sata) level=1 raid-devices=1
format /dev/md0 with bcache
format /dev/sdb (ssd) with brache
create bcache0 with /dev/md0 and /dev/sdb
?
--
Vasiliy Tolstov,
e-mail: v.tolstov-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
jabber: vase-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: software raid and bcache
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>
1 sibling, 0 replies; 11+ messages in thread
From: Gabriel de Perthuis @ 2013-07-03 16:56 UTC (permalink / raw)
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA
On Wed, 03 Jul 2013 20:50:59 +0400, Vasiliy Tolstov wrote:
> 2013/7/3 Gabriel de Perthuis:
>> Hello,
>>
>> You could use `blocks to-lvm`[1] to convert your large disk to lvm,
>> and then `blocks to-bcache` to convert the lvm volume to bcache.
>> The lvm conversion will allow you to migrate the data off the
>> prefailed disk later, either by moving it (pvmove) or by converting
>> to raid1 (lvconvert).
>
> Why i can't do :
>
> create /dev/md0 with /dev/sda (sata) level=1 raid-devices=1
> format /dev/md0 with bcache
> format /dev/sdb (ssd) with brache
>
> create bcache0 with /dev/md0 and /dev/sdb
That's reasonable, if you don't have any data you need to keep.
You can use
make-bcache -C /deb/sdb -B /dev/md0
to format the devices and attach them at the same time.
^ permalink raw reply [flat|nested] 11+ messages in thread[parent not found: <CACaajQv2A8XkOpmwYU47qCwPVXKsTR+T=ETA5AA701bOr=767w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: software raid and bcache
[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>
0 siblings, 1 reply; 11+ messages in thread
From: Jason Warr @ 2013-07-03 17:02 UTC (permalink / raw)
To: Vasiliy Tolstov; +Cc: Gabriel de Perthuis, linux-bcache-u79uwXL29TY76Z2rM5mHXA
On 07/03/2013 11:50 AM, Vasiliy Tolstov wrote:
> 2013/7/3 Gabriel de Perthuis <g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>> Hello,
>>
>> You could use `blocks to-lvm`[1] to convert your large disk to lvm,
>> and then `blocks to-bcache` to convert the lvm volume to bcache.
>> The lvm conversion will allow you to migrate the data off the
>> prefailed disk later, either by moving it (pvmove) or by converting
>> to raid1 (lvconvert).
>
> Why i can't do :
>
> create /dev/md0 with /dev/sda (sata) level=1 raid-devices=1
> format /dev/md0 with bcache
> format /dev/sdb (ssd) with brache
>
> create bcache0 with /dev/md0 and /dev/sdb
>
> ?
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
>
>
> --
> Vasiliy Tolstov,
> e-mail: v.tolstov-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
> jabber: vase-+9FY0jupvH6HXe+LvDLADg@public.gmane.org
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-07-03 18:17 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox