LoginSignup
19
21

More than 5 years have passed since last update.

Amazon FSx for Windows を触ってみた (1)

Last updated at Posted at 2018-12-01

Amazon FSxとは

AWS Blog - Amazon FSx for Windows ファイルサーバー – 高速・完全マネージド型・セキュアなファイルサーバー
サービスURL
ドキュメント

2018/12/01時点では東京リージョンにはありません

Amazon FSx for Windows ファイルサーバー
Amazon FSx for Windows ファイルサーバーはこれら全てのニーズに対応しています。既存の Windows アプリケーションや Windows 環境で作業することを前提に設計されており、Windows ワークロードのクラウドへの Lift-and-Shift を非常に簡単にしてくれます。完全マネージド型の Windows ファイルサーバーに裏付けられたネイティブ Windows ファイルサーバーに、広く採用されている SMB (Server Message Block) プロトコルを介してアクセスできます。SSD ストレージで構築されている Amazon FSx for Windows ファイルサーバーは、皆さん (と皆さんの Windows アプリケーション) が期待するスループット、IOPS、一貫したミリ秒未満のパフォーマンスを提供します。

必要なもの

  • Directory Service(Microsoft AD aka MSAD)

    • Directory Serviceには大きく分けて3種類ありますが、現時点ではMSADが必須のようです
      • Microsoft AD
        • Windows 2012 R2をベースにしたマネージドAD
      • AD Connector
        • オンプレやEC2で構築したADとAWSサービスを接続するためのプロキシ
        • Workspaces,FSxなどのADが必要なAWSサービスは、ユーザ環境のADに直接アクセスすることはできないため、AD Connectorというプロキシを利用することで、ユーザ環境のAD - AD Connector - AWSサービスという経路でAD上のユーザ情報等を取得します
      • Simple AD
        • AD互換のSamba4で作られたマネージドAD
        • Smanba4は、ADと100%互換ではないため、主に検証環境用途。本番環境での利用は非推奨。
  • MSADのドメインに参加したWindows Server

    • FSxをマウントするクライアント

マネジメントコンソールからファイルシステムの作成

image.png

image.png

Highly-durable and available file storage for business applications, home directories, web serving, data analytics, media processing, and software build environment use cases.
Built on Windows Server, providing shared file storage with the compatibility and features that Windows-based applications rely on, such as full support for the SMB protocol and Windows NTFS, Active Directory (AD) integration, and Distributed File System (DFS).
Automatically replicates data within the AZ associated with your file system, provides automatic daily backups across AZs, and fully supports the use of DFS to enable multi-AZ deployments.
All file system data is automatically encrypted at rest and in transit.

FSx自体はAZ指定で作成するようですが、Windowsの機能のDFSを利用することでMulti-AZ化できると書いてあるようですね。
今回は初回ということで複雑なことはやらずに最もシンプルに使ってみようと思います。

image.png

最小の300GBで。スループットも最小の8MB/s

image.png

VPCとAZとサブネットとセキュリティグループを設定。

そもそもFSxにアクセスさせるさせない設定はセキュリティグループにて行い(AWSの設定)、
各フォルダやファイルのアクセス権限の設定は通常のファイルサーバのオペレーションでやる(Windowsの設定)っぽいですね。

image.png

Microsoft Active Directory ID Info
Choose a directory where you allow authorized domain users to authenticate against this file system using ActiveDirectory. This must be a Microsoft AD Directory, be active, and have a VPC ID that matches the value specified in the Network & security section.

MS ADが必須と書いてあります。
ここでMS ADを作ってない人は作る必要があります。
一点注意が必要なのは、MS ADを作成しても、OSへアクセス(RDP)できないので、MS ADへアクセス(AD管理ツールを使って)するためのWindows Serverが必要になります。
https://docs.aws.amazon.com/ja_jp/directoryservice/latest/admin-guide/ms_ad_install_ad_tools.html

image.png

backup windowとmaintenance windowを選択します。
触るだけなので、デフォルトでいいかと思いますが、どういった選び方なのか知るため個別指定しました。
backup windowは、30分の時間枠を設定して、毎日その枠内でバックアップを取得。世代管理の設定も可能
maintenance windowは、一週間のうち30分を指定する。どの頻度でmaintenanceが走るかはわかりませんが、指定する時間帯はFSxが使えないと想定しておくといいでしょう。
例えば、サードパーティのバックアップソフトを使っている場合は、その時間は避けるとか。

image.png

全体を確認できます。
親切に後で変更できるものとできないものを教えてくれますね。
注意が必要なのは、容量・スループットが変更できないことでしょうか。
(ADを変更できないことは、中の仕組みはよくわかりませんがWindowsに詳しい人からみると当たり前な気がします)

image.png

作成したファイルシステムの確認

image.png

Attachを押してみる

image.png

Windows Serverからマウントしてみる

手順は上に書いてありますが、
1.Directory Service(MS AD)のドメインに参加したWindowsを用意してログイン
2.net use コマンドを実行

