Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
why does df does not display all (real) filessystems ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Tue Jan 21, 2014 5:06 pm    Post subject: why does df does not display all (real) filessystems ? Reply with quote

I have to specify -a to get all :
Code:
$ df -h

Filesystem                             Size  Used Avail Use% Mounted on
/dev/sdb3                              180G   37G  134G  22% /
/dev                                    10M  4.0K   10M   1% /mnt/n22unst4/dev
tmpfs                                  799M  852K  798M   1% /run
shm                                    3.9G     0  3.9G   0% /dev/shm
cgroup_root                             10M     0   10M   0% /sys/fs/cgroup
/dev/sdb4                              506G   48G  459G  10% /mnt/E
/mnt/ramdisk/n22unst4_var_tmp_portage  3.9G  1.6G  2.4G  39% /mnt/n22unst4/var/tmp/portage
tmpfs                                  3.9G     0  3.9G   0% /var/tmp/portage
/dev/sdb1                              942M   35M  860M   4% /boot
/dev/loop0                             1.9G  1.4G  332M  81% /mnt/n22unst4
none                                   3.9G     0  3.9G   0% /mnt/n22unst4/dev/shm
/dev/loop1                             1.9G  1.2G  552M  69% /mnt/n22stab4
none                                   3.9G     0  3.9G   0% /mnt/n22stab4/dev/shm


$ df -ha

Filesystem                             Size  Used Avail Use% Mounted on
rootfs                                 180G   37G  134G  22% /
proc                                      0     0     0    - /proc
udev                                    10M  4.0K   10M   1% /dev
devpts                                    0     0     0    - /dev/pts
sysfs                                     0     0     0    - /sys
/dev/sdb3                              180G   37G  134G  22% /
tmpfs                                  799M  852K  798M   1% /run
mqueue                                    0     0     0    - /dev/mqueue
shm                                    3.9G     0  3.9G   0% /dev/shm
securityfs                                0     0     0    - /sys/kernel/security
debugfs                                   0     0     0    - /sys/kernel/debug
cgroup_root                             10M     0   10M   0% /sys/fs/cgroup
fusectl                                   0     0     0    - /sys/fs/fuse/connections
openrc                                    0     0     0    - /sys/fs/cgroup/openrc
cpuset                                    0     0     0    - /sys/fs/cgroup/cpuset
cpu                                       0     0     0    - /sys/fs/cgroup/cpu
cpuacct                                   0     0     0    - /sys/fs/cgroup/cpuacct
memory                                    0     0     0    - /sys/fs/cgroup/memory
devices                                   0     0     0    - /sys/fs/cgroup/devices
freezer                                   0     0     0    - /sys/fs/cgroup/freezer
blkio                                     0     0     0    - /sys/fs/cgroup/blkio
/dev/sdb4                              506G   48G  459G  10% /mnt/E
tmpfs                                  3.9G  1.6G  2.4G  39% /mnt/ramdisk
tmpfs                                  3.9G     0  3.9G   0% /var/tmp/portage
/dev/sdb1                              942M   35M  860M   4% /boot
/dev/loop0                             1.9G  1.4G  332M  81% /mnt/n22unst4
none                                      0     0     0    - /mnt/n22unst4/proc
/dev                                    10M  4.0K   10M   1% /mnt/n22unst4/dev
/dev/pts                                  0     0     0    - /mnt/n22unst4/dev/pts
none                                   3.9G     0  3.9G   0% /mnt/n22unst4/dev/shm
/etc/portage/patches                   180G   37G  134G  22% /mnt/n22unst4/etc/portage/patches
/sys                                      0     0     0    - /mnt/n22unst4/sys
/usr/portage                           180G   37G  134G  22% /mnt/n22unst4/usr/portage
/usr/local/portage                     180G   37G  134G  22% /mnt/n22unst4/usr/local/portage
/mnt/ramdisk/n22unst4_var_tmp_portage  3.9G  1.6G  2.4G  39% /mnt/n22unst4/var/tmp/portage
/dev/loop1                             1.9G  1.2G  552M  69% /mnt/n22stab4
none                                      0     0     0    - /mnt/n22stab4/proc
/dev                                    10M  4.0K   10M   1% /mnt/n22stab4/dev
/dev/pts                                  0     0     0    - /mnt/n22stab4/dev/pts
none                                   3.9G     0  3.9G   0% /mnt/n22stab4/dev/shm
/etc/portage/patches                   180G   37G  134G  22% /mnt/n22stab4/etc/portage/patches
/sys                                      0     0     0    - /mnt/n22stab4/sys
/usr/portage                           180G   37G  134G  22% /mnt/n22stab4/usr/portage
/usr/local/portage                     180G   37G  134G  22% /mnt/n22stab4/usr/local/portage
/mnt/ramdisk/n22stab4_var_tmp_portage  3.9G  1.6G  2.4G  39% /mnt/n22stab4/var/tmp/portage
(I know that /cgroups + friends needs -a, but I do miss /mnt/n22stab4/var/tmp/portage in the first example)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Wed Jan 22, 2014 2:16 am    Post subject: Reply with quote

