Re: [gentoo-user] Bind stole my /

2015-11-19 Thread Tom H
On Wed, Nov 18, 2015 at 9:00 PM, Jarry  wrote:
> On 10-Nov-15 14:22, Tom H wrote:
>> On Tue, Nov 10, 2015 at 12:32 AM, Mike Gilbert  wrote:
>>>
>>> Can you try replacing /etc/mtab with a symlink to /proc/self/mounts to
>>> see if it makes any difference? That triggers different code paths in
>>> several programs.
>>
>> Is "/" shown when you run "df -a"? If it's shown, then there's a bug
>> in coreutils (as long as they accept a bug on a system where mtab
>> isn't a symlink) because, AFAIR, "df" should show the mount with the
>> shortest mount path if a filesystem's mounted more than once.
>
> vs5-dns ~ # df -a
> Filesystem1K-blocksUsed Available Use% Mounted on
> /dev/sda2 -   - -- /

> /etc/bind -   - -- /chroot/dns/etc/bind
> /var/bind -   - -- /chroot/dns/var/bind
> /var/log/named 10138552 2300032   7300460  24% /chroot/dns/var/log/named
>
> So there *is* /, but strangely it has no size. But it suddenly does
> have its proper size as soon as I stop bind running:
>
> vs5-dns ~ # df -a
> Filesystem 1K-blocksUsed Available Use% Mounted on
> /dev/sda2  10138552 2300024   7300468  24% /


It must be a bug that it's "/var/log/named" that shows the size of
"/". Most likely same bug as not showing "/" when simply running "df".



Re: [gentoo-user] Bind stole my /

2015-11-18 Thread Jarry

On 10-Nov-15 14:22, Tom H wrote:

On Tue, Nov 10, 2015 at 12:32 AM, Mike Gilbert  wrote:

On Mon, Nov 9, 2015 at 2:36 PM, Jarry  wrote:

On 08-Nov-15 17:58, Mike Gilbert wrote:

On Fri, Nov 6, 2015 at 12:19 PM, Jarry  wrote:


I noted one strange thing today: It seems one of my servers lost "/"!

vs5-dns ~ # df
Filesystem1K-blocksUsed Available Use% Mounted on
/var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
tmpfs308196 420307776   1% /run
dev   10240   0 10240   0% /dev
shm 1540968   0   1540968   0% /dev/shm
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
none1048576   0   1048576   0% /var/tmp/portage


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


It is regular file. I never changed it...

vs5-dns ~ # ls -l /etc/mtab
-rw-r--r-- 1 root root 908 Nov  9 19:14 /etc/mtab


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.


With bind running:
http://pastebin.com/wkTW6xAY

without bind:
http://pastebin.com/JG5FPNDW



Can you try replacing /etc/mtab with a symlink to /proc/self/mounts to
see if it makes any difference? That triggers different code paths in
several programs.


Is "/" shown when you run "df -a"? If it's shown, then there's a bug
in coreutils (as long as they accept a bug on a system where mtab
isn't a symlink) because, AFAIR, "df" should show the mount with the
shortest mount path if a filesystem's mounted more than once.


vs5-dns ~ # df -a
Filesystem1K-blocksUsed Available Use% Mounted on
/dev/sda2 -   - -- /
proc  0   0 0- /proc
tmpfs308188 420307768   1% /run
dev   10240   0 10240   0% /dev
mqueue0   0 0- /dev/mqueue
devpts0   0 0- /dev/pts
shm 1540940   0   1540940   0% /dev/shm
sysfs 0   0 0- /sys
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
openrc0   0 0- /sys/fs/cgroup/openrc
none1048576   0   1048576   0% /var/tmp/portage
/etc/bind -   - -- /chroot/dns/etc/bind
/var/bind -   - -- /chroot/dns/var/bind
/var/log/named 10138552 2300032   7300460  24% /chroot/dns/var/log/named

So there *is* /, but strangely it has no size. But it suddenly does
have its proper size as soon as I stop bind running:

vs5-dns ~ # df -a
Filesystem 1K-blocksUsed Available Use% Mounted on
/dev/sda2  10138552 2300024   7300468  24% /
proc  0   0 0- /proc
tmpfs308188 416307772   1% /run
dev   10240   0 10240   0% /dev
mqueue0   0 0- /dev/mqueue
devpts0   0 0- /dev/pts
shm 1540940   0   1540940   0% /dev/shm
sysfs 0   0 0- /sys
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
openrc0   0 0- /sys/fs/cgroup/openrc
none1048576   0   1048576   0% /var/tmp/portage

Jarry

--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] Bind stole my /

2015-11-10 Thread Tom H
On Tue, Nov 10, 2015 at 12:32 AM, Mike Gilbert  wrote:
> On Mon, Nov 9, 2015 at 2:36 PM, Jarry  wrote:
>> On 08-Nov-15 17:58, Mike Gilbert wrote:
>>> On Fri, Nov 6, 2015 at 12:19 PM, Jarry  wrote:

 I noted one strange thing today: It seems one of my servers lost "/"!

 vs5-dns ~ # df
 Filesystem1K-blocksUsed Available Use% Mounted on
 /var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
 tmpfs308196 420307776   1% /run
 dev   10240   0 10240   0% /dev
 shm 1540968   0   1540968   0% /dev/shm
 cgroup_root   10240   0 10240   0% /sys/fs/cgroup
 none1048576   0   1048576   0% /var/tmp/portage
>>>
>>> Is your /etc/mtab a regular file, or is it a symlink to
>>> /proc/self/mounts? The latter is recommended.
>>
>> It is regular file. I never changed it...
>>
>> vs5-dns ~ # ls -l /etc/mtab
>> -rw-r--r-- 1 root root 908 Nov  9 19:14 /etc/mtab
>>
>>> 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.
>>
>> With bind running:
>> http://pastebin.com/wkTW6xAY
>>
>> without bind:
>> http://pastebin.com/JG5FPNDW
>>
>> While I can see some differences there, I still do not understand
>> why is "/" missing in "df" output. BTW I can not proove it, but this
>> was not the case all the time. At least when I was tuning monitoring
>> software, I'm pretty sure "/" was there...
>
> It may be a bug.
>
> Can you try replacing /etc/mtab with a symlink to /proc/self/mounts to
> see if it makes any difference? That triggers different code paths in
> several programs.

>From the OP's pastebin:

vs5-dns ~ # more /etc/mtab
/dev/sda2 / ext4 rw,noatime,data=ordered 0 0
/etc/bind /chroot/dns/etc/bind none rw,bind 0 0
/var/bind /chroot/dns/var/bind none rw,bind 0 0
/var/log/named /chroot/dns/var/log/named none rw,bind 0 0

vs5-dns ~ # more /proc/self/mounts
/dev/sda2 / ext4 rw,noatime,data=ordered 0 0
/dev/sda2 /chroot/dns/etc/bind ext4 rw,noatime,data=ordered 0 0
/dev/sda2 /chroot/dns/var/bind ext4 rw,noatime,data=ordered 0 0
/dev/sda2 /chroot/dns/var/log/named ext4 rw,noatime,data=ordered 0 0

There was a blog post a few years ago by the util-linux maintainer in
which he was pushing for users to symlink "/etc/mtab" to
"/proc/self/mounts" and he was explaining that having "bind" as a
property in mtab doesn't make sense because you could unmount the
"bound-to" mount and the "bound" mount would still show "bind" as a
property.

Is "/" shown when you run "df -a"? If it's shown, then there's a bug
in coreutils (as long as they accept a bug on a system where mtab
isn't a symlink) because, AFAIR, "df" should show the mount with the
shortest mount path if a filesystem's mounted more than once.



Re: [gentoo-user] Bind stole my /

2015-11-09 Thread Jarry

On 08-Nov-15 17:58, Mike Gilbert wrote:

On Fri, Nov 6, 2015 at 12:19 PM, Jarry  wrote:

Hi Gentoo-users,

I noted one strange thing today: It seems one of my servers lost "/"!

vs5-dns ~ # df
Filesystem1K-blocksUsed Available Use% Mounted on
/var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
tmpfs308196 420307776   1% /run
dev   10240   0 10240   0% /dev
shm 1540968   0   1540968   0% /dev/shm
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
none1048576   0   1048576   0% /var/tmp/portage


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


It is regular file. I never changed it...

vs5-dns ~ # ls -l /etc/mtab
-rw-r--r-- 1 root root 908 Nov  9 19:14 /etc/mtab


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.


With bind running:
http://pastebin.com/wkTW6xAY

without bind:
http://pastebin.com/JG5FPNDW

While I can see some differences there, I still do not understand
why is "/" missing in "df" output. BTW I can not proove it, but this
was not the case all the time. At least when I was tuning monitoring
software, I'm pretty sure "/" was there...

Jarry

--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] Bind stole my /

2015-11-09 Thread Mike Gilbert
On Mon, Nov 9, 2015 at 2:36 PM, Jarry  wrote:
> On 08-Nov-15 17:58, Mike Gilbert wrote:
>>
>> On Fri, Nov 6, 2015 at 12:19 PM, Jarry  wrote:
>>>
>>> Hi Gentoo-users,
>>>
>>> I noted one strange thing today: It seems one of my servers lost "/"!
>>>
>>> vs5-dns ~ # df
>>> Filesystem1K-blocksUsed Available Use% Mounted on
>>> /var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
>>> tmpfs308196 420307776   1% /run
>>> dev   10240   0 10240   0% /dev
>>> shm 1540968   0   1540968   0% /dev/shm
>>> cgroup_root   10240   0 10240   0% /sys/fs/cgroup
>>> none1048576   0   1048576   0% /var/tmp/portage
>>
>>
>> Is your /etc/mtab a regular file, or is it a symlink to
>> /proc/self/mounts? The latter is recommended.
>
>
> It is regular file. I never changed it...
>
> vs5-dns ~ # ls -l /etc/mtab
> -rw-r--r-- 1 root root 908 Nov  9 19:14 /etc/mtab
>
>> 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.
>
>
> With bind running:
> http://pastebin.com/wkTW6xAY
>
> without bind:
> http://pastebin.com/JG5FPNDW
>
> While I can see some differences there, I still do not understand
> why is "/" missing in "df" output. BTW I can not proove it, but this
> was not the case all the time. At least when I was tuning monitoring
> software, I'm pretty sure "/" was there...

It may be a bug.

Can you try replacing /etc/mtab with a symlink to /proc/self/mounts to
see if it makes any difference? That triggers different code paths in
several programs.



Re: [gentoo-user] Bind stole my /

2015-11-08 Thread Mike Gilbert
On Fri, Nov 6, 2015 at 12:19 PM, Jarry  wrote:
> Hi Gentoo-users,
>
> I noted one strange thing today: It seems one of my servers lost "/"!
>
> vs5-dns ~ # df
> Filesystem1K-blocksUsed Available Use% Mounted on
> /var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
> tmpfs308196 420307776   1% /run
> dev   10240   0 10240   0% /dev
> shm 1540968   0   1540968   0% /dev/shm
> cgroup_root   10240   0 10240   0% /sys/fs/cgroup
> none1048576   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
> Filesystem1K-blocksUsed Available Use% Mounted on
> /dev/sda2  10138552 2223140   7377352  24% /
> tmpfs308196 416307780   1% /run
> dev   10240   0 10240   0% /dev
> shm 1540968   0   1540968   0% /dev/shm
> cgroup_root   10240   0 10240   0% /sys/fs/cgroup
> none1048576   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
> Filesystem1K-blocksUsed Available Use% Mounted on
> /var/log/named 10138552 2223160   7377332  24% /chroot/dns/var/log/named
> tmpfs308196 420307776   1% /run
> dev   10240   0 10240   0% /dev
> shm 1540968   0   1540968   0% /dev/shm
> cgroup_root   10240   0 10240   0% /sys/fs/cgroup
> none1048576   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.



[gentoo-user] Bind stole my /

2015-11-06 Thread Jarry

Hi Gentoo-users,

I noted one strange thing today: It seems one of my servers lost "/"!

vs5-dns ~ # df
Filesystem1K-blocksUsed Available Use% Mounted on
/var/log/named 10138552 2223148   7377344  24% /chroot/dns/var/log/named
tmpfs308196 420307776   1% /run
dev   10240   0 10240   0% /dev
shm 1540968   0   1540968   0% /dev/shm
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
none1048576   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
Filesystem1K-blocksUsed Available Use% Mounted on
/dev/sda2  10138552 2223140   7377352  24% /
tmpfs308196 416307780   1% /run
dev   10240   0 10240   0% /dev
shm 1540968   0   1540968   0% /dev/shm
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
none1048576   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
Filesystem1K-blocksUsed Available Use% Mounted on
/var/log/named 10138552 2223160   7377332  24% /chroot/dns/var/log/named
tmpfs308196 420307776   1% /run
dev   10240   0 10240   0% /dev
shm 1540968   0   1540968   0% /dev/shm
cgroup_root   10240   0 10240   0% /sys/fs/cgroup
none1048576   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...

Jarry
--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.