LoginSignup
0
0

More than 3 years have passed since last update.

Amazon FSx for Lustre 使ってみた part2

Last updated at Posted at 2021-02-25

プレロード

状態確認

S3にアップロードした後、ファイルストレージにロードされた状態だとexists archivedと表示される。

$ sudo lfs hsm_state /mnt/fsx/FSxLustre20210225T110202Z/test2.txt
/mnt/fsx/FSxLustre20210225T110202Z/test2.txt: (0x00000009) exists archived, archive_id:1

S3にアップロードした後、まだロードされていない状態だとreleased exists archivedと表示される。

$ sudo lfs hsm_state /mnt/fsx/FSxLustre20210225T110202Z/test3.txt
/mnt/fsx/FSxLustre20210225T110202Z/test3.txt: (0x0000000d) released exists archived, archive_id:1

この時間差は次節のプレロードによって解消されるらしい。

なお、フォルダの中身をまとめて確認できる。

$ sudo lfs hsm_state /mnt/fsx/FSxLustre20210225T110202Z/*
/mnt/fsx/FSxLustre20210225T110202Z/test2.txt: (0x00000009) exists archived, archive_id:1
/mnt/fsx/FSxLustre20210225T110202Z/test3.txt: (0x00000009) exists archived, archive_id:1
/mnt/fsx/FSxLustre20210225T110202Z/test4.txt: (0x00000009) exists archived, archive_id:1
/mnt/fsx/FSxLustre20210225T110202Z/test5.txt: (0x0000000d) released exists archived, archive_id:1

プレロード

Amazon FSx copies data from your Amazon S3 data repository when a file is first accessed. Because of this approach, the initial read or write to a file incurs a small amount of latency. If your application is sensitive to this latency, and you know which files or directories your application needs to access, you can optionally preload contents of individual files or directories.

日本語訳

Amazon FSxは、ファイルが最初にアクセスされたときにAmazon S3データリポジトリからデータをコピーする。このアプローチのため、ファイルへの最初の読み取りや書き込みには少量の遅延が発生します。アプリケーションがこの待ち時間に敏感で、アプリケーションがアクセスする必要のあるファイルやディレクトリがわかっている場合、オプションで個々のファイルやディレクトリのコンテンツをプリロードすることができます。

$ sudo lfs hsm_restore /mnt/fsx/FSxLustre20210225T110202Z/test2.txt

You can use the hsm_action command to verify that the file's contents have finished loading into the file system. A return value of NOOP indicates that the file has successfully been loaded. Run the following commands from a compute instance with the file system mounted.

日本語訳

hsm_actionコマンドを使用して、ファイルの内容がファイルシステムへのロードが終了したことを確認することができます。NOOPが返ってきた場合は、ファイルが正常にロードされたことを示します。

$ sudo lfs hsm_action /mnt/fsx/FSxLustre20210225T110202Z/test2.txt
/mnt/fsx/FSxLustre20210225T110202Z/test2.txt: NOOP

データリポジトリ

ディレクトリmydirをS3にアップロードする。ここでマウントポイントは/mnt/fsxである。

$ ls /mnt/fsx/mydir/
mytest1.txt  mytest2.txt

画像のようにマウントポイント配下のディレクトリを指定する。

image.png

  • ステータス

image.png

  • データリポジトリを使ったアップロード後のS3の状態

image.png

リリース

If you want to create storage space on your file system, you can release files from your file system. Releasing a file retains the file listing and metadata, but removes the local copy of that file's contents.

日本語訳

ファイルシステムにストレージスペースを作成したい場合は、ファイルシステムからファイルを解放することができます。ファイルをリリースすると、ファイルの一覧とメタデータは保持されますが、そのファイルのコンテンツのローカルコピーは削除されます。

$ sudo lfs hsm_release /mnt/fsx/test1.txt
$ sudo lfs hsm_state /mnt/fsx/test1.txt
/mnt/fsx/test1.txt: (0x0000000d) released exists archived, archive_id:1

リリースの後、プレロードによって再度ファイルシステムにロード可能である。

参考記事

Preloading files into your file system
https://docs.aws.amazon.com/fsx/latest/LustreGuide/preload-file-contents-hsm.html

Overview of data repositories
https://docs.aws.amazon.com/fsx/latest/LustreGuide/overview-data-repo.html

Releasing data from your file system
https://docs.aws.amazon.com/fsx/latest/LustreGuide/release-files.html

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