What is the output of cat -n /proc/mounts?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Wed Jan 22, 2014 3:48 pm    Post subject: Reply with quote

Code:
tfoerste@n22 ~ $ df -m
Filesystem                            1M-blocks  Used Available Use% Mounted on
/dev/sdb3                                183851 37617    136872  22% /
/dev                                         10     1        10   1% /mnt/n22unst4/dev
tmpfs                                       799     1       798   1% /run
shm                                        3992     0      3992   0% /dev/shm
cgroup_root                                  10     0        10   0% /sys/fs/cgroup
/dev/sdb4                                517997 48272    469725  10% /mnt/E
/mnt/ramdisk/n22unst4_var_tmp_portage      3992     0      3992   0% /mnt/n22unst4/var/tmp/portage
tmpfs                                      3992    10      3983   1% /var/tmp/portage
/dev/sdb1                                   942    35       860   4% /boot
/dev/loop0                                 1846  1408       327  82% /mnt/n22unst4
none                                       3992     0      3992   0% /mnt/n22unst4/dev/shm
/dev/loop1                                 1846  1183       552  69% /mnt/n22stab4
none                                       3992     0      3992   0% /mnt/n22stab4/dev/shm
Code:
tfoerste@n22 ~ $ cat -n /proc/mounts
     1  rootfs / rootfs rw 0 0
     2  proc /proc proc rw,relatime 0 0
     3  udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=203412,mode=755 0 0
     4  devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
     5  sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
     6  /dev/sdb3 / ext4 rw,noatime,data=ordered 0 0
     7  tmpfs /run tmpfs rw,nosuid,nodev,relatime,size=817424k,mode=755 0 0
     8  mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
     9  shm /dev/shm tmpfs rw,nodev,relatime 0 0
    10  securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
    11  debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
    12  cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
    13  fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
    14  openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
    15  cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
    16  cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
    17  cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
    18  memory /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
    19  devices /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
    20  freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
    21  blkio /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
    22  /dev/sdb4 /mnt/E fuseblk rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
    23  tmpfs /mnt/ramdisk tmpfs rw,noatime 0 0
    24  tmpfs /var/tmp/portage tmpfs rw,noatime 0 0
    25  /dev/sdb1 /boot ext2 rw,relatime,errors=continue,user_xattr 0 0
    26  /dev/loop0 /mnt/n22unst4 ext4 rw,relatime,data=ordered 0 0
    27  none /mnt/n22unst4/proc proc rw,relatime 0 0
    28  udev /mnt/n22unst4/dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=203412,mode=755 0 0
    29  devpts /mnt/n22unst4/dev/pts devpts rw,relatime,gid=5,mode=620 0 0
    30  none /mnt/n22unst4/dev/shm tmpfs rw,relatime 0 0
    31  /dev/sdb3 /mnt/n22unst4/etc/portage/patches ext4 rw,noatime,data=ordered 0 0
    32  sysfs /mnt/n22unst4/sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
    33  /dev/sdb3 /mnt/n22unst4/usr/portage ext4 rw,noatime,data=ordered 0 0
    34  /dev/sdb3 /mnt/n22unst4/usr/local/portage ext4 rw,noatime,data=ordered 0 0
    35  tmpfs /mnt/n22unst4/var/tmp/portage tmpfs rw,noatime 0 0
    36  /dev/loop1 /mnt/n22stab4 ext4 rw,relatime,data=ordered 0 0
    37  none /mnt/n22stab4/proc proc rw,relatime 0 0
    38  udev /mnt/n22stab4/dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=203412,mode=755 0 0
    39  devpts /mnt/n22stab4/dev/pts devpts rw,relatime,gid=5,mode=620 0 0
    40  none /mnt/n22stab4/dev/shm tmpfs rw,relatime 0 0
    41  /dev/sdb3 /mnt/n22stab4/etc/portage/patches ext4 rw,noatime,data=ordered 0 0
    42  sysfs /mnt/n22stab4/sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
    43  /dev/sdb3 /mnt/n22stab4/usr/portage ext4 rw,noatime,data=ordered 0 0
    44  /dev/sdb3 /mnt/n22stab4/usr/local/portage ext4 rw,noatime,data=ordered 0 0
    45  tmpfs /mnt/n22stab4/var/tmp/portage tmpfs rw,noatime 0 0
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Wed Jan 22, 2014 11:38 pm    Post subject: Reply with quote

