[GH-ISSUE #981] s3fs double mounting itself on mount -a #544

Closed
opened 2026-03-04 01:46:35 +03:00 by kerem · 2 comments
Owner

Originally created by @muryoutaisuu on GitHub (Mar 14, 2019).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/981

Version of s3fs being used (s3fs --version)

$ s3fs --version
Amazon Simple Storage Service File System V1.85(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, dpkg -s fuse)

$ yum list installed | grep fuse
fuse.x86_64                  2.9.2-11.el7                    @anaconda/7.6
fuse-libs.x86_64             2.9.2-11.el7                    @anaconda/7.6

Kernel information (uname -r)

$ uname -r
3.10.0-957.1.3.el7.x86_64

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

$ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.6 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.6"

s3fs command line used, if applicable

/etc/fstab entry, if applicable

$ grep s3fs /etc/fstab
p-prometheus                                 /appl/prometheus/etc/s3    fuse.s3fs    url=https\://s3.example.ch,x-systemd.automount,x-systemd.idle-timeout=1min,_netdev,user,dbglevel=info,curldbg,instance_name=prometheus,allow_other,passwd_file=/appl/prometheus/.passwd-s3fs,umask=0022,nonempty    0    0

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages

Details about issue

Not sure if this is a s3fs-fuse or a RHEL7 fuse bug.
It's possible to overmount an s3fs-fuse mount with the command mount -a. I'd expect it to work like other local mounts: first check if already mounted, if not then mount, if yes then don't do anything.

How to reproduce

  1. Make sure, /etc/fstab entry exists
  2. Make sure, nothing is mounted yet: mount | grep s3fs
  3. Mount with mount -a
  4. Make sure, it is mounted only once: mount | grep s3fs
  5. Mount again with mount -a
  6. Check, whether it's mounted only once: mount | grep s3fs

But I get this after performing all actions above:

$ grep s3fs /etc/fstab
p-prometheus                                 /appl/prometheus/etc/s3    fuse.s3fs    url=https\://s3.example.ch,x-systemd.automount,x-systemd.idle-timeout=1min,_netdev,user,dbglevel=info,curldbg,instance_name=prometheus,allow_other,passwd_file=/appl/prometheus/.passwd-s3fs,umask=0022,nonempty    0    0

$ mount | grep s3fs

$ mount -a

$ mount | grep s3fs
s3fs on /appl/prometheus/etc/s3 type fuse.s3fs (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other)

$ mount -a

$ mount | grep s3fs
s3fs on /appl/prometheus/etc/s3 type fuse.s3fs (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other)
s3fs on /appl/prometheus/etc/s3 type fuse.s3fs (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other)

Therefore it's also possible to umount one mount after the other.

Originally created by @muryoutaisuu on GitHub (Mar 14, 2019). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/981 #### Version of s3fs being used (s3fs --version) ``` $ s3fs --version Amazon Simple Storage Service File System V1.85(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, dpkg -s fuse) ``` $ yum list installed | grep fuse fuse.x86_64 2.9.2-11.el7 @anaconda/7.6 fuse-libs.x86_64 2.9.2-11.el7 @anaconda/7.6 ``` #### Kernel information (uname -r) ``` $ uname -r 3.10.0-957.1.3.el7.x86_64 ``` #### GNU/Linux Distribution, if applicable (cat /etc/os-release) ``` $ cat /etc/os-release NAME="Red Hat Enterprise Linux Server" VERSION="7.6 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.6" PRETTY_NAME="Red Hat Enterprise Linux Server 7.6 (Maipo)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.6 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.6" ``` #### s3fs command line used, if applicable ``` ``` #### /etc/fstab entry, if applicable ``` $ grep s3fs /etc/fstab p-prometheus /appl/prometheus/etc/s3 fuse.s3fs url=https\://s3.example.ch,x-systemd.automount,x-systemd.idle-timeout=1min,_netdev,user,dbglevel=info,curldbg,instance_name=prometheus,allow_other,passwd_file=/appl/prometheus/.passwd-s3fs,umask=0022,nonempty 0 0 ``` #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) _if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages_ ``` ``` ### Details about issue Not sure if this is a `s3fs-fuse` or a RHEL7 fuse bug. It's possible to overmount an s3fs-fuse mount with the command `mount -a`. I'd expect it to work like other local mounts: first check if already mounted, if not then mount, if yes then don't do anything. #### How to reproduce 1. Make sure, /etc/fstab entry exists 2. Make sure, nothing is mounted yet: `mount | grep s3fs` 3. Mount with `mount -a` 4. Make sure, it is mounted only once: `mount | grep s3fs` 5. Mount again with `mount -a` 6. Check, whether it's mounted only once: `mount | grep s3fs` But I get this after performing all actions above: ``` $ grep s3fs /etc/fstab p-prometheus /appl/prometheus/etc/s3 fuse.s3fs url=https\://s3.example.ch,x-systemd.automount,x-systemd.idle-timeout=1min,_netdev,user,dbglevel=info,curldbg,instance_name=prometheus,allow_other,passwd_file=/appl/prometheus/.passwd-s3fs,umask=0022,nonempty 0 0 $ mount | grep s3fs $ mount -a $ mount | grep s3fs s3fs on /appl/prometheus/etc/s3 type fuse.s3fs (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other) $ mount -a $ mount | grep s3fs s3fs on /appl/prometheus/etc/s3 type fuse.s3fs (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other) s3fs on /appl/prometheus/etc/s3 type fuse.s3fs (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other) ``` Therefore it's also possible to umount one mount after the other.
kerem closed this issue 2026-03-04 01:46:35 +03:00
Author
Owner

@ggtakec commented on GitHub (Mar 24, 2019):

@muryoutaisuu
This is because s3fs is started with the nonempty option, so I think that it is for mounting even if the mount point is not empty.
In other words, another s3fs mounts on the s3fs mount point that was started first.
In this case, only the last s3fs should be processing access to the mount point.

If you do not want to mount multiples, remove nonempty and try.

<!-- gh-comment-id:475964838 --> @ggtakec commented on GitHub (Mar 24, 2019): @muryoutaisuu This is because s3fs is started with the nonempty option, so I think that it is for mounting even if the mount point is not empty. In other words, another s3fs mounts on the s3fs mount point that was started first. In this case, only the last s3fs should be processing access to the mount point. If you do not want to mount multiples, remove nonempty and try.
Author
Owner

@muryoutaisuu commented on GitHub (Mar 26, 2019):

@ggtakec thanks, that solved it. Not sure why we put that option in the first place.

<!-- gh-comment-id:476538561 --> @muryoutaisuu commented on GitHub (Mar 26, 2019): @ggtakec thanks, that solved it. Not sure why we put that option in the first place.
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#544
No description provided.