Re: software raid and bcache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/03/2013 11:50 AM, Vasiliy Tolstov wrote:
> 2013/7/3 Gabriel de Perthuis <g2p.code@xxxxxxxxx>:
>> 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@xxxxxxxxx
> jabber: vase@xxxxxxxxx
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux