Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#679289: inotify-tools: can't watch FS unmounts

40 views
Skip to first unread message

Neal Murphy

unread,
Jun 27, 2012, 12:00:03 PM6/27/12
to
Package: inotify-tools
Version: 3.13-3.1
Severity: normal

Dear Maintainer,

Inotifywait cannot watch for FS unmounts.

On Squeeze, I was able to:
(sleep 1; umount /mnt)&
inotifywait -q -e unmount /mnt
to receive notice that the FS was unmounted and, by extension, that all
buffers were flushed; thus it would be safe to unplug the medium.

On Wheezy, that inotifywait command results in:
Setting up watches.
Couldn't watch /mnt: Invalid argument

The problem occurs on two different recent Wheezy ix86-64 installations; they
are basic systems with web server, ssh server, and vim, apcupsd, inotify-tools,
hdparm, acl, samba and ntp (and their dependencies) installed, and vim-tiny
removed.

Other features of inotifywait seem to work as with Squeeze.

I'm presently using a less elegant work-around:
while grep -q " /mnt " /proc/mounts; do sleep .1; done
but would prefer to use inotifywait.


-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages inotify-tools depends on:
ii libc6 2.13-33
ii libinotifytools0 3.13-3.1

inotify-tools recommends no packages.

inotify-tools suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

KAc...@gnu.org

unread,
Jun 8, 2018, 3:10:03 PM6/8/18
to

[2018-06-04 16:15] "Neal P. Murphy" <neal.p...@alum.wpi.edu>
>
> part text/plain 1646
> On Sun, 03 Jun 2018 14:16:53 +0300
> KAc...@gnu.org wrote:
>
> > control: tag -1 +confirmed
> > control: found -1 3.14-5
> >
> > [2012-06-27 00:40] Neal Murphy <neal.p...@alum.wpi.edu>
> > > Package: inotify-tools
> > > Version: 3.13-3.1
> > > Severity: normal
> > >
> > > Dear Maintainer,
> > >
> > > Inotifywait cannot watch for FS unmounts.
> > >
> > > On Squeeze, I was able to:
> > > (sleep 1; umount /mnt)&
> > > inotifywait -q -e unmount /mnt
> > > to receive notice that the FS was unmounted and, by extension, that all
> > > buffers were flushed; thus it would be safe to unplug the medium.
> > >
> > > On Wheezy, that inotifywait command results in:
> > > Setting up watches.
> > > Couldn't watch /mnt: Invalid argument
> > >
> > > The problem occurs on two different recent Wheezy ix86-64 installations; they
> > > are basic systems with web server, ssh server, and vim, apcupsd, inotify-tools,
> > > hdparm, acl, samba and ntp (and their dependencies) installed, and vim-tiny
> > > removed.
> >
> > Interesting. I tried this command, and, got another (still wrong) behaviour.
> > To me, `inotifywait' seems to miss unmount event, and keeps waiting
> > after mountpoint was umounted.
> >
> > Needs more research.

> Just tried this with a rotating drive on Stretch (inotifytools 3.14);
> it works OK. Haven't tried Jessie or other types of media.

Sorry, what is rotating drive? BTW, I tested on `mount --bind'. Will
check on physical device.

> But (probably unrelated to this problem), I've noticed that XFCE on
> Stretch reports a USB thumb drive unmounted while its LED continu es
> to flash for a while. I'm beginning to wonder if Linux's unmount
> mechanism needs investigation; IMO, it shouldn't claim it's done until
> all dirty buffers for that medium have been written out.

I saw something similar recently. But I have no idea how debug it.
0 new messages