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

迁移 StorSimple 1200 到 Azure 文件同步StorSimple 1200 migration to Azure File Sync

StorSimple 1200 系列是在本地数据中心运行的虚拟设备。StorSimple 1200 series is a virtual appliance that is run in an on-premises data center. 可以将此设备中的数据迁移到 Azure 文件同步的环境。It is possible to migrate the data from this appliance to an Azure File Sync environment. Azure 文件同步是 StorSimple 设备可以迁移到的默认和策略长期 Azure 服务。Azure File Sync is the default and strategic long-term Azure service that StorSimple appliances can be migrated to.

StorSimple 1200 系列 将在 12 月2022日到期。StorSimple 1200 series will reach its end-of-life in December 2022. 请务必尽快开始规划迁移。It is important to begin planning your migration as soon as possible. 本文提供成功迁移到 Azure 文件同步所需的背景知识和迁移步骤。This article provides the necessary background knowledge and migrations steps for a successful migration to Azure File Sync.

Azure 文件同步Azure File Sync


Microsoft 致力于帮助客户完成其迁移。Microsoft is committed to assist customers in their migration. AzureFilesMigration@microsoft用于自定义迁移计划的电子邮件,并在迁移过程中提供帮助。Email AzureFilesMigration@microsoft .com for a customized migration plan as well as assistance during the migration.

Azure 文件同步是一种 Microsoft 云服务,基于两个主要组件:Azure File Sync is a Microsoft cloud service, based on two main components:

  • 文件同步和云分层。File synchronization and cloud tiering.
  • 文件共享是 Azure 中的本机存储,可通过多个协议(如 SMB 和文件 REST)进行访问。File shares as native storage in Azure, that can be accessed over multiple protocols like SMB and file REST. Azure 文件共享相当于 Windows Server 上的文件共享,你可以将该文件共享作为网络驱动器进行本机装入。An Azure file share is comparable to a file share on a Windows Server, that you can natively mount as a network drive. 它支持重要的文件保真方面,如属性、权限和时间戳。It supports important file fidelity aspects like attributes, permissions, and timestamps. 与 StorSimple 不同,无需应用程序/服务来解释存储在云中的文件和文件夹。Unlike with StorSimple, no application/service is required to interpret the files and folders stored in the cloud. 在云中存储常规用途文件服务器数据以及某些应用程序数据的理想且最灵活的方法。The ideal, and most flexible approach to store general purpose file server data as well as some application data, in the cloud.

本文重点介绍迁移步骤。This article focuses on the migration steps. 如果要在迁移之前详细了解 Azure 文件同步,我们建议阅读以下文章:If before migrating you'd like to learn more about Azure File Sync, we recommend the following articles:

迁移目标Migration goals

目标是保证生产数据的完整性并保证可用性。The goal is to guarantee the integrity of the production data as well as guaranteeing availability. 后者需要将停机时间保持在最少,使其适应或仅略超过定期维护时段。The latter requires keeping downtime to a minimum, so that it can fit into or only slightly exceed regular maintenance windows.

StorSimple 1200 到 Azure 文件同步的迁移路径StorSimple 1200 migration path to Azure File Sync

运行 Azure 文件同步代理需要本地 Windows Server。A local Windows Server is required to run an Azure File Sync agent. Windows Server 可以是至少一个2012R2 服务器,但理想情况下为 Windows Server 2019。The Windows Server can be at a minimum a 2012R2 server but ideally is a Windows Server 2019.

有大量的备用迁移路径,并且它将创建的项目太长,可以记录所有这些路径,并说明它们在路由上出现风险或缺点的原因,我们建议将其作为本文的最佳实践。There are numerous, alternative migration paths and it would create too long of an article to document all of them and illustrate why they bear risk or disadvantages over the route we recommend as a best practice in this article.


上图描述了对应于本文各部分的步骤。The previous image depicts steps that correspond to sections in this article.

步骤1:预配本地 Windows Server 和存储Step 1: Provision your on-premises Windows Server and storage

  1. 创建 Windows Server 2019-以最小2012R2 为虚拟机或物理服务器。Create a Windows Server 2019 - at a minimum 2012R2 - as a virtual machine or physical server. 还支持 Windows Server 故障转移群集。A Windows Server fail-over cluster is also supported.
  2. 与 NAS 相比,预配或添加直接附加存储 (DAS,这在) 不受支持。Provision or add Direct Attached Storage (DAS as compared to NAS, which is not supported). Windows Server 存储的大小必须等于或大于你的虚拟 StorSimple 1200 设备的可用容量。The size of the Windows Server storage must be equal to or larger than the size of the available capacity of your virtual StorSimple 1200 appliance.

步骤2:配置 Windows Server 存储Step 2: Configure your Windows Server storage

