LoginSignup
3
7

More than 3 years have passed since last update.

AWSのファイルサーバを使ってみる(Amazon FSx)

Posted at

Amazon FSxとは

  • 「Amazon FSx for Windows File Server」と「Amazon FSx for Lustre」を提供。
    ※今回は「Amazon FSx for Windows File Server」について記載。
  • SMBプロトコルを利用したファイルストレージ。
  • ADと統合するため、ローカルもしくはAWS上にWindows Serverが必要。
  • ファイルの転送時と保存時に自動的に暗号化。

FSxの利用に必要な構成

  • VPC
  • VPC(DHCP オプションセットの編集)
  • VPC(DNS 解決の編集)
  • VPCセキュリティグループ
  • サブネット
  • AD Server(「AWS Directory Service」 or 「ローカルAD」)
    ※今回は「AWS Directory Service」を使用。
  • AD Serverと接続するためのWindowsマシン
    ※今回はEC2上に「Windows Server 2016」を構築。

FSxを利用するための準備

※VPC、VPCセキュリティグループ、サブネットは割愛

1. 「AWS Directory Service」でAD用のディレクトリを作成。
2. 「AWS FSx」でファイルシステムの作成。
3. Windows端末(Win 2016)からAD参加。
4. Windows端末(win 2016)から作成したファイルシステムをマウント。

Directory ServiceでAD用のディレクトリを作成

1. AWSのサービスから「Directory Service」を選択。
image.png

2. 「Active Directory」 - 「ディレクトリ」 - 「ディレクトリのセットアップ」を選択。
image.png

3. 「AWS Managed Microsoft AD」を選択。

※利用用途によって選択するディレクトリタイプは異なりますが、今回は「AWS Managed Microsoft AD」を利用します。
image.png

4. エディションに「Standard Edtion」、DNS名に適当なDNS名(今回は「sagaken.local」を使用)を入力。
image.png

5. 管理者ユーザ(admin)用のパスワードを入力。
image.png

6. VPCとサブネットを選択。
image.png

7. ディレクトリを作成。
image.png

8. ディレクトリが作成されていることを確認。
※作成に20分~30分程度掛かります。
image.png

Amazon FSxでファイルシステムを作成

1. サービスからfsxを選択。
image.png

2. 「Create file system」を選択。
image.png

3. 「Amazon FSx for Windows File Server」を選択。
image.png

4. 「File system details」で以下の通り入力/選択。
image.png

File system name - optional Deployment type Storage type Throughput capacity
FSx_TEST Single-AZ 2 SSD 32GiB Recommended throughput capacity(8MB/s)

5. 「Network & security」、「Windows authentication」で以下の通り入力/選択。

「Encryption/Maintenance preference/Tags」はデフォルト値を使用。
image.png
image.png

  • Network & security
Virtual Private Cloud (VPC) VPC Security Groups Subnet
VPCを選択 セキュリティグループを選択 サブネットを選択
  • Windows authentication
Choose an Active Directory to provide user authentication and access control for your file system                       Choose an AWS Managed Microsoft AD directory to use.
AWS Managed Microsoft Active Directory sagaken.local|d-92671f1a62(VPC名)
  • Encryption
    デフォルト

  • Maintenance preferences - optional
    デフォルト

  • Tags - optional
    デフォルト

6. 「Create file system」を選択。
image.png

7. ファイルシステムが作成されていることを確認。
※作成に20分~30分程度掛かります。
image.png

Windows端末(Win 2016)からAD参加

1. Windows端末にログインし、「Directory Service」で作成したAD(sagaken.local)に参加。
※ユーザは「admin」、パスワードは「Directory Service」で入力したパスワードを記載。
※ドメイン参加後に再起動が求められます。
image.png

Windows端末(win 2016)から作成したファイルシステムをマウント

1. Windows端末に「sagaken.local/admin」でログイン。

2. 作成したファイルシステムを選択し、「Network & security」の画面で「DNS name」の文字列をコピー。
※画面上部の「Attach」を押すと「Attach instruction」にnet useコマンドも見えるのでどちらでも問題ありません。
image.png
or
image.png

3. コピーした文字列に「\share」を加え、ネットワークドライブとして追加。
※ドライブパスは任意。
image.png
image.png

image.png

まとめ

FSxの使い方をざっくり纏めてみました。
接続出来ないという方は、AWSのユーザーガイドにトラブルシューティング方法が記載されているのでご確認下さい。
https://docs.aws.amazon.com/fsx/latest/WindowsGuide/troubleshooting.html

3
7
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
3
7