Bug 16819 - df does not list all mounted nfs partitions.
Summary: df does not list all mounted nfs partitions.
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thomas Backlund
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-24 07:02 CEST by w unruh
Modified: 2018-10-06 12:56 CEST (History)
2 users (show)

See Also:
Source RPM: coreutils-8.23-6.mga5
CVE:
Status comment:


Attachments

Description w unruh 2015-09-24 07:02:37 CEST
Description of problem:

I have a machine which mounts a number of directories from a remote nfs fileserver. If I run df, not all of the mounts are listed. 

>df
Filesystem             1K-blocks      Used Available Use% Mounted on
devtmpfs                  499220         0    499220   0% /dev
tmpfs                     505784      1252    504532   1% /dev/shm
tmpfs                     505784       644    505140   1% /run
/dev/sdb1               24780864  10043444  13455568  43% /
tmpfs                     505784         0    505784   0% /sys/fs/cgroup
tmpfs                     505784      1292    504492   1% /tmp
tmpfs                     101160        12    101148   1% /run/user/1000
/dev/sda1               18463832  14808784   2694096  85% /mga3
/dev/sda7              497800000 391704680  80785460  83% /alt
/dev/sda6              440746092     71808 418262572   1% /local
/dev/sdb7              427084232     71880 405294632   1% /spare
info:/local/usershome  706634112 188874752 481841280  29% /disk11/home
info:/local/usrlocal   706634112 188874752 481841280  29% /usr/local
info:/var/spool/mail      991616    333312    607104  36% /var/spool/mail
/dev/mapper/crypt_sdb6 504313700 370250504 108422512  78% /backup

Note the three nfs mounted from info:

If I run mount, I see for those files mounted from info
info:/local/unruhhome on /disk9/home type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=142.103.234.23,mountvers=3,mountport=41414,mountproto=udp,local_lock=none,addr=142.103.234.23)
info:/local/usrlocal on /usr/local type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=142.103.234.24,local_lock=none,addr=142.103.234.23)
info:/var/spool/mail on /var/spool/mail type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=142.103.234.24,local_lock=none,addr=142.103.234.23)
info:/local/usershome on /disk11/home type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=142.103.234.23,mountvers=3,mountport=41414,mountproto=udp,local_lock=none,addr=142.103.234.23)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)


Note the extra directory mounted on /disk9/home which is not listed in the output of df.

Happens Always although which of the two (disk11 or disk9) which is not listed varies depending on which got mounted last. 





Reproducible: 

Steps to Reproduce:
Comment 1 Yann Cantin 2015-09-25 18:39:28 CEST
What is the output of df -a ?

If it's correct, maybe this is related to these br :

Fedora : https://bugzilla.redhat.com/show_bug.cgi?id=920806
debian : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737399

In short : de-duplication done to the list of mounted dir hide some path.

Fedora moved to 8.24, Debian patch 8.23 :
https://sources.debian.net/src/coreutils/8.23-4/debian/patches/31_df_remote_dupes.dpatch/

CC: (none) => yann.cantin

Comment 2 w unruh 2015-09-25 19:45:14 CEST
It probably is that bug
Here is the nfs part of df -a
info:/local/unruhhome          -         -         -    - /disk9/home
info:/local/usrlocal   706634112 188876288 481839872  29% /usr/local
info:/var/spool/mail      991616    336768    603648  36% /var/spool/mail
info:/local/usershome  706634112 188876288 481839872  29% /disk11/home
gvfsd-fuse                     0         0         0    - /run/user/1000/gvfs
fusectl                        0         0         0    - /sys/fs/fuse/connections
/dev/mapper/crypt_sdb6 504313700 358114456 120558560  75% /backup

Note that both /disk9/home and /disk11/home are listed here, but only one of them is listed in df. 
Both are subdirectories of the same  partition on info. (I do not want to mount the whole partition via nfs).

Reading the Fedora screed, I would just point out that one of the purposes of using
df is to see if filesystems that were supposed to be mounted actually are mounted. 
The whole philosophy of the Linux filesystem tree is that of a flat filesystem. You should not need to know where disk memory came from to use it (Windows C: D: etc) 
But that also means you really have no idea from the filesystem whether or not something got mounted, or there was some problem. df gives that. 

df -a is pretty useless as it pours out far too much data with the new systemd structure (eg all the cgroup entries etc) Thus in my case I have 4 nfs mounts, and 6 local mounts and 7 temporary memory mounts (tmpfs,proc, etc) . My df -a has 39 lines, which hides the information in a forest of information. 

So, yes, putting a patch into Mageia 5 or moving to coreutils 8.24 would be a good idea.
Comment 3 Samuel Verschelde 2015-09-28 08:57:04 CEST
Assigning to coreutils maintainer for opinion.

Assignee: bugsquad => tmb

Comment 4 Marja Van Waes 2018-04-14 12:31:10 CEST
Thank you for having taken the needed time to report this issue!

Did this bug get fixed? If so, please change it's status to RESOLVED - FIXED

If it didn't, then we regret that we weren't able to fix it in Mageia 5. Mageia 5 has officially reached its End of Life on December 31st, 2017 https://blog.mageia.org/en/2017/11/07/mageia-5-eol-postponed/
It only continued to get important security updates since then, because we are waiting for a big Plasma5 update in Mageia 6, that'll fix many of the Mageia 5 => 6 upgrade issues.

We have coreutils 8.25 in Mageia 6, which shouldn't suffer from this bug. However, please say so if I'm wrong and you still see it! In that case, please change the Version (near the top of this report, at the left) to "6".

Thanks,
Marja

CC: (none) => marja11

Comment 5 Marja Van Waes 2018-10-06 12:56:40 CEST
No reply, so closing as OLD

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.