说到Windows下集群,大家都会想到Windows系统自带的故障转移的集群服务,详细的我们就不多说了,今天主要介绍的Windows Server 2016下配置NFS服务集群,我们为什么搭建今天的服务呢?是有一定的原因的,在此我们就说说原因吧~从去年年开始公司就一直上线OA系统,OA系统中有一个附件服务器,通过Mount的方式做共享数据,由于之前做的是单点,供应商也没有好的方法,所以就想到了用windows的NFS做集群,经过尝试确实效果还不错,所以分享给有需要的同学参考。
环境介绍:
Hostname:DC
IP:192.168.5.10
Role:DC、DNS
Domain Name:ixmsoft.com
Hostname:ISCSI-Server
IP:192.168.5.65
Role:ISCSI Server
Hostname:NFS2016-01
IP:192.168.2.42
Role:NFS+Cluster
Hostname:NFS2016-02
IP:192.168.2.43
Role:NFS+Cluster
接下来开始我们的环境
我们的DC环境
IXMSOFT.COM
我们在ISCSI Server上挂载一块40G的磁盘,我们需要将该40G磁盘空间分配到两台NFS服务器
我们打开ISCSI服务器然后新建ISCSI磁盘
定义名称
定义服务器
确认信息
创建完成
然后我们在NFS2016服务器上,打开ISCSI发起程序,然后是输入ISCSI服务器,然后快速链接
我们打开磁盘管理,然后联机,初始化,然后分配盘符
分配盘符0盘
我们同样在第二台服务器上进行发起ISCSI发起程序,操作同上面一样
磁盘准备好了之后,我们接下来就是安装安装NFS服务和故障转移
首先在第一台服务器上进行安装,NFS服务
同时勾选安装故障转移
安装完成
我们同样在第二台服务器上也安装NFS和故障转移
同样也安装完成
接下来我们创建故障转移集群
我们最好在创建前进行验证配置
开始验证
验证通过后,我们就可以开始创建集群
需要注意的是,有一个警告---网络警告,原因是由于集群建议配置心跳线,再次忽略了
开始创建集群
定义集群名称及地址
NFS2016-CL
192.168.2.44
确认信息
创建完成
接下来我们开始配置NFS集群
我们首先是增加一次磁盘,主要用来做数据共享使用
配置角色
开始配置角色
选择--文件服务器
我们选择文件服务起的常规使用,具体可以参考提示说明
定义客户端访问点,定义名称及IP
NFS2016-CLS
192.168.4.45
选择存储
确认信息
创建完成
创建完成
我们可以查看磁盘状态
我们单击进入仲裁盘,然后可以看见里面有一个cluster文件
我们打开cluster文件可以看见一些共享文件
接下来我们测试一下集群,我们在集群存储磁盘中创建一个文件夹--sharedir,然后创建测试文件
我们创建一个测试文件
然后我们访问集群的客户端访问地址
然后我们单击进入文件夹查看是否可以显示
接下来我们切换节点
我们再切换前,我们ping一下客户端访问地址,查看切换的时候看看网络状态
开始切换
开始切换
切换完成
我们发现切换的时候就丢了一个包,所以还是比较正常的
本文转自 高文龙 51CTO博客,原文链接:http://blog.51cto.com/gaowenlong/1902158,如需转载请自行联系原作者

