[DRBD-user] Increasing a DRBD array

Andreas Kurz andreas at hastexo.com
Fri Oct 21 21:55:06 CEST 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 10/21/2011 09:30 PM, Gerald Brandt wrote:
> Hi,
> 
> I've successfully resize the lower level RAID-6 array, and grown it.  I'm now attempting to resize drbd, and nothing seems to happen.
> 
> /dev/md0 is definitely bigger.
> 
> What should I see during a drbd resize?

You should see a DRBD resync of the newly added space.

What is the lower level device of your DRBD resource? The whole md0, a
partition on md0, a lv on a vg on a pv on md0?

... so if the lower level device has been resized on both nodes, DRBD
should definitely grow on a "drbdadm resize".

Did I mention that on starting DRBD it is resized automatically if a
bigger lower level device is detected? ... have a look at the kernel logs...

Regards,
Andreas

-- 
Need help with DRBD?
http://www.hastexo.com/now

> 
> Gerald
> 
> 
> ----- Original Message -----
>> From: "Gerald Brandt" <gbr at majentis.com>
>> To: drbd-user at lists.linbit.com
>> Sent: Tuesday, October 18, 2011 7:08:55 AM
>> Subject: Re: [DRBD-user] Increasing a DRBD array
>>
>> Hi,
>>
>> Okay, this is my list of what to do, and in what order:
>>
>> 1. remove the primary from DRBD
>> 2. add the physical disk to the primary
>> 3. add the primary back to DRBD and allow resync.
>> 4. remove the secondary from DRBD
>> 5. add the physical disk to the secondary
>> 6. add the secondary back to DRBD and allow resync.
>> 7. fdisk and add the disk to the RAID array on primary and secondary
>> 8. grow the RAID array on the primary and secondary (while mounted or
>> not mounted?)
>> 9. drbdadm resize on the primary (can this be done while drbd is in
>> use?)
>> 10. expand the file system on the primary only (via Citrix XenServer
>> (iSCSI))
>>
>> That sounds about right.  As long as I don't lose data. (yeah,
>> backups.  That's left up to my client, but becomes my problem if
>> they failed.)
>>
>> Gerald
>>
>>
>>
>> ----- Original Message -----
>>> From: "Florian Haas" <florian at hastexo.com>
>>> To: drbd-user at lists.linbit.com
>>> Sent: Tuesday, October 18, 2011 3:53:11 AM
>>> Subject: Re: [DRBD-user] Increasing a DRBD array
>>>
>>> On 2011-10-17 22:19, Matt Graham wrote:
>>>>>> Your DRBD uses the MD RAID as its backing device, doesn't it?
>>>>>> That means you'll have add the drive and resize your RAID
>>>>>> first,
>>>>>> then
>>>>>> you can resize your DRBD, and then expand the file system.
>>>>> Definitely built on top of the RAID.  I'm a bit confused by your
>>>>> answer though.  Step 8 grows the RAID array, and I don't have a
>>>>> step
>>>>> to grow DRBD.  Does that mean I'm missing something?
>>>>
>>>> 8. mdadm --grow /dev/md0 (other mdadm options)
>>>>    Do that on both machines.
>>>> 8.1 (on secondary) drbdsetup /dev/drbd0 resize
>>>> 8.2 (on primary) drbdsetup /dev/drbd0 resize
>>>
>>> There's a "resize" subcommand for drbdadm too; no need to use
>>> drbdsetup.
>>> And it needs to be done on one node only. Just do "drbdadm resize
>>> <resourcename>" on the primary while the two nodes are connected,
>>> and
>>> you're good to go.
>>>
>>>>    The softRAID is below the DRBD device.  Once the softRAID is
>>>>    larger, the DRBD device needs to be informed of this fact.
>>>>    When making arrays/devices larger, you go bottom-up; you make
>>>>    the hardware changes first, then softRAID changes, then DRBD
>>>>    changes, then filesystem changes.
>>>> 9. (on primary) resize2fs /dev/drbd0
>>>
>>> If it's ext3 and if it supports on-line resizing, of course. But
>>> that
>>> should be obvious.
>>>
>>> Cheers,
>>> Florian
>>>
>>> --
>>> Need help with DRBD?
>>> http://www.hastexo.com/knowledge/drbd
>>> _______________________________________________
>>> drbd-user mailing list
>>> drbd-user at lists.linbit.com
>>> http://lists.linbit.com/mailman/listinfo/drbd-user
>>>
>> _______________________________________________
>> drbd-user mailing list
>> drbd-user at lists.linbit.com
>> http://lists.linbit.com/mailman/listinfo/drbd-user
>>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 286 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20111021/e7f21b38/attachment.pgp>


More information about the drbd-user mailing list