您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

什么是 Azure 文件?What is Azure Files?

Azure 文件在云端提供完全托管的文件共享,这些共享项可通过行业标准的服务器消息块 (SMB) 协议进行访问。Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol. Azure 文件共享可由云或者 Windows、Linux 和 macOS 的本地部署同时装载。Azure file shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. 此外,可以使用 Azure 文件同步将 Azure 文件共享缓存在 Windows Server 上,以加快访问速度(与在数据使用位置进行访问的速度相当)。Additionally, Azure file shares can be cached on Windows Servers with Azure File Sync for fast access near where the data is being used.

视频Videos

Azure 文件同步简介(2 分钟)Introducing Azure File Sync (2 m) Azure 文件与同步 (Ignite 2017)(85 分钟)Azure Files with Sync (Ignite 2017) (85 m)
Azure 文件同步简介视频截屏 - 单击播放!Screencast of the Introducing Azure File Sync video - click to play! Azure 文件与同步演示截屏 - 单击播放!Screencast of the Azure Files with Sync presentation - click to play!

为何 Azure 文件很有用Why Azure Files is useful

Azure 文件共享可用于:Azure file shares can be used to:

  • 取代或补充本地文件服务器Replace or supplement on-premises file servers:
    可以使用 Azure 文件来完全取代或补充传统的本地文件服务器或 NAS 设备。Azure Files can be used to completely replace or supplement traditional on-premises file servers or NAS devices. 流行的操作系统(例如 Windows、macOS 和 Linux)可在世界各地直接装载 Azure 文件共享。Popular operating systems such as Windows, macOS, and Linux can directly mount Azure file shares wherever they are in the world. 此外,可以使用 Azure 文件同步将 Azure 文件共享复制到本地或云中的 Windows Server,以便在使用位置对数据进行高性能的分布式缓存。Azure file shares can also be replicated with Azure File Sync to Windows Servers, either on-premises or in the cloud, for performance and distributed caching of the data where it's being used.

  • “直接迁移”应用程序"Lift and shift" applications:
    借助 Azure 文件可以轻松地将预期使用文件共享存储文件应用程序或用户数据的应用程序“直接迁移”到云中。Azure Files makes it easy to "lift and shift" applications to the cloud that expect a file share to store file application or user data. Azure 文件既支持“经典”直接迁移方案(应用程序及其数据将移到 Azure 中),也支持“混合”直接迁移方案(应用程序数据将移到 Azure 文件中,应用程序继续在本地运行)。Azure Files enables both the "classic" lift and shift scenario, where both the application and its data are moved to Azure, and the "hybrid" lift and shift scenario, where the application data is moved to Azure Files, and the application continues to run on-premises.

  • 简化云开发Simplify cloud development:
    还可以通过众多方式使用 Azure 文件来简化新的云开发项目。Azure Files can also be used in numerous ways to simplify new cloud development projects. 例如:For example:

    • 共享应用程序设置Shared application settings:
      分布式应用程序的常见模式是将配置文件置于某个中心位置,然后可以从许多应用程序实例访问这些文件。A common pattern for distributed applications is to have configuration files in a centralized location where they can be accessed from many application instances. 应用程序实例可以通过文件 REST API 加载其配置,人类可以根据需要通过本地装载 SMB 共享来访问这些配置。Application instances can load their configuration through the File REST API, and humans can access them as needed by mounting the SMB share locally.

    • 诊断共享Diagnostic share:
      Azure 文件共享是云应用程序写入其日志、指标和故障转储的方便位置。An Azure file share is a convenient place for cloud applications to write their logs, metrics, and crash dumps. 应用程序实例可以通过文件 REST API 写入日志,开发人员可以通过在其本地计算机上装载文件共享来访问这些日志。Logs can be written by the application instances via the File REST API, and developers can access them by mounting the file share on their local machine. 这就带来了极大的灵活性,因为开发人员可以利用云开发,同时又不需要放弃他们所熟悉和喜爱的任何现有工具。This enables great flexibility, as developers can embrace cloud development without having to abandon any existing tooling they know and love.

    • 开发/测试/调试Dev/Test/Debug:
      开发人员或管理员在云中的 VM 上工作时,通常需要一套工具或实用程序。When developers or administrators are working on VMs in the cloud, they often need a set of tools or utilities. 将此类实用程序和工具复制到每个 VM 可能非常耗时。Copying such utilities and tools to each VM can be a time consuming exercise. 通过在 VM 上本地装载 Azure 文件共享,开发人员和管理员可以快速访问其工具和实用程序,而无需进行复制。By mounting an Azure file share locally on the VMs, a developer and administrator can quickly access their tools and utilities, no copying required.

主要优点Key benefits

  • 共享访问Shared access. Azure 文件共享支持行业标准 SMB 协议,这意味着,你可以无缝地将本地文件共享替换为 Azure 文件共享,不需担心应用程序兼容性。Azure file shares support the industry standard SMB protocol, meaning you can seamlessly replace your on-premises file shares with Azure file shares without worrying about application compatibility. 对于需要可共享性的应用程序来说,能够跨多个计算机、应用程序/实例共享文件系统是使用 Azure 文件的一项明显优势。Being able to share a file system across multiple machines, applications/instances is a significant advantage with Azure Files for applications that need shareability.
  • 完全托管Fully managed. 不需管理硬件或 OS 即可创建 Azure 文件共享。Azure file shares can be created without the need to manage hardware or an OS. 这意味着,你不需使用关键的安全升级程序来修补服务器 OS,也不需更换故障硬盘。This means you don't have to deal with patching the server OS with critical security upgrades or replacing faulty hard disks.
  • 脚本和工具Scripting and tooling. 在管理 Azure 应用程序的过程中,可以使用 PowerShell cmdlet 和 Azure CLI 来创建、装载和管理 Azure 文件共享。可以使用 Azure 门户和 Azure 存储资源管理器来创建和管理 Azure 文件共享。PowerShell cmdlets and Azure CLI can be used to create, mount, and manage Azure file shares as part of the administration of Azure applications.You can create and manage Azure file shares using Azure portal and Azure Storage Explorer.
  • 复原能力Resiliency. Azure 文件是从头开始构建的,我们的目的是确保其始终可用。Azure Files has been built from the ground up to be always available. 将本地文件共享取代为 Azure 文件之后,再也不需要半夜起来处理当地断电或网络问题。Replacing on-premises file shares with Azure Files means you no longer have to wake up to deal with local power outages or network issues.
  • 熟悉的可编程性Familiar programmability. 在 Azure 中运行的应用程序可以通过文件系统 I/O API 访问共享中的数据。Applications running in Azure can access data in the share via file system I/O APIs. 因此,开发人员可以利用其现有代码和技术迁移现有应用程序。Developers can therefore leverage their existing code and skills to migrate existing applications. 除了系统 IO API,还可以使用 Azure 存储客户端库Azure 存储 REST APIIn addition to System IO APIs, you can use Azure Storage Client Libraries or the Azure Storage REST API.

后续步骤Next Steps