<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I missed some bits where drbdsetup xxx secondary and drbdsetup xxx
secondary are called. My attempt at decoding the call tree is at the
end of the message, but in summary:<br>
<br>
* Check /proc/drbd on target, require network is Connected and local
disk is UpToDate. [No check on source?]<br>
* on target: drbdsetup <dev> secondary (just to be sure?). No
wait or status check?<br>
* on both nodes: drbdsetup <dev> disconnect. No wait or status
check?<br>
* on both nodes: drbdsetup <dev> connect. Poll /proc/drbd
until connected or syncing<br>
* wait until sync complete<br>
... rest not relevant as it doesn't get this far when it fails<br>
<br>
Regards,<br>
<br>
Brian.<br>
<br>
_ExecMigration(...) [cmdlib.py]<br>
on target node:<br>
_CheckDiskConsistency(...) [cmdlib.py]<br>
_CheckDiskConsistencyInner(...) [cmdlib.py]<br>
AFAICS it seems to call down through to GetSyncStatus
[bdev.py]<br>
which calls GetProcStatus which reads <b>/proc/drbd</b>.
Then it returns<br>
is_degraded=True if (not is_connected or not
is_disk_uptodate)<br>
_EnsureSecondary(target_node) [cmdlib.py]<br>
for target node only:<br>
call_blockdev_close<br>
perspective_blockdev_close [server/noded.py]<br>
BlockdevClose [backend.py]<br>
Close [bdev.py]<br>
<b> drbdsetup <dev> secondary</b><br>
_GoStandalone() [cmdlib.py]<br>
for both nodes:<br>
call_drbd_disconnect_net<br>
perspective_drbd_disconnect_net [server/noded.py]<br>
DrbdDisconnectNet [backend.py]<br>
DisconnectNet [bdev.py]<br>
_ShutdownNet [bdev.py]<br>
<b> drbdsetup <dev> disconnect</b><br>
_GoReconnect(True) [cmdlib.py]<br>
for both nodes:<br>
call_drbd_attach_net<br>
perspective_drbd_attach_net [server/noded.py]<br>
DrbdAttachNet [backend.py]<br>
AttachNet [bdev.py]<br>
GetProcStatus [bdev.py] - repeat until is_connected or
is_in_resync<br>
_GetProcData - reads <b>/proc/drbd</b><br>
_MassageProcData - groups by device<br>
_DRBD8Status(..) - parses one device line<br>
Open [bdev.py]<br>
<b> </b><b>drbdsetup <dev> primary</b><br>
_WaitUntilSync()<br>
for all nodes: repeat until all_done, display progress message<br>
call_drbd_wait_sync<br>
perspective_drbd_wait_sync<br>
DrbdWaitSync<br>
GetProcStatus<br>
_GetProcData - reads <b>/proc/drbd</b><br>
_MassageProcData - groups by device<br>
_DRBD8Status(..) - parses one device line<br>
... do the migration [but when there's a problem it doesn't get this
far]<br>
_EnsureSecondary(source_node)<br>
_WaitUntilSync()<br>
_GoStandalone()<br>
_GoReconnect(False)<br>
_WaitUntilSync()<br>
<br>
</body>
</html>