Skip to content

Commit 5591dc5

Browse files
committed
NFS migration guide for Azure Files
1 parent 3b8408e commit 5591dc5

File tree

2 files changed

+142
-17
lines changed

2 files changed

+142
-17
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: Migrate to NFS Azure file shares
3+
description: Learn how to migrate from Linux file servers to NFS Azure file shares using open source file copy tools.
4+
author: khdownie
5+
ms.service: azure-file-storage
6+
ms.topic: conceptual
7+
ms.date: 12/11/2023
8+
ms.author: kendownie
9+
---
10+
11+
# Migrate to NFS Azure file shares
12+
13+
This article covers the basic aspects of migrating from Linux file servers to NFS Azure file shares, which are only available as Premium file shares (FileStorage account kind). We'll also compare open source tools fpsync and rsync to understand how they perform in different situations when copying data to Azure file shares.
14+
15+
## Applies to
16+
17+
| File share type | SMB | NFS |
18+
|-|:-:|:-:|
19+
| Standard file shares (GPv2), LRS/ZRS | ![No](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
20+
| Standard file shares (GPv2), GRS/GZRS | ![No](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
21+
| Premium file shares (FileStorage), LRS/ZRS | ![No](../media/icons/yes-icon.png) | ![Yes](../media/icons/yes-icon.png) |
22+
23+
## Prerequisites
24+
25+
You'll need at least one NFS Azure file share mounted to a Linux virtual machine (VM). To create one, see [Create an NFS Azure file share and mount it on a Linux VM](storage-files-quick-create-use-linux.md). We recommend mounting the share with nconnect to make use of multiple TCP connections. For more information, see [Improve NFS Azure file share performance](nfs-performance.md#nconnect).
26+
27+
## Migration basics
28+
29+
Many open source tools are available to transfer data to NFS file shares. However, not all of them are efficient when dealing with a distributed file system with distinct performance considerations compared to on-premises setups. In a distributed file system, each network call involves a round trip to a server that might not be local. Therefore, optimizing the time spent on network calls is crucial to achieving optimal performance and efficient data transfer over the network.
30+
31+
## Using fpsync
32+
33+
In this article, we'll use the open source tool fpsync to copy the data. Designed to synchronize files between two locations, [fpsync](https://manpages.ubuntu.com/manpages/lunar/en/man1/fpsync.1.html) stands for File Parallel Synchronization. It comes as a part of the fpart filesystem partitioner.
34+
35+
Internally, fpsync uses [rsync](https://linux.die.net/man/1/rsync) (default), [cpio](https://linux.die.net/man/1/cpio), or tar tools to copy. It computes subsets of `src_dir/` and spawns synchronization jobs to synchronize them to `dst_dir/`. Synchronization jobs are executed on the fly while fpsync crawls the file system, making it a useful tool for efficiently migrating large file systems and copying large datasets with multiple files.
36+
37+
### Install fpart
38+
39+
Install fpart on the Linux distribution of your choice. Once it's installed, you should see fpsync under `/usr/bin/`.
40+
41+
# [Ubuntu](#tab/ubuntu)
42+
43+
On Ubuntu, use the apt package manager.
44+
45+
```bash
46+
sudo apt-get install fpart
47+
```
48+
49+
# [RHEL](#tab/rhel)
50+
51+
On Red Hat Enterprise Linux, use the yum package manager.
52+
53+
**Red Hat Enterprise Linux 7:**
54+
55+
```bash
56+
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
57+
sudo yum install fpart -y
58+
```
59+
60+
**Red Hat Enterprise Linux 8:**
61+
62+
```bash
63+
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
64+
sudo yum install fpart -y
65+
```
66+
67+
**Red Hat Enterprise Linux 9:**
68+
69+
```bash
70+
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
71+
sudo yum install fpart -y
72+
```
73+
74+
# [SUSE](#tab/suse)
75+
76+
```bash
77+
git clone https://github.com/martymac/fpart
78+
./make_release.sh 
79+
```
80+
---
81+
82+
## Copy data from source to target
83+
84+
Make sure your target Azure file share is mounted to a Linux VM, then copy your data in three phases:
85+
86+
1. **Baseline copy:** Copy from source to target when no data exists on the target.
87+
1. **Incremental copy:** Copy only the incremental changes from source to target. This is often done multiple times.
88+
1. **Final pass:** A final pass is needed to delete any files on the target that don't exist at the source.
89+
90+
Copying the data always involves some version of this command:
91+
92+
```bash
93+
fpsync -m <copy tool - rsync/cpio/tar> -n <parallel transfers> <absolute source path> <absolute target path>
94+
```
95+
96+
### Baseline copy
97+
98+
For baseline copy we recommend using fpsync with cpio as the copy tool, for example:
99+
100+
```bash
101+
fpsync -m cpio –n <parallel transfers> <absolute source path> <absolute target path>
102+
```
103+
104+
For more information, see [Cpio and Tar support](http://www.fpart.org/fpsync/#cpio-and-tar-support).
105+
106+
### Incremental copy
107+
108+
For incremental sync, we recommend using fpsync with the default copy tool (rsync):
109+
110+
```bash
111+
fpsync –n <parallel transfers> <absolute source path> <absolute target path>
112+
```
113+
114+
By default, fpsync will specify the following rsync options: `-lptgoD -v --numeric-ids`. You can specify additional rsync options by adding `–o option` to the fpsync command.
115+
116+
## Next steps
117+
118+
- [Improve NFS Azure file share performance](nfs-performance.md)

articles/storage/files/storage-files-migration-overview.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
---
2-
title: Migrate to Azure file shares
3-
description: Learn how to migrate to Azure file shares and find your migration guide.
2+
title: Migrate to SMB Azure file shares
3+
description: Learn how to migrate to SMB Azure file shares and find your migration guide.
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: conceptual
7-
ms.date: 11/28/2023
7+
ms.date: 12/11/2023
88
ms.author: kendownie
99
---
1010

11-
# Migrate to Azure file shares
11+
# Migrate to SMB Azure file shares
1212

13-
This article covers the basic aspects of a migration to Azure file shares and contains a table of migration guides. These guides help you move your files into Azure file shares. The guides are organized based on where your data is and what deployment model (cloud-only or hybrid) you're moving to.
13+
This article covers the basic aspects of a migration to SMB Azure file shares and contains a table of migration guides. These guides help you move your files into Azure file shares. The guides are organized based on where your data is and what deployment model (cloud-only or hybrid) you're moving to.
14+
15+
## Applies to
16+
| File share type | SMB | NFS |
17+
|-|:-:|:-:|
18+
| Standard file shares (GPv2), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
19+
| Standard file shares (GPv2), GRS/GZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
20+
| Premium file shares (FileStorage), LRS/ZRS | ![Yes](../media/icons/yes-icon.png) | ![No](../media/icons/no-icon.png) |
1421

1522
## Migration basics
1623

17-
Azure has multiple available types of cloud storage. A fundamental aspect of file migrations to Azure is determining which Azure storage option is right for your data.
24+
Azure offers different types of cloud storage. A fundamental aspect of file migrations to Azure is determining which Azure storage option is right for your data.
1825

19-
[Azure file shares](storage-files-introduction.md) are suitable for general-purpose file data. This data includes anything you use an on-premises SMB or NFS share for. With [Azure File Sync](../file-sync/file-sync-planning.md), you can cache the contents of several Azure file shares on servers running Windows Server on-premises.
26+
[Azure file shares](storage-files-introduction.md) are suitable for general-purpose file data. This data includes anything you use an on-premises SMB share for. With [Azure File Sync](../file-sync/file-sync-planning.md), you can cache the contents of several Azure file shares on servers running Windows Server on-premises.
2027

2128
For an app that currently runs on an on-premises server, storing files in an Azure file share might be a good choice. You can move the app to Azure and use Azure file shares as shared storage. You can also consider [Azure Disks](../../virtual-machines/managed-disks-overview.md) for this scenario.
2229

2330
Some cloud apps don't depend on SMB or on machine-local data access or shared access. For those apps, object storage like [Azure blobs](../blobs/storage-blobs-overview.md) is often the best choice.
2431

25-
The key in any migration is to capture all the applicable file fidelity when moving your files from their current storage location to Azure. How much fidelity the Azure storage option supports and how much your scenario requires also helps you pick the right Azure storage.
32+
The key in any migration is to capture all the applicable file fidelity when moving your files from their current storage location to Azure. How much fidelity the Azure storage option supports and how much your scenario requires also helps you pick the right Azure storage.
2633

2734
Here are the two basic components of a file:
2835

2936
- **Data stream**: The data stream of a file stores the file content.
3037
- **File metadata**: Unlike object storage in Azure blobs, an Azure file share can natively store file metadata. General-purpose file data traditionally depends on file metadata. App data might not. The file metadata has these subcomponents:
31-
* File attributes like read-only
32-
* File permissions, which can be referred to as *NTFS permissions* or *file and folder ACLs*
33-
* Timestamps, most notably the creation and last-modified timestamps
34-
* An alternative data stream, which is a space to store larger amounts of nonstandard properties. This alternative data stream can't be stored on a file in an Azure file share. It's preserved on-premises when Azure File Sync is used.
38+
- File attributes like read-only
39+
- File permissions, which can be referred to as *NTFS permissions* or *file and folder ACLs*
40+
- Timestamps, most notably the creation and last-modified timestamps
41+
- An alternative data stream, which is a space to store larger amounts of nonstandard properties. This alternative data stream can't be stored on a file in an Azure file share. It's preserved on-premises when Azure File Sync is used.
3542

3643
File fidelity in a migration can be defined as the ability to:
3744

@@ -98,18 +105,18 @@ A scenario without a link doesn't yet have a published migration guide. Check th
98105

99106
There are several file-copy tools available from Microsoft and others. To select the right tool for your migration scenario, consider these fundamental questions:
100107

101-
* Does the tool support the source and target locations for your file copy?
108+
- Does the tool support the source and target locations for your file copy?
102109

103-
* Does the tool support your network path or available protocols (such as REST, SMB, or NFS) between the source and target storage locations?
110+
- Does the tool support your network path or available protocols (such as REST or SMB) between the source and target storage locations?
104111

105-
* Does the tool preserve the necessary file fidelity supported by your source and target locations?
112+
- Does the tool preserve the necessary file fidelity supported by your source and target locations?
106113

107114
In some cases, your target storage doesn't support the same fidelity as your source. If the target storage is sufficient for your needs, the tool must match only the target's file-fidelity capabilities.
108115

109-
* Does the tool have features that let it fit into your migration strategy?
116+
- Does the tool have features that let it fit into your migration strategy?
110117

111118
For example, consider whether the tool lets you minimize your downtime.
112-
119+
113120
When a tool supports an option to mirror a source to a target, you can often run it multiple times on the same source and target while the source stays accessible.
114121

115122
The first time you run the tool, it copies the bulk of the data. This initial run might last a while. It often lasts longer than you want for taking the data source offline for your business processes.

0 commit comments

Comments
 (0)