在此步骤中,将 (卷和共享) 的 StorSimple 存储结构映射到 Windows Server 存储结构。In this step, you map your StorSimple storage structure (volumes and shares) to your Windows Server storage structure. 如果你计划对存储结构进行更改(即卷的数量、数据文件夹与卷的关联)或当前 SMB/NFS 共享之上或之下的子文件夹结构,那么现在就是考虑这些更改的时间。If you plan to make changes to your storage structure, meaning the number of volumes, the association of data folders to volumes, or the subfolder structure above or below your current SMB/NFS shares, then now is the time to take these changes into consideration. 在配置 Azure 文件同步后更改文件和文件夹结构非常麻烦,应避免这样做。Changing your file and folder structure after Azure File Sync is configured, is cumbersome, and should be avoided. 本文假设您映射的是1:1,因此在按照本文中的步骤操作时,您必须考虑您的映射更改。This article assumes you are mapping 1:1, so you must take your mapping changes into consideration when you follow the steps in this article.

  • 在 Windows Server 系统卷上,不会有任何生产数据最终。None of your production data should end up on the Windows Server system volume. 系统卷上不支持云分层。Cloud tiering is not supported on system volumes. 但是,迁移需要使用此功能,同时也需要使用 StorSimple 替换操作。However, this feature is required for the migration as well as continuous operations as a StorSimple replacement.
  • 在 Windows Server 上预配与 StorSimple 1200 虚拟设备上相同数量的卷。Provision the same number of volumes on your Windows Server as you have on your StorSimple 1200 virtual appliance.
  • 配置所需的任何 Windows Server 角色、功能和设置。Configure any Windows Server roles, features, and settings you need. 建议你选择加入 Windows Server 更新以使你的操作系统保持安全和最新。We recommend you opt into Windows Server updates to keep your OS safe and up to date. 同样,我们建议选择 Microsoft 更新以使 Microsoft 应用程序保持最新状态,包括 Azure 文件同步代理。Similarly, we recommend opting into Microsoft Update to keep Microsoft applications up to date, including the Azure File Sync agent.
  • 阅读以下步骤之前,请不要配置任何文件夹或共享。Do not configure any folders or shares before reading the following steps.

步骤3:部署第一个 Azure 文件同步云资源Step 3: Deploy the first Azure File Sync cloud resource

在此步骤中,需要 Azure 订阅凭据。In this step, you need your Azure subscription credentials.

为 Azure 文件同步配置的核心资源称为存储同步服务。The core resource to configure for Azure File Sync is called a Storage Sync Service. 建议只为当前或将来同步同一组文件的所有服务器部署一项存储同步服务。We recommend that you deploy only one for all servers that are syncing the same set of files now or in the future. 仅当有不同的一组服务器,且这些服务器永不交换数据时,才创建多项存储同步服务。Create multiple Storage Sync Services only if you have distinct sets of servers that must never exchange data. 例如,你可能有一些绝不会同步同一个 Azure 文件共享的服务器。For example, you might have servers that must never sync the same Azure file share. 否则,最佳做法是创建一项存储同步服务。Otherwise, a single Storage Sync Service is the best practice.

为存储同步服务选择一个离你的位置最近的 Azure 区域。Choose an Azure region for your Storage Sync Service that's close to your location. 其他所有资源必须部署在同一区域中。All other cloud resources must be deployed in the same region. 若要简化管理,请在订阅中创建一个包含同步和存储资源的新资源组。To simplify management, create a new resource group in your subscription that houses sync and storage resources.

有关详细信息,请参阅有关部署 Azure 文件同步的文章中关于部署存储同步服务的部分。请严格按照这部分内容操作。For more information, see the section about deploying the Storage Sync Service in the article about deploying Azure File Sync. Follow only this part of the article. 后续步骤中有这篇文章其他部分的链接。There will be links to other sections of the article in later steps.

步骤4:将本地卷和文件夹结构与 Azure 文件同步和 Azure 文件共享资源匹配Step 4: Match your local volume and folder structure to Azure File Sync and Azure file share resources

在此步骤中,你将评估你需要多少个 Azure 文件共享。In this step, you're evaluating how many Azure file shares you need. 单个 Windows Server 实例 (或群集) 可以同步最多30个 Azure 文件共享。A single Windows Server instance (or cluster) can sync up to 30 Azure file shares.

你的卷上可能有更多文件夹在本地作为 SMB 共享本地共享到用户和应用。You might have more folders on your volumes that you currently share out locally as SMB shares to your users and apps. 若要解决此问题,最简单的方法是构想将1:1 映射到 Azure 文件共享的本地共享。The easiest way to picture this scenario is to envision an on-premises share that maps 1:1 to an Azure file share. 如果你有足够小的数字,请在低于30的单个 Windows Server 实例的情况下,建议使用1:1 映射。If you have a small enough number, below 30 for a single Windows Server instance, a 1:1 mapping is recommended.

如果共享超过30个,通常不需要将本地共享1:1 映射到 Azure 文件共享。If you have more shares than 30, it's often unnecessary to map an on-premises share 1:1 to an Azure file share. 请考虑以下选项。Consider the following options.

共享分组Share grouping

