diff --git a/lib/cmdlib.py b/lib/cmdlib.py index cc1ead5f4b1f481185e9620c08d2a720551d3f64..69bb2318a4d12125e6acd67de1e533f93e5519c6 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2701,22 +2701,6 @@ def _GenerateUniqueNames(cfg, exts): return results -def _GenerateMDDRBDBranch(cfg, primary, secondary, size, names): - """Generate a drbd device complete with its children. - - """ - port = cfg.AllocatePort() - vgname = cfg.GetVGName() - dev_data = objects.Disk(dev_type=constants.LD_LV, size=size, - logical_id=(vgname, names[0])) - dev_meta = objects.Disk(dev_type=constants.LD_LV, size=128, - logical_id=(vgname, names[1])) - drbd_dev = objects.Disk(dev_type=constants.LD_DRBD7, size=size, - logical_id = (primary, secondary, port), - children = [dev_data, dev_meta]) - return drbd_dev - - def _GenerateDRBD8Branch(cfg, primary, secondary, size, names, iv_name): """Generate a drbd8 device complete with its children. diff --git a/lib/objects.py b/lib/objects.py index d67e31cf2182234b1d72d3e6ad0ef07ac23867f7..522162a7bf67ac7ea1865bc8227f619cc64f3883 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -277,13 +277,11 @@ class Disk(ConfigObject): def CreateOnSecondary(self): """Test if this device needs to be created on a secondary node.""" - return self.dev_type in (constants.LD_DRBD7, constants.LD_DRBD8, - constants.LD_LV) + return self.dev_type in (constants.LD_DRBD8, constants.LD_LV) def AssembleOnSecondary(self): """Test if this device needs to be assembled on a secondary node.""" - return self.dev_type in (constants.LD_DRBD7, constants.LD_DRBD8, - constants.LD_LV) + return self.dev_type in (constants.LD_DRBD8, constants.LD_LV) def OpenOnSecondary(self): """Test if this device needs to be opened on a secondary node.""" @@ -326,8 +324,7 @@ class Disk(ConfigObject): devices needs to (or can) be assembled. """ - if self.dev_type in [constants.LD_LV, constants.LD_MD_R1, - constants.LD_FILE]: + if self.dev_type in [constants.LD_LV, constants.LD_FILE]: result = [node] elif self.dev_type in constants.LDS_DRBD: result = [self.logical_id[0], self.logical_id[1]] @@ -470,10 +467,7 @@ class Disk(ConfigObject): if self.dev_type == constants.LD_LV: val = "<LogicalVolume(/dev/%s/%s" % self.logical_id elif self.dev_type in constants.LDS_DRBD: - if self.dev_type == constants.LD_DRBD7: - val = "<DRBD7(" - else: - val = "<DRBD8(" + val = "<DRBD8(" if self.physical_id is None: phy = "unconfigured" else: @@ -488,8 +482,6 @@ class Disk(ConfigObject): val += "backend=%s, metadev=%s" % (self.children[0], self.children[1]) else: val += "no local storage" - elif self.dev_type == constants.LD_MD_R1: - val = "<MD_R1(uuid=%s, children=%s" % (self.physical_id, self.children) else: val = ("<Disk(type=%s, logical_id=%s, physical_id=%s, children=%s" % (self.dev_type, self.logical_id, self.physical_id, self.children)) diff --git a/scripts/gnt-instance b/scripts/gnt-instance index 06caf943f0c906a96cc73f4495581743759db3f9..45d7fd4837841ca07104a30b82636982dd5e0e5d 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -590,7 +590,7 @@ def _FormatBlockDevInfo(buf, dev, indent_level): minor_string = str(minor) buf.write("%s (%s:%s)" % (path, major_string, minor_string)) - if dtype in (constants.LD_MD_R1, constants.LD_DRBD7, constants.LD_DRBD8): + if dtype in (constants.LD_DRBD8, ): if syncp is not None: sync_text = "*RECOVERING* %5.2f%%," % syncp if estt: