新进化论

道生一,一生二,二生三,三生万物。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

备注:类似教程见http://www.shudnow.net/2008/04/28/exchange-2007-sp1-scc-using-server-2008-starwind-iscsi-part-4/

微软的安装参考文档:http://technet.microsoft.com/zh-CN/library/bb691354(v=exchg.80).aspx

一,实验环境

注意:Exchange 2007 SP3只支持在新安装的windows server 2008 R2上安装。

http://technet.microsoft.com/en-us/library/ff607226%28EXCHG.80%29.aspx

如下:

1.物理主机-OS windows 7 sp1家庭普通中文版,内存6GB, 虚拟化软件为vmware Workstion 8.04

2.虚拟机3台,OS均为windows server 2008

VM名称 DC1 Node1 Node2
功能角色 域控
Exchange HUB和CAS角色
iSCSI Target
集群节点1
域成员服务器,SCC主动集群邮件服务节点
集群节点2
域成员服务器,SCC被动集群邮件服务节点
IP 192.168.190.168

192.168.190.171
网络适配器名称:public

IPv6启用  

DNS:192.168.190.168

192.168.190.172
网络适配器名称:public

IPv6启用

DNS:192.168.190.168

心跳IP  

10.10.10.1
网络适配器名称:private

IPv6禁用

不设置网关和DNS

取消“在DNS中注册此连接的地址”选项

不启用LMHOSTS查找

禁用Tcp/IP上的NetBIOS

10.10.10.2
网络适配器名称: private

IPv6禁用

不设置网关和DNS

取消“在DNS中注册此连接的地址”选项

不启用LMHOSTS查找

禁用Tcp/IP上的NetBIOS

OS windows server 2008 R2
中文企业版
windows server 2008 R2
中文企业版
windows server 2008 R2
中文企业版
分配内存 1GB 1GB 1GB
备注 安装微软iscsi target软件
版本3.3
2个网络适配器
一个做心跳检测用private
一个对外提供服务public
(建议实际环境用第3个网卡以便iSCSI专用)
2个网络适配器
一个做心跳检测用private
一个对外提供服务public
(建议实际环境用第3个网卡以便iSCSI专用)
Exchange版本 2007 sp3中文企业版  2007 sp3中文企业版  2007 sp3中文企业版

 

 

集群邮箱服务器名称CMS Name exsvr
集群邮箱服务器IP 192.168.190.201

 

 

iSCSI target名称 SAN
可访问虚拟磁盘 500MB Exchange Data
500MB 仲裁盘
发起者程序 node1,node2

 

 

故障转移集群名字Cluster Name scc_cluster
集群IP 192.168.190.200
身份验证

 

 

小知识:SCC 最多可包含八个物理节点。因此,一个 SCC 中最多可以存放七个群集邮箱服务器。

虽然一个被动节点可以为一个或多个主动节点提供服务,但是微软建议您至少为群集中的每个主动节点部署一个被动节点。

微软iSCSI Software Target 3.3产品帮助

http://technet.microsoft.com/en-us/library/gg232606(v=ws.10).aspx

Exchange 2007 SP3和windows server 2008 R2试用期均为120天。

image

Exchange Server 2007:平台和版本介绍:

http://technet.microsoft.com/zh-cn/library/bb232170(v=EXCHG.80).aspx

Exchange高可用性介绍:http://technet.microsoft.com/en-us/library/bb124721(v=EXCHG.80).aspx

SCC的节点数

Exchange 2007 RTM and Exchange 2007 SP1 support a maximum of eight nodes in an SCC. Valid combinations of Exchange 2007 SP1 SCCs on Windows Server failover clusters include:

  • 7 Active / 1 Passive
  • 6 Active / 1 or 2 Passive
  • 5 Active / 1, 2, or 3 Passive
  • 4 Active / 1, 2, 3, or 4 Passive
  • 3 Active / 1, 2, 3, 4, or 5 Passive
  • 2 Active / 1, 2, 3, 4, 5, or 6 Passive
  • 1 Active / 0, 1, 2, 3, 4, 5, 6, or 7 Passive
    noteNote:
    The 64-bit version of Windows Server 2008 supports up to 16 nodes in a single failover cluster; however, Exchange 2007 supports a maximum of 8 nodes in the cluster. The failover cluster can still contain up to 16 nodes, but Exchange 2007 should be installed on no more than 8 nodes in the failover cluster.

Typically, there is no need for more than one passive node in the cluster for each active node in the cluster. As a result, a configuration of one active node and one passive node is preferred over configurations with one active node and multiple passive nodes. When using a single node SCC, you can use either a shared storage quorum, or a Majority Node Set quorum (traditional, without a file share witness). Although single-node SCCs are supported, they are not considered to be a high availability solution because no redundancy exists within the cluster.

 'Single Copy Cluster', protects you against a server failure but not a database failure. 'Local Continuous Replication' protects you from database failure, but not server failure. The more simple 'Clustered Continuous Replication' protects against both。

不错的文章,详细介绍:https://www.simple-talk.com/content/print.aspx?article=546

The most important thing to remember in an SCC environment is regarding ’shared storage‘. Databases and log files are placed on a SAN or other central storage solution. This can be a Fiber Channel solution or an iSCSI solution. Data placed on the SAN is shared by all members of the cluster. Only one node is owner of the data and thus able to process the data at a given time. When this node fails, another node can take over the databases and log files and continue the processing of the data. For the end user, this is a fully transparent process; he or she will hardly notice that something has happened in the background.

Before installing Exchange, the cluster has to be built. Windows needs to be installed and the hardware needs to be properly configured. All nodes of the cluster need full access to the shared storage locations on the SAN. A special location on the SAN must be reserved for the quorum. This is basically the brains of the cluster, the location where the cluster configuration is actually stored. This is stored on the SAN, but is very limited in size. The smallest unit of allocation within your SAN is sufficient, and normally around 1 GB.

When finished installing the Active Node of the cluster, you can continue with the other nodes. In the example shown in Figure 1, you can continue installing another Active Node and finish with installing the Passive Node of the cluster.

Implementing a SCC environment will help you protect against server failure, but since you only have a single copy of your data, it will not protect against database failure. You can lower the risk and possible impact by implementing multiple smaller databases in your environment instead of one large database. If a database failure occurs, only a part of your organization is impacted. But there’s a part still impacted and this part will see an outage of the messaging service.

注意:规划LUN的时候考虑分区对齐,微软建议一个LUN分配一个分区,而且建议用基本磁盘,MBR格式,NTFS簇大小为64KB

(或者遵照存储提供商的建议)

iSCSI 是唯一受 Exchange 2007 支持的基于网络的存储。虽然 iSCSI 通过以太网将服务器连接到存储,但要将其视为您的存储连接并将 iSCSI 存储网络与其他所有网络通信完全隔离,这很重要。流控制、服务质量 (QoS) 和大型帧等选项(如果可用)可进一步提高性能。Microsoft iSCSI Initiator 2.0 支持多路径 I/O (MPIO)。在 Microsoft 测试实验室中,我们在 3 块网卡上测到的速率都超过了 250 MB/秒,证实了 iSCSI 能够作为要求高吞吐量的方案的存储传输

http://technet.microsoft.com/zh-cn/library/bb738145(v=EXCHG.80).aspx

二,安装步骤

概述:先安装OS,配置好域控DC1,2个node加入活动目录成为成员服务器。

DC1上安装好Exchange HUB和CAS角色,配置好共享存储,Node1和Node2上分别加入共享存储,

然后分别安装主动/被动邮箱角色.

具体步骤

step 1: 3个VM上都分别安装好windows server 2008 R2,起好主机名,设置好IP地址

step 2:提升 DC1为域控,运行dcpromo,设置AD名为xxx.com

step 3:DC1上安装微软iscsi target 软件,配置好LUN,配置2个虚拟磁盘

image

 image

 image

image

step 4:node1和node2分别都加入xxx.com AD域

step 5:(DC1上安装Exchange 2007 sp3之前的准备工作1:安装AD DS管理工具和IIS)

开启PowerShell命令行窗口:执行如下命令:

import-module servermanager

Add-WindowsFeature RSAT-ADDS

如下:

image

需要重启一次,否则Exchange安装检查会提示如下错误:

image

 

 

备注:安装Exchange 2007 sp3之前的准备工作之一就是要安装RSAT-ADDS(AD DS 管理单元和命令行工具)

windows server 2008包含一个命令行工具servermanagercmd以便管理员用来

配置角色,角色服务,特性等。之前可以用它来安装RSAT-ADDS,自windows server 2008 R2起,这个工具将被弃用,

运行servermanagercmd会得到如下错误提示:

image

取而代之的是新的powershell server manager cmdlets.

在使用这个新的cmdlets之前必须先导入他们。开启powershell命令行提示符,输入以下命令:

