When a MGT is mounted on a node which already has an running MGT
it will fail as expected since only one MGS can run on a node.
However, the MGS will be stopped by mistake during this process.
This patch fixes the problem.
Signed-off-by: Li Xi <pkuelelixi@gmail.com>
Change-Id: Ibebf59be3d41849d02801a4ac29fca31dc06c408
Reviewed-on: http://review.whamcloud.com/12301
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
{
struct obd_device *obd;
int rc;
+ struct lustre_mount_info *lmi;
ENTRY;
+ /* Do not stop MGS if this device is not the running MGT */
+ lmi = server_find_mount(LUSTRE_MGS_OBDNAME);
+ if (lmi != NULL && lmi->lmi_sb != sb)
+ RETURN(0);
+
CDEBUG(D_MOUNT, "Stop MGS service %s\n", LUSTRE_MGS_OBDNAME);
/* There better be only one MGS */