Re: software raid and bcache

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

 



On 07/03/2013 12:15 PM, Vasiliy Tolstov wrote:
> 2013/7/3 Jason Warr <jason@xxxxxxxx>:
>> 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@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




[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