Bug 484190 - mount: tmpfs to reject mounts of the same mountpoint
Summary: mount: tmpfs to reject mounts of the same mountpoint
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-05 10:11 UTC by Ondrej Valousek
Modified: 2009-02-05 12:18 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-02-05 12:18:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ondrej Valousek 2009-02-05 10:11:50 UTC
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:
1.
2.
3.
  
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 12:18:24 UTC
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.