LoginSignup
12
5

More than 5 years have passed since last update.

改めてS3FSの細かいオプションとか挙動を検証してみた

Last updated at Posted at 2018-07-16

※2018/7/17時点で書きかけです。7/23頃には書き上げたい。
ひと段落。

とある事情で最新情報のキャッチアップと動作検証が必要になったので、改めて検証してみます。

[2019/2/4] いろんな人から指摘を受けたのでコメント追記

-o sigv2のオプションは 非推奨 です!
2019年6月末に廃止されるバージョンを指定してしまいます。
(このブログ執筆時、なぜwarningが発生してしまっていたかは不明。)

環境

項目 設定
OS CentOS (CentOS Linux release 7.5.1804 (Core))
インスタンスタイプ t2.micro
ボリュームタイプ gp2

前回同様、公式の手順に従ってインストールする。
https://github.com/s3fs-fuse/s3fs-fuse

インストール・セットアップ

パッケージのインストール


===============================================================================================================================================================================================================================================================================
 Package                                                                   Arch                                                      Version                                                                  Repository                                                  Size
===============================================================================================================================================================================================================================================================================
Installing:
 automake                                                                  noarch                                                    1.13.4-3.el7                                                             base                                                       679 k
 fuse                                                                      x86_64                                                    2.9.2-10.el7                                                             base                                                        86 k
 fuse-devel                                                                x86_64                                                    2.9.2-10.el7                                                             base                                                        37 k
 gcc-c++                                                                   x86_64                                                    4.8.5-28.el7_5.1                                                         updates                                                    7.2 M
 git                                                                       x86_64                                                    1.8.3.1-14.el7_5                                                         updates                                                    4.4 M
 libcurl-devel                                                             x86_64                                                    7.29.0-46.el7                                                            base                                                       300 k
 libxml2-devel                                                             x86_64                                                    2.9.1-6.el7_2.3                                                          base                                                       1.0 M
 openssl-devel                                                             x86_64                                                    1:1.0.2k-12.el7                                                          base                                                       1.5 M
Installing for dependencies:
 autoconf                                                                  noarch                                                    2.69-11.el7                                                              base                                                       701 k
 cpp                                                                       x86_64                                                    4.8.5-28.el7_5.1                                                         updates                                                    5.9 M
 fuse-libs                                                                 x86_64                                                    2.9.2-10.el7                                                             base                                                        93 k
 gcc                                                                       x86_64                                                    4.8.5-28.el7_5.1                                                         updates                                                     16 M
 glibc-devel                                                               x86_64                                                    2.17-222.el7                                                             base                                                       1.1 M
 glibc-headers                                                             x86_64                                                    2.17-222.el7                                                             base                                                       678 k
 kernel-headers                                                            x86_64                                                    3.10.0-862.6.3.el7                                                       updates                                                    7.1 M
 keyutils-libs-devel                                                       x86_64                                                    1.5.8-3.el7                                                              base                                                        37 k
 krb5-devel                                                                x86_64                                                    1.15.1-19.el7                                                            updates                                                    269 k
 libcom_err-devel                                                          x86_64                                                    1.42.9-12.el7_5                                                          updates                                                     31 k
 libgnome-keyring                                                          x86_64                                                    3.12.0-1.el7                                                             base                                                       109 k
 libkadm5                                                                  x86_64                                                    1.15.1-19.el7                                                            updates                                                    175 k
 libmpc                                                                    x86_64                                                    1.0.1-3.el7                                                              base                                                        51 k
 libselinux-devel                                                          x86_64                                                    2.5-12.el7                                                               base                                                       186 k
 libsepol-devel                                                            x86_64                                                    2.5-8.1.el7                                                              base                                                        77 k
 libstdc++-devel                                                           x86_64                                                    4.8.5-28.el7_5.1                                                         updates                                                    1.5 M
 libverto-devel                                                            x86_64                                                    0.2.5-4.el7                                                              base                                                        12 k
 m4                                                                        x86_64                                                    1.4.16-10.el7                                                            base                                                       256 k
 mpfr                                                                      x86_64                                                    3.1.1-4.el7                                                              base                                                       203 k
 pcre-devel                                                                x86_64                                                    8.32-17.el7                                                              base                                                       480 k
 perl                                                                      x86_64                                                    4:5.16.3-292.el7                                                         base                                                       8.0 M
 perl-Carp                                                                 noarch                                                    1.26-244.el7                                                             base                                                        19 k
 perl-Data-Dumper                                                          x86_64                                                    2.145-3.el7                                                              base                                                        47 k
 perl-Encode                                                               x86_64                                                    2.51-7.el7                                                               base                                                       1.5 M
 perl-Error                                                                noarch                                                    1:0.17020-2.el7                                                          base                                                        32 k
 perl-Exporter                                                             noarch                                                    5.68-3.el7                                                               base                                                        28 k
 perl-File-Path                                                            noarch                                                    2.09-2.el7                                                               base                                                        26 k
 perl-File-Temp                                                            noarch                                                    0.23.01-3.el7                                                            base                                                        56 k
 perl-Filter                                                               x86_64                                                    1.49-3.el7                                                               base                                                        76 k
 perl-Getopt-Long                                                          noarch                                                    2.40-3.el7                                                               base                                                        56 k
 perl-Git                                                                  noarch                                                    1.8.3.1-14.el7_5                                                         updates                                                     54 k
 perl-HTTP-Tiny                                                            noarch                                                    0.033-3.el7                                                              base                                                        38 k
 perl-PathTools                                                            x86_64                                                    3.40-5.el7                                                               base                                                        82 k
 perl-Pod-Escapes                                                          noarch                                                    1:1.04-292.el7                                                           base                                                        51 k
 perl-Pod-Perldoc                                                          noarch                                                    3.20-4.el7                                                               base                                                        87 k
 perl-Pod-Simple                                                           noarch                                                    1:3.28-4.el7                                                             base                                                       216 k
 perl-Pod-Usage                                                            noarch                                                    1.63-3.el7                                                               base                                                        27 k
 perl-Scalar-List-Utils                                                    x86_64                                                    1.27-248.el7                                                             base                                                        36 k
 perl-Socket                                                               x86_64                                                    2.010-4.el7                                                              base                                                        49 k
 perl-Storable                                                             x86_64                                                    2.45-3.el7                                                               base                                                        77 k
 perl-TermReadKey                                                          x86_64                                                    2.30-20.el7                                                              base                                                        31 k
 perl-Test-Harness                                                         noarch                                                    3.28-3.el7                                                               base                                                       302 k
 perl-Text-ParseWords                                                      noarch                                                    3.29-4.el7                                                               base                                                        14 k
 perl-Thread-Queue                                                         noarch                                                    3.02-2.el7                                                               base                                                        17 k
 perl-Time-HiRes                                                           x86_64                                                    4:1.9725-3.el7                                                           base                                                        45 k
 perl-Time-Local                                                           noarch                                                    1.2300-2.el7                                                             base                                                        24 k
 perl-constant                                                             noarch                                                    1.27-2.el7                                                               base                                                        19 k
 perl-libs                                                                 x86_64                                                    4:5.16.3-292.el7                                                         base                                                       688 k
 perl-macros                                                               x86_64                                                    4:5.16.3-292.el7                                                         base                                                        43 k
 perl-parent                                                               noarch                                                    1:0.225-244.el7                                                          base                                                        12 k
 perl-podlators                                                            noarch                                                    2.5.1-3.el7                                                              base                                                       112 k
 perl-threads                                                              x86_64                                                    1.87-4.el7                                                               base                                                        49 k
 perl-threads-shared                                                       x86_64                                                    1.43-6.el7                                                               base                                                        39 k
 xz-devel                                                                  x86_64                                                    5.2.2-1.el7                                                              base                                                        46 k
 zlib-devel                                                                x86_64                                                    1.2.7-17.el7                                                             base                                                        50 k

Transaction Summary
===============================================================================================================================================================================================================================================================================
Install  8 Packages (+55 Dependent packages)

gitからcloneする

[root@ip-172-30-0-180 ~]# git clone https://github.com/s3fs-fuse/s3fs-fuse.git
Cloning into 's3fs-fuse'...
remote: Counting objects: 4122, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 4122 (delta 18), reused 24 (delta 13), pack-reused 4085
Receiving objects: 100% (4122/4122), 2.25 MiB | 1.53 MiB/s, done.
Resolving deltas: 100% (2824/2824), done.

