You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how to register and unregister a Windows Server with an Azure File Sync Storage Sync Service.
4
4
author: khdownie
5
5
ms.service: azure-file-storage
6
-
ms.custom:
7
6
ms.topic: how-to
8
-
ms.date: 10/04/2023
7
+
ms.date: 08/07/2024
9
8
ms.author: kendownie
10
9
---
11
10
12
11
# Manage registered servers with Azure File Sync
12
+
13
13
Azure File Sync allows you to centralize your organization's file shares in Azure Files without giving up the flexibility, performance, and compatibility of an on-premises file server. It does this by transforming your Windows Servers into a quick cache of your Azure file share. You can use any protocol available on Windows Server to access your data locally (including SMB, NFS, and FTPS) and you can have as many caches as you need across the world.
14
14
15
15
The following article illustrates how to register and manage a server with a Storage Sync Service. See [How to deploy Azure File Sync](file-sync-deployment-guide.md) for information on how to deploy Azure File Sync end-to-end.
16
16
17
17
## Register/unregister a server with Storage Sync Service
18
-
Registering a server with Azure File Sync establishes a trust relationship between Windows Server and Azure. This relationship can then be used to create *server endpoints* on the server, which represent specific folders that should be synced with an Azure file share (also known as a *cloud endpoint*).
18
+
19
+
Registering a server with Azure File Sync establishes a trust relationship between Windows Server and Azure. This relationship can then be used to create *server endpoints* on the server, which represent specific folders that should be synced with an Azure file share (also known as a *cloud endpoint*).
19
20
20
21
### Prerequisites
22
+
21
23
To register a server with a Storage Sync Service, you must first prepare your server with the necessary prerequisites:
22
24
23
25
* Your server must be running a supported version of Windows Server. For more information, see [Azure File Sync system requirements and interoperability](file-sync-planning.md#windows-file-server-considerations).
24
-
* Ensure that a Storage Sync Service has been deployed. For more information on how to deploy a Storage Sync Service, see [How to deploy Azure File Sync](file-sync-deployment-guide.md).
26
+
* Ensure that you've deployed a Storage Sync Service. For more information on how to deploy a Storage Sync Service, see [How to deploy Azure File Sync](file-sync-deployment-guide.md).
25
27
* Ensure that the server is connected to the internet and that Azure is accessible.
26
28
* Disable the IE Enhanced Security Configuration for administrators with the Server Manager UI.
27
29
28
-

30
+

29
31
30
32
* Ensure that the Azure PowerShell module is installed on your server. If your server is a member of a Failover Cluster, every node in the cluster will require the Az module. More details on how to install the Az module can be found on the [Install and configure Azure PowerShell](/powershell/azure/install-azure-powershell).
31
33
@@ -41,7 +43,7 @@ To register a server with a Storage Sync Service, you must first prepare your se
41
43
* Show the proxy: netsh winhttp show proxy
42
44
* Set the proxy: netsh winhttp set proxy 127.0.0.1:8888
43
45
* Reset the proxy: netsh winhttp reset proxy
44
-
*if this is setup after the agent is installed, then restart our sync agent:
46
+
*If this is set up after the agent is installed, then restart our sync agent:
45
47
net stop filesyncsvc
46
48
47
49
```xml
@@ -54,55 +56,61 @@ To register a server with a Storage Sync Service, you must first prepare your se
54
56
```
55
57
56
58
### Register a server with Storage Sync Service
59
+
57
60
Before a server can be used as a *server endpoint* in an Azure File Sync *sync group*, it must be registered with a *Storage Sync Service*. A server can only be registered with one Storage Sync Service at a time.
58
61
59
62
#### Install the Azure File Sync agent
63
+
60
64
1.[Download the Azure File Sync agent](https://go.microsoft.com/fwlink/?linkid=858257).
65
+
61
66
2. Start the Azure File Sync agent installer.
62
67
63
-

68
+

64
69
65
-
3. Be sure to enable updates to the Azure File Sync agent using Microsoft Update. It is important because critical security fixes and feature enhancements to the server package are shipped via Microsoft Update.
70
+
3. Be sure to enable updates to the Azure File Sync agent using Microsoft Update. It's important because critical security fixes and feature enhancements to the server package are shipped via Microsoft Update.
66
71
67
-

72
+

68
73
69
74
4. If the server has not been previously registered, the server registration UI will pop up immediately after completing the installation.
70
75
71
76
> [!IMPORTANT]
72
-
> If the server is a member of a Failover Cluster, the Azure File Sync agent needs to be installed on every node in the cluster.
77
+
> If the server is a member of a Failover Cluster, the Azure File Sync agent must be installed on every node in the cluster.
73
78
74
79
#### Register the server using the server registration UI
75
-
1. If the server registration UI did not start immediately after completing the installation of the Azure File Sync agent, it can be started manually by executing `C:\Program Files\Azure\StorageSyncAgent\ServerRegistration.exe`.
76
-
2. Click *Sign-in* to access your Azure subscription.
77
80
78
-

81
+
1. If the server registration UI didn't start immediately after completing the installation of the Azure File Sync agent, start it manually by executing `C:\Program Files\Azure\StorageSyncAgent\ServerRegistration.exe`.
79
82
80
-
3. Pick the correct subscription, resource group, and Storage Sync Service from the dialog.
83
+
2. Select *Sign-in* to access your Azure subscription.
81
84
82
-

85
+

83
86
84
-
4. In preview, one more sign-in is required to complete the process.
87
+
3. Pick the correct subscription, resource group, and Storage Sync Service from the dialog.
85
88
86
-

89
+

90
+
91
+
4. You might be prompted to sign into Azure again to complete the process.
87
92
88
93
> [!IMPORTANT]
89
94
> If the server is a member of a Failover Cluster, each server needs to run the Server Registration. When you view the registered servers in the Azure Portal, Azure File Sync automatically recognizes each node as a member of the same Failover Cluster, and groups them together appropriately.
90
95
91
96
#### Register the server with PowerShell
92
-
You can also perform server registration via PowerShell.
97
+
98
+
You can also perform server registration via PowerShell.
### Unregister the server with Storage Sync Service
105
+
99
106
There are several steps that are required to unregister a server with a Storage Sync Service. Let's take a look at how to properly unregister a server.
100
107
101
108
> [!WARNING]
102
-
> Do not attempt to troubleshoot issues with sync, cloud tiering, or any other aspect of Azure File Sync by unregistering and registering a server, or removing and recreating the server endpoints unless explicitly instructed to by a Microsoft engineer. Unregistering a server and removing server endpoints is a destructive operation, and tiered files on the volumes with server endpoints will not be "reconnected" to their locations on the Azure file share after the registered server and server endpoints are recreated, which will result in sync errors. Also note, tiered files that exist outside of a server endpoint namespace may be permanently lost. Tiered files may exist within server endpoints even if cloud tiering was never enabled.
109
+
> Don't attempt to troubleshoot issues with sync, cloud tiering, or any other aspect of Azure File Sync by unregistering and registering a server, or removing and recreating the server endpoints unless explicitly instructed to by a Microsoft engineer. Unregistering a server and removing server endpoints is a destructive operation, and tiered files on the volumes with server endpoints will not be "reconnected" to their locations on the Azure file share after the registered server and server endpoints are recreated, which will result in sync errors. Tiered files that exist outside of a server endpoint namespace might be permanently lost. Tiered files might exist within server endpoints even if cloud tiering was never enabled.
103
110
104
111
#### (Optional) Recall all tiered data
105
-
If you would like files that are currently tiered to be available after removing Azure File Sync (i.e. this is a production, not a test, environment), recall all files on each volume containing server endpoints. Disable cloud tiering for all server endpoints, and then run the following PowerShell cmdlet:
112
+
113
+
If you want files that are currently tiered to be available after removing Azure File Sync (i.e. this is a production, not a test, environment), recall all files on each volume containing server endpoints. Disable cloud tiering for all server endpoints, and then run the following PowerShell cmdlet:
> If the local volume hosting the server endpoint does not have enough free space to recall all the tiered data, the `Invoke-StorageSyncFileRecall` cmdlet will fail.
114
122
115
123
#### Remove the server from all sync groups
124
+
116
125
Before unregistering the server on the Storage Sync Service, you must remove all server endpoints on that server. You can do this via the Azure portal:
117
126
118
127
1. Navigate to the Storage Sync Service where your server is registered.
119
-
2. Remove all server endpoints for this server in each sync group in the Storage Sync Service. This can be accomplished by right-clicking the relevant server endpoint in the sync group pane.
128
+
2. Remove all server endpoints for this server in each sync group in the Storage Sync Service. Do this by right-clicking the relevant server endpoint in the sync group pane.
120
129
121
130
:::image type="content" source="media/storage-sync-files-server-registration/sync-group-server-endpoint-remove.png" alt-text="Screenshot showing how to remove a server endpoint from a sync group.":::
122
131
123
-
This can also be accomplished with a simple PowerShell script:
132
+
You can also do this with a simple PowerShell script:
Now that all data has been recalled and the server has been removed from all sync groups, you can unregister the server.
141
151
142
152
1. In the Azure portal, navigate to the Storage Sync Service and select **Sync** > **Registered servers**.
@@ -145,6 +155,7 @@ Now that all data has been recalled and the server has been removed from all syn
145
155
:::image type="content" source="media/storage-sync-files-server-registration/unregister-server.png" alt-text="Screenshot showing how to unregister a server.":::
146
156
147
157
#### Unregister the server with PowerShell
158
+
148
159
You can also unregister the server via PowerShell by using the `Unregister-AzStorageSyncServer` cmdlet.
## Ensuring Azure File Sync is a good neighbor in your datacenter
159
-
Because Azure File Sync will rarely be the only service running in your datacenter, you might want to limit the network and storage usage of Azure File Sync.
169
+
## Ensuring Azure File Sync is a good neighbor in your data center
170
+
171
+
Because Azure File Sync will rarely be the only service running in your data center, you might want to limit the network and storage usage of Azure File Sync.
160
172
161
173
> [!IMPORTANT]
162
174
> Setting limits too low will impact the performance of Azure File Sync synchronization and recall.
163
175
164
176
### Set Azure File Sync network limits
177
+
165
178
You can throttle the network utilization of Azure File Sync by using the `StorageSyncNetworkLimit` cmdlets.
166
179
167
180
> [!NOTE]
168
-
> Network limits does not apply to the following scenarios:
181
+
> Network limits don't apply to the following scenarios:
169
182
> - When a tiered file is accessed.
170
183
> - Sync metadata that is exchanged between the registered server and Storage Sync Service.
171
184
>
172
-
> Because this network traffic is not throttled, Azure File Sync may exceed the network limit configured. Our recommendation is to monitor the network traffic and adjust the limit to account for the network traffic that is not throttled.
185
+
> Because this network traffic isn't throttled, Azure File Sync might exceed the network limit configured. We recommend monitoring the network traffic and adjusting the limit to account for the network traffic that isn't throttled.
173
186
174
-
For example, you can create a new throttle limit to ensure that Azure File Sync does not use more than 10 Mbps between 9 am and 5 pm (17:00h) during the work week:
187
+
For example, you can create a new throttle limit to ensure that Azure File Sync doesn't use more than 10 Mbps between 9 am and 5 pm (17:00h) during the work week:
When Azure File Sync is hosted in a virtual machine running on a Windows Server virtualization host, you can use Storage QoS (storage quality of service) to regulate storage IO consumption. You can set the Storage QoS policy either as a maximum (or limit, such as how `StorageSyncNetworkLimit` is enforced in the previous example) or as a minimum (or reservation). Setting a minimum instead of a maximum allows Azure File Sync to burst to use available storage bandwidth if other workloads are not using it. For more information, see [Storage Quality of Service](/windows-server/storage/storage-qos/storage-qos-overview).
209
+
### Use Windows Server storage QoS
210
+
211
+
When Azure File Sync is hosted in a virtual machine running on a Windows Server virtualization host, you can use Storage QoS (storage quality of service) to regulate storage IO consumption. You can set the Storage QoS policy either as a maximum (or limit, such as how `StorageSyncNetworkLimit` is enforced in the previous example) or as a minimum (or reservation). Setting a minimum instead of a maximum allows Azure File Sync to burst to use available storage bandwidth if other workloads aren't using it. For more information, see [Storage Quality of Service](/windows-server/storage/storage-qos/storage-qos-overview).
197
212
198
213
## See also
214
+
199
215
-[Planning for an Azure File Sync deployment](file-sync-planning.md)
0 commit comments