File server windows azure

Использование общей папки Azure в Windows Use an Azure file share with Windows

Файлы Azure — это простая в использовании облачная файловая система от корпорации Майкрософт. Azure Files is Microsoft’s easy-to-use cloud file system. Общие папки Azure можно легко использовать в Windows и Windows Server. Azure file shares can be seamlessly used in Windows and Windows Server. В этой статье рассматриваются рекомендации по использованию общей папки Azure в Windows и Windows Server. This article discusses the considerations for using an Azure file share with Windows and Windows Server.

Чтобы использовать общую папку Azure за пределами региона Azure, в котором она размещается, например локально или в другом регионе Azure, операционная система должна поддерживать протокол SMB 3.0. In order to use an Azure file share outside of the Azure region it is hosted in, such as on-premises or in a different Azure region, the OS must support SMB 3.0.

Общие папки Azure можно использовать в ОС Windows, работающей на виртуальной машине Azure или в локальной среде. You can use Azure file shares on a Windows installation that is running either in an Azure VM or on-premises. В следующей таблице показано, какие версии операционной системы поддерживают доступ к общим папкам и в какой среде: The following table illustrates which OS versions support accessing file shares in which environment:

Версия Windows Windows version Версия SMB SMB version Возможность подключения на виртуальной машине Azure Mountable in Azure VM Возможность подключения в локальной среде Mountable on-premises
Windows Server 2019 Windows Server 2019 SMB 3.0 SMB 3.0 Да Yes Да Yes
Windows 10 1 Windows 10 1 SMB 3.0 SMB 3.0 Да Yes Да Yes
Semi-Annual Channel 2 для Windows Server Windows Server semi-annual channel 2 SMB 3.0 SMB 3.0 Да Yes Да Yes
Windows Server 2016 Windows Server 2016 SMB 3.0 SMB 3.0 Да Yes Да Yes
Windows 8.1 Windows 8.1 SMB 3.0 SMB 3.0 Да Yes Да Yes
Windows Server 2012 R2 Windows Server 2012 R2 SMB 3.0 SMB 3.0 Да Yes Да Yes
Windows Server 2012 Windows Server 2012 SMB 3.0 SMB 3.0 Да Yes Да Yes
Windows 7 3 . Windows 7 3 SMB 2.1 SMB 2.1 Да Yes нет No
Windows Server 2008 R2 3 Windows Server 2008 R2 3 SMB 2.1 SMB 2.1 Да Yes Нет No

1 Windows 10, версии 1507, 1607, 1803, 1809, 1903, 1909 и 2004. 1 Windows 10, versions 1507, 1607, 1803, 1809, 1903, 1909, and 2004.
2 Windows Server, версии 1809, 1903, 1909, 2004. 2 Windows Server, versions 1809, 1903, 1909, 2004.
3 Обычная поддержка Майкрософт для Windows 7 и Windows Server 2008 R2 закончилась. 3 Regular Microsoft support for Windows 7 and Windows Server 2008 R2 has ended. Дополнительную поддержку обновлений для системы безопасности можно приобрести только с помощью программы Расширенные обновления для системы безопасности (ESU). It is possible to purchase additional support for security updates only through the Extended Security Update (ESU) program. Мы настоятельно рекомендуем отказаться от этих операционных систем. We strongly recommend migrating off of these operating systems.

Мы всегда рекомендуем использовать последнюю версию KB для своей версии Windows. We always recommend taking the most recent KB for your version of Windows.

Предварительные требования Prerequisites

Открытый порт 445. Для протокола SMB требуется, чтобы TCP-порт 445 был открыт. В противном случае установить подключение не получится. Ensure port 445 is open: The SMB protocol requires TCP port 445 to be open; connections will fail if port 445 is blocked. Вы можете проверить, блокирует ли брандмауэр порт 445 с помощью Test-NetConnection командлета. You can check if your firewall is blocking port 445 with the Test-NetConnection cmdlet. Дополнительные сведения о способах обхода заблокированного порта 445 см. в разделе Причина 1. порт 445 заблокирована в нашем руководство по устранению неполадок Windows. To learn about ways to work around a blocked 445 port, see the Cause 1: Port 445 is blocked section of our Windows troubleshooting guide.

Использование общей папки Azure в Windows Using an Azure file share with Windows

Чтобы использовать общую папку Azure в Windows, вы должны либо подключить ее, то есть присвоить ей букву диска или путь точки подключения, либо получить доступ к ней через UNC-путь. To use an Azure file share with Windows, you must either mount it, which means assigning it a drive letter or mount point path, or access it via its UNC path.