例如,如果人力资源 (人事) 部门总共有15个共享,则可以考虑将所有 HR 数据存储在一个 Azure 文件共享中。For example, if your human resources (HR) department has a total of 15 shares, you might consider storing all of the HR data in a single Azure file share. 如果将多个本地共享存储在一个 Azure 文件共享中,则不会阻止你在本地 Windows Server 实例上创建常见的15个 SMB 共享。Storing multiple on-premises shares in one Azure file share doesn't prevent you from creating the usual 15 SMB shares on your local Windows Server instance. 这只意味着将这些15个共享的根文件夹组织为公用文件夹下的子文件夹。It only means that you organize the root folders of these 15 shares as subfolders under a common folder. 然后,将此公用文件夹同步到 Azure 文件共享。You then sync this common folder to an Azure file share. 这样一来,就只需要将云中的单个 Azure 文件共享用于此组本地共享。That way, only a single Azure file share in the cloud is needed for this group of on-premises shares.

卷同步Volume sync

Azure 文件同步支持将卷的根同步到 Azure 文件共享。Azure File Sync supports syncing the root of a volume to an Azure file share. 如果同步卷根,则所有子文件夹和文件都将发送到相同的 Azure 文件共享。If you sync the volume root, all subfolders and files will go to the same Azure file share.

同步卷的根目录并非总是最好的答案。Syncing the root of the volume isn't always the best answer. 同步多个位置有一些好处。There are benefits in syncing multiple locations. 例如,这样做有助于使每个同步作用域的项数保持较低。For example, doing so helps keep the number of items lower per sync scope. 尽管我们使用100000000项来测试 Azure 文件共享和 Azure 文件同步 (文件和文件夹) 每个共享,最佳做法是尝试在单个共享中保留低于20000000或30000000的数字。While we test Azure file shares and Azure File Sync with 100 million items (files and folders) per share, a best practice is to try to keep the number below 20 million or 30 million in a single share. 使用较少数量的项目设置 Azure 文件同步不仅对文件同步有利。项目数量越少,还会受益于以下方案:Setting up Azure File Sync with a lower number of items isn't only beneficial for file sync. A lower number of items also benefits scenarios like these:

  • 云内容的初始扫描可以更快地完成,这进而会降低命名空间在启用 Azure 文件同步的服务器上出现的等待时间。Initial scan of the cloud content can complete faster, which in turn decreases the wait for the namespace to appear on an Azure File Sync-enabled server.
  • 从 Azure 文件共享快照进行云端还原将会更快。Cloud-side restore from an Azure file share snapshot will be faster.
  • 本地服务器的灾难恢复可以显著提高速度。Disaster recovery of an on-premises server can speed up significantly.
  • 在 Azure 文件共享中直接进行的更改 (可以检测到外部同步) 并能更快地同步。Changes made directly in an Azure file share (outside sync) can be detected and synced faster.


如果你不确定有多少文件和文件夹,请查看 Database 工具的卡纸软件 GmbH。If you're unsure how many files and folders you have, check out the TreeSize tool from JAM Software GmbH.

部署映射的结构化方法A structured approach to a deployment map

在稍后的步骤中部署云存储之前,请务必在本地文件夹和 Azure 文件共享之间创建映射。Before you deploy cloud storage in a later step, it's important to create a map between on-premises folders and Azure file shares. 然后,此映射会通知要预配多少个 Azure 文件同步 同步组 资源。This mapping will then inform how many and which Azure File Sync sync group resources you'll provision. 同步组会将服务器上的 Azure 文件共享和文件夹连接在一起,并建立同步连接。A sync group ties the Azure file share and the folder on your server together and establishes a sync connection.

若要确定需要多少个 Azure 文件共享,请查看以下限制和最佳实践。To make the decision about how many Azure file shares you need, review the following limits and best practices. 这样做有助于优化地图。Doing so will help you optimize your map.

  • 安装了 Azure 文件同步代理的服务器可与最多30个 Azure 文件共享同步。A server with the Azure File Sync agent installed can sync with up to 30 Azure file shares.

  • Azure 文件共享部署在存储帐户中。An Azure file share is deployed inside a storage account. 这会使存储帐户成为性能数字(如 IOPS 和吞吐量)的缩放目标。That makes the storage account a scale target for performance numbers such as IOPS and throughput.

    理论上,一个标准 Azure 文件共享可能会让存储帐户能够提供的最大性能饱和。One standard Azure file share can theoretically saturate the maximum performance that a storage account can deliver. 如果将多个共享放置在单个存储帐户中,则意味着要为这些共享创建一个共享的 IOPS 和吞吐量池。Placing multiple shares in a single storage account means you are creating a shared pool of IOPS and throughput for these shares. 如果你计划仅将 Azure 文件同步附加到这些文件共享,则将多个 Azure 文件共享分组到相同的存储帐户不会产生问题。If you plan to only attach Azure File Sync to these file shares, grouping several Azure file shares into the same storage account won't create a problem. 查看 Azure 文件共享性能目标,深入了解要考虑的相关指标。Review the Azure file share performance targets for deeper insight into the relevant metrics to consider. 这些限制不适用于高级存储,其中为每个共享显式设置并保证性能。These limitations do not apply to premium storage, where performance is explicitly provisioned and guaranteed for each share.

    如果你计划将应用程序提升到 Azure,以便在本地使用 Azure 文件共享,则你可能需要从 Azure 文件共享获得更高的性能。If you plan on lifting an app to Azure that will use the Azure file share natively, you might need more performance from your Azure file share. 如果这种类型的使用是一种可能的情况,甚至在将来,在其自己的存储帐户中创建一个标准 Azure 文件共享都是最好的做法。If this type of use is a possibility, even in the future, then creating a single standard Azure file share in its own storage account is best.

  • 每个 Azure 区域每个订阅的存储帐户数限制为250。There's a limit of 250 storage accounts per subscription per Azure region.


