Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
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 :-) 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. To grow your drbd partition and filesystem (after playing around with HA or working with the intermediate size) the following worked for me: Just enlarge the disk-size in /etc/drbd.conf on both nodes while drbd is inactive. Starting drbd will make a full sync. You can even increase the disk-size on the primary while drbd is active and _reload_ drbd on the secondary during the (automatically started) full sync (drbd will complain about bogus disk-size otherwise). But I am not sure whether the latter aproach this is save. Workedforme. You are on the save side if you resize your filesystem after the drbd sync is finished. I usually place drbd on top of LVs so its even possible to add some extra disks or RAID Arrays - so beware to choose the physical extend of your VG accordingly :-) Have fun, Andreas > > Thanks in advance. > > Anshul > > _______________________________________________ > drbd-user mailing list > drbd-user at lists.linbit.com > http://lists.linbit.com/mailman/listinfo/drbd-user