Based on a comm of your first two df outputs, the set of filesystems that you were hidden from a bare df is:
Code:
/dev                                    10M  4.0K   10M   1% /mnt/n22stab4/dev
/dev/pts                                  0     0     0    - /mnt/n22stab4/dev/pts
/dev/pts                                  0     0     0    - /mnt/n22unst4/dev/pts
/etc/portage/patches                   180G   37G  134G  22% /mnt/n22stab4/etc/portage/patches
/etc/portage/patches                   180G   37G  134G  22% /mnt/n22unst4/etc/portage/patches
/mnt/ramdisk/n22stab4_var_tmp_portage  3.9G  1.6G  2.4G  39% /mnt/n22stab4/var/tmp/portage
/sys                                      0     0     0    - /mnt/n22stab4/sys
/sys                                      0     0     0    - /mnt/n22unst4/sys
/usr/local/portage                     180G   37G  134G  22% /mnt/n22stab4/usr/local/portage
/usr/local/portage                     180G   37G  134G  22% /mnt/n22unst4/usr/local/portage
/usr/portage                           180G   37G  134G  22% /mnt/n22stab4/usr/portage
/usr/portage                           180G   37G  134G  22% /mnt/n22unst4/usr/portage
blkio                                     0     0     0    - /sys/fs/cgroup/blkio
cpu                                       0     0     0    - /sys/fs/cgroup/cpu
cpuacct                                   0     0     0    - /sys/fs/cgroup/cpuacct
cpuset                                    0     0     0    - /sys/fs/cgroup/cpuset
debugfs                                   0     0     0    - /sys/kernel/debug
devices                                   0     0     0    - /sys/fs/cgroup/devices
devpts                                    0     0     0    - /dev/pts
freezer                                   0     0     0    - /sys/fs/cgroup/freezer
fusectl                                   0     0     0    - /sys/fs/fuse/connections
memory                                    0     0     0    - /sys/fs/cgroup/memory
mqueue                                    0     0     0    - /dev/mqueue
none                                      0     0     0    - /mnt/n22stab4/proc
none                                      0     0     0    - /mnt/n22unst4/proc
openrc                                    0     0     0    - /sys/fs/cgroup/openrc
proc                                      0     0     0    - /proc
rootfs                                 180G   37G  134G  22% /
securityfs                                0     0     0    - /sys/kernel/security
sysfs                                     0     0     0    - /sys
tmpfs                                  3.9G  1.6G  2.4G  39% /mnt/ramdisk
udev                                    10M  4.0K   10M   1% /dev
Of these, visually filtering out filesystem types that df hides by default and filtering out duplicates caused by bind mounting, I get an empty list. What entries do you think should be shown by a bare df that are missing?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Thu Jan 23, 2014 4:38 pm    Post subject: Reply with quote

If
Code:
/mnt/ramdisk/n22unst4_var_tmp_portage      3992     0      3992   0% /mnt/n22unst4/var/tmp/portage
is displayed by just "df -m" then I do miss
Code:
/mnt/ramdisk/n22stab4_var_tmp_portage  3.9G  1.6G  2.4G  39% /mnt/n22stab4/var/tmp/portage
[/code] too.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Fri Jan 24, 2014 2:03 am    Post subject: Reply with quote

Based on the utilizations, I think that /mnt/ramdisk/n22unst4_var_tmp_portage and /mnt/n22unst4/var/tmp/portage are bind mounts of the same filesystem. Am I wrong about that?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Fri Jan 24, 2014 4:45 pm    Post subject: Reply with quote

I chrooted into 2 different user mode linux images using this script : http://bpaste.net/show/171707/ So they are different file systems, or ?
Code:
tfoerste@n22 ~ $ ll ~/virtual/uml/
total 5843348
-rw-r--r-- 1 tfoerste users 2000000000 Jan 24 17:44 n22stab4
-rw-r--r-- 1 tfoerste users 2000000000 Jan 24 17:44 n22unst4
-rw-r--r-- 1 tfoerste users 2000000000 Jan 18 14:14 trinity
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Fri Jan 24, 2014 10:27 pm    Post subject: Reply with quote

That script is all bind mounts. A filesystem mounted in multiple places via bind mount is still just one filesystem. I assume, but didn't check, that df normally filters out such duplicates.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum