Bug 484190 - mount: tmpfs to reject mounts of the same mountpoint
mount: tmpfs to reject mounts of the same mountpoint
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-02-05 05:11 EST by Ondrej Valousek
Modified: 2009-02-05 07:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-05 07:18:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ondrej Valousek 2009-02-05 05:11:50 EST
Description of problem:
mount should reject attempts to mount already mounted filesystem. Example: 
[root@dorado_v1 /]# mount dorado:/exports/ext1/tmp /tmp2 
[root@dorado_v1 /]# mount dorado:/exports/ext1/tmp /tmp2 
mount.nfs: /tmp2 is already mounted or busy 
-- correct behavior. However if I try the same using tmpfs, it does not reject it: 
[root@dorado_v1 /]# mount -t tmpfs none /tmp2 
[root@dorado_v1 /]# mount -t tmpfs none /tmp2 
So /tmp2 is mounted twice now. This should not be possible.

Version-Release number of selected component (if applicable):
All versions of Fedora and RHEL are affected by this bug.

How reproducible:

Steps to Reproduce:
Actual results:
/tmp2 is mounted twice using tmpfs

Expected results:
Once /tmp2 is mounted, any consequential mounts to this mountpoint should be refused (as it already work for NFS, for example).

Additional info:
Comment 1 Karel Zak 2009-02-05 07:18:24 EST
That's correct.

You cannot mount the same filesystem on the same mountpoint more than once (e.g your NFS), BUT linux supports overlaying -- it means you can mount more (different) filesystems on the same mountpoint, e.g:

  mount /dev/foo /mnt
  mount /dev/bar /mnt

and you can also mount the same device on more places, e.g:

 mount /dev/foo /mnt
 mount /dev/foo /mnt2

Note that the "tmpfs" is always unique filesystem.

Note You need to log in before you can comment on or make changes to this bug.