[DRBD-user] syncing progresses even if devices are of different size?

Tomasz Chmielewski mangoo at wpkg.org
Wed Jan 9 16:44:51 CET 2008

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


I just noticed that it is possible to sync a bigger device to a smaller 
device (i.e., drbd will sync a 500 GB device onto a 450 GB device).


drbd_receiver.c will even warn us of a "considerable difference", but 
the sync will progress:


/* warn if the arguments differ by more than 12.5% */
static void warn_if_differ_considerably(struct drbd_conf *mdev,
         const char *s, sector_t a, sector_t b)
{
         sector_t d;
         if (a == 0 || b == 0)
                 return;
         d = (a > b) ? (a - b) : (b - a);
         if ( d > (a>>3) || d > (b>>3))
                 WARN("Considerable difference in %s: %llus vs. %llus\n", s,
                      (unsigned long long)a, (unsigned long long)b);
}



What's the point in trying to synchronize a bigger device on a smaller one?

Just asking, perhaps there are some valid uses.



-- 
Tomasz Chmielewski
http://wpkg.org



More information about the drbd-user mailing list