[GH-ISSUE #2408] df -kh hangs while mounting s3 bucket using s3 access point alias #1186

Closed
opened 2026-03-04 01:52:02 +03:00 by kerem · 1 comment
Owner

Originally created by @amitdctm on GitHub (Feb 10, 2024).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2408

Environment:

OS : Amazon Linux (RHEL 7.9, 8.4, 8.8)
s3fs : V1.93 (commit:unknown) with OpenSSL
AWS Cli : V2

Problem:
My team has been using s3fs since long using Instance IAM Profile Role on EC2. The Instance Profile Roles are being updated to use S3 Access Points Policy. We have been successful using Instance Profile Role so far using AWS Cli. The only change we observed is that we need to use Access Point alias instead of Bucket Name while using S3-SDK/AWS-CLI.

E.g., aws s3 cp s3://<Access Point alias>/<folder>/<file> /usr/local/

When we follow the steps below for remounting, the server hangs (mainly df -kh or cd /mnt)! We have no errors!
Please help if s3fs supports use of Access Point alias.

  1. Modify /etc/fstab like below
    s3fs#<Access Point alias> /mnt/mybucket fuse rw,iam_role=<Instance-Profile-Role>,use_cache=/tmp,uid=<12345>,gid=<12345>,allow_other 0 0
  2. unmount the mountpoint
  3. Reload systemctl daemon
  4. And mount again using mount -a

When using mount-s3 it goes well and superfast! The only reason for using s3fs is that mount-s3 doesn't support mv for us as it is not implemented yet.
E.g.,
mount-s3 \ --allow-overwrite \ --allow-delete \ --uid 12345 \ --gid 12345 \ --cache /tmp \ <Access Point alias> \ /mnt/mybucket

Help will be much appreciated with s3fs hanging issue! I'm new to s3fs but not sure if there are any logs those I can check to find more details.

Version of s3fs being used (s3fs --version)

Amazon Simple Storage Service File System V1.93 (commit:unknown) with OpenSSL
Copyright (C) 2010 Randy Rizun rrizun@gmail.com
License GPL2: GNU GPL version 2 https://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.

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse or dpkg -s fuse)

Name : fuse
Version : 2.9.7
Release : 17.el8
Architecture: x86_64
Install Date: Wed 07 Feb 2024 16:40:51 GMT
Group : Unspecified
Size : 208380
License : GPL+
Signature : RSA/SHA256, Fri 28 Apr 2023 11:07:38 BST, Key ID 199e2f91fd431d51
Source RPM : fuse-2.9.7-17.el8.src.rpm
Build Date : Tue 18 Apr 2023 19:30:27 BST
Build Host : x86-64-02.build.eng.rdu2.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. http://bugzilla.redhat.com/bugzilla
Vendor : Red Hat, Inc.
URL : http://fuse.sf.net
Summary : File System in Userspace (FUSE) v2 utilities
Description :
With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains the FUSE v2 userspace tools to
mount a FUSE filesystem.

Kernel information (uname -r)

4.18.0-513.9.1.el8_9.x86_64

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME="Red Hat Enterprise Linux"
VERSION="8.9 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.9"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.9 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.9"