В этой статье предполагается, что для доступа к общей папке используется ключ учетной записи хранения. This article uses the storage account key to access the file share. Это ключ администратора для учетной записи хранения, включая разрешения администратора для всех файлов и папок в общей папке, к которой вы получаете доступ, и для всех общих папок и других ресурсов хранения (большие двоичные объекты, очереди, таблицы и т. д.), которые размещаются в этой учетной записи. A storage account key is an administrator key for a storage account, including administrator permissions to all files and folders within the file share you’re accessing, and for all file shares and other storage resources (blobs, queues, tables, etc.) contained within your storage account. Если этого недостаточно для вашей рабочей нагрузки, можно использовать Синхронизацию файлов Azure или проверку подлинности на основе удостоверений через SMB. If this is not sufficient for your workload, Azure File Sync may be used, or you may use identity-based authentication over SMB.

Общим вариантом для переноса бизнес-приложений, которые ожидают наличия подключенной к Azure общей папки SMB, является использование общей папки Azure в качестве альтернативы для запуска выделенного файлового сервера Windows на виртуальной машине Azure. A common pattern for lifting and shifting line-of-business (LOB) applications that expect an SMB file share to Azure is to use an Azure file share as an alternative for running a dedicated Windows file server in an Azure VM. Одна из важных рекомендаций для успешного перевода бизнес-приложения на использование общей папки Azure заключается в том, что многие бизнес-приложения работают в контексте выделенной учетной записи службы с ограниченными системными правами, а не административной учетной записью виртуальной машины. One important consideration for successfully migrating a line-of-business application to use an Azure file share is that many line-of-business applications run under the context of a dedicated service account with limited system permissions rather than the VM’s administrative account. Поэтому нужно обязательно подключить или сохранить учетные данные для общей папки Azure из контекста учетной записи службы, а не вашей учетной записи администратора. Therefore, you must ensure that you mount/save the credentials for the Azure file share from the context of the service account rather than your administrative account.

Подключение файлового ресурса Azure Mount the Azure file share

Портал Azure предоставляет скрипт, который можно использовать для подключения общей папки непосредственно к узлу. The Azure portal provides you with a script that you can use to mount your file share directly to a host. Мы рекомендуем использовать указанный скрипт. We recommend using this provided script.

Чтобы получить этот скрипт, сделайте следующее: To get this script:

Войдите на портал Azure. Sign in to the Azure portal.

Перейдите к учетной записи хранения, содержащей общую папку, которую вы хотите подключить. Navigate to the storage account that contains the file share you’d like to mount.

Выберите Общие папки. Select File shares.

Выберите общую папку, которую вы хотите подключить. Select the file share you’d like to mount.

Выберите Подключиться. Select Connect.

Выберите букву диска для подключения общей папки. Select the drive letter to mount the share to.

Скопируйте предоставленный скрипт. Copy the provided script.

Вставьте сценарий в оболочку на узле, на котором вы хотите подключить общую папку, и запустите ее. Paste the script into a shell on the host you’d like to mount the file share to, and run it.

Теперь вы подключили файловый ресурс Azure. You have now mounted your Azure file share.

Подключение общей папки Azure с помощью проводника Mount the Azure file share with File Explorer

Имейте в виду, что следующие инструкции приведены для Windows 10 и могут немного отличаться для более поздних версий. Note that the following instructions are shown on Windows 10 and may differ slightly on older releases.

Откройте проводник. Open File Explorer. Это можно сделать, открыв меню «Пуск» или нажав клавиши WIN+E. This can be done by opening from the Start Menu, or by pressing Win+E shortcut.

Перейдите к этому компьютеру в левой части окна. Navigate to This PC on the left-hand side of the window. Меню, доступные на ленте, изменятся. This will change the menus available in the ribbon. В меню «Компьютер» выберите раздел Подключение сетевого диска. Under the Computer menu, select Map network drive.

Выберите букву диска и введите UNC-путь, формат UNC-пути — \\ .file.core.windows.net\ . Select the drive letter and enter the UNC path, the UNC path format is \\ .file.core.windows.net\ . Например: \\anexampleaccountname.file.core.windows.net\example-share-name . For example: \\anexampleaccountname.file.core.windows.net\example-share-name .

Используйте имя учетной записи хранения с префиксом AZURE\ как имя пользователя и ключ учетной записи хранения в качестве пароля. Use the storage account name prepended with AZURE\ as the username and a storage account key as the password.

Выберите общую папку Azure. Use Azure file share as desired.

Когда вы будете готовы отключить общую папку Azure, это можно сделать, щелкнув правой кнопкой мыши запись для общей папки в разделе проводника Сетевые расположения и выбрав параметр Отключить. When you are ready to dismount the Azure file share, you can do so by right-clicking on the entry for the share under the Network locations in File Explorer and selecting Disconnect.

Доступ к моментальным снимкам общих файловых ресурсов из Windows Accessing share snapshots from Windows

