NFS 问题导致整个 vSphere ESX 环境瘫痪

NFS 问题导致整个 vSphere ESX 环境瘫痪

今天早上我遇到了一个奇怪的问题,NFS 问题似乎已经导致托管在小型 vSphere 5.0 环境中的大多数虚拟机崩溃。

基础设施本身是 4 个 IBM HS21 刀片,运行大约 20 个虚拟机。存储由单个 HP X1600 阵列提供,该阵列附带运行 Solaris 11 的 D2700 机箱。这里有几个存储池,它们通过 NFS 公开,用于存储虚拟机文件,还有一些 iSCSI LUN 用于 MSCS 共享磁盘等。通常情况下,这非常稳定,但我意识到单个 X1600 执行所有存储缺乏弹性。

今天早上,在每个 ESX 主机的日志中,大约在格林威治标准时间 05:21,我看到了很多这样的条目:

2011-11-30T05:21:54.161Z cpu2:2050)NFSLock: 608: Stop accessing fd 0x41000a4cf9a8  3
2011-11-30T05:21:54.161Z cpu2:2050)NFSLock: 608: Stop accessing fd 0x41000a4dc9e8  3
2011-11-30T05:21:54.161Z cpu2:2050)NFSLock: 608: Stop accessing fd 0x41000a4d3fa8  3
2011-11-30T05:21:54.161Z cpu2:2050)NFSLock: 608: Stop accessing fd 0x41000a4de0a8  3
[....]
2011-11-30T06:16:07.042Z cpu0:2058)WARNING: NFS: 283: Lost connection to the server 10.13.111.197 mount point /sastank/VMStorage, mounted as f0342e1c-19be66b5-0000-000000000000 ("SAStank")
2011-11-30T06:17:01.459Z cpu2:4011)NFS: 292: Restored connection to the server 10.13.111.197 mount point /sastank/VMStorage, mounted as f0342e1c-19be66b5-0000-000000000000 ("SAStank")
2011-11-30T06:25:17.887Z cpu3:2051)NFSLock: 608: Stop accessing fd 0x41000a4c2b28  3
2011-11-30T06:27:16.063Z cpu3:4011)NFSLock: 568: Start accessing fd 0x41000a4d8928 again
2011-11-30T06:35:30.827Z cpu1:2058)WARNING: NFS: 283: Lost connection to the server 10.13.111.197 mount point /tank/ISO, mounted as 5acdbb3e-410e56e3-0000-000000000000 ("ISO (1)")
2011-11-30T06:36:37.953Z cpu6:2054)NFS: 292: Restored connection to the server 10.13.111.197 mount point /tank/ISO, mounted as 5acdbb3e-410e56e3-0000-000000000000 ("ISO (1)")
2011-11-30T06:40:08.242Z cpu6:2054)NFSLock: 608: Stop accessing fd 0x41000a4c3e68  3
2011-11-30T06:40:34.647Z cpu3:2051)NFSLock: 568: Start accessing fd 0x41000a4d8928 again
2011-11-30T06:44:42.663Z cpu1:2058)WARNING: NFS: 283: Lost connection to the server 10.13.111.197 mount point /sastank/VMStorage, mounted as f0342e1c-19be66b5-0000-000000000000 ("SAStank")
2011-11-30T06:44:53.973Z cpu0:4011)NFS: 292: Restored connection to the server 10.13.111.197 mount point /sastank/VMStorage, mounted as f0342e1c-19be66b5-0000-000000000000 ("SAStank")
2011-11-30T06:51:28.296Z cpu5:2058)NFSLock: 608: Stop accessing fd 0x41000ae3c528  3
2011-11-30T06:51:44.024Z cpu4:2052)NFSLock: 568: Start accessing fd 0x41000ae3b8e8 again
2011-11-30T06:56:30.758Z cpu4:2058)WARNING: NFS: 283: Lost connection to the server 10.13.111.197 mount point /sastank/VMStorage, mounted as f0342e1c-19be66b5-0000-000000000000 ("SAStank")
2011-11-30T06:56:53.389Z cpu7:2055)NFS: 292: Restored connection to the server 10.13.111.197 mount point /sastank/VMStorage, mounted as f0342e1c-19be66b5-0000-000000000000 ("SAStank")
2011-11-30T07:01:50.350Z cpu6:2054)ScsiDeviceIO: 2316: Cmd(0x41240072bc80) 0x12, CmdSN 0x9803 to dev "naa.600508e000000000505c16815a36c50d" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x5 0x24 0x0.
2011-11-30T07:03:48.449Z cpu3:2051)NFSLock: 608: Stop accessing fd 0x41000ae46b68  3
2011-11-30T07:03:57.318Z cpu4:4009)NFSLock: 568: Start accessing fd 0x41000ae48228 again