ビルドする

[root@ip-172-30-0-180 s3fs-fuse]# ./autogen.sh
--- Make commit hash file -------
--- Finished commit hash file ---
--- Start autotools -------------
configure.ac:26: installing './config.guess'
configure.ac:26: installing './config.sub'
configure.ac:27: installing './install-sh'
configure.ac:27: installing './missing'
src/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
--- Finished autotools ----------
[root@ip-172-30-0-180 s3fs-fuse]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/xattr.h usability... yes
checking sys/xattr.h presence... yes
checking for sys/xattr.h... yes
checking attr/xattr.h usability... no
checking attr/xattr.h presence... no
checking for attr/xattr.h... no
checking sys/extattr.h usability... no
checking sys/extattr.h presence... no
checking for sys/extattr.h... no
checking s3fs build with nettle(GnuTLS)... no
checking s3fs build with OpenSSL... no
checking s3fs build with GnuTLS... no
checking s3fs build with NSS... no
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for common_lib_checking... yes
checking compile s3fs with... OpenSSL
checking for DEPS... yes
checking for malloc_trim... yes
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking pthread mutex recursive... PTHREAD_MUTEX_RECURSIVE
checking for git... yes
checking for .git... yes
checking github short commit hash... 06032aa
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
[root@ip-172-30-0-180 s3fs-fuse]# make
make  all-recursive
make[1]: Entering directory `/root/s3fs-fuse'
Making all in src
make[2]: Entering directory `/root/s3fs-fuse/src'
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
mv -f .deps/s3fs.Tpo .deps/s3fs.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT curl.o -MD -MP -MF .deps/curl.Tpo -c -o curl.o curl.cpp
mv -f .deps/curl.Tpo .deps/curl.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT cache.o -MD -MP -MF .deps/cache.Tpo -c -o cache.o cache.cpp
mv -f .deps/cache.Tpo .deps/cache.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT string_util.o -MD -MP -MF .deps/string_util.Tpo -c -o string_util.o string_util.cpp
mv -f .deps/string_util.Tpo .deps/string_util.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs_util.o -MD -MP -MF .deps/s3fs_util.Tpo -c -o s3fs_util.o s3fs_util.cpp
mv -f .deps/s3fs_util.Tpo .deps/s3fs_util.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT fdcache.o -MD -MP -MF .deps/fdcache.Tpo -c -o fdcache.o fdcache.cpp
mv -f .deps/fdcache.Tpo .deps/fdcache.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT common_auth.o -MD -MP -MF .deps/common_auth.Tpo -c -o common_auth.o common_auth.cpp
mv -f .deps/common_auth.Tpo .deps/common_auth.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT addhead.o -MD -MP -MF .deps/addhead.Tpo -c -o addhead.o addhead.cpp
mv -f .deps/addhead.Tpo .deps/addhead.Po
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT openssl_auth.o -MD -MP -MF .deps/openssl_auth.Tpo -c -o openssl_auth.o openssl_auth.cpp
mv -f .deps/openssl_auth.Tpo .deps/openssl_auth.Po
g++  -g -O2 -Wall -D_FILE_OFFSET_BITS=64   -o s3fs s3fs.o curl.o cache.o string_util.o s3fs_util.o fdcache.o common_auth.o addhead.o openssl_auth.o   -pthread -lfuse -lcurl -lxml2 -lcrypto
g++ -DHAVE_CONFIG_H -I. -I..  -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2      -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT test_string_util.o -MD -MP -MF .deps/test_string_util.Tpo -c -o test_string_util.o test_string_util.cpp
mv -f .deps/test_string_util.Tpo .deps/test_string_util.Po
g++  -g -O2 -Wall -D_FILE_OFFSET_BITS=64   -o test_string_util string_util.o test_string_util.o
make[2]: Leaving directory `/root/s3fs-fuse/src'
Making all in test
make[2]: Entering directory `/root/s3fs-fuse/test'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/s3fs-fuse/test'
Making all in doc
make[2]: Entering directory `/root/s3fs-fuse/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/s3fs-fuse/doc'
make[2]: Entering directory `/root/s3fs-fuse'
make[2]: Leaving directory `/root/s3fs-fuse'
make[1]: Leaving directory `/root/s3fs-fuse'
[root@ip-172-30-0-180 s3fs-fuse]# make install
Making install in src
make[1]: Entering directory `/root/s3fs-fuse/src'
make[2]: Entering directory `/root/s3fs-fuse/src'
 /bin/mkdir -p '/usr/local/bin'
  /bin/install -c s3fs '/usr/local/bin'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/s3fs-fuse/src'
make[1]: Leaving directory `/root/s3fs-fuse/src'
Making install in test
make[1]: Entering directory `/root/s3fs-fuse/test'
make[2]: Entering directory `/root/s3fs-fuse/test'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/s3fs-fuse/test'
make[1]: Leaving directory `/root/s3fs-fuse/test'
Making install in doc
make[1]: Entering directory `/root/s3fs-fuse/doc'
make[2]: Entering directory `/root/s3fs-fuse/doc'
make[2]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/usr/local/share/man/man1'
 /bin/install -c -m 644 man/s3fs.1 '/usr/local/share/man/man1'
