On Wed, Nov 12, 2014 at 08:31:49PM +0100, Helge Kreutzmann wrote:
> Ok, this seems to point to something:
> find /proc/ -name mounts -exec cat "{}" ";" | grep video
> finds two entries.
>
> Ok, the first one is:
> /sbin/cgmanager --daemon -m name=systemd
>
> (However, I don't use systemd on this machine, it does not really work
> on this machine, and having it installed partially (though not as PID
> 1) caused only trouble; unfortunately sometimes hard depencendcies
> require it, but I disgress).
So cgmanager is different from systemd. In fact, it's not clear in th
elong term whether systemd and cgmanager will play well together.
> Now I removed cgmanager:
>
> And e2fsck works again!
So e2fsck was always working correctly; it properly prevented file
system corruption by warning you that the file system was still
mounted --- which it was. :-)
> Secondly should this bug be assigned to cgmanager?
Well, what it is doing is documented:
"This daemon (cgmanager) runs on the host, mounts cgroupfs into a
separate mount namespace (so it's invisible from the host), binds
/sys/fs/cgroup/cgmanager/sock for incoming DBus queries and generally
handles all clients running directly on the host." --
https://cgmanager.linuxcontainers.org/
The net effect is that if you start cgmanager, since it create a
separate mount namespace, any file systems which are mounted at the
time when cgmanager is started will still be mounted in the cgmanager
namespace:
# mount -t ext4 /dev/heap/bitcoin /bitcoin
# service cgmanager start
# umount /dev/heap/bitcoin
# e2fsck -p /dev/heap/bitcoin
/dev/heap/bitcoin is in use.
e2fsck: Cannot continue, aborting.
# service cgmanager stop
# e2fsck -p /dev/heap/bitcoin
/dev/heap/bitcoin: clean, 15913/4587520 files, 14937110/18350080 blocks
Whether or not this is a _bug_ is a bit debateable. It is a natural
consequences of its documented (and intentional) behavior. Granted it
is has some very confusing and someone user-unfriendly consequences.
So, if you want try to reassign this to the cgmanager package, it's
not unreasonable. But it's likely that any "fix" will require some
pretty serious design discussions with its upstream developers.
> (And probably a wishlist bug for the kernel to offer a reliable means
> to detect mounted partitions?).
Again, it's not unreasonable, but it's also the case that it's beyond
what the Debian kernel developers are likely to have the bandwidth and
mandate to try to "fix", since it requires a fairly fundamental
rearchitecture of how namespaces work. I've been grumbling about this
for years, and if there was an easy fix, it would have been fixed by
now.
Best regards,
- Ted
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]