Gentoo Archives: gentoo-user

From: Jarry <mr.jarry@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Bind stole my /
Date: Wed, 18 Nov 2015 19:01:31
Message-Id: 564CCAE7.7090404@gmail.com
In Reply to: Re: [gentoo-user] Bind stole my / by Tom H
1 On 10-Nov-15 14:22, Tom H wrote:
2 > On Tue, Nov 10, 2015 at 12:32 AM, Mike Gilbert <floppym@g.o> wrote:
3 >> On Mon, Nov 9, 2015 at 2:36 PM, Jarry <mr.jarry@×××××.com> wrote:
4 >>> On 08-Nov-15 17:58, Mike Gilbert wrote:
5 >>>> On Fri, Nov 6, 2015 at 12:19 PM, Jarry <mr.jarry@×××××.com> wrote:
6 >>>>>
7 >>>>> I noted one strange thing today: It seems one of my servers lost "/"!
8 >>>>>
9 >>>>> vs5-dns ~ # df
10 >>>>> Filesystem 1K-blocks Used Available Use% Mounted on
11 >>>>> /var/log/named 10138552 2223148 7377344 24% /chroot/dns/var/log/named
12 >>>>> tmpfs 308196 420 307776 1% /run
13 >>>>> dev 10240 0 10240 0% /dev
14 >>>>> shm 1540968 0 1540968 0% /dev/shm
15 >>>>> cgroup_root 10240 0 10240 0% /sys/fs/cgroup
16 >>>>> none 1048576 0 1048576 0% /var/tmp/portage
17 >>>>
18 >>>> Is your /etc/mtab a regular file, or is it a symlink to
19 >>>> /proc/self/mounts? The latter is recommended.
20 >>>
21 >>> It is regular file. I never changed it...
22 >>>
23 >>> vs5-dns ~ # ls -l /etc/mtab
24 >>> -rw-r--r-- 1 root root 908 Nov 9 19:14 /etc/mtab
25 >>>
26 >>>> Anyway, please have a look at the contents of /etc/mtab,
27 >>>> /proc/self/mounts, and proc/self/mountinfo while named is running and
28 >>>> when it is stopped. If you pastebin them we can take a look for key
29 >>>> differences.
30 >>>
31 >>> With bind running:
32 >>> http://pastebin.com/wkTW6xAY
33 >>>
34 >>> without bind:
35 >>> http://pastebin.com/JG5FPNDW
36 >>>
37 >>
38 >> Can you try replacing /etc/mtab with a symlink to /proc/self/mounts to
39 >> see if it makes any difference? That triggers different code paths in
40 >> several programs.
41 >
42 > Is "/" shown when you run "df -a"? If it's shown, then there's a bug
43 > in coreutils (as long as they accept a bug on a system where mtab
44 > isn't a symlink) because, AFAIR, "df" should show the mount with the
45 > shortest mount path if a filesystem's mounted more than once.
46
47 vs5-dns ~ # df -a
48 Filesystem 1K-blocks Used Available Use% Mounted on
49 /dev/sda2 - - - - /
50 proc 0 0 0 - /proc
51 tmpfs 308188 420 307768 1% /run
52 dev 10240 0 10240 0% /dev
53 mqueue 0 0 0 - /dev/mqueue
54 devpts 0 0 0 - /dev/pts
55 shm 1540940 0 1540940 0% /dev/shm
56 sysfs 0 0 0 - /sys
57 cgroup_root 10240 0 10240 0% /sys/fs/cgroup
58 openrc 0 0 0 - /sys/fs/cgroup/openrc
59 none 1048576 0 1048576 0% /var/tmp/portage
60 /etc/bind - - - - /chroot/dns/etc/bind
61 /var/bind - - - - /chroot/dns/var/bind
62 /var/log/named 10138552 2300032 7300460 24% /chroot/dns/var/log/named
63
64 So there *is* /, but strangely it has no size. But it suddenly does
65 have its proper size as soon as I stop bind running:
66
67 vs5-dns ~ # df -a
68 Filesystem 1K-blocks Used Available Use% Mounted on
69 /dev/sda2 10138552 2300024 7300468 24% /
70 proc 0 0 0 - /proc
71 tmpfs 308188 416 307772 1% /run
72 dev 10240 0 10240 0% /dev
73 mqueue 0 0 0 - /dev/mqueue
74 devpts 0 0 0 - /dev/pts
75 shm 1540940 0 1540940 0% /dev/shm
76 sysfs 0 0 0 - /sys
77 cgroup_root 10240 0 10240 0% /sys/fs/cgroup
78 openrc 0 0 0 - /sys/fs/cgroup/openrc
79 none 1048576 0 1048576 0% /var/tmp/portage
80
81 Jarry
82
83 --
84 _______________________________________________________________
85 This mailbox accepts e-mails only from selected mailing-lists!
86 Everything else is considered to be spam and therefore deleted.

Replies

Subject Author
[gentoo-user] Re: Bind stole my / "Jörg Schaible" <joerg.schaible@×××.de>
Re: [gentoo-user] Bind stole my / Tom H <tomh0665@×××××.com>