image.png

ドメイン参加したEC2のwindowsサーバにRDPで入って、コマンドプロンプトで書いてあったコマンドをそのまま実行しました。
network driveは「Z」に変更しています

image.png

Zドライブとしてマウントされていますね

ファイルを作成してみる

image.png

適当にフォルダとファイルを作成しました。
エラーなくそのまま作成できたので、デフォルトの権限はわりと緩めなのでしょうか?見てみましょう。

デフォルトの権限を見てみる

image.png
image.png
image.png

AWS Delegated FSx Administratorsというのがありますね。
詳しくは見れていないのですが、MSAD側で自動で作られるセキュリティグループのようです。FSxの管理者用セキュリティグループといったところでしょうか。

Windowsを触っている方なら分かると思いますが、デフォルトの権限は緩めですが、ファイルサーバはそんなもんです。
不要なものは消して、(AWSではななくてWindowsの)セキュリティグループで制御するなど運用をしないといけません。
それはFSxを利用してもWindowsでファイルサーバを利用しても、Sambaで作っても変わらないところですね。

まとめ

FSx for Windowsを実際に触り、Windows Serverからマウントしてみました。
マネージドのWindows用ファイルサーバとしては非常に魅力的なサービスではないでしょうか。
ただ、今回は「触ってみた」だけなので、今後細かいところを触っていこうと思います。

おまけ

ありそうな疑問点

バックアップ取得時はファイルの整合性を保証してくれる?

してくれるっぽいです。しかもincremental backup
https://docs.aws.amazon.com/ja_jp/fsx/latest/WindowsGuide/using-backups.html

With Amazon FSx, backups are file-system-consistent, highly durable, and incremental. To ensure file system consistency, Amazon FSx uses the Volume Shadow Copy Service (VSS) in Microsoft Windows. To ensure high durability, Amazon FSx stores backups in Amazon Simple Storage Service (Amazon S3). Amazon FSx backups are incremental, which means that only the changes after your most recent backup are saved. Thus, you can save on backup storage costs by not duplicating data. Using Amazon FSx, you can create a new file system from a backup, effectively restoring a point-in-time snapshot of the file system.

メンテナンス時の挙動は?

Patching occurs infrequently, typically once every several weeks. Patching should require only a fraction of your 30-minute maintenance window. During these few minutes of time, your file system is temporarily unavailable.
30分まるごと使うわけではなさそうですが、じゃあ何分なの?って不毛な議論をさけるために、30分まるごと使えないとみなしたほうがベター

DFSを使うには?

DFS-R(Multi-AZ)を使うには?

https://docs.aws.amazon.com/ja_jp/fsx/latest/WindowsGuide/multi-az-deployments.html
ただ個人的にはDFS-Rは積極的にはおすすめしないので、既存環境がDFS-Rを使っているなら使うことを検討してもいいかもねくらいでいいと思います

オンプレ(VPN経由/DirectConnect経由)で使える?

つかえないっぽいです。
https://docs.aws.amazon.com/ja_jp/fsx/latest/WindowsGuide/supported-fsx-clients.html

Supported Clients for Amazon FSx for Windows File Server
Amazon FSx supports connecting to your file system from a wide variety of compute instances and operating systems by supporting access via the SMB protocol (versions 2.0 through 3.1.1).
The following compute instances are supported for use with Amazon FSx.
Amazon Elastic Compute Cloud (Amazon EC2) instances
Amazon WorkSpaces instances
Amazon AppStream 2.0 instances
VMs running in VMware Cloud on AWS environments

The following operating systems are supported for use with Amazon FSx
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, and Windows Server 2016
Windows Vista, Windows 7, Windows 8, Windows 8.1, and Windows 10 (including the Windows 7 and Windows 10 desktop experiences of Amazon WorkSpaces)
Linux – using the cifs-utils tool

既存のファイルサーバからの移行方法は?

ここに詳しく書いてあります。
https://docs.aws.amazon.com/ja_jp/fsx/latest/WindowsGuide/migrate-to-fsx.html
FSxはMS ADしか使えないので、移行の場合はきっと、オンプレ or EC2のADがあるので、別ドメインでMS ADを作って、既存ADと信頼関係を結んで、ファイルサーバへのアクセス権限等を設定するっぽいです。
ファイルの移行は、robocopy使えって書いてありますね

ファイルシステムの変更方法は?

現時点では、セキュリティグループなどの変更可能な項目もGUIだと変更できないようです。CLIでやる必要があるとのこと。
https://docs.aws.amazon.com/ja_jp/fsx/latest/WindowsGuide/walkthrough03-update-file-system.html

ファイル単位でのバックアップが必要なら?

FSxにはファイル単位のバックアップ機能がないので、いま使っているサードパーティがあればそのまま引き続き使うという選択肢もありませ

ファイルへのアクセスログとれるの?

調査中
(FSx自体にはアクセスログの機能はないようです)

19
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
21