Originally created by @amitdctm on GitHub (Feb 10, 2024). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2408 **_Environment_**: **OS** : Amazon Linux (RHEL 7.9, 8.4, 8.8) **s3fs** : V1.93 (commit:unknown) with OpenSSL **AWS Cli** : V2 **Problem:** My team has been using s3fs since long using Instance IAM Profile Role on EC2. The Instance Profile Roles are being updated to use S3 Access Points Policy. We have been successful using Instance Profile Role so far using AWS Cli. The only change we observed is that we need to use **_Access Point alias_** instead of Bucket Name while using S3-SDK/AWS-CLI. E.g., `aws s3 cp s3://<Access Point alias>/<folder>/<file> /usr/local/ ` When we follow the steps below for remounting, the server hangs (mainly `df -kh` or `cd /mnt`)! We have no errors! Please help if `s3fs` supports use of **_Access Point alias_**. 1. Modify /etc/fstab like below `s3fs#<Access Point alias> /mnt/mybucket fuse rw,iam_role=<Instance-Profile-Role>,use_cache=/tmp,uid=<12345>,gid=<12345>,allow_other 0 0` 2. unmount the mountpoint 3. Reload systemctl daemon 4. And mount again using `mount -a` When using mount-s3 it goes well and superfast! The only reason for using s3fs is that mount-s3 doesn't support `mv` for us as it is not implemented yet. E.g., `mount-s3 \ --allow-overwrite \ --allow-delete \ --uid 12345 \ --gid 12345 \ --cache /tmp \ <Access Point alias> \ /mnt/mybucket` Help will be much appreciated with s3fs hanging issue! I'm new to s3fs but not sure if there are any logs those I can check to find more details. #### Version of s3fs being used (`s3fs --version`) Amazon Simple Storage Service File System V1.93 (commit:unknown) with OpenSSL Copyright (C) 2010 Randy Rizun <rrizun@gmail.com> License GPL2: GNU GPL version 2 <https://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. #### Version of fuse being used (`pkg-config --modversion fuse`, `rpm -qi fuse` or `dpkg -s fuse`) Name : fuse Version : 2.9.7 Release : 17.el8 Architecture: x86_64 Install Date: Wed 07 Feb 2024 16:40:51 GMT Group : Unspecified Size : 208380 License : GPL+ Signature : RSA/SHA256, Fri 28 Apr 2023 11:07:38 BST, Key ID 199e2f91fd431d51 Source RPM : fuse-2.9.7-17.el8.src.rpm Build Date : Tue 18 Apr 2023 19:30:27 BST Build Host : x86-64-02.build.eng.rdu2.redhat.com Relocations : (not relocatable) Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> Vendor : Red Hat, Inc. URL : http://fuse.sf.net Summary : File System in Userspace (FUSE) v2 utilities Description : With FUSE it is possible to implement a fully functional filesystem in a userspace program. This package contains the FUSE v2 userspace tools to mount a FUSE filesystem. #### Kernel information (`uname -r`) 4.18.0-513.9.1.el8_9.x86_64 #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) NAME="Red Hat Enterprise Linux" VERSION="8.9 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.9" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.9 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos" HOME_URL="https://www.redhat.com/" DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.9 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.9"
kerem closed this issue 2026-03-04 01:52:02 +03:00
Author
Owner

@amitdctm commented on GitHub (Feb 10, 2024):

I'm pleased to inform that the issue has now been resolved!
This is odd but when I use EC2 Instance Role Profile backed with S3 Access Point policy it struggle connecting appropriate S3 Regional endpoint, and it works fine if I use EC2 Instance Role Profile backed by Role based Policy (not S3 Access Point Policy).

After putting my head on fire, it really brighten my thoughts and given me an idea to try!
This what made me happy!

Ansible Task

- name: mount the S3 bucket 
  mount:
    name: "{{ s3_mount }}"
    src: "s3fs#{{ s3_bucket }}"
    fstype: fuse
    opts: "iam_role={{ iam_role }},nonempty,rw,allow_other,uid={{ user_id.stdout }},gid={{ group_id.stdout }},use_cache=/tmp,url=https://s3.{{ aws_region }}.amazonaws.com,endpoint={{ aws_region }},use_path_request_style"
    state: mounted

If you want to use non-fstab style, use like below:

s3fs \
{{ s3_bucket }} \
{{ s3_mount }} \
-o iam_role={{ iam_role }} \
-o nonempty,rw,allow_other,uid={{ user_id.stdout }},gid={{ group_id.stdout }},use_cache=/tmp \
-o url=https://s3.{{ aws_region }}.amazonaws.com,endpoint={{ aws_region }},use_path_request_style

Thanks for supporting the community!💯

<!-- gh-comment-id:1937105608 --> @amitdctm commented on GitHub (Feb 10, 2024): I'm pleased to inform that the issue has now been resolved! This is odd but when I use EC2 Instance Role Profile backed with S3 Access Point policy it struggle connecting appropriate S3 Regional endpoint, and it works fine if I use EC2 Instance Role Profile backed by Role based Policy (not S3 Access Point Policy). After putting my head on fire, it really brighten my thoughts and given me an idea to try! This what made me happy! **Ansible Task** ``` - name: mount the S3 bucket mount: name: "{{ s3_mount }}" src: "s3fs#{{ s3_bucket }}" fstype: fuse opts: "iam_role={{ iam_role }},nonempty,rw,allow_other,uid={{ user_id.stdout }},gid={{ group_id.stdout }},use_cache=/tmp,url=https://s3.{{ aws_region }}.amazonaws.com,endpoint={{ aws_region }},use_path_request_style" state: mounted ``` If you want to use non-fstab style, use like below: ``` s3fs \ {{ s3_bucket }} \ {{ s3_mount }} \ -o iam_role={{ iam_role }} \ -o nonempty,rw,allow_other,uid={{ user_id.stdout }},gid={{ group_id.stdout }},use_cache=/tmp \ -o url=https://s3.{{ aws_region }}.amazonaws.com,endpoint={{ aws_region }},use_path_request_style ``` Thanks for supporting the community!💯
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1186
No description provided.