Если вы уже создали моментальные снимки общего файлового ресурса вручную или автоматически с помощью скрипта или такой службы, как Azure Backup, вы можете просмотреть предыдущие версии общего ресурса, каталога или определенного файла из подключенного общего файлового ресурса в Windows. If you have taken a share snapshot, either manually or automatically through a script or service like Azure Backup, you can view previous versions of a share, a directory, or a particular file from file share on Windows. Моментальный снимок общего ресурса можно создать с помощью Azure PowerShell, Azure CLIили портал Azure. You can take a share snapshot using Azure PowerShell, Azure CLI, or the Azure portal.

Вывод списка предыдущих версий List previous versions

Перейдите к элементу или родительскому элементу, который требуется восстановить. Browse to the item or parent item that needs to be restored. Дважды щелкните для перехода к нужному каталогу. Double-click to go to the desired directory. Щелкните правой кнопкой мыши и выберите в меню пункт Свойства. Right-click and select Properties from the menu.

Выберите пункт Предыдущие версии, чтобы просмотреть список моментальных снимков общих ресурсов для этого каталога. Select Previous Versions to see the list of share snapshots for this directory. Вывод списка может занять несколько секунд в зависимости от скорости сети и количества моментальных снимков в каталоге. The list might take a few seconds to load, depending on the network speed and the number of share snapshots in the directory.

Чтобы открыть тот или иной моментальный снимок, нажмите кнопку Открыть. You can select Open to open a particular snapshot.

Восстановление из предыдущей версии Restore from a previous version

Нажмите кнопку Восстановить, чтобы рекурсивно скопировать содержимое всего каталога на момент создания моментального снимка общего ресурса в исходном расположении. Select Restore to copy the contents of the entire directory recursively at the share snapshot creation time to the original location.

Обеспечение безопасности Windows или Windows Server Securing Windows/Windows Server

Чтобы подключить общую папку Azure в Windows, порт 445 должен быть доступен. In order to mount an Azure file share on Windows, port 445 must be accessible. Многие организации блокируют порт 445 из-за угроз безопасности, присущих SMB 1. Many organizations block port 445 because of the security risks inherent with SMB 1. SMB 1, также известный как CIFS (Common Internet File System), является устаревшим протоколом файловой системы, включенным в Windows и Windows Server. SMB 1, also known as CIFS (Common Internet File System), is a legacy file system protocol included with Windows and Windows Server. SMB 1 — это устаревший, неэффективный и, самое главное, небезопасный протокол. SMB 1 is an outdated, inefficient, and most importantly insecure protocol. Хорошей новостью является то, что компонент «Файлы Azure» не поддерживает SMB 1, а все поддерживаемые версии Windows и Windows Server позволяют удалить или отключить этот протокол. The good news is that Azure Files does not support SMB 1, and all supported versions of Windows and Windows Server make it possible to remove or disable SMB 1. Мы всегда настоятельно рекомендуем удалять или отключать клиент и сервер SMB 1 в Windows перед использованием общей папки Azure в рабочей среде. We always strongly recommend removing or disabling the SMB 1 client and server in Windows before using Azure file shares in production.

В следующей таблице представлена ​​подробная информация о состоянии SMB 1 для каждой версии Windows: The following table provides detailed information on the status of SMB 1 each version of Windows:

Версия Windows Windows version Состояние SMB 1 по умолчанию SMB 1 default status Метод удаления или отключения Disable/Remove method
Windows Server 2019 Windows Server 2019 Выключено Disabled Удаление с помощью функции Windows Remove with Windows feature
Windows Server версии 1709 или выше Windows Server, versions 1709+ Выключено Disabled Удаление с помощью функции Windows Remove with Windows feature
Windows 10 версии 1709 или выше Windows 10, versions 1709+ Выключено Disabled Удаление с помощью функции Windows Remove with Windows feature
Windows Server 2016 Windows Server 2016 Активировано Enabled Удаление с помощью функции Windows Remove with Windows feature
Windows 10 версии 1507, 1607 и 1703 Windows 10, versions 1507, 1607, and 1703 Активировано Enabled Удаление с помощью функции Windows Remove with Windows feature
Windows Server 2012 R2 Windows Server 2012 R2 Активировано Enabled Удаление с помощью функции Windows Remove with Windows feature
Windows 8.1 Windows 8.1 Активировано Enabled Удаление с помощью функции Windows Remove with Windows feature
Windows Server 2012 Windows Server 2012 Активировано Enabled Отключение с помощью реестра Disable with Registry
Windows Server 2008 R2 Windows Server 2008 R2 Активировано Enabled Отключение с помощью реестра Disable with Registry
Windows 7 Windows 7 Активировано Enabled Отключение с помощью реестра Disable with Registry

Аудит использования SMB 1 Auditing SMB 1 usage

