Package: mount
Version: 2.25.2-6
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

1. create an entry in /etc/fstab as follows:
/home/testuser1 /chroots/testuser1/home/testuser1 bind defaults,bind 0 0

2. run multiple times following command:
mount /home/testuser1

3. run
mount

4. see the outcome - /home/testuser1 was mounted multiple times, instead of 
quiting with error message "/home/testuser1 is already mounted"

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
see above

   * What was the outcome of this action?
the directory was mounted several times.

   * What outcome did you expect instead?
the directory should be mounted only once and any further attempt should 
produce an error "already mounted"


While normaly one will not mount the same directory several times - it does 
occur when using Ansible to configure the system, as it is common to run the 
same Ansible scripts (playbooks) multiple times which are supposed to be 
idempotent (not to cause changes on multiple runs of the same script).

Thank you very much!

see:
https://github.com/ansible/ansible/issues/29870
https://askubuntu.com/questions/595418/how-to-prevent-duplicate-bind-mounts


*** End of the template - remove these template lines ***


-- System Information:
I observed this problem on a remote system (Debian 9)...

Here is my local machine info:
Debian Release: 8.3
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mount depends on:
ii  libc6          2.19-18+deb8u3
ii  libmount1      2.25.2-6
ii  libselinux1    2.3-2
ii  libsmartcols1  2.25.2-6

mount recommends no packages.

Versions of packages mount suggests:
ii  nfs-common  1:1.2.8-9

-- no debconf information

Reply via email to