Maximum number of supported paths reached (1020654)

当ESXi主机无法报告到存储的物理路径时,可能是因为已达到最大支持路径数1024条。此问题会导致部分存储路径及设备无法访问。解决方法包括重新配置存储连接、屏蔽不必要的LUN,并确保每条路径数量适当。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Details

Symptoms

 

The ESXi/ESX host system fails to report a physical path to storage. The maximum number of supported paths (1024) is reached.

 

For example, if an ESXi/ESX host does not detect all the paths to the SAN, more than 1024 physical paths might be connected. You see messages similar to:


The maximum number of supported paths of 1024 has been reached. Path vmhba2:C0:T0:L3 could not be added.
The number of paths allocated has reached the maximum: 1024. Path: vmhba5:C0:T6:L28 will not be allocated. This warning won't be repeated until some paths are removed.

 

Impact

 

Storage paths that are discovered after the first 1024 are not added to the system. You will not have access to some of the storage paths, and possibly some storage devices, that are configured to be accessible by the system.


Solution

Reconfigure the storage attached to the ESXi/ESX host so that the total number of physical paths to storage is limited to 1024.

For more information about the maximum number of paths supported, see the Configuration Maximums documentation on the VMware web site.

 

To add more LUNs:

  1. Examine the LUNs the host has access to and identify the LUNs that it is not required to see.

  2. Unpresent these LUNs.

  3. Unmask the LUNs from ESX/ESXi before unpresenting them. For more information, see Masking a LUN from ESX and ESXi using the MASK_PATH plug-in (1009449).

  4. Identify whether data on certain LUNs can be consolidated on to one LUN. Ensure that you use Storage vMotion or cold migration to move the data off a LUN if you are planning to consolidate data on to one LUN. You can then unpresent the LUNs from the host whose data has been consolidated. For more information, see Masking a LUN from ESX and ESXi using the MASK_PATH plug-in (1009449).

  5. Verify that the number of paths you have per LUN and whether you can reduce the number of paths, making sure that you do not compromise on both the HBA and the switch and controller.

Additional Information

For translated versions of this article, see: 

本文转自学海无涯博客51CTO博客,原文链接http://blog.51cto.com/549687/1897328如需转载请自行联系原作者

520feng2007
### select 函数最大文件描述符限制及其原因 `select` 函数的最大文件描述符限制通常为 1024,这是因为 `fd_set` 的内部实现是一个固定大小的位图结构。具体来说,`fd_set` 是一个长度为 1024 比特的数组,其中每一位对应一个可能的文件描述符编号[^1]。由于该数据结构的设计初衷是为了简单高效地处理少量文件描述符,在设计时并未考虑现代操作系统中可能出现的大规模并发连接需求。 当调用 `select` 时,传入的 `fd_set` 参数会通过位操作来标记哪些文件描述符需要被监控。如果文件描述符的数量超过 1024,则超出部分无法正确存储到 `fd_set` 中,从而导致错误行为或未定义的结果。 #### 原因分析 这种限制的根本原因是历史遗留问题。早期 Unix 系统中的文件描述符数量较少,因此使用固定的 1024 大小足以满足当时的大多数应用场景。然而随着技术发展,尤其是网络服务器领域对高并发的支持需求增加,这一限制逐渐成为瓶颈。 另外需要注意的是,虽然某些平台允许调整此上限(例如通过重新编译库或将宏定义修改),但这并非标准做法,并且可能导致兼容性和移植性问题。 #### 解决方案 针对上述限制有几种常见解决方案: 1. **poll**: 使用 `poll()` 替代 `select()` 可以突破 1024 文件描述符的硬编码限制。因为 `poll` 不依赖于固定大小的数据结构,而是采用动态分配内存的方式管理文件描述符列表。 2. **epoll/kqueue**: 对于 Linux 平台推荐使用更高效的事件通知机制——`epoll`;而在 BSD 类系统上则可以选用 `kqueue`。这两种方法不仅能够支持更多的文件描述符,还提供了更好的性能表现特别是在大量活动连接的情况下。 3. **多线程或多进程模型**: 如果坚持使用 `select` 而又希望扩展其能力范围的话,可以通过创建多个子线程或者子进程分别负责不同组别的文件描述符集合来进行间接扩容。不过这种方法增加了编程复杂度并引入额外开销。 以下是基于 Python 实现的一个简单的 epoll 示例代码片段用于展示如何利用它超越传统 select 方法的能力: ```python import select import socket def create_server(): server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_socket.bind(('localhost', 8080)) server_socket.listen(5) return server_socket if __name__ == "__main__": server_sock = create_server() epoll_fd = select.epoll() # 创建 epoll 对象实例 epoll_fd.register(server_sock.fileno(), select.EPOLLIN | select.EPOLLET) try: connections = {} while True: events = epoll_fd.poll(timeout=1) for fileno, event in events: if fileno == server_sock.fileno(): # 新客户端请求到达 client_sock, addr = server_sock.accept() epoll_fd.register(client_sock.fileno(), select.EPOLLIN | select.EPOLLET) connections[client_sock.fileno()] = client_sock elif event & select.EPOLLIN: # 客户端发送消息过来 data = connections[fileno].recv(1024).decode('utf-8') if not data: del connections[fileno] epoll_fd.unregister(fileno) else: print(f"Received {data} from {addr}") finally: epoll_fd.close() server_sock.close() ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值