![clipboard[1] clipboard[1]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/785b9b663bf6490aa5cdd9a7f23f7130.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[2] clipboard[2]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/ca08ed04c93d4705a72b8f221557d75a.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[3] clipboard[3]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/25d500dbffb34d40a2d3a360ddeea08f.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[4] clipboard[4]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/cebd65ec52f24980b2ee4c87c5a2b0a6.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[5] clipboard[5]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/b373c3df2ebd4794905d24c91a505f39.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[6] clipboard[6]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/884069a7ebb54d459a81c6684210ae5a.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[7] clipboard[7]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/bbc3fd166bc243d5b4ca2d1d4d084dba.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[8] clipboard[8]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/141739ec1fdb4d90a46d0fc341bfc907.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[9] clipboard[9]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/6023d1de8efe41618a113eb87b3d186e.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[10] clipboard[10]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/2ec417d70a9a4978b4871130620d913f.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[11] clipboard[11]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/dd6d25a5411542a98c7582d6ff3a0653.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[12] clipboard[12]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/6ee96416ab8a42b0aabbe80ca79426c6.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[13] clipboard[13]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/4d0ad346b3a949e78871c255b71e1ff3.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[14] clipboard[14]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/397c257da0784efe92d0a09162ba728c.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[15] clipboard[15]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/4d0d531d992f412bbd21684445c80eef.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[16] clipboard[16]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/ba726578dd26458c92134dc91fab2cfd.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[17] clipboard[17]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/de1530baa8ae48d09d4395c3aed4ccb2.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[18] clipboard[18]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/f83085ea7bf84c00874feaf57ffc9c98.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[19] clipboard[19]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/d4454d5cfc004c47b063ba740fe34d72.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[20] clipboard[20]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/2a41862a1607493b9bf8ea0e3e3362f8.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[21] clipboard[21]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/1b4acd1fe8c948f49c10e388a29ee18f.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[22] clipboard[22]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/96b67d189e01496b828faf4454d440bb.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[23] clipboard[23]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/41880438b98f4b6fb95fd87e365e174d.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[24] clipboard[24]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/53394c6a6c8a4ad29dbf03df62b75077.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[25] clipboard[25]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/2665890d0d9146ea8b64b738eae0e1d7.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[26] clipboard[26]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/cc9c4624b6c2468d8c8c767711453d89.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[27] clipboard[27]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/ceb91b2a44fd43c88ca185f159a6940c.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[28] clipboard[28]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/f294af7eecfc4d938739a356f72eae24.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[29] clipboard[29]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/f2e904c24e2d4a4391094b08b54f26a8.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[30] clipboard[30]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/cb66324ffa86468f854524998f98d509.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[31] clipboard[31]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/b526956bce9c406384c64c23e1d5011a.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[32] clipboard[32]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/dcc0b63140b14d7894953719d83e78f8.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[33] clipboard[33]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/d18c29373da6473d96e6d2baae79bc42.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[34] clipboard[34]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/6e4906769e344f9386cb59ac2093ce8f.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[35] clipboard[35]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/0dc9765cc0754d6183978b9fdbf2f927.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[36] clipboard[36]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/50f1d89db19143598f84a37a5c3dc551.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[37] clipboard[37]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/93b4818a1bab4539942b280bc33063d0.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[38] clipboard[38]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/e1890208de6c44108459f85437974b2b.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[39] clipboard[39]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/d4f395cd569c4f5b92b5be7a519e57a3.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[40] clipboard[40]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/68a49fdaf01b41b8a2db68d1a9629e5e.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[41] clipboard[41]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/68a48d6dd12c4a4c817fabdfae88ac1b.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[42] clipboard[42]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/7c76e80c34374af6b954f5a5c8886c1f.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[43] clipboard[43]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/d2b0de45b4b447699cc8e3fb24f06728.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[44] clipboard[44]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/e4d346d706d84c1cb9035f89a4328f8d.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[45] clipboard[45]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/0d2844e1dd38461a9a80be8672904303.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[46] clipboard[46]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/2f736d7d571847de9fdfaadbc9c147da.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[47] clipboard[47]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/94540b212ff1468da90a1a57f030a658.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[48] clipboard[48]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/4e8336d7800d4f65ab9dabc26e6fc797.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[49] clipboard[49]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/0a4299fe500a41d88f659ccb285f1302.png?x-oss-process=image/resize,w_1400/format,webp)
![clipboard[50] clipboard[50]](https://ucc.alicdn.com/grng7az2sxifq/developer-article427874/20241018/8bbb458a5cb44e3bad7a49311151f390.png?x-oss-process=image/resize,w_1400/format,webp)