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 年前351 查看次数
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 ?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则