import-module servermanager

和原来的servermanagercmd等价的3个PowerShell cmdlets如下:

Add-WindowsFeature [servermanagercmd.exe –install]

Get-WindowsFeature [servermanagercmd.exe –query]

 

Remove-WindowsFeature [servermanagercmd.exe –remove]

 

Step 6:准备工作2:DC1上安装IIS

打开服务器管理器:

image

点击“角色”

image

点击“添加角色”,出现如下对话框,点击下一步

image

勾选“Web服务器”,点击下一步

image

点击下一步

image

勾选如下选项,然后点击下一步

安全性:基本身份验证,windows身份验证,摘要式身份验证

性能:动态内容压缩

IIS6管理兼容性: IIS6元数据兼容性,IIS6管理控制台

image

点击“安装”

image

提示安装成功

image

 

Step 7: DC1上安装Exchange sp3

下载Exchange sp3中文版安装程序,解压到某个目录,

执行setup程序如下:

安装步骤

image

 

image

 

image

 

image

 

image

 

image

 

image

准备情况检查完毕

image

完整成功

Step 8:Node1和Node2上添加共享磁盘

以域管理员账户登录Node1,

点击开始-管理工具-iscsi发起程序,

点击“发现”一页,点击发现门户,输入DC1的IP或者完全域名

image

点击“目标”一页,输入DC1的IP或者完全域名,点击连接

image

状态变为"连接"

image

打开服务器管理器程序-磁盘管理器,会发现多出的2个磁盘

image

右键选择“联机”,初始化磁盘,选择MBR格式新建简单卷,分配驱动器号X和Q,

X磁盘用作exchange data,Q用作仲裁

 

对Node2如法炮制,不过磁盘驱动器号会自动分配为E:和F:

image

Step9:建立群集

备注:如果是在 Windows Server 2003 上安装 SCC,则必须使用域帐户作为群集服务帐户:先建立一个域账户,将该域账户加入Node1和Node2的本地管理员组

如果在 Windows Server 2008 上安装 SCC,则群集服务将在 LocalSystem (SYSTEM) 帐户下运行。

在将成为群集中第一个节点的计算机上执行此步骤,从Node1开始,

先添加“故障转移群集”:以域账户登录Node1,打开服务器管理器,添加功能,勾选“故障转移群集”

image

image

 

image

 

image

打开故障转移群集管理器,如果没有以域用户登录会出现以下提示:

image

以域用户登录才可以创建集群,

image

创建之前可以验证配置,启动验证配置向导:

image

输入节点的名字:

image

可以全部验证(注意验证前其他节点也必须如前所述一样安装了故障转移集群管理器)

image

image

 image

或者选择性的验证

image

 image

验证会进行4组测试:库存、网络、存储和系统配置

验证成功:

image

完整报告:

image

点击“创建一个集群”,启动向导,(注意域账户必须是在本地管理员组里头)

image

输入2个节点的名字:Node1和Node2

image

填写集群名字scc_cluster和IP地址192.168.190.200

image

确认:

image

正在配置:

image

创建成功:

image

此时登录Node2,也会发现集群创建好了。

image

打开“故障转移集群管理器”,点击操作-更多操作-配置集群仲裁设置

image

向导界面:

image

 

image

 

选择仲裁磁盘,原仲裁磁盘是系统自动选择的,一般是第一个可见共享磁盘,如下:

image

更改为如下:

image

确认:

image

更改成功后的摘要:

image

至此,windows 2008 server上基于iSCSI的群集创建完毕,

可以在域控制器DC1上查看AD中的“用户和计算机”,发现多出了个名叫scc_cluster的机器,

这是windows cluster对外的机器名。

image

在DNS中可以查看到多出来一个名为scc_cluster的A记录,这就是刚才配置的集群的虚拟IP

image

命令行查看集群状态和节点:

 

cluster scc_cluster node

下一步是安装Exchange SCC主动节点的邮箱服务器角色。

step 10:安装Exchange SCC主动群集邮箱服务器角色

概要:先安装IIS,再安装Exchange

----------------------------------------------------------------------------------------------------------------------------

失败经历:第一次是这么尝试的,结果遇到状况:3个VM都开机,在Node1上先安装故障转移集群,配置好后仲裁磁盘后,再安装Exchange 邮箱服务器主动节点,

在准备情况检查阶段遇到错误提示:需要安装IIS和重启

