[DRBD-user] disk size
Lars Ellenberg
Lars.Ellenberg at linbit.com
Thu Feb 12 14:12:10 CET 2004
/ 2004-02-11 22:29:58 +0100
\ Andreas Huck:
> Hi,
>
> On Friday 06 February 2004 04:40, Anshul Gupta wrote:
> > Hi Everyone,
> >
> > I am in process of setting up HA cluster and using DRBD for filesystem
> > replication. I have created partition /dev/hda2 of 20 GB, currently
> > using just 8GB. It takes approx 30 minutes to sync the entire partiton
> > for the first time.
> >
> > Can I change the disk-size parameter to say 10G (in drbd.conf) so that
> > sync time is reduced and later when I need more space, increase it?
> > Will there be any problem if I proceed this way?
>
> the disk-size in drbd.conf just needs to be larger or equal to the size
> of your filesystem on top of it. So if you use reiserfs, for example, you
> may do the following:
>
> 1) stop heartbeat on both nodes (/proc/drbd shows both as secondary)
> 2) drbdsetup /dev/nb0 primary (on node A)
> 2) resize_reiserfs -s 10G /dev/nb0 (on node A)
> Beware: shrinking is experimental. If its a new system, just
> create a 10G filesystem (and a filesystem which allows to enlarge it).
> 3) drbdsetup /dev/nb0 secondary
> 4) Comment out the original (or final) disk-size and set it to 10G in
> your /etc/drbd.conf (hm, don't know whether it understands the G,
> just copy-n-past $((10*1024*1024)) from your bash :-)
uhm. please do 4) before 2),
and make sure that the new device size shows up in drbdsetup /dev/nbX show !
yes, it understands G.
> 5) scp your new drbd.conf to your node B.
> 6) (re)start of drbd on either node will make it primary and start a
> full sync.
More information about the drbd-user
mailing list