Can't mount S3 bucket on Ubuntu 20

0

I have an EC2 instance (Ubuntu 20) I took management over. It has been fine for the last year or so. There is an S3 bucket mounted in fstab like so :

s3fs#bucket-name /path/to/mount fuse _netdev,url=https://s3-ca-central-1.amazonaws.com,endpoint=ca-central-1,allow_other 0 0

The instance had this mounted and was working fine. Yesterday, the instance stooped responding, I had to restart the instance using the EC2 console. After that, the bucket (in fact both of them) don't mount. When I issue a command like df or mount, I get :

df: /path/to/mount: Transport endpoint is not connected.

I tried mounting the bucket manually with s3fs in debug :

s3fs -d -d -f -o url="https://s3-ca-central-1.amazonaws.com" -o endpoint=ca-central-1 -o allow_other bucket-name /path/to/mount

I get :

[CRT] s3fs.cpp:set_s3fs_log_level(297): change debug level from [CRT] to [INF]

[INF] s3fs.cpp:set_mountpoint_attribute(4400): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40775)

And then it sits there indefinitively with no output.

The instance has also an IAM role that grants permission to that bucket. Doing "aws s3" commands on it works fine.

/etc/passwd-s3fs has the correct credentials and permissions.

Launching a new instance with ubuntu 20, installing s3fs and creating /etc/passwd-s3fs file with the same content works just fine.

Any hint on how to debug this ?

質問済み 2年前352ビュー
1回答
0

There seems to be many similar cases but no clear single root cause for these. As it works with fresh instance, you could try cleaning (or disabling) cache on the instance. If having filesystem access to data in S3 bucket is critical I would also consider more robust options than s3fs. One such would be FSx for Lustre. It might be an over-kill for small scale use-cases but it does offer a managed and reliable 2 way sync between filesystem and S3.

https://aws.amazon.com/blogs/aws/enhanced-amazon-s3-integration-for-amazon-fsx-for-lustre/

profile picture
エキスパート
Kallu
回答済み 2年前
  • Thanks for that. AFAIK, the s3fs cache option isn't there. So from what I understand from the man page, cache should not be used. Is there another cache that could be involved ?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