On Fri, Nov 6, 2015 at 12:19 PM, Jarry <mr.ja...@gmail.com> wrote:
> Hi Gentoo-users,
>
> I noted one strange thing today: It seems one of my servers lost "/"!
>
> vs5-dns ~ # df
> Filesystem    1K-blocks    Used Available Use% Mounted on
> /var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
> tmpfs            308196     420    307776   1% /run
> dev               10240       0     10240   0% /dev
> shm             1540968       0   1540968   0% /dev/shm
> cgroup_root       10240       0     10240   0% /sys/fs/cgroup
> none            1048576       0   1048576   0% /var/tmp/portage
>
> And it seems I found the thief who stole it:
>
> vs5-dns ~ # /etc/init.d/named stop
>  * Caching service dependencies ...                    [ ok ]
>  * Stopping chrooted named ...
>  * Umounting chroot dirs ...
>  * umounting /chroot/dns/etc/bind ...                  [ ok ]
>  * umounting /chroot/dns/var/log/named ...             [ ok ]
>  * umounting /chroot/dns/var/bind ...                  [ ok ]
> vs5-dns ~ # df
> Filesystem    1K-blocks    Used Available Use% Mounted on
> /dev/sda2      10138552 2223140   7377352  24% /
> tmpfs            308196     416    307780   1% /run
> dev               10240       0     10240   0% /dev
> shm             1540968       0   1540968   0% /dev/shm
> cgroup_root       10240       0     10240   0% /sys/fs/cgroup
> none            1048576       0   1048576   0% /var/tmp/portage
> vs5-dns ~ # /etc/init.d/named start
>  * Starting chrooted named ...
>  * Mounting chroot dirs
>  * mounting /etc/bind to /chroot/dns/etc/bind           [ ok ]
>  * mounting /var/bind to /chroot/dns/var/bind           [ ok ]
>  * mounting /var/log/named to /chroot/dns/var/log/named [ ok ]
>  * Checking named configuration ...                     [ ok ]
> vs5-dns ~ # df
> Filesystem    1K-blocks    Used Available Use% Mounted on
> /var/log/named 10138552 2223160   7377332  24% /chroot/dns/var/log/named
> tmpfs            308196     420    307776   1% /run
> dev               10240       0     10240   0% /dev
> shm             1540968       0   1540968   0% /dev/shm
> cgroup_root       10240       0     10240   0% /sys/fs/cgroup
> none            1048576       0   1048576   0% /var/tmp/portage
> vs5-dns ~ #
>
> So it seems whenever chrooted bind/named is running, "/" simply
> dissapeares from the list of mounted filesystem. Instead of it,
> chrooted /var/log/named is listed. Is this correct behaviour???
>
> This is a little problem for me, as I run monitoring software
> which (appart from other things) check filesystems if they are
> not close to being full. With bind/named running it complains
> it can not find "/" in df output. I'd like to get my "/" back,
> but I do not know how to do it...

Is your /etc/mtab a regular file, or is it a symlink to
/proc/self/mounts? The latter is recommended.

Anyway, please have a look at the contents of /etc/mtab,
/proc/self/mounts, and proc/self/mountinfo while named is running and
when it is stopped. If you pastebin them we can take a look for key
differences.

Reply via email to