make[2]: Leaving directory `/root/s3fs-fuse/doc'
make[1]: Leaving directory `/root/s3fs-fuse/doc'
make[1]: Entering directory `/root/s3fs-fuse'
make[2]: Entering directory `/root/s3fs-fuse'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/s3fs-fuse'
make[1]: Leaving directory `/root/s3fs-fuse'

大して時間はかからないが、バージョンを固定するためにはgitでcloneしたファイルを管理する必要あり。

インストール結果の確認

[root@ip-172-30-0-180 ~]# s3fs --version
Amazon Simple Storage Service File System V1.84(commit:06032aa) with OpenSSL
Copyright (C) 2010 Randy Rizun <rrizun@gmail.com>
License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

コマンドの調査

オプションが多い…。

オプション 説明 デフォルト値 メモ
bucket バケット名。prefixも指定できるっぽい。 無し
default_acl 長かったので割愛…。 private デフォ値で使う。
retries S3へのトランザクションに失敗した際のリトライ回数。 5 デフォ値で使う。
use_cache ローカルファイルキャッシュの使用有無。 disable マウントしたディレクトリの用途によっては有効化したほうが良い。
check_cache_dir_exist キャッシュディレクトリがあるかどうかチェックする。チェックしていなくてもなければ作る。 disable デフォ値で使う。
del_cache S3FS起動時と停止時にキャッシュの削除を行う。 不明 指定しておいて損は無い。
storage_class ストアするデータのストレージクラス。許容値:standard, standard_ia, and reduced_redundancy standard デフォ値で使う。
use_sse SSE-S3, SSE-C, SSE-KMSが選択できる。長かったので割愛。 disable S3側でSSE有効化すればいいので、デフォ値のまま。
load_sse_c SSE-Cを使ったときに鍵のパスを指定する。 不明 使わない。
passwd_file AWSのcredentialファイルがあるパスを指定する。s3fs独自フォーマット。 $HOME/.passwd-s3fs and /etc/passwd-s3fs IAM Roleを使うので、指定しない。
ahbe_conf HTTPヘッダを追加する場合、そのコンフィグのパス disable 使わないので、デフォ値のまま。
public_bucket Publicバケットをマウントする。そういうのがあるのか。 disable 使わない。
connect_timeout コネクションタイムアウト。どこの、という具体的な説明は無し。 300 デフォ値を使う。
readwrite_timeout Read/Write処理のタイムアウト。こちらも説明は無し。 60 デフォ値を使う。
list_object_max_keys S3リストAPIで取得するキーの最大値。 1,000 大量ファイルは持たない場合は、気にしなくてよい?
max_stat_cache_size statのキャッシュ数。詳しく書いてなかったので、よくわからない。 100,000 デフォ値のまま。
stat_cache_expire statのキャッシュの有効期間。期間の指定はキャッシュが作成されてから。 期限無し デフォ値のまま。
stat_cache_interval_expire statのキャッシュの有効期間。期間の指定はキャッシュが最後にアクセスされてから。 期限無し デフォ値のまま。
enable_noobj_cache 存在しないオブジェクトのキャッシュを有効化する。S3FSはあるディレクトリが配下にファイルまたはサブディレクトリを持っていないか認識するため、S3FSのコマンドが実行されるたびに常に確認をしている。これはListBucketの発行数が多くなり、パフォーマンスに影響する。このオプションを有効化すると、存在しないオブジェクトをキャッシュに記憶する。 disable 重要そうなのでちゃんと読んだけど、デフォ値で良さそう。
no_check_certificate SSL証明書をチェックしない。 disable デフォ値を使う。
nodnscache s3fsは常にDNSキャッシュを使う。有効化するとDNSキャッシュを無効化する。 enable VPC EndpointのIPが変わらないことを想定して、デフォ値を使う。要問い合わせ?
nosscache s3fsは常にSSLセッションキャッシュを使う。有効化するとキャッシュを無効化する。 enable デフォ値を使う。
multireq_max オブジェクトをリストする処理の最大同時並行数。 20 チューニングポイントっぽいけど、デフォ値で。
parallel_count 容量の大きいオブジェクトをアップロードするときの同時並行数。s3fsは20MB(デフォ)以上のファイルをアップロードするとき、パラレルでリクエストを発行する。 5 デフォ値で使う。
multipart_size マルチパートアップロードでアップロードするときのサイズ。指定する際はMB単位で、最小5から。 10 デフォ値で使う。
ensure_diskfree 保護したい空き容量をMB単位で指定する。s3fsはダウンロードやアップロードでキャッシュ的にディスクを使うことがある。しかし、空き容量が指定された値よりも小さくなった場合は、パフォーマンスと引き換えにそれ以上利用しないようにする。 0 デフォ値で使う。が、そもそもこれってどの領域を使う?rootデバイスだと困る。
url S3のURLを指定する。httpを使いたかったら、指定する。 https://s3.amazonaws.com デフォ値で使う。
endpoint リージョン指定。指定しなかったら、エラーレスポンスを見ながら見つかるまでリトライする。 us-east-1 指定したほうが無難そうなので、ap-northeast-1
sigv2 sing Signature Version 2をセットする。 signature version 4 (分からないので)デフォ値で使う。
mp_umask マウントポイントのumaskを指定する。allow_otherオプションを指定しないと、s3fsはオーナにかアクセスできない。逆に指定すれば全ユーザがアクセス可能になってしまう。このオプションを併用すれば、アクセスコントロールが可能。 0000 困らないので、デフォ値で使う。
nomultipart マルチパートアップロードを無効化する。 不明 たぶんdisableなので、そのまま。
enable_content_md5 マルチパートアップロードしないファイルもmd5をチェックする。小さいファイル(自分で追記:multipart_sizeで指定したサイズ)のアップロードが多いとパフォーマンスに影響あり。 disable 更新処理をする場合は、有効化を検討したほうが良い。
ecs インスタンスメタデータの代わりにECSのコンテナクレデンシャルメタデータを使わせる。 disable デフォ値で使う。
iam_role ロール名か"auto"を指定する。autoを指定すれば自動的に判定する。もし、引数を与えなければ、それはautoを指定した時と同じ挙動になる。 disable autoを指定する。
ibm_iam_auth IBM IAM認証を有効化する。 IBM IAM認証を利用しない なんじゃこれ?
ibm_iam_endpoint IBM IAM認証のエンドポイントの指定。 https://iam.bluemix.net これbluemixと連携できるのか。
use_xattr 拡張された属性を有効化する。例えばencfsやecryptfsを使うために必要。 拡張属性をハンドルしない デフォ値で使う。
noxmlns ListBucketResultやListVersionResultのレスポンスのXML名前空間の登録を無効化する。 たぶん無効化しない よくわからなかった…。
nocopyapi このオプションを有効化するとs3fsはCopyAPIを使わない。非推奨。 有効化しない デフォ値で使う。
norenameapi 上と同じような話。 有効化しない デフォ値で使う。(疲れてきた。)
use_path_request_style S3互換のAPIを使う際、古い形式のパス指定を許容する。 不明 デフォ値で使う。
noua User-Agentの表示をなくす。 たぶんそのまま デフォ値で使う。
cipher_suites 利用するTLSのCipherSuitesを指定する。コロンで区切ってリスト指定可能。 不明 デフォ値で使う。
instance_name S3FSをマウントしているインスタンスの名前?。これはログメッセージとS3に送るUser-Agentヘッダに記載される。 不明 指定してもいいかも。
complement_stat s3fsはx-amz-meta-mode headerを持たないファイルのファイル・ディレクトリモードの補完を行う。デフォルトでは補完を行わず、その時ファイルのmodifyやlistはできない。 補完をしない 指定が必要?要検証。
notsup_compat_dir …。 - 長かったので…。
dbglevel debugメッセージのレベル。crit, err, warn, infoが指定可能。 crit(critical) infoに指定してみる。
curldbg libcurlからdebugメッセージをPUTする。 不明 よくわからない。

マウントする

コマンド調査疲れた…やっとマウントする。

[root@ip-172-30-0-180 ~]# s3fs jucco-s3-test /s3fs -o del_cache -o endpoint=ap-northeast-1 -o iam_role=auto -o instance_name=hoge01 -o dbglevel=info
[root@ip-172-30-0-180 ~]# echo $?
0
[root@ip-172-30-0-180 ~]# df -h /s3fs
Filesystem      Size  Used Avail Use% Mounted on
s3fs            256T     0  256T   0% /s3fs
[root@ip-172-30-0-180 ~]# ls -ld /s3fs
drwx------. 1 root root 0 Jan  1  1970 /s3fs

/var/log/messagesに以下のようなログが出ていることが確認できた。keyとかtokenがログに出てしまうので注意。
(消せないかなあ…IAMロールの一時的な情報だからOK?)

Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]init v1.84(commit:06032aa) with OpenSSL
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      Get IAM Role name
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      HTTP response code 200
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      IAM role name response = "administrator"
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]loaded IAM role name = administrator
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]check services.
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      [IAM role=administrator]
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      HTTP response code 200
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      IAM credential response = "{#012  "Code" : "Success",#012  "LastUpdated" : "2018-07-16T05:21:40Z",#012  "Type" : "AWS-HMAC",#012  "AccessKeyId" : "xxx",#012  "SecretAccessKey" : "xxx",#012  "Token" : "xxx",#012  "Expiration" : "2018-07-16T11:38:59Z"#012}"
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      check a bucket.
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      URL is https://s3.amazonaws.com/jucco-s3-test/
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      URL changed is https://jucco-s3-test.s3.amazonaws.com/
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      computing signature [GET] [/] [] []
Jul 16 05:37:32 ip-172-30-0-180 s3fs[15838]: [hoge01]      url is https://s3.amazonaws.com
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]curl.cpp:RequestPerform(2078): HTTP response code 403, returning EPERM. Body Text:xxx
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]curl.cpp:CheckBucket(3104): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?>#012<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>xxx
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]s3fs.cpp:s3fs_check_service(3762): Could not connect, so retry to connect by signature version 2.
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]      check a bucket.
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]      URL is https://s3.amazonaws.com/jucco-s3-test/
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]      URL changed is https://jucco-s3-test.s3.amazonaws.com/
Jul 16 05:37:33 ip-172-30-0-180 s3fs[15838]: [hoge01]      HTTP response code 200
Jul 16 05:37:53 ip-172-30-0-180 s3fs[15838]: [hoge01][path=/]
Jul 16 05:37:59 ip-172-30-0-180 s3fs[15838]: [hoge01][path=/][flags=32768]
Jul 16 05:37:59 ip-172-30-0-180 s3fs[15838]: [hoge01][path=/]
Jul 16 05:38:12 ip-172-30-0-180 s3fs[15838]: [hoge01][path=/]

途中でエラーが出ているのは、sigv2を指定すればでなくなりそうな気がする。

[root@ip-172-30-0-180 ~]# s3fs jucco-s3-test /s3fs -o del_cache -o endpoint=ap-northeast-1 -o iam_role=auto -o instance_name=hoge01 -o dbglevel=info -o sigv2
[root@ip-172-30-0-180 ~]# less /var/log/messages
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15870]: [hoge01]s3fs.cpp:set_s3fs_log_level(273): change debug level from [CRT] to [INF]
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15870]: [hoge01]    PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40755)
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]init v1.84(commit:06032aa) with OpenSSL
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      Get IAM Role name
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      HTTP response code 200
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      IAM role name response = "administrator"
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]loaded IAM role name = administrator
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]check services.
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      [IAM role=administrator]
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      HTTP response code 200
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      IAM credential response = "{#012  "Code" : "Success",#012  "LastUpdated" : "2018-07-16T05:21:40Z",#012  "Type" : "AWS-HMAC",#012  "AccessKeyId" : "xxx",#012  "SecretAccessKey" : "xxx",#012  "Token" : "xxx",#012  "Expiration" : "2018-07-16T11:38:59Z"#012}"
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      check a bucket.
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL is https://s3.amazonaws.com/jucco-s3-test/
Jul 16 05:44:24 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL changed is https://jucco-s3-test.s3.amazonaws.com/
Jul 16 05:44:25 ip-172-30-0-180 s3fs[15871]: [hoge01]      HTTP response code 200

期待通り消えた。

マウントコマンドに環境差分情報が含まれそうなので、shellなどでラッピングしたほうが使いやすいかも。

いろいろ操作してみる

ファイルをアップロードする

[root@ip-172-30-0-180 ~]# time date > /s3fs/date1.txt

real    0m3.202s
user    0m0.001s
sys     0m0.000s

結構かかる。ログを見てみる。

Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01][path=/date.txt][mode=100644][flags=33345]
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      [tpath=/date.txt]
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      [tpath=/date.txt][bpath=][save=][sseckeypos=-1]
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL is https://s3.amazonaws.com/jucco-s3-test/date.txt
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL changed is https://jucco-s3-test.s3.amazonaws.com/date.txt
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      HTTP response code 404 was returned, returning ENOENT
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      [tpath=/date.txt/]
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      [tpath=/date.txt/][bpath=][save=][sseckeypos=-1]
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL is https://s3.amazonaws.com/jucco-s3-test/date.txt/
Jul 16 05:47:05 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL changed is https://jucco-s3-test.s3.amazonaws.com/date.txt/
Jul 16 05:47:06 ip-172-30-0-180 s3fs[15871]: [hoge01]      HTTP response code 404 was returned, returning ENOENT
Jul 16 05:47:06 ip-172-30-0-180 s3fs[15871]: [hoge01]      [tpath=/date.txt_$folder$]
Jul 16 05:47:06 ip-172-30-0-180 s3fs[15871]: [hoge01]      [tpath=/date.txt_$folder$][bpath=][save=][sseckeypos=-1]
Jul 16 05:47:06 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL is https://s3.amazonaws.com/jucco-s3-test/date.txt_%24folder%24
Jul 16 05:47:06 ip-172-30-0-180 s3fs[15871]: [hoge01]      URL changed is https://jucco-s3-test.s3.amazonaws.com/date.txt_%24folder%24
Jul 16 05:47:06 ip-172-30-0-180 s3fs[15871]: [hoge01]      HTTP response code 404 was returned, returning ENOENT

NotFoundしているけど…一体何をしているんだろう。URLを探っている…?
URLオプションを明示的に指定すると変わるかと思ったが、特に変わりはなかった。

アップロードしたファイルを見てみる

[root@ip-172-30-0-180 ~]# ls -l /s3fs/date1.txt
-rw-r--r--. 1 root root 29 Jul 16 05:48 /s3fs/date1.txt
get-object-acl
{
    "Owner": {
        "DisplayName": "ppprotected.void.jucco",
        "ID": "6c50f2303cc4b69cf5f514cb384de32dc566a972ed7d9fcba3ac588e75ea7d77"
    },
    "Grants": [
        {
            "Grantee": {
                "Type": "CanonicalUser",
                "DisplayName": "ppprotected.void.jucco",
                "ID": "6c50f2303cc4b69cf5f514cb384de32dc566a972ed7d9fcba3ac588e75ea7d77"
            },
            "Permission": "FULL_CONTROL"
        }
    ]
}
get-object-tagging
{
    "TagSet": []
}
head-object
{
    "AcceptRanges": "bytes",
    "ContentType": "application/octet-stream",
    "LastModified": "Mon, 16 Jul 2018 05:48:45 GMT",
    "ContentLength": 29,
    "ETag": "\"d8e8dd92cc5d7549875e61983304ac86\"",
    "Metadata": {
        "gid": "0",
        "mtime": "1531720124",
        "uid": "0",
        "mode": "33188"
    }
}

S3上には問題なくファイルがアップロードできていることが確認できた。
User-AgentのヘッダはS3のアクセスログに出てた。

6c50f2303cc4b69cf5f514cb384de32dc566a972ed7d9fcba3ac588e75ea7d77 jucco-s3-test [22/Jul/2018:13:19:45 +0000] 172.30.0.180 arn:aws:sts::896403600077:assumed-role/administrator/i-020fc2d4fb2939b5f B48DD09F3A996AF1 REST.PUT.OBJECT data_centos.txt "PUT /data_centos.txt HTTP/1.1" 200 - - 29 17 8 "-" "s3fs/1.84 (commit hash 06032aa; OpenSSL)[hoge01]" -

root以外のユーザで使ってみる

[root@ip-172-30-0-180 ~]# s3fs jucco-s3-test /s3fs -o del_cache -o endpoint=ap-northeast-1 -o iam_role=auto -o instance_name=hoge01 -o dbglevel=info -o sigv2 -o mp_umask=0777
[root@ip-172-30-0-180 ~]# ls -ld /s3fs
drwx------. 1 root root 0 Jan  1  1970 /s3fs
[root@ip-172-30-0-180 ~]# exit
[centos@ip-172-30-0-180 ~]$ ls -l /s3fs/date1.txt
ls: cannot access /s3fs/date1.txt: Permission denied

mp_umaskを指定しても、root以外のユーザには読み取り権限がなかった。
fstabで指定可能なallow_other相当のオプションがs3fsコマンドには無かったが、
manの末尾にFUSEのオプションも指定できるか見てね、いっぱいあるよ、とのこと。

[root@ip-172-30-0-180 ~]# s3fs jucco-s3-test /s3fs -o del_cache -o endpoint=ap-northeast-1 -o iam_role=auto -o instance_name=hoge01 -o dbglevel=info -o sigv2 -o mp_umask=0777 -o allow_other
[root@ip-172-30-0-180 ~]# ls -ld /s3fs
d---------. 1 root root 0 Jan  1  1970 /s3fs

ダメじゃん…。うーん。

途中だけど諸事情でいったん公開。また来週末かなあ。

[2018/07/22 追記]

パーミッションを設定してみる

前回までで、マウントできてもrootユーザじゃないと触れない状態でした。
今日中にはこれを解消したい。

[root@ip-172-30-0-180 ~]# s3fs jucco-s3-test /s3fs -o del_cache -o endpoint=ap-northeast-1 -o iam_role=auto -o instance_name=hoge01 -o dbglevel=info -o sigv2 -o mp_umask=0000 -o allow_other
[root@ip-172-30-0-180 ~]# ls -ld /s3fs
drwxrwxrwx. 1 root root 0 Jan  1  1970 /s3fs
[centos@ip-172-30-0-180 s3fs]$ date > data_centos.txt
[centos@ip-172-30-0-180 s3fs]$ ls -l data_centos.txt
-rw-rw-r--. 1 centos centos 29 Jul 22 13:19 data_centos.txt
[centos@ip-172-30-0-180 s3fs]$

解決した…恥ずかしい、umaskは引き算でしたね…。

その他気づいたこといろいろ

instance_nameをmetadataから取得する

[root@ip-172-30-0-180 ~]# s3fs jucco-s3-test /s3fs -o del_cache -o endpoint=ap-northeast-1 -o iam_role=auto -o instance_name=$(curl http://169.254.169.254/latest/meta-data/instance-id/) -o dbglevel=info -o sigv2 -o mp_umask=0000 -o allow_other
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    19  100    19    0     0  18572      0 --:--:-- --:--:-- --:--:-- 19000
[root@ip-172-30-0-180 ~]#

こんな感じになる。

Jul 22 13:27:34 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]      HTTP response code 200

ログ監視を考えてみる

今はログレベルをinfoでマウントしているが、例えば存在しないファイルにアクセスしようとするとどうなるのか。

[root@ip-172-30-0-180 ~]# ls -l /s3fs/hoge.txt
ls: cannot access /s3fs/hoge.txt: No such file or directory

ログの抜粋はこちら。

Jul 22 13:29:10 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]      URL is https://s3.amazonaws.com/jucco-s3-test?delimiter=/&max-keys=2&prefix=hoge.txt/
Jul 22 13:29:10 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]      URL changed is https://jucco-s3-test.s3.amazonaws.com?delimiter=/&max-keys=2&prefix=hoge.txt/
Jul 22 13:29:10 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]      HTTP response code 200

ファイル自体は存在しないが、S3のAPIについては成功しているため、ERRORではないという扱いになる模様。
では、例えばS3のアクセス権限をはがすとどうなるのか。

S3へのアクションを全て拒否する
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Deny",
            "Action": "s3:*",
            "Resource": "*"
        }
    ]
}

以下のようにエラーが出力されていることが確認できた。

Jul 22 13:34:03 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]curl.cpp:RequestPerform(2078): HTTP response code 403, returning EPERM. Body Text: <?xml version="1.0" encoding="UTF-8"?>#012<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>9C03FF82E5FDD2C5</RequestId><HostId>Vw2YhI6qwJV4YNYdLHR4VR4NKgYmrNpYEMjjt7K5495xWgpOklv5dlqfwBFNW0hkB8coX+4iclM=</HostId></Error>
Jul 22 13:34:03 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]s3fs.cpp:list_bucket(2513): ListBucketRequest returns with error.
Jul 22 13:34:03 ip-172-30-0-180 s3fs[2012]: [i-020fc2d4fb2939b5f]s3fs.cpp:directory_empty(1115): list_bucket returns error.

しかし、このエラー文字列の中にログレベルを示す文字列は無さそう。([ERROR]みたいな。)
適当にgrepしたらこんな感じで、やはり無いと考えたほうが良さそう。

./addhead.cpp:      S3FS_PRN_ERR("file format error: %s key(suffix) is no HTTP header value.", key.c_str());
./addhead.cpp:        S3FS_PRN_ERR("file format error: %s key(suffix) does not have key string.", key.c_str());
./addhead.cpp:        S3FS_PRN_ERR("failed to compile regex from %s key by %s.", key.c_str(), errbuf);
./common.h:#define S3FS_PRN_ERR(fmt, ...)    S3FS_LOW_LOGPRN(S3FS_LOG_ERR,  fmt, ##__VA_ARGS__, "")
./curl.cpp:    S3FS_PRN_ERR("Parameter is wrong.");
./curl.cpp:    S3FS_PRN_ERR("Could not make tmpfile.");
./curl.cpp:    S3FS_PRN_ERR("Failed to write tmpfile.");
./curl.cpp:    S3FS_PRN_ERR("Failed to make MD5.");
./curl.cpp:    S3FS_PRN_ERR("Failed to make MD5.");
./curl.cpp:    S3FS_PRN_ERR("Init curl handlers lock failed");
./curl.cpp:      S3FS_PRN_ERR("Init curl handlers pool failed");
./curl.cpp:    S3FS_PRN_ERR("Destroy curl handlers lock failed");
./curl.cpp:    S3FS_PRN_ERR("init_curl_global_all returns error.");
./curl.cpp:    S3FS_PRN_ERR("curl_share_init failed");
./curl.cpp:    S3FS_PRN_ERR("curl_share_setopt(LOCKFUNC) returns %d(%s)", nSHCode, curl_share_strerror(nSHCode));
./curl.cpp:    S3FS_PRN_ERR("curl_share_setopt(UNLOCKFUNC) returns %d(%s)", nSHCode, curl_share_strerror(nSHCode));
./curl.cpp:      S3FS_PRN_ERR("curl_share_setopt(DNS) returns %d(%s)", nSHCode, curl_share_strerror(nSHCode));
./curl.cpp:      S3FS_PRN_ERR("curl_share_setopt(SSL SESSION) returns %d(%s)", nSHCode, curl_share_strerror(nSHCode));
./curl.cpp:    S3FS_PRN_ERR("curl_share_setopt(USERDATA) returns %d(%s)", nSHCode, curl_share_strerror(nSHCode));
./curl.cpp:      S3FS_PRN_ERR("timeout now: %jd, curl_times[curl]: %jd, readwrite_timeout: %jd",
./curl.cpp:        S3FS_PRN_ERR("%s: file specified by CURL_CA_BUNDLE environment variable is not readable", program_name.c_str());
./curl.cpp:          S3FS_PRN_ERR("%s: /.../ca-bundle.crt is not readable", program_name.c_str());
./curl.cpp:      S3FS_PRN_ERR("read file error(%d).", errno);
./curl.cpp:      S3FS_PRN_ERR("write file error(%d).", errno);
./curl.cpp:    S3FS_PRN_ERR("Failed to convert base64 from SSE-C key %s", onekey.c_str());
./curl.cpp:    S3FS_PRN_ERR("Could not make MD5 from SSE-C keys(%s).", onekey.c_str());
./curl.cpp:    S3FS_PRN_ERR("SSE-C keys filepath is empty.");
./curl.cpp:    S3FS_PRN_ERR("could not open use_sse keys file(%s).", filepath);
./curl.cpp:    S3FS_PRN_ERR("use_sse keys file %s should be 0600 permissions.", filepath);
./curl.cpp:    S3FS_PRN_ERR("Could not open SSE-C keys file(%s).", filepath);
./curl.cpp:    S3FS_PRN_ERR("There is no SSE Key in file(%s).", filepath);
./curl.cpp:    S3FS_PRN_ERR("SSE-KMS kms id is empty.");
./curl.cpp:      S3FS_PRN_ERR("sse type is SSE-C, but there is no custom key.");
./curl.cpp:      S3FS_PRN_ERR("sse type is SSE-KMS, but there is no specified kms id.");
./curl.cpp:      S3FS_PRN_ERR("sse type is SSE-KMS, but signature type is not v4. SSE-KMS require signature v4.");
./curl.cpp:    S3FS_PRN_ERR("sse type is unknown(%d).", S3fsCurl::ssetype);
./curl.cpp:    S3FS_PRN_ERR("There is no SSE Key in environment(AWSSSECKEYS=%s).", envkeys);
./curl.cpp:    S3FS_PRN_ERR("Over retry count(%d) limit(%s:%d).", s3fscurl->retry_count, s3fscurl->path.c_str(), part_num);
./curl.cpp:    S3FS_PRN_ERR("Could not duplicate curl object(%s:%d).", s3fscurl->path.c_str(), part_num);
./curl.cpp:    S3FS_PRN_ERR("Could not duplicate file descriptor(errno=%d)", errno);
./curl.cpp:    S3FS_PRN_ERR("Invalid file descriptor(errno=%d)", errno);
./curl.cpp:        S3FS_PRN_ERR("failed uploading part setup(%d)", result);
./curl.cpp:        S3FS_PRN_ERR("Could not make curl object into multi curl(%s).", tpath);
./curl.cpp:      S3FS_PRN_ERR("error occurred in multi request(errno=%d).", result);
./curl.cpp:    S3FS_PRN_ERR("Over retry count(%d) limit(%s).", s3fscurl->retry_count, s3fscurl->path.c_str());
./curl.cpp:    S3FS_PRN_ERR("failed downloading part setup(%d)", result);
./curl.cpp:        S3FS_PRN_ERR("failed downloading part setup(%d)", result);
./curl.cpp:        S3FS_PRN_ERR("Could not make curl object into multi curl(%s).", tpath);
./curl.cpp:      S3FS_PRN_ERR("error occurred in multi request(errno=%d).", result);
./curl.cpp:      S3FS_PRN_ERR("could not destroy handle.");
./curl.cpp:    S3FS_PRN_ERR("Failed to create handle.");
./curl.cpp:      S3FS_PRN_ERR("request type is unknown(%d)", type);
./curl.cpp:          S3FS_PRN_ERR("curl_easy_getinfo failed while trying to retrieve HTTP response code");
./curl.cpp:          S3FS_PRN_ERR("HTTP response code = %ld Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
./curl.cpp:            S3FS_PRN_ERR("HTTP response code %ld, returning EIO. Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
./curl.cpp:            S3FS_PRN_ERR("HTTP response code %ld, returning EPERM. Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
./curl.cpp:            S3FS_PRN_ERR("HTTP response code %ld, returning EIO. Body Text: %s", LastResponseCode, (bodydata ? bodydata->str() : ""));
./curl.cpp:        S3FS_PRN_ERR("### CURLE_WRITE_ERROR");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_OPERATION_TIMEDOUT");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_COULDNT_RESOLVE_HOST");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_COULDNT_CONNECT");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_GOT_NOTHING");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_ABORTED_BY_CALLBACK");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_PARTIAL_FILE");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_SEND_ERROR");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_RECV_ERROR");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_SSL_CONNECT_ERROR");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_SSL_CACERT");
./curl.cpp:            S3FS_PRN_ERR("could not get CURL_CA_BUNDLE.");
./curl.cpp:        S3FS_PRN_ERR("curlCode: %d  msg: %s", curlCode, curl_easy_strerror(curlCode));
./curl.cpp:        S3FS_PRN_ERR("### CURLE_PEER_FAILED_VERIFICATION");
./curl.cpp:        S3FS_PRN_ERR("### CURLE_HTTP_RETURNED_ERROR");
./curl.cpp:        S3FS_PRN_ERR("###curlCode: %d  msg: %s", curlCode, curl_easy_strerror(curlCode));
./curl.cpp:  S3FS_PRN_ERR("### giving up");
./curl.cpp:    S3FS_PRN_ERR("An error occurred in checking IAM credential.");
./curl.cpp:      S3FS_PRN_ERR("IAM role name is empty.");
./curl.cpp:    S3FS_PRN_ERR("Something error occurred, could not get IAM credential.");
./curl.cpp:    S3FS_PRN_ERR("Something error occurred, could not get IAM role name.");
./curl.cpp:      S3FS_PRN_ERR("Failed to set SSE-C headers for sse-c key pos(%d)(=md5(%s)).", ssekey_pos, md5.c_str());
./curl.cpp:      S3FS_PRN_ERR("PutHeadRequest get 200 status response, but it included error body(or NULL). The request failed during copying the object in S3.");
./curl.cpp:      S3FS_PRN_ERR("Could not duplicate file descriptor(errno=%d)", errno);
./curl.cpp:    S3FS_PRN_ERR("Check bucket failed, S3 response: %s", (bodydata ? bodydata->str() : ""));
./curl.cpp:      S3FS_PRN_ERR("%d file part is not finished uploading.", cnt + 1);
./curl.cpp:      S3FS_PRN_ERR("Could not make md5 for file(part %d)", part_num);
./curl.cpp:    S3FS_PRN_ERR("Could not duplicate file descriptor(errno=%d)", errno);
./curl.cpp:    S3FS_PRN_ERR("Invalid file descriptor(errno=%d)", errno);
./curl.cpp:      S3FS_PRN_ERR("failed uploading part(%d)", result);
./curl.cpp:    S3FS_PRN_ERR("Could not duplicate file descriptor(errno=%d)", errno);
./curl.cpp:    S3FS_PRN_ERR("failed uploading part(%d)", result);
./curl.cpp:      S3FS_PRN_ERR("failed pthread_create - rc(%d)", rc);
./curl.cpp:      S3FS_PRN_ERR("failed pthread_join - rc(%d)", rc);
./curl.cpp:      S3FS_PRN_ERR("failed a request(Unknown response code: %s)", s3fscurl->url.c_str());
./fdcache.cpp:      S3FS_PRN_ERR("failed to create dir(%s) by errno(%d).", path, result);
./fdcache.cpp:    S3FS_PRN_ERR("failed to create cache stat file path(%s)", path);
./fdcache.cpp:      S3FS_PRN_ERR("failed to delete file(%s): errno=%d", path, errno);
./fdcache.cpp:    S3FS_PRN_ERR("failed to create cache stat file path(%s)", path.c_str());
./fdcache.cpp:    S3FS_PRN_ERR("failed to open cache stat file path(%s) - errno(%d)", path.c_str(), errno);
./fdcache.cpp:    S3FS_PRN_ERR("failed to lock cache stat file(%s) - errno(%d)", path.c_str(), errno);
./fdcache.cpp:    S3FS_PRN_ERR("failed to lseek cache stat file(%s) - errno(%d)", path.c_str(), errno);
./fdcache.cpp:    S3FS_PRN_ERR("failed to unlock cache stat file(%s) - errno(%d)", path.c_str(), errno);
./fdcache.cpp:    S3FS_PRN_ERR("failed to close cache stat file(%s) - errno(%d)", path.c_str(), errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to write stats(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("fstat is failed. errno(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to read stats(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to parse stats.");
./fdcache.cpp:      S3FS_PRN_ERR("failed to parse stats.");
./fdcache.cpp:      S3FS_PRN_ERR("different size(%jd - %jd).", (intmax_t)total, (intmax_t)Size());
./fdcache.cpp:      S3FS_PRN_ERR("pwrite failed. errno(%d)", errno);
./fdcache.cpp:    S3FS_PRN_ERR("cache path is empty, why come here");
./fdcache.cpp:    S3FS_PRN_ERR("could not make bup cache directory path or create it.");
./fdcache.cpp:      S3FS_PRN_ERR("could not link mirror file(%s) to cache file(%s) by errno(%d).", mirrorpath.c_str(), cachepath.c_str(), errno);
./fdcache.cpp:    S3FS_PRN_ERR("could not open mirror file(%s) by errno(%d).", mirrorpath.c_str(), errno);
./fdcache.cpp:        S3FS_PRN_ERR("failed to truncate temporary file(%d) by errno(%d).", fd, errno);
./fdcache.cpp:        S3FS_PRN_ERR("failed to truncate temporary file information(%d).", fd);
./fdcache.cpp:        S3FS_PRN_ERR("fstat is failed. errno(%d)", errno);
./fdcache.cpp:        S3FS_PRN_ERR("failed to open file(%s). errno(%d)", cachepath.c_str(), errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to open mirror file linked cache file(%s).", cachepath.c_str());
./fdcache.cpp:      S3FS_PRN_ERR("failed to get fileno(%s). errno(%d)", cachepath.c_str(), errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to open tmp file. err(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("ftruncate(%s) or fsync returned err(%d)", cachepath.c_str(), errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to set mtime. errno(%d)", errno);
./fdcache.cpp:    S3FS_PRN_ERR("could not download, result(%d)", result);
./fdcache.cpp:    S3FS_PRN_ERR("fstat failed. errno(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("futimes failed. errno(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("utime failed. errno(%d)", errno);
./fdcache.cpp:    S3FS_PRN_ERR("fstat is failed. errno(%d)", errno);
./fdcache.cpp:          S3FS_PRN_ERR("failed to fill rest bytes for fd(%d). errno(%d)", fd, result);
./fdcache.cpp:    S3FS_PRN_ERR("failed to open tmp file. err(%d)", errno);
./fdcache.cpp:          S3FS_PRN_ERR("failed to truncate temporary file(%d).", tmpfd);
./fdcache.cpp:            S3FS_PRN_ERR("failed to get object(start=%zd, size=%zu) for file(%d).", offset, oneread, tmpfd);
./fdcache.cpp:            S3FS_PRN_ERR("failed to fill rest bytes for fd(%d). errno(%d)", tmpfd, result);
./fdcache.cpp:        S3FS_PRN_ERR("failed to multipart post(start=%zd, size=%zu) for file(%d).", offset, oneread, upload_fd);
./fdcache.cpp:      S3FS_PRN_ERR("failed to truncate file(%d), but continue...", fd);
./fdcache.cpp:    S3FS_PRN_ERR("Need to initialize for multipart post.");
./fdcache.cpp:    S3FS_PRN_ERR("There is no upload id or etag list.");
./fdcache.cpp:          S3FS_PRN_ERR("failed to upload all area(errno=%d)", result);
./fdcache.cpp:          S3FS_PRN_ERR("failed to upload all area by multipart uploading(errno=%d)", result);
./fdcache.cpp:      S3FS_PRN_ERR("lseek error(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("fstat is failed by errno(%d), but continue...", errno);
./fdcache.cpp:      S3FS_PRN_ERR("lseek error(%d)", errno);
./fdcache.cpp:        S3FS_PRN_ERR("failed to multipart post(start=%zd, size=%zu) for file(%d).", mp_start, mp_size, fd);
./fdcache.cpp:      S3FS_PRN_ERR("failed to complete(finish) multipart post for file(%d).", fd);
./fdcache.cpp:      S3FS_PRN_ERR("failed to truncate file(%d) to zero, but continue...", fd);
./fdcache.cpp:      S3FS_PRN_ERR("failed to truncate temporary file(%d).", fd);
./fdcache.cpp:        S3FS_PRN_ERR("could not reserve disk space for pre-fetch download");
./fdcache.cpp:      S3FS_PRN_ERR("could not download. start(%jd), size(%zu), errno(%d)", (intmax_t)start, size, result);
./fdcache.cpp:    S3FS_PRN_ERR("pread failed. errno(%d)", errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to truncate temporary file(%d).", fd);
./fdcache.cpp:        S3FS_PRN_ERR("failed to load uninitialized area before writing(errno=%d)", result);
./fdcache.cpp:        S3FS_PRN_ERR("failed to switch multipart uploading with no cache(errno=%d)", result);
./fdcache.cpp:        S3FS_PRN_ERR("failed to load uninitialized area and multipart uploading it(errno=%d)", result);
./fdcache.cpp:    S3FS_PRN_ERR("pwrite failed. errno(%d)", errno);
./fdcache.cpp:        S3FS_PRN_ERR("failed to multipart post(start=%zd, size=%zu) for file(%d).", mp_start, mp_size, fd);
./fdcache.cpp:        S3FS_PRN_ERR("failed to truncate file(%d).", fd);
./fdcache.cpp:      S3FS_PRN_ERR("failed to delete file(%s): errno=%d", path, errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to delete stat file(%s): errno=%d", path, errno);
./fdcache.cpp:      S3FS_PRN_ERR("failed to create dir(%s) by errno(%d).", path, result);
./fdcache.cpp:    S3FS_PRN_ERR("could not access to cache directory(%s) by errno(%d).", cache_dir.c_str(), errno);
./fdcache.cpp:    S3FS_PRN_ERR("the cache directory(%s) is not directory.", cache_dir.c_str());
./fdcache.cpp:    S3FS_PRN_ERR("could not get vfs stat by errno(%d)", errno);
./fdcache.cpp:        S3FS_PRN_ERR("failed to make cache path for object(%s).", path);
./fdcache.cpp:    S3FS_PRN_ERR("could not open cache dir(%s) - errno(%d)", abs_path.c_str(), errno);
./fdcache.cpp:      S3FS_PRN_ERR("could not get stats of file(%s) - errno(%d)", fullpath.c_str(), errno);
./gnutls_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./gnutls_auth.cpp:    S3FS_PRN_ERR("MD5 context creation failure: %s/%s", gcry_strsource(err), gcry_strerror(err));
./gnutls_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./gnutls_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./gnutls_auth.cpp:    S3FS_PRN_ERR("SHA256 context creation failure: %s/%s", gcry_strsource(err), gcry_strerror(err));
./gnutls_auth.cpp:    S3FS_PRN_ERR("SHA256 context creation failure: %s/%s", gcry_strsource(err), gcry_strerror(err));
./gnutls_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./nss_auth.cpp:    S3FS_PRN_ERR("Failed NSS_NoDB_Init call.");
./nss_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./nss_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./openssl_auth.cpp:      S3FS_PRN_ERR("Failed to s3fs_crypt_mutex");
./openssl_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./openssl_auth.cpp:      S3FS_PRN_ERR("file read error(%d)", errno);
./s3fs.cpp:      S3FS_PRN_ERR("failed adding stat cache [path=%s]", strpath.c_str());
./s3fs.cpp:        S3FS_PRN_ERR("failed convert headers to stat[path=%s]", strpath.c_str());
./s3fs.cpp:      S3FS_PRN_ERR("failed convert headers to stat[path=%s]", strpath.c_str());
./s3fs.cpp:    S3FS_PRN_ERR("Failed to get object(%s) headers", path);
./s3fs.cpp:    S3FS_PRN_ERR("Could not open file. errno(%d)", errno);
./s3fs.cpp:    S3FS_PRN_ERR("Could not load file. errno(%d)", errno);
./s3fs.cpp:    S3FS_PRN_ERR("could not get fent(file=%s)", path);
./s3fs.cpp:    S3FS_PRN_ERR("could not get file size(file=%s)", path);
./s3fs.cpp:    S3FS_PRN_ERR("could not read file(file=%s, ressize=%jd)", path, (intmax_t)ressize);
./s3fs.cpp:      S3FS_PRN_ERR("failed to create temporary file. err(%d)", errno);
./s3fs.cpp:      S3FS_PRN_ERR("Could not connect, so retry to connect by signature version 2.");
./s3fs.cpp:    S3FS_PRN_ERR("could not create object for special file(result=%d)", result);
./s3fs.cpp:    S3FS_PRN_ERR("list_bucket returns error.");
./s3fs.cpp:    S3FS_PRN_ERR("could not open tmpfile(errno=%d)", errno);
./s3fs.cpp:    S3FS_PRN_ERR("could not write tmpfile(errno=%d)", errno);
./s3fs.cpp:    S3FS_PRN_ERR("could not open and read file(%s)", from);
./s3fs.cpp:    S3FS_PRN_ERR("could not set content-type for %s", to);
./s3fs.cpp:    S3FS_PRN_ERR("could not upload file(%s): result=%d", to, result);
./s3fs.cpp:    S3FS_PRN_ERR("list_bucket returns error.");
./s3fs.cpp:        S3FS_PRN_ERR("clone_directory_object returned an error(%d)", result);
./s3fs.cpp:        S3FS_PRN_ERR("rename_object returned an error(%d)", result);
./s3fs.cpp:          S3FS_PRN_ERR("s3fs_rmdir returned an error(%d)", result);
./s3fs.cpp:    S3FS_PRN_ERR("Could not change mode for mount point.");
./s3fs.cpp:    S3FS_PRN_ERR("Could not change mode for mount point.");
./s3fs.cpp:      S3FS_PRN_ERR("could not open and read file(%s)", strpath.c_str());
./s3fs.cpp:      S3FS_PRN_ERR("could not upload file(%s): result=%d", strpath.c_str(), result);
./s3fs.cpp:    S3FS_PRN_ERR("Could not change owner for mount point.");
./s3fs.cpp:    S3FS_PRN_ERR("Could not change owner for mount point.");
./s3fs.cpp:      S3FS_PRN_ERR("could not open and read file(%s)", strpath.c_str());
./s3fs.cpp:      S3FS_PRN_ERR("could not upload file(%s): result=%d", strpath.c_str(), result);
./s3fs.cpp:    S3FS_PRN_ERR("Could not change mtime for mount point.");
./s3fs.cpp:    S3FS_PRN_ERR("Could not change mtime for mount point.");
./s3fs.cpp:      S3FS_PRN_ERR("could not open and read file(%s)", strpath.c_str());
./s3fs.cpp:      S3FS_PRN_ERR("could not set mtime to file(%s): result=%d", strpath.c_str(), result);
./s3fs.cpp:      S3FS_PRN_ERR("could not upload file(%s): result=%d", strpath.c_str(), result);
./s3fs.cpp:      S3FS_PRN_ERR("could not open file(%s): errno=%d", path, errno);
./s3fs.cpp:      S3FS_PRN_ERR("could not download file(%s): result=%d", path, result);
./s3fs.cpp:      S3FS_PRN_ERR("could not open file(%s): errno=%d", path, errno);
./s3fs.cpp:    S3FS_PRN_ERR("could not upload file(%s): result=%d", path, result);
./s3fs.cpp:      S3FS_PRN_ERR("could not upload file(%s): result=%d", path, result);
./s3fs.cpp:    S3FS_PRN_ERR("could not find opened fd(%s)", path);
./s3fs.cpp:    S3FS_PRN_ERR("could not find opened fd(%s)", path);
./s3fs.cpp:    S3FS_PRN_ERR("could not find fd(file=%s)", path);
./s3fs.cpp:    S3FS_PRN_ERR("failed adding stat cache [path=%s]", saved_path.c_str());
./s3fs.cpp:      S3FS_PRN_ERR("Over retry count(%d) limit(%s).", s3fscurl->GetMultipartRetryCount(), s3fscurl->GetSpacialSavedPath().c_str());
./s3fs.cpp:    S3FS_PRN_ERR("Could not duplicate curl object(%s).", saved_path.c_str());
./s3fs.cpp:        S3FS_PRN_ERR("error occurred in multi request(errno=%d).", result);
./s3fs.cpp:    S3FS_PRN_ERR("list_bucket returns error(%d).", result);
./s3fs.cpp:    S3FS_PRN_ERR("readdir_multi_head returns error(%d).", result);
./s3fs.cpp:      S3FS_PRN_ERR("ListBucketRequest returns with error.");
./s3fs.cpp:      S3FS_PRN_ERR("xmlReadMemory returns with error.");
./s3fs.cpp:      S3FS_PRN_ERR("append_objects_from_xml returns with error.");
./s3fs.cpp:    S3FS_PRN_ERR("xmlXPathEvalExpression returns null.");
./s3fs.cpp:        S3FS_PRN_ERR("insert_object returns with error.");
./s3fs.cpp:    S3FS_PRN_ERR("append_objects_from_xml_ex returns with error.");
./s3fs.cpp:    S3FS_PRN_ERR("marker_xp->nodesetval is empty.");
./s3fs.cpp:    S3FS_PRN_ERR("could not get object full path name..");
./s3fs.cpp:    S3FS_PRN_ERR("one of xattr pair(%s) is wrong format.", xattrpair.c_str());
./s3fs.cpp:    S3FS_PRN_ERR("one of xattr pair(%s) is wrong format.", xattrpair.c_str());
./s3fs.cpp:    S3FS_PRN_ERR("Wrong parameter: value(%p), size(%zu)", value, size);
./s3fs.cpp:    S3FS_PRN_ERR("Could not change mode for mount point.");
./s3fs.cpp:    S3FS_PRN_ERR("Could not change mode for mount point.");
./s3fs.cpp:    S3FS_PRN_ERR("Exiting FUSE event loop due to errors\n");
./s3fs.cpp:    S3FS_PRN_ERR("Could not find key(%s).", exp_key);
./s3fs.cpp:    S3FS_PRN_ERR("Key(%s) node is empty.", exp_key);
./s3fs.cpp:    S3FS_PRN_ERR("Key(%s) value is empty.", exp_key);
./s3fs.cpp:    S3FS_PRN_ERR("xmlXPathEvalExpression returns null.");
./s3fs.cpp:      S3FS_PRN_ERR("option fd_page_size is no longer supported, so skip this option.");
./s3fs_util.cpp:    S3FS_PRN_ERR("could not get pw information(%d).", result);
./s3fs_util.cpp:        S3FS_PRN_ERR("could not get max name length.");
./s3fs_util.cpp:    S3FS_PRN_ERR("could not get group information(%d).", result);
./s3fs_util.cpp:    S3FS_PRN_ERR("could not open dir(%s) - errno(%d)", dir, errno);
./s3fs_util.cpp:      S3FS_PRN_ERR("could not get stats of file(%s) - errno(%d)", fullpath.c_str(), errno);
./s3fs_util.cpp:        S3FS_PRN_ERR("could not remove sub dir(%s) - errno(%d)", fullpath.c_str(), errno);
./s3fs_util.cpp:        S3FS_PRN_ERR("could not remove file(%s) - errno(%d)", fullpath.c_str(), errno);
./s3fs_util.cpp:    S3FS_PRN_ERR("could not remove dir(%s) - errno(%d)", dir, errno);

したがって、監視をする場合にはlogレベルをerrにし、/var/log/messagess3fsという文字列で監視するか、
上記のログを決め打ちで監視する必要がある。

CRITICALだともう少し絞れるが、初期起動時っぽいのとメモリ関連のエラーのみで、運用中のオペレーションに伴うエラーはcriticalとしては上がらない模様。

[root@ip-172-30-0-180 src]# find ./ -type f | xargs grep "S3FS_PRN_CRIT" --color
./common.h:#define S3FS_PRN_CRIT(fmt, ...)   S3FS_LOW_LOGPRN(S3FS_LOG_CRIT, fmt, ##__VA_ARGS__, "")
./curl.cpp:    S3FS_PRN_CRIT("not enough memory (realloc returned NULL)");
./curl.cpp:    S3FS_PRN_CRIT("BodyData.Append() returned false.");
./fdcache.cpp:      S3FS_PRN_CRIT("could not allocate memory.");
./fdcache.cpp:    S3FS_PRN_CRIT("failed to init mutex");
./fdcache.cpp:      S3FS_PRN_CRIT("failed to destroy mutex");
./fdcache.cpp:      S3FS_PRN_CRIT("failed to init mutex");
./fdcache.cpp:        S3FS_PRN_CRIT("failed to init mutex");
./openssl_auth.cpp:    S3FS_PRN_CRIT("Could not allocate memory for CRYPTO_dynlock_value");
./openssl_auth.cpp:    S3FS_PRN_CRIT("Could not allocate memory for s3fs_crypt_mutex");
./s3fs.cpp:  S3FS_PRN_CRIT("change debug level from %sto %s", S3FS_LOG_LEVEL_STRING(old), S3FS_LOG_LEVEL_STRING(debug_level));
./s3fs.cpp:  S3FS_PRN_CRIT("change debug level from %sto %s", S3FS_LOG_LEVEL_STRING(old), S3FS_LOG_LEVEL_STRING(debug_level));
./s3fs.cpp:      S3FS_PRN_CRIT("could not load IAM role name from meta data.");
./s3fs.cpp:    S3FS_PRN_CRIT("Failed to check IAM role name(%s).", S3fsCurl::GetIAMRole());
./s3fs.cpp:        S3FS_PRN_CRIT("Could not connect wrong region %s, so retry to connect region %s.", endpoint.c_str(), expectregion.c_str());
./s3fs.cpp:        S3FS_PRN_CRIT("Bad Request(host=%s) - result of checking service.", host.c_str());
./s3fs.cpp:        S3FS_PRN_CRIT("invalid credentials(host=%s) - result of checking service.", host.c_str());
./s3fs.cpp:        S3FS_PRN_CRIT("bucket not found(host=%s) - result of checking service.", host.c_str());
./s3fs.cpp:        S3FS_PRN_CRIT("unable to connect bucket and timeout(host=%s) - result of checking service.", host.c_str());
./s3fs.cpp:        S3FS_PRN_CRIT("unable to connect(host=%s) - result of checking service.", host.c_str());
./s3fs.cpp:      S3FS_PRN_CRIT("remote mountpath %s not found.", mount_prefix.c_str());
./s3fs_util.cpp:    S3FS_PRN_CRIT("failed to allocate memory.");
./s3fs_util.cpp:      S3FS_PRN_CRIT("failed to allocate memory.");
./s3fs_util.cpp:    S3FS_PRN_CRIT("failed to allocate memory.");
./s3fs_util.cpp:      S3FS_PRN_CRIT("failed to allocate memory.");

ファイルのメタデータを比較してみる

・s3fs上のファイル

[root@ip-172-30-0-180 s3fs]# stat data_centos.txt
  File: ‘data_centos.txt’
  Size: 58              Blocks: 1          IO Block: 4096   regular file
Device: 27h/39d Inode: 2           Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/  centos)   Gid: ( 1000/  centos)
Context: system_u:object_r:fusefs_t:s0
Access: 1970-01-01 00:00:00.000000000 +0000
Modify: 2018-07-22 15:21:02.000000000 +0000
Change: 1970-01-01 00:00:00.000000000 +0000
 Birth: -

ファイルの更新をしてもModifyしか変わらなかった。

まとめ

・前回検証したときには使えなかったIAM Roleが使えるようになったので、実用度が上がった。
・遅かったり結果整合性だったりは当然変わらずなので、利用ケースをちゃんと考えること。
・監視や複数台でマウントしたときの挙動は、実際に運用してみる必要がある。

12
5
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
12
5