Revision 00fb8246

b/lib/cmdlib.py
2701 2701
  return results
2702 2702

  
2703 2703

  
2704
def _GenerateMDDRBDBranch(cfg, primary, secondary, size, names):
2705
  """Generate a drbd device complete with its children.
2706

  
2707
  """
2708
  port = cfg.AllocatePort()
2709
  vgname = cfg.GetVGName()
2710
  dev_data = objects.Disk(dev_type=constants.LD_LV, size=size,
2711
                          logical_id=(vgname, names[0]))
2712
  dev_meta = objects.Disk(dev_type=constants.LD_LV, size=128,
2713
                          logical_id=(vgname, names[1]))
2714
  drbd_dev = objects.Disk(dev_type=constants.LD_DRBD7, size=size,
2715
                          logical_id = (primary, secondary, port),
2716
                          children = [dev_data, dev_meta])
2717
  return drbd_dev
2718

  
2719

  
2720 2704
def _GenerateDRBD8Branch(cfg, primary, secondary, size, names, iv_name):
2721 2705
  """Generate a drbd8 device complete with its children.
2722 2706

  
b/lib/objects.py
277 277

  
278 278
  def CreateOnSecondary(self):
279 279
    """Test if this device needs to be created on a secondary node."""
280
    return self.dev_type in (constants.LD_DRBD7, constants.LD_DRBD8,
281
                             constants.LD_LV)
280
    return self.dev_type in (constants.LD_DRBD8, constants.LD_LV)
282 281

  
283 282
  def AssembleOnSecondary(self):
284 283
    """Test if this device needs to be assembled on a secondary node."""
285
    return self.dev_type in (constants.LD_DRBD7, constants.LD_DRBD8,
286
                             constants.LD_LV)
284
    return self.dev_type in (constants.LD_DRBD8, constants.LD_LV)
287 285

  
288 286
  def OpenOnSecondary(self):
289 287
    """Test if this device needs to be opened on a secondary node."""
......
326 324
    devices needs to (or can) be assembled.
327 325

  
328 326
    """
329
    if self.dev_type in [constants.LD_LV, constants.LD_MD_R1,
330
                         constants.LD_FILE]:
327
    if self.dev_type in [constants.LD_LV, constants.LD_FILE]:
331 328
      result = [node]
332 329
    elif self.dev_type in constants.LDS_DRBD:
333 330
      result = [self.logical_id[0], self.logical_id[1]]
......
470 467
    if self.dev_type == constants.LD_LV:
471 468
      val =  "<LogicalVolume(/dev/%s/%s" % self.logical_id
472 469
    elif self.dev_type in constants.LDS_DRBD:
473
      if self.dev_type == constants.LD_DRBD7:
474
        val = "<DRBD7("
475
      else:
476
        val = "<DRBD8("
470
      val = "<DRBD8("
477 471
      if self.physical_id is None:
478 472
        phy = "unconfigured"
479 473
      else:
......
488 482
        val += "backend=%s, metadev=%s" % (self.children[0], self.children[1])
489 483
      else:
490 484
        val += "no local storage"
491
    elif self.dev_type == constants.LD_MD_R1:
492
      val = "<MD_R1(uuid=%s, children=%s" % (self.physical_id, self.children)
493 485
    else:
494 486
      val = ("<Disk(type=%s, logical_id=%s, physical_id=%s, children=%s" %
495 487
             (self.dev_type, self.logical_id, self.physical_id, self.children))
b/scripts/gnt-instance
590 590
        minor_string = str(minor)
591 591

  
592 592
      buf.write("%s (%s:%s)" % (path, major_string, minor_string))
593
      if dtype in (constants.LD_MD_R1, constants.LD_DRBD7, constants.LD_DRBD8):
593
      if dtype in (constants.LD_DRBD8, ):
594 594
        if syncp is not None:
595 595
          sync_text = "*RECOVERING* %5.2f%%," % syncp
596 596
          if estt:

Also available in: Unified diff