考虑到此信息,通常需要将卷上的多个顶级文件夹分组到一个公用的新根目录中。With this information in mind, it often becomes necessary to group multiple top-level folders on your volumes into a common, new root directory. 然后,将这个新的根目录以及您分组到其中的所有文件夹同步到单个 Azure 文件共享。You then sync this new root directory, and all the folders you grouped into it, to a single Azure file share. 此方法允许你在每台服务器30个 Azure 文件共享同步的限制范围内保持不变。This technique allows you to stay within the limit of 30 Azure file share syncs per server.

在公用根下进行此分组不会对数据访问产生任何影响。This grouping under a common root has no impact on access to your data. 你的 Acl 保持原样。Your ACLs stay as is. 只需调整 SMB 或 NFS 共享所 (的任何共享路径) 你可能已将本地服务器文件夹更改为公用根目录。You would only need to adjust any share paths (like SMB or NFS shares) you might have on the local server folders that you now changed into a common root. 无其他更改。Nothing else changes.


Azure 文件同步的最重要缩放矢量是需要同步 (文件和文件夹) 的项目数。The most important scale vector for Azure File Sync is the number of items (files and folders) that need to be synchronized. 有关更多详细信息,请查看 Azure 文件同步缩放目标Review the Azure File Sync scale targets for more details.

最佳做法是保持每个同步范围内的项的数目较低。It's a best practice to keep the number of items per sync scope low. 这是在将文件夹映射到 Azure 文件共享时要考虑的重要因素。That's an important factor to consider in your mapping of folders to Azure file shares. Azure 文件同步测试了100000000项, (文件和文件夹) 每个共享。Azure File Sync is tested with 100 million items (files and folders) per share. 但是,通常最好是将低于20000000或30000000的项目数保存在一个共享中。However, it's often best to keep the number of items below 20 million or 30 million in a single share. 如果开始超过这些数字,请将命名空间拆分为多个共享。Split your namespace into multiple shares if you start to exceed these numbers. 如果你一直在这两个数字下面,你可以继续将多个本地共享组合到同一个 Azure 文件共享中。You can continue to group multiple on-premises shares into the same Azure file share if you stay roughly below these numbers. 这种做法将为你提供增加空间。This practice will provide you with room to grow.