(我把来自其中一个主机的完整转储放在了 pastebin 上:http://pastebin.com/Vn60wgTt

上午 9 点我到办公室时,看到各种故障和警报,并排除了故障。结果发现几乎所有虚拟机都无法访问,ESX 主机将每个虚拟机描述为“已关闭”、“已打开”或“不可用”。描述为“已打开”的虚拟机无法以任何方式访问或响应 ping,因此这可能是谎言。

X1600 上完全没有迹象表明出现任何问题,交换机上也没有迹象表明连接中断。我只能通过依次重新启动 ESX 主机来解决问题。

我有几个问题:

  1. 到底发生了什么?
  2. 如果这是暂时的 NFS 故障,为什么它会让 ESX 主机陷入只能通过重新启动才能恢复的状态?
  3. 将来,当 NFS 服务器出现一些问题时,增加一些弹性的最佳方法是什么?我一直在考虑明年的预算,并且可能有预算购买另一个 X1600/D2700/磁盘,相同的镜像磁盘设置是否有助于自动缓解此类故障?

编辑(添加所需详细信息)

根据要求扩展一些细节:

X1600 有 12 个 1TB 磁盘,以镜像对的形式集中在一起tank,而 D2700(使用 mini SAS 电缆连接)有 12 个 300GB 10k SAS 磁盘,以镜像对的形式集中在一起sastank

zpool status

  pool: rpool
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c7t0d0s0  ONLINE       0     0     0

errors: No known data errors

  pool: sastank
 state: ONLINE
 scan: scrub repaired 0 in 74h21m with 0 errors on Wed Nov 30 02:51:58 2011
config:

        NAME         STATE     READ WRITE CKSUM
        sastank      ONLINE       0     0     0
          mirror-0   ONLINE       0     0     0
            c7t14d0  ONLINE       0     0     0
            c7t15d0  ONLINE       0     0     0
          mirror-1   ONLINE       0     0     0
            c7t16d0  ONLINE       0     0     0
            c7t17d0  ONLINE       0     0     0
          mirror-2   ONLINE       0     0     0
            c7t18d0  ONLINE       0     0     0
            c7t19d0  ONLINE       0     0     0
          mirror-3   ONLINE       0     0     0
            c7t20d0  ONLINE       0     0     0
            c7t21d0  ONLINE       0     0     0
          mirror-4   ONLINE       0     0     0
            c7t22d0  ONLINE       0     0     0
            c7t23d0  ONLINE       0     0     0
          mirror-5   ONLINE       0     0     0
            c7t24d0  ONLINE       0     0     0
            c7t25d0  ONLINE       0     0     0

errors: No known data errors

  pool: tank
 state: ONLINE
 scan: scrub repaired 0 in 17h28m with 0 errors on Mon Nov 28 17:58:19 2011
config:

        NAME         STATE     READ WRITE CKSUM
        tank         ONLINE       0     0     0
          mirror-0   ONLINE       0     0     0
            c7t1d0   ONLINE       0     0     0
            c7t2d0   ONLINE       0     0     0
          mirror-1   ONLINE       0     0     0
            c7t3d0   ONLINE       0     0     0
            c7t4d0   ONLINE       0     0     0
          mirror-2   ONLINE       0     0     0
            c7t5d0   ONLINE       0     0     0
            c7t6d0   ONLINE       0     0     0
          mirror-3   ONLINE       0     0     0
            c7t8d0   ONLINE       0     0     0
            c7t9d0   ONLINE       0     0     0
          mirror-4   ONLINE       0     0     0
            c7t10d0  ONLINE       0     0     0
            c7t11d0  ONLINE       0     0     0
          mirror-5   ONLINE       0     0     0
            c7t12d0  ONLINE       0     0     0
            c7t13d0  ONLINE       0     0     0

errors: No known data errors

通过 NFS 公开的主数据存储的文件系统是sastank/VMStorage

zfs list

NAME                          USED  AVAIL  REFER  MOUNTPOINT
rpool                        45.1G  13.4G  92.5K  /rpool
rpool/ROOT                   2.28G  13.4G    31K  legacy
rpool/ROOT/solaris           2.28G  13.4G  2.19G  /
rpool/dump                   15.0G  13.4G  15.0G  -
rpool/export                 11.9G  13.4G    32K  /export
rpool/export/home            11.9G  13.4G    32K  /export/home
rpool/export/home/andrew     11.9G  13.4G  11.9G  /export/home/andrew
rpool/swap                   15.9G  29.2G   123M  -
sastank                      1.08T   536G    33K  /sastank
sastank/VMStorage            1.01T   536G  1.01T  /sastank/VMStorage
sastank/comstar              71.7G   536G    31K  /sastank/comstar
sastank/comstar/sql_tempdb   6.31G   536G  6.31G  -
sastank/comstar/sql_tx_data  65.4G   536G  65.4G  -
tank                         4.79T   578G    42K  /tank
tank/FTP                      269G   578G   269G  /tank/FTP
tank/ISO                     28.8G   578G  25.9G  /tank/ISO
tank/backupstage             2.64T   578G  2.49T  /tank/backupstage
tank/cifs                     301G   578G   297G  /tank/cifs
tank/comstar                 1.54T   578G    31K  /tank/comstar
tank/comstar/msdtc           1.07G   579G  32.8M  -
tank/comstar/quorum           577M   578G  47.9M  -
tank/comstar/sqldata         1.54T   886G   304G  -
tank/comstar/vsphere_lun     2.09G   580G  22.2M  -
tank/mcs-asset-repository    7.01M   578G  6.99M  /tank/mcs-asset-repository
tank/mscs-quorum               55K   578G    36K  /tank/mscs-quorum
tank/sccm                    16.1G   578G  12.8G  /tank/sccm

至于网络,X1600、刀片和交换机之间的所有连接都是 LACP 或 Etherchannel 绑定的 2x 1Gbit 链路。交换机是单个 Cisco 3750。

存储流量位于其自己的 VLAN 上,与虚拟机流量隔离。

答案1

我觉得我们这里遗漏了重要信息。请描述您的存储服务器。惠普 X1600基本上是ProLiant DL180 G6。您正在使用外部HP D2700通过 SAS 电缆连接机柜。我假设此设置正在运行 Solaris,并且有 ZFS 卷共享到您的 ESXi 节点。一些可以开始的地方是:

  • 您的 zpools/文件系统是如何配置的?
  • 由于 X1600 和 D2700 都有磁盘托架,那么 NFS 存储池位于何处(控制器问题)?
  • 您在 Solaris 系统上是否有相应的错误(zpool status -v输出)?
  • 您的网络对于 NFS 共享/流量的弹性如何?您是否进行了绑定等?
  • 您的存储网络是否与 LAN 流量(VLAN、独立交换机)隔离?
  • 您是否使用NFS 最佳实践(心跳、超时、缓冲区)?

相关内容