Package ganeti :: Package storage :: Module drbd_cmdgen :: Class DRBD84CmdGenerator
[hide private]
[frames] | no frames]

Class DRBD84CmdGenerator

source code


Generates drbdsetup commands suited for the DRBD >= 8.4 syntax.

Instance Methods [hide private]
 
__init__(self, version)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
GenShowCmd(self, minor) source code
 
GenInitMetaCmd(self, minor, meta_dev) source code
 
GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params) source code
 
GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, dual_pri, hmac, secret, params) source code
 
GenSyncParamsCmd(self, minor, params) source code
 
GenPauseSyncCmd(self, minor) source code
 
GenResumeSyncCmd(self, minor) source code
 
GenPrimaryCmd(self, minor, force) source code
 
GenSecondaryCmd(self, minor) source code
 
GenDetachCmd(self, minor) source code
 
GenDisconnectCmd(self, minor, family, lhost, lport, rhost, rport) source code
 
GenDownCmd(self, minor) source code
 
GenResizeCmd(self, minor, size_mb) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
_ComputeDiskBarrierArgs(cls, disabled_barriers, disable_meta_flush)
Compute the DRBD command line parameters for disk barriers
source code
Static Methods [hide private]
 
_GetResource(minor)
Return the resource name for a given minor.
source code

Inherited from BaseDRBDCmdGenerator (private): _DevPath

Class Variables [hide private]
  _DISABLE_DISK_OPTION = "--disk-barrier=no"
  _DISABLE_DRAIN_OPTION = "--disk-drain=no"
  _DISABLE_FLUSH_OPTION = "--disk-flushes=no"
  _DISABLE_META_FLUSH_OPTION = "--md-flushes=no"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, version)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

GenShowCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenShowCmd

GenInitMetaCmd(self, minor, meta_dev)

source code 
Overrides: BaseDRBDCmdGenerator.GenInitMetaCmd

GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params)

source code 
Overrides: BaseDRBDCmdGenerator.GenLocalInitCmds

GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, dual_pri, hmac, secret, params)

source code 
Overrides: BaseDRBDCmdGenerator.GenNetInitCmd

GenSyncParamsCmd(self, minor, params)

source code 
Overrides: BaseDRBDCmdGenerator.GenSyncParamsCmd

GenPauseSyncCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenPauseSyncCmd

GenResumeSyncCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenResumeSyncCmd

GenPrimaryCmd(self, minor, force)

source code 
Overrides: BaseDRBDCmdGenerator.GenPrimaryCmd

GenSecondaryCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenSecondaryCmd

GenDetachCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenDetachCmd

GenDisconnectCmd(self, minor, family, lhost, lport, rhost, rport)

source code 
Overrides: BaseDRBDCmdGenerator.GenDisconnectCmd

GenDownCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenDownCmd

GenResizeCmd(self, minor, size_mb)

source code 
Overrides: BaseDRBDCmdGenerator.GenResizeCmd

_GetResource(minor)
Static Method

source code 

Return the resource name for a given minor.

Currently we don't support DRBD volumes which share a resource, so we generate the resource name based on the minor the resulting volumes is assigned to.