在这种情况下,可以使用) 前面所述的新的通用根文件夹方法,以逻辑方式将一组文件夹同步到相同的 Azure 文件共享 (。In your situation, it's possible that a set of folders can logically sync to the same Azure file share (using the new, common root folder approach mentioned earlier). 但最好是重新组合文件夹,使它们同步到两个(而不是一个) Azure 文件共享。But it might still be better to regroup folders such that they sync to two instead of one Azure file share. 您可以使用此方法来使每个文件共享的文件和文件夹数在服务器之间保持平衡。You can use this approach to keep the number of files and folders per file share balanced across the server. 你还可以拆分本地共享并在更多的本地服务器上同步,并为每个额外的服务器增加30多个 Azure 文件共享的功能。You can also split your on-premises shares and sync across more on-premises servers, adding the ability to sync with 30 more Azure file share per extra server.

创建映射表Create a mapping table

映射表的示例。下载以下文件以体验并使用此映像的内容。An example of a mapping table. Download the following file to experience and use the content of this image.

结合使用前面的概念来帮助确定所需的 Azure 文件共享的数量,以及现有数据的哪些部分最终会在哪个 Azure 文件共享位置结束。Use a combination of the previous concepts to help determine how many Azure file shares you need, and which parts of your existing data will end up in which Azure file share.

创建记录你的想法的表,以便可以在需要时对其进行引用。Create a table that records your thoughts so you can refer to it when needed. 保持井然有序非常重要,因为当你同时预配许多 Azure 资源时,可能会很容易丢失映射计划的详细信息。Staying organized is important because it can be easy to lose details of your mapping plan when you're provisioning many Azure resources at once. 为了帮助你创建完整的映射,你可以下载 Microsoft Excel 文件作为模板。To help you create a complete mapping, you can download a Microsoft Excel file as a template.

Microsoft Excel file icon that helps to set the context for the type of file download for the link next to it. 下载命名空间映射模板。 Download a namespace-mapping template.

步骤5:预配 Azure 文件共享Step 5: Provision Azure file shares

Azure 文件共享存储在云中的 Azure 存储帐户中。An Azure file share is stored in the cloud in an Azure storage account. 这里还有另外一个性能注意事项。There's another level of performance considerations here.

如果共享的活跃度很高(共享由多个用户和/或应用程序使用),则两个 Azure 文件共享就可能达到存储帐户的性能限制。If you have highly active shares (shares used by many users and/or applications), then two Azure file shares might reach the performance limit of a storage account.

最佳做法是在部署存储帐户时,让每个存储帐户都有一个文件共享。A best practice is to deploy storage accounts with one file share each. 假如你有存档共享或预计文件共享的日常活跃度较低,可将多个 Azure 文件共享加入同一存储帐户。You can pool multiple Azure file shares into the same storage account, in case you have archival shares or you expect low day-to-day activity in them.

相对于 Azure 文件同步,这些注意事项更适用于通过 Azure VM 进行的直接云访问。如果计划只在这些共享上使用 Azure 文件同步,则可以将多个文件共享分组到一个 Azure 存储帐户中。These considerations apply more to direct cloud access (through an Azure VM) than to Azure File Sync. If you plan to use Azure File Sync only on these shares, then grouping several into a single Azure storage account is fine.

如果已创建共享列表,应将每个共享映射到它将驻留的存储帐户。If you've made a list of your shares, you should map each share to the storage account that it will reside in.

在上一阶段中,你确定了适当数量的共享。In the previous phase, you determined the appropriate number of shares. 在此步骤中,你已创建存储帐户到文件共享的映射。In this step, you have a created a mapping of storage accounts to file shares. 现在,可部署适当数量的 Azure 存储帐户,其中包含相应数量的 Azure 文件共享。Now deploy the appropriate number of Azure storage accounts with the appropriate number of Azure file shares in them.

请确保每个存储帐户的区域相同,并且与已部署的存储同步服务资源的区域相匹配。Make sure the region of each of your storage accounts is the same and matches the region of the Storage Sync Service resource you've already deployed.


如果创建的 Azure 文件共享具有 100 TiB 的限制,则该共享只能使用本地冗余存储或区域冗余存储冗余选项。If you create an Azure file share that has a 100-TiB limit, that share can only use locally redundant storage or zone-redundant storage redundancy options. 使用 100 TiB 的文件共享之前,应考虑自己的存储冗余需求。Consider your storage redundancy needs before using 100-TiB file shares.

默认情况下,将创建具有 5 TiB 限制的 Azure 文件共享。Azure file shares are still created with a 5-TiB limit by default. 由于你要创建新的存储帐户,因此请确保遵循创建可使用具有 100 TiB 限制的 Azure 文件共享的存储帐户的相关指南Because you're creating new storage accounts, make sure to follow the guidance to create storage accounts that allow Azure file shares with 100-TiB limits.

部署存储帐户时,还要考虑一个问题,那就是 Azure 存储的冗余。Another consideration when you're deploying a storage account is the redundancy of Azure Storage. 请参阅 Azure 存储冗余选项See Azure Storage redundancy options.

资源的名称也很重要。The names of your resources are also important. 例如,如果将 HR 部门的多个共享归入一个 Azure 存储帐户中,则应适当地命名存储帐户。For example, if you group multiple shares for the HR department into an Azure storage account, you should name the storage account appropriately. 同样,命名 Azure 文件共享时,应使用与本地对应项所用名称类似的名称。Similarly, when naming your Azure file shares, you should use names similar to the ones used for their on-premises counterparts.

步骤6:配置 Windows Server 目标文件夹Step 6: Configure Windows Server target folders

在前面的步骤中,您已考虑了将确定同步拓扑组件的所有方面。In previous steps, you have considered all aspects that will determine the components of your sync topologies. 现在,准备好服务器来接收要上载的文件。It is now time, to prepare the server to receive files for upload.

创建 所有 文件夹,将每个文件夹同步到其自己的 Azure 文件共享。Create all folders, that will sync each to its own Azure file share. 务必遵循前面所述的文件夹结构。It's important that you follow the folder structure you've documented earlier. 例如,如果决定将多个本地 SMB 共享一起同步到单个 Azure 文件共享中,则需要将其放在卷上的通用根文件夹下。If for instance, you have decided to sync multiple, local SMB shares together into a single Azure file share, then you need to place them under a common root folder on the volume. 立即在卷上创建此目标根文件夹。Create this target root folder on the volume now.

你预配的 Azure 文件共享的数量应该与你在此步骤中创建的文件夹数以及要在根级别同步的卷的数目匹配。The number of Azure file shares you have provisioned should match the number of folders you've created in this step + the number of volumes you will sync at the root level.

步骤7:部署 Azure 文件同步代理Step 7: Deploy the Azure File Sync agent

在本部分中,你将在 Windows Server 实例上安装 Azure 文件同步代理。In this section, you install the Azure File Sync agent on your Windows Server instance.

部署指南说明了需要关闭“Internet Explorer 增强的安全性配置”。The deployment guide illustrates that you need to turn off Internet Explorer Enhanced Security Configuration. 此安全措施不适用于 Azure 文件同步。将其关闭后,可以对 Azure 进行身份验证,而不会出现任何问题。This security measure isn't applicable with Azure File Sync. Turning it off allows you to authenticate to Azure without any issues.

打开 PowerShell,然后使用以下命令安装所需的 PowerShell 模块。Open PowerShell, and install the required PowerShell modules by using the following commands. 请确保在出现提示时安装完整的模块和 NuGet 提供程序。Make sure to install the full module and the NuGet provider when you're prompted.

Install-Module -Name Az -AllowClobber
Install-Module -Name Az.StorageSync

如果从服务器访问 Internet 时遇到任何问题,现在可以解决这些问题。If you have any issues reaching the internet from your server, now is the time to solve them. Azure 文件同步使用与 Internet 的任何可用网络连接。Azure File Sync uses any available network connection to the internet. 还支持要求代理服务器访问 Internet。Requiring a proxy server to reach the internet is also supported. 你可以立即配置计算机范围的代理,也可以指定在代理安装期间仅由 Azure 文件同步使用的代理。You can either configure a machine-wide proxy now or specify a proxy that only Azure File Sync will use, during agent installation.

如果配置代理意味着需要为此服务器打开防火墙,那么这种方法可能适合你。If configuring a proxy means you need to open your firewalls for this server, that approach might be acceptable to you. 服务器安装结束时,在完成服务器注册后,会有一个网络连接报表精确显示所选区域中 Azure 文件同步需要与之通信的 Azure 中的终结点 URL。At the end of the server installation, after you've completed server registration, a network connectivity report will show you the exact endpoint URLs in Azure that Azure File Sync needs to communicate with for the region you've selected. 该报表还会告诉你需要进行通信的原因。The report also tells you the reason why communication is needed. 可以使用该报表将此服务器上的防火墙锁定到特定的 URL。You can use the report to lock down the firewalls around this server to specific URLs.

还可以采用相对保守的方法,就是不完全打开防火墙,而是限制服务器与更高级别的 DNS 命名空间进行通信。You can also follow a more conservative approach in which you don't open the firewalls wide, but instead limit the server to communicate with higher-level DNS namespaces. 有关详细信息,请参阅 Azure 文件同步代理和防火墙设置For more information, see Azure File Sync proxy and firewall settings. 遵循自己的网络最佳做法。Follow your own networking best practices.

在服务器安装向导结束时,将打开一个服务器注册向导。At the end of the server installation wizard, a server registration wizard will open. 从一开始将服务器注册到存储同步服务的 Azure 资源。Register the server to your Storage Sync Service's Azure resource from earlier.

部署指南中详细地介绍了这些步骤,其中包含要首先安装的 PowerShell 模块:Azure 文件同步代理安装These steps are described in more detail in the deployment guide, which includes the PowerShell modules that you should install first: Azure File Sync agent installation.

使用最新的代理。Use the latest agent. 可以从 Microsoft 下载中心下载:Azure 文件同步代理You can download it from the Microsoft Download Center: Azure File Sync Agent.

成功安装并注册服务器后,可以检查是否已成功完成此步骤。After a successful installation and server registration, you can check that you've successfully completed this step. 转到 Azure 门户中的存储同步服务资源。Go to the Storage Sync Service resource in the Azure portal. 在左侧菜单中,转到“已注册的服务器”。On the left menu, go to Registered servers. 你将看到你的服务器已在此处列出。You'll see your server listed there.

步骤8:配置同步Step 8: Configure sync

此步骤将前面步骤中在 Windows Server 实例中设置的所有资源和文件夹绑定在一起。This step ties together all resources and folders you've set up on your Windows Server instance during the previous steps.

  1. 登录 Azure 门户Sign in to the Azure portal.
  2. 找到你的存储同步服务资源。Locate your Storage Sync Service resource.
  3. 在每个 Azure 文件共享的存储同步服务资源中创建一个新的同步组。Create a new sync group within the Storage Sync Service resource for each Azure file share. 在 Azure 文件同步术语中,Azure 文件共享是你在创建同步组时所述的同步拓扑中的云终结点。In Azure File Sync terminology, the Azure file share will become a cloud endpoint in the sync topology that you're describing with the creation of a sync group. 创建同步组时,为其提供一个熟悉的名称,以便能够识别出此处同步的是哪组文件。As you're creating the sync group, give it a familiar name so that you recognize which set of files syncs here. 请确保引用具有匹配名称的 Azure 文件共享。Make sure you reference the Azure file share with a matching name.
  4. 创建同步组后,该同步组的行会显示在同步组列表中。After the sync group is created, a row for it will appear in the list of sync groups. 选择名称(链接)可显示同步组的内容。Select the name (a link) to display the contents of the sync group. 你将在“云终结点”下看到你的 Azure 文件共享。You'll see your Azure file share under Cloud endpoints.
  5. 找到“+ 添加服务器终结点”按钮。Locate the + Add Server Endpoint button. 你在本地服务器上预配的文件夹将成为此服务器终结点的路径。The folder on the local server that you've provisioned will become the path for this server endpoint.


确保启用云分层!Be sure to turn on cloud tiering! 如果本地服务器没有足够的空间来存储 StorSimple 云存储中的数据的总大小,则这是必需的。This is required if your local server does not have enough space to store the total size of your data in the StorSimple cloud storage. 将你的分层策略设置为临时迁移到99% 卷可用空间。Set your tiering policy, temporarily for the migration, to 99% volume free space.

为需要配置为进行同步的所有 Azure 文件共享/服务器位置重复创建同步组并添加匹配的服务器文件夹作为服务器终结点的步骤。Repeat the steps of sync group creation and addition of the matching server folder as a server endpoint for all Azure file shares / server locations, that need to be configured for sync.

步骤9:复制文件Step 9: Copy your files

基本迁移方法是从 StorSimple 虚拟设备到 Windows Server 的 RoboCopy,并 Azure 文件同步到 Azure 文件共享。The basic migration approach is a RoboCopy from your StorSimple virtual appliance to your Windows Server, and Azure File Sync to Azure file shares.

运行 Windows Server 目标文件夹的第一个本地副本:Run the first local copy to your Windows Server target folder:

  • 确定虚拟 StorSimple 设备上的第一个位置。Identify the first location on your virtual StorSimple appliance.
  • 标识已在 Windows Server 上配置了 Azure 文件同步的匹配文件夹。Identify the matching folder on the Windows Server, that already has Azure File Sync configured on it.
  • 使用 RoboCopy 开始复制Start the copy using RoboCopy

以下 RoboCopy 命令将从 StorSimple Azure 存储中回调文件到本地 StorSimple,然后将其移到 Windows Server 目标文件夹。The following RoboCopy command will recall files from your StorSimple Azure storage to your local StorSimple and then move them over to the Windows Server target folder. Windows Server 会将其同步到 Azure 文件共享 (s) 。The Windows Server will sync it to the Azure file share(s). 当本地 Windows Server 卷已满时,云分层将开始,并且已成功同步的层文件已成功同步。As the local Windows Server volume gets full, cloud tiering will kick in and tier files that have successfully synced already. 云分层将生成足够的空间,以便从 StorSimple 虚拟设备继续复制。Cloud tiering will generate enough space to continue the copy from the StorSimple virtual appliance. 云分层检查一小时以查看已同步的内容,并释放磁盘空间以达到99% 的可用空间。Cloud tiering checks once an hour to see what has synced and to free up disk space to reach the 99% volume free space.

Robocopy /MT:32 /UNILOG:<file name> /TEE /B /MIR /COPYALL /DCOPY:DAT <SourcePath> <Dest.Path>



允许 RoboCopy 运行多线程。Allows for RoboCopy to run multi-threaded. 默认值为8,最大值为128。Default is 8, max is 128.


将状态作为 UNICODE 输出到日志文件 (覆盖现有日志) 。Outputs status to LOG file as UNICODE (overwrites existing log).


输出到控制台窗口。Outputs to console window. 与输出一起用于日志文件。Used in conjunction with output to a log file.


在备份应用程序使用的相同模式下运行 RoboCopy。Runs RoboCopy in the same mode a backup application would use. 它允许 RoboCopy 移动当前用户没有权限的文件。It allows RoboCopy to move files that the current user does not have permissions to.


允许按顺序在同一目标/目标上多次运行此 RoboCopy 命令。Allows to run this RoboCopy command several times, sequentially on the same target / destination. 它标识在之前已复制的内容并将其省略。It identifies what has been copied before and omits it. 仅会处理自上次运行后发生的更改、添加和 删除 操作。Only changes, additions and "deletes" will be processed, that occurred since the last run. 如果命令之前未运行,则不会省略任何内容。If the command wasn't run before, nothing is omitted. 对于仍在使用和变化的源位置,这是一个很好的选择。This is an excellent option for source locations that are still actively used and changing.

/COPY: copyflag [s]/COPY:copyflag[s]

文件副本的保真度 (默认值为/COPY: DAT) 、复制标志: D = 数据、A = 属性、T = 时间戳、S = 安全 = NTFS Acl、O = 所有者信息、U = 审核信息fidelity of the file copy (default is /COPY:DAT), copy flags: D=Data, A=Attributes, T=Timestamps, S=Security=NTFS ACLs, O=Owner info, U=aUditing info


将所有文件信息复制 (等效于/COPY: DATSOU) COPY ALL file info (equivalent to /COPY:DATSOU)

/DCOPY: copyflag [s]/DCOPY:copyflag[s]

目录副本的保真度 (默认值为/DCOPY: DA) ,复制标志: D = 数据,A = 属性,T = 时间戳fidelity for the copy of directories (default is /DCOPY:DA), copy flags: D=Data, A=Attributes, T=Timestamps

首次运行 RoboCopy 命令时,您的用户和应用程序仍将访问 StorSimple 文件和文件夹,并可能会更改。When you run the RoboCopy command for the first time, your users and applications are still accessing the StorSimple files and folders and potentially change it. 这是可能的: RoboCopy 处理了一个目录,在 (StorSimple 的源位置上转到下一项,然后是用户,) 添加、更改或删除当前不会在当前 RoboCopy 运行中处理的文件。It is possible, that RoboCopy has processed a directory, moves on to the next and then a user on the source location (StorSimple) adds, changes, or deletes a file that will now not be processed in this current RoboCopy run. 这是正常的。That is fine.

第一次运行是将大量数据移回本地,通过 Azure 文件同步将数据移回 Windows Server 并备份到云中。这可能需要很长时间,具体取决于:The first run is about moving the bulk of the data back to on-premises, over to your Windows Server and backup into the cloud via Azure File Sync. This can take a long time, depending on:

  • 下载带宽your download bandwidth
  • StorSimple 云服务的撤回速度the recall speed of the StorSimple cloud service
  • 上传带宽the upload bandwidth
  • 需要由任意一项服务处理) (文件和文件夹的项数the number of items (files and folders), that need to be processed by either service

初始运行完成后,再次运行该命令。Once the initial run is complete, run the command again.

第二次它将更快完成,因为它只需要传输自上次运行后发生的更改。The second time it will finish faster, because it only needs to transport changes that happened since the last run. 这些更改可能是 StorSimple 的本地更改,因为它们是最新的。Those changes are likely local to the StorSimple already, because they are recent. 这会进一步缩短时间,因为降低了从云回调的需求。That is further reducing the time because the need for recall from the cloud is reduced. 在第二次运行期间,新更改可能会累积。During this second run, still, new changes can accumulate.

重复此过程,直到你满足完成所需的时间,这是一个可接受的停机时间。Repeat this process until you are satisfied that the amount of time it takes to complete is an acceptable downtime.

如果你认为可接受的停机时间,并且你已准备好使 StorSimple 位置脱机,则立即执行此操作:例如,删除 SMB 共享,以便没有用户可以访问该文件夹或采取任何其他合适的步骤来防止在 StorSimple 上的此文件夹中更改内容。When you consider the downtime acceptable and you are prepared to take the StorSimple location offline, then do so now: For example, remove the SMB share so that no user can access the folder or take any other appropriate step that prevents content to change in this folder on StorSimple.

运行最后一个 RoboCopy 轮。Run one last RoboCopy round. 这会选取任何更改,这些更改可能已丢失。This will pick up any changes, that might have been missed. 这最后一步所花费的时间取决于 RoboCopy 扫描的速度。How long this final step takes, is dependent on the speed of the RoboCopy scan. 您可以通过测量上一次运行所用的时间来估算与停机时间) (。You can estimate the time (which is equal to your downtime) by measuring how long the previous run took.

在 Windows Server 文件夹上创建一个共享,并且可能会调整你的 DFS N 部署以指向该文件夹。Create a share on the Windows Server folder and possibly adjust your DFS-N deployment to point to it. 请确保设置与 StorSimple SMB 共享上相同的共享级别权限。Be sure to set the same share-level permissions as on your StorSimple SMB share.

你已完成将共享/共享组迁移到公共根或卷中。You have finished migrating a share / group of shares into a common root or volume. (具体取决于你所映射的内容,并决定需要进入同一个 Azure 文件共享。 ) (Depending on what you mapped and decided that needed to go into the same Azure file share.)

可以尝试并行运行其中几个副本。You can try to run a few of these copies in parallel. 建议一次处理一个 Azure 文件共享的作用域。We recommend processing the scope of one Azure file share at a time.


将所有数据从 StorSimple 移到 Windows Server 并完成迁移后:返回到 Azure 门户中的 所有 _ 同步组,并将云分层卷可用空间百分比值调整为更适合缓存利用率的内容,例如20%。Once you have moved all the data from you StorSimple to the Windows Server, and your migration is complete: Return to *all _ sync groups in the Azure portal and adjust the cloud tiering volume free space percent value to something better suited for cache utilization, say 20%.

云分层卷可用空间策略作用于可能有多个服务器终结点从中同步的卷级别。The cloud tiering volume free space policy acts on a volume level with potentially multiple server endpoints syncing from it. 如果忘记调整甚至一个服务器终结点上的可用空间,同步将继续应用最严格的规则,并尝试保留99% 的可用磁盘空间,从而使本地缓存不会像预期的那样运行。If you forget to adjust the free space on even one server endpoint, sync will continue to apply the most restrictive rule and attempt to keep 99% free disk space, making the local cache not performing as you might expect. 除非您的目标只包含一个只包含很少访问的存档数据的卷的命名空间。Unless it is your goal to only have the namespace for a volume that only contains rarely accessed, archival data.


最可能遇到的问题是,RoboCopy 命令在 Windows Server 端上出现 "卷已满" * 的情况下失败。The most likely issue you can run into, is that the RoboCopy command fails with _"Volume full"* on the Windows Server side. 如果是这样,下载速度可能比上传速度更好。If that is the case, then your download speed is likely better than your upload speed. 云分层每小时进行一次,用于从已同步的本地 Windows Server 磁盘撤走内容。Cloud tiering acts once every hour to evacuate content from the local Windows Server disk, that has synced.

让同步进度和云分层释放磁盘空间。Let sync progress and cloud tiering free up disk space. 您可以在 Windows Server 上的文件资源管理器中观察。You can observe that in File Explorer on your Windows Server.

当你的 Windows 服务器有足够的可用容量时,重新运行该命令将解决此问题。When your Windows Server has sufficient available capacity, rerunning the command will resolve the problem. 如果遇到这种情况,您可以放心地继续操作。Nothing breaks when you get into this situation and you can move forward with confidence. 再次运行该命令是一个后果。Inconvenience of running the command again is the only consequence.

还可以遇到其他 Azure 文件同步问题。You can also run into other Azure File Sync issues. 如果出现这种情况,请查看 Azure 文件同步故障排除指南的链接As unlikely as they may be, if that happens, take a look at the LINK Azure File Sync troubleshooting guide.

迁移内容:Migration content:

Azure 文件同步内容:Azure File Sync content: