将 Batch 池与 Azure 文件共享配合使用Use an Azure file share with a Batch pool
Azure 文件在云中提供完全托管的文件共享,这些共享项可通过服务器消息块 (SMB) 协议进行访问。Azure Files offers fully managed file shares in the cloud that are accessible via the Server Message Block (SMB) protocol. 本文提供有关在池计算节点上装载和使用 Azure 文件共享的信息与代码示例。This article provides information and code examples for mounting and using an Azure file share on pool compute nodes.
与 Batch 配合使用时的注意事项Considerations for use with Batch
在使用非高级 Azure 文件存储的情况下,如果池中运行的并行任务数相对较少,请考虑使用 Azure 文件共享。Consider using an Azure file share when you have pools that run a relatively low number of parallel tasks if using non-premium Azure Files. 请查看性能和可伸缩性目标,确定在指定了预期的池大小和资产文件数的情况下,是否应使用 Azure 文件(Azure 文件使用 Azure 存储帐户)。Review the performance and scale targets to determine if Azure Files (which uses an Azure Storage account) should be used, given your expected pool size and number of asset files.
Azure 文件共享非常经济高效,可以使用数据复制将其配置到另一个区域,以实现全局冗余。Azure file shares are cost-efficient and can be configured with data replication to another region so are globally redundant.
可从本地计算机并行装载 Azure 文件共享。You can mount an Azure file share concurrently from an on-premises computer. 但是,请务必了解并发性影响,尤其是在使用 REST API 的情况下。However, ensure that you understand concurrency implications especially when using REST APIs.
另请参阅 Azure 文件共享的一般规划注意事项。See also the general planning considerations for Azure file shares.
创建文件共享Create a file share
在已链接到 Batch 帐户的存储帐户中,或者在单独的存储帐户中创建文件共享。Create a file share in a storage account that is linked to your Batch account, or in a separate storage account.
在 Batch 池中装载 Azure 文件共享Mount an Azure File share on a Batch pool
请参阅相关文档,了解如何在 Batch 池中装载虚拟文件系统。Please refer to the documentation on how to Mount a virtual file system on a Batch pool.
后续步骤Next steps
- 有关 Batch 中用于读取和写入数据的其他选项,请参阅保存作业和任务的输出。For other options to read and write data in Batch, see Persist job and task output.
- 另请参阅 Batch Shipyard 工具包,其中包含用于部署 Batch 容器工作负荷文件系统的 Shipyard 脚本。See also the Batch Shipyard toolkit, which includes Shipyard recipes to deploy file systems for Batch container workloads.