只好放弃安装Exchange,先安装IIS,再重启Node1,结果发现2个共享磁盘

的所有者都变成Node2了,而不是之前的Node1,而在Node1上2个共享磁盘都脱机了。

过一段时间后2个磁盘的owner又变成一个是node1一个是node2.而且Node1和Node2上各自只能识别一个磁盘(节点自身是owner的那个磁盘),

重启一次node1,此时node2上出现node1不可用

image

image

Node2上只可以识别其中一个磁盘,另一个脱机。Node1上也是类似。

image image

教训:安装邮箱服务器主动节点前确保集群资源在该主动节点上,此例中资源就是共享磁盘。

如果安装前,主动node需要启动,确保启动后资源也在该node上,例如可以在启动主动node之前先关闭所有其他节点。

或者如果出现前述现象一个磁盘在node1,另一个在Node2上,那么就把node2重启一次,就会发现owner都变成node1

如图重启node2过程中,owner将变成node1

image

重启node2结束后的截图:

image

----------------------------------------------------------------------------------------------

域账户登录Node1,安装IIS,如果不安装IIS,exchange安装检测会报如下错误提示。

image

打开服务器管理器,点击角色,添加角色,勾选IIS,安装IIS时需要添加

IIS 6 元数据库兼容性

IIS 6 管理控制台

IIS 7 基本验证

IIS 7 windows验证

安装成功后,先对除了Node1之外的其他节点关机,然后重启Node1,其他节点再开机。

image image

解压exchange 安装压缩包,执行setup.exe

执行自定义安装,,选择主动集群邮箱角色

image

选择单一副本群集,填写集群邮箱服务器(CMS)名称exsvr,

指定集群邮箱服务器数据库文件路径时在共享磁盘x:上新建exchange目录,并选择该目录,点击下一步

imageimage

设置集群邮箱服务器exsvr的IP:192.168.190.201,可以不选择IPv6

image

客户端设置

image

准备情况检查

image

开始安装

image

安装成功

image

点击完成,提示需要重新启动

image

--------------------------------------------------------------------------------------------------------

备注:此处微软提示的正确做法是:参考:http://technet.microsoft.com/zh-cn/library/bb676373.aspx

在重新启动节点之前,应停止 CMS。要停止 CMS,从“开始”菜单中打开 Exchange 命令行管理程序(在Microsoft Exchange Server 2007 程序组中)并运行以下命令:

Stop-ClusteredMailboxServer <CMSName> -StopReason Setup -Confirm:$false停止 CMS(使其脱机)之后,关闭命令提示符窗口和 Exchange 命令行管理程序,然后重新启动节点。

在重新启动期间,CMS 以及正在重新启动节点所拥有的任何其他群集组都会被移到群集中的另一个节点(如果有的话),这包括未安装 Exchange 的节点。在配置物理磁盘资源之前,应将 CMS 组及包含 CMS 使用的磁盘资源的那些组一起移回主动节点。如果在重新启动期间获得 CMS 所有权的节点安装了同一版本的 Exchange,则可以在 Exchange 命令行管理程序中使用以下命令,将 CMS 移回已重新启动的节点:

Move-ClusteredMailboxServer <CMSName> -TargetMachine <NodeName> -MoveComment Setup -Confirm:$false

如果在重新启动期间获得 CMS 所有权的节点未安装同一版本的 Exchange(或如果在该节点上未安装 Exchange),则必须使用群集管理工具(故障转移群集管理工具或 Cluster.exe)将 CMS 组移回已重新启动的节点。可以使用以下命令完成此操作:

Cluster group <CMSName> /move:<NodeName>----------------------------------------------------------------------

先关闭Node2,再重启Node1

重启Node1后:

imageimage

imageimage

接着启动Node2,继续安装被动节点角色,启动Node2后上面图片中的Node2状态都会变成正常。

-----------------------------------------------------------------------------------------------------------

失败经历2:到这一步,Node1和Node2上的共享磁盘都是正常状态,将exchane安装包拷贝到Node2上

准备安装被动角色的时候虚机所在磁盘空间不够,导致vmware workstation强制中断拷贝,并强制对Node2关机。

磁盘空间处理好后,启动Node2,发现2个共享磁盘是保留状态无法联机,此时就将Node1重启,然后就发现Node2上共享

磁盘联机了,所有者也改为了Node2.但是exsrv启动失败:

image

再重启Node2,共享磁盘所有者又变成了Node1(此时Node2没有共享磁盘),但是exsrv服务还是没启动,需要手工启动一下,exsrv右键