Применяется к Windows Server 2019, Semi-Annual Channel для Windows Server (версии 1709 и 1803), Windows Server 2016, Windows 10 (версии 1507, 1607, 1703, 1709 и 1803), Windows Server 2012 R2 и Windows 8.1. Applies to Windows Server 2019, Windows Server semi-annual channel (versions 1709 and 1803), Windows Server 2016, Windows 10 (versions 1507, 1607, 1703, 1709, and 1803), Windows Server 2012 R2, and Windows 8.1

Прежде чем удалять SMB 1 в вашей среде, можете провести аудит использования SMB 1, чтобы узнать, повлияет ли это изменение на работу каких-либо клиентов. Before removing SMB 1 in your environment, you may wish to audit SMB 1 usage to see if any clients will be broken by the change. Если какие-либо запросы к папкам SMB выполняются с помощью SMB 1, событие аудита будет регистрироваться в журнале событий в разделе Applications and Services Logs > Microsoft > Windows > SMBServer > Audit . If any requests are made against SMB shares with SMB 1, an audit event will be logged in the event log under Applications and Services Logs > Microsoft > Windows > SMBServer > Audit .

Чтобы включить поддержку аудита в Windows Server 2012 R2 и Windows 8.1, требуется пакет обновлений не ниже указанного в KB4022720. To enable auditing support on Windows Server 2012 R2 and Windows 8.1, install at least KB4022720.

Чтобы включить аудит, выполните следующий командлет в сеансе PowerShell с повышенными правами: To enable auditing, execute the following cmdlet from an elevated PowerShell session:

Удаление SMB 1 из Windows Server Removing SMB 1 from Windows Server

Применяется к Windows Server 2019, Semi-Annual Channel для Windows Server (версии 1709 и 1803), Windows Server 2016 и Windows Server 2012 R2. Applies to Windows Server 2019, Windows Server semi-annual channel (versions 1709 and 1803), Windows Server 2016, Windows Server 2012 R2

Чтобы удалить SMB 1 из экземпляра Windows Server, выполните следующий командлет в сеансе PowerShell с повышенными правами: To remove SMB 1 from a Windows Server instance, execute the following cmdlet from an elevated PowerShell session:

Чтобы завершить процесс удаления, перезагрузите сервер. To complete the removal process, restart your server.

Начиная с Windows 10 и Windows Server версии 1709, SMB 1 не установлен по умолчанию и имеет отдельные функции Windows для клиента SMB 1 и сервера SMB 1. Starting with Windows 10 and Windows Server version 1709, SMB 1 is not installed by default and has separate Windows features for the SMB 1 client and SMB 1 server. Мы всегда рекомендуем удалять сервер SMB 1 ( FS-SMB1-SERVER ) и клиент SMB 1 ( FS-SMB1-CLIENT ). We always recommend leaving both the SMB 1 server ( FS-SMB1-SERVER ) and the SMB 1 client ( FS-SMB1-CLIENT ) uninstalled.

Удаление SMB 1 из клиента Windows Removing SMB 1 from Windows client

Применяется к Windows 10 (версии 1507, 1607, 1703, 1709 и 1803) и Windows 8.1. Applies to Windows 10 (versions 1507, 1607, 1703, 1709, and 1803) and Windows 8.1

Чтобы удалить SMB 1 из клиента Windows, выполните следующий командлет в сеансе PowerShell с повышенными правами: To remove SMB 1 from your Windows client, execute the following cmdlet from an elevated PowerShell session:

Чтобы завершить процесс удаления, перезагрузите компьютер. To complete the removal process, restart your PC.

Отключение SMB 1 в устаревших версиях Windows и Windows Server Disabling SMB 1 on legacy versions of Windows/Windows Server

Применяется к Windows Server 2012, Windows Server 2008 R2 и Windows 7. Applies to Windows Server 2012, Windows Server 2008 R2, and Windows 7

SMB 1 нельзя полностью удалить в устаревших версиях Windows и Windows Server, но его можно отключить через реестр. SMB 1 cannot be completely removed on legacy versions of Windows/Windows Server, but it can be disabled through the Registry. Чтобы отключить SMB 1, создайте новый ключ реестра SMB1 типа DWORD со значением 0 в HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > LanmanServer > Parameters . To disable SMB 1, create a new registry key SMB1 of type DWORD with a value of 0 under HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > LanmanServer > Parameters .

Вы можете легко выполнить это с помощью следующего командлета PowerShell: You can easily accomplish this with the following PowerShell cmdlet as well:

После создания этого раздела реестра необходимо перезагрузить сервер, чтобы отключить SMB 1. After creating this registry key, you must restart your server to disable SMB 1.

Ресурсы по SMB SMB resources

Дальнейшие действия Next steps

Дополнительные сведения о службе файлов Azure см. по следующим ссылкам. See these links for more information about Azure Files:

Читайте также:  Most recent windows operating systems
Оцените статью