Package: autofs
Version: 5.0.7-3
Severity: normal

Dear Maintainer,

   * What led up to the situation?

Likely the cause was me reducing the TIMEOUT in /etc/default/autofs, but I
haven't verified this.

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

Not sure what to answer here - I am using autofs.

   * What was the outcome of this action?

automount regualrly tries (and sometimes succeeds) to unmount local
filesystems that are completely unrelated to its own mountpoint.

   * What outcome did you expect instead?

automount should leave filesystems alone that it didn't mount itself.

The reason I don't know exactly what caused it (I am suffering^Wusing
autofs for many years now) is that it took me more than a month to
find out that automount is responsible for the magically disappearing
filesystems.

My auto.master looks like this:

/fs /etc/auto.fs

and auto.fs looks like this (this is an excerpt, full version available on
request, but I don't think any relevant lines are missing):

   # yama
   yama_wd -symlink        :/fs/yama/wd
   yama    -vers=3,intr,tcp,rsize=1048576,wsize=1048576 \
      /    yama:/ \
      /wd  yama:/wd \

   # doom
   doom_archiv_001 -symlink        :/fs/doom/archiv_001
   doom_archiv_002 -symlink        :/fs/doom/archiv_002
   doom_db -symlink        :/fs/doom/db
   doom_localvol2  -symlink        :/fs/doom/localvol2
   doom_localvol3  -symlink        :/fs/doom/localvol3
   doom_localvol4  -symlink        :/fs/doom/localvol4
   doom_localvol5  -symlink        :/fs/doom/localvol5
   doom    -vers=3,intr,tcp,rsize=1048576,wsize=1048576 \
      /    doom:/ \
      /archiv_001  doom:/archiv_001 \
      /archiv_002  doom:/archiv_002 \
      /db  doom:/db \
      /localvol2   doom:/localvol2 \
      /localvol3   doom:/localvol3 \
      /localvol4   doom:/localvol4 \
      /localvol5   doom:/localvol5 \

   # rain
   rain_localvol   -symlink        :/fs/rain/localvol
   rain_localvol2  -symlink        :/fs/rain/localvol2
   rain    -vers=3,intr,tcp,rsize=1048576,wsize=1048576 \
   /    rain:/ \
   /localvol    rain:/localvol \
   /localvol2   rain:/localvol2 \


   # cerebro
   cerebro_bp      -symlink        :/fs/cerebro/bp
   cerebro_localvol        -symlink        :/fs/cerebro/localvol
   cerebro_temp    -symlink        :/fs/cerebro/temp
   cerebro_wd      -symlink        :/fs/cerebro/wd
   cerebro -symlink        :/

   wd              -symlink                        :/wd/
   db              -symlink                        :/db/
   bp              -symlink                        :/bp/

All of these, obviously, should be managed in /fs, and this more or less
works.

However, for some time now, /wd was "magically" being unmounted from time
to time. This also happene dto other mounted filesystems, but it was hard
to see a pattern.

After long time I decided to strace -f automount, to see if that is
responsible. And lo and behold, it is:

   [pid  5814] open("/proc/mounts", O_RDONLY <unfinished ...>
   ...
   [pid  5814] read(12, "rootfs / rootfs rw 0 0\nsysfs /sy"..., 1024) = 1024
   [pid  5814] read(12, " binfmt_misc rw,nosuid,nodev,noe"..., 1024) = 1024
   [pid  5814] read(12, "to=5,offset 0 0\ndoom:/localvol5 "..., 1024) = 251
   [pid  5814] read(12, "", 1024)          = 0

   ...

   [pid  5807] umount("/wd", 0)            = 0

   [pid  5817] execve("/bin/umount", ["/bin/umount", "/fs/bp"], [/* 20 vars 
*/]) = 0

   [pid  5817] umount("/bp", 0)            = -1 EBUSY (Device or resource busy)

   [pid  5817] umount("/bp", 0)            = -1 EBUSY (Device or resource busy)

   [pid  5819] execve("/bin/umount", ["/bin/umount", "/fs/cerebro_localvol"], 
[/* 20 vars */]) = 0

   [pid  5819] umount("/localvol", 0)      = -1 EBUSY (Device or resource busy)

   [pid  5826] umount("/fs/doom/localvol5", 0) = -1 EBUSY (Device or resource 
busy)

So basically, it read /etc/fstab and then tried to umount basically every
local filesystem. Looking at the strace output more closely reveals that
it simply calls umount on the entries in /fs, which are symlinks.

I guess the fix would be to not umount symlinks, as umount follows
symlinks.

-- System Information:
Debian Release: 7.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (500, 
'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.1-031601-generic (SMP w/12 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages autofs depends on:
ii  libc6              2.19-1
ii  libxml2            2.9.1+dfsg1-4
ii  multiarch-support  2.13-38+deb7u3
ii  ucf                3.0025+nmu3

Versions of packages autofs recommends:
ii  kmod               9-3
ii  module-init-tools  9-3
ii  nfs-common         1:1.2.6-4

autofs suggests no packages.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20140815063426.5855.73826.reportbug@cerebro.laendle

Reply via email to