选择“将该应用或者服务联机”即可。至此,一切问题解决,可以到step 11了。

image手工启动exsrv后的状态:image

开启exchange命令行,检查

image

手工停止/启动exsrv的exchange命令

image

-------------------------------------------------------------------------------------------

step 11:安装Exchange SCC被动集群邮箱服务器角色

域账户登录Node2,

先安装IIS,如果不安装IIS,exchange安装检测会报如下错误提示。

image

打开服务器管理器,点击角色,添加角色,勾选IIS,安装IIS时需要添加

IIS 6 元数据库兼容性

IIS 6 管理控制台

IIS 7 基本验证

IIS 7 windows验证

------------------------------------------------------------------------------------------------------------------

失败经历3:接失败经历2,Node2上,IIS安装成功后,发现node2没有共享磁盘,只好将node1停止CMS

image

然后重启Node1,此时Node2恢复能看到共享磁盘。但是启动exsrv联机,会发现它mailbox连接不上,报错,下图所示为正常联机状态。

image

只好将node2又重启,恢复共享磁盘所有者为node1,mailbox才联机成功。

但是此时node2又没有共享磁盘了。

只好将node1关机(关机时exsrv是联机的)。

然后再在node2上安装Exchange被动集群邮箱服务器角色,准备情况检查阶段会报错,

image

总结:上面折腾半天,是走了弯路,安装过程中错把exchange安装路径理解为数据库文件存放的共享磁盘路径。

其实被动节点node2上无需能看到共享磁盘。直接安装即可,不需要指定共享磁盘路径,相当容易

------------------------------------------------------------------------------------------

执行exchange setup程序

image

image

image

image

image

image

image

安装成功

image

提示需要重启

image

重启node2,大功告成。

step 12:测试故障转移

测试一:将Node1关机,此时Node2是活动节点,查看邮箱服务等状态均正常,说明切换成功

image image

测试二:紧接着将node1开机,使用命令行或者管理工具切换node1为活动节点

--------------------------------------------------------------------------------

备注:

SCC的恢复行为,微软有以下详细描述:

http://technet.microsoft.com/zh-CN/library/aa997195(v=exchg.80).aspx

管理SCC,微软文档:

http://technet.microsoft.com/zh-CN/library/aa996753(v=exchg.80).aspx

--------------------------------------------------------------------------------

域账户登录到Node1打开Exchange管理控制台,展开“服务器配置”,再选择“邮箱”。

image

右键单击要移动的 CMS,本例为exsrv,然后选择“管理群集邮箱服务器”。

image

选择移动到其他节点,点击下一步,选择节点node1,

image image

注释是必须的,否则报错:

image

摘要:

image

能不能切换成功,此处虚拟机环境下会发生很多结果。现将遇到的几个类型说明如下:

结果1:切换成功:

image

不过仲裁盘还是在Node2上,Node1只是exchange数据盘的所有者

image

查看集群状态摘要,有点奇怪,显示当前主服务器为node2

image image image

查看Exchange管理控制台-服务器配置-邮箱-exsrv属性-集群邮箱服务器

image

现象2:因为虚拟机环境有限,进行切换有时候会会发现邮箱数据库挂载失败,错误提示如下:

image 

 

如图:共享磁盘资源没加载,导致邮箱数据库联机失败image 

日志ID:1069

image

微软对此ID的解释:http://technet.microsoft.com/en-us/library/cc756225(v=WS.10).aspx

此时使用exchange命令行Get-ClusteredMailboxServerStatus查看状态

image

观察到有一个共享磁盘-仲裁盘切换过来了。

image

邮箱数据库之所以挂载失败就是因为另一个承载exchange数据的共享磁盘资源没有切换过来,如何解决这个问题:继续如下操作

打开故障转移集群管理器-找到服务和应用程序下面的exsrv,点击右键菜单-“添加存储”,将exchange data共享磁盘添加进来,

然后重新挂载mailbox数据库即可。

 

上例如果是从node1切换到node2,一切正常的话,使用exchange命令行Get-ClusteredMailboxServerStatus查看状态验证转移成功:

image

 

step 13:安装后的任务:

为 Windows Server 2008 单一副本群集配置磁盘依存关系

这个是很多人容易忽略掉的

具体参见下文:《管理Exchange SCC》

 

posted on 2013-04-12 16:47  岌岌可危  阅读(449)  评论(0编辑  收藏  举报