Description of problem: Command du does not display the size of /run under certain conditions. It seem to be linked to the given command line parameter order, if /var precedes /run. Version-Release number of selected component (if applicable): coreutils.x86_64 8.12-6.fc16 How reproducible: Always Steps to Reproduce: 1. Run the test following test script. Cases with missing /run printouts are marked with "echo Fail". #!/bin/bash -v du -s /usr /run /var echo OK du -s /usr /var /run echo Fail du -s /run /var /usr echo OK du -s /run /usr /var echo OK du -s /var /usr /run echo Fail du -s /var /run /usr echo Fail du -s /usr /run echo OK du -s /run /usr echo OK du -s /var /run echo Fail du -s /run /var echo OK Actual results: Output of the above test script. #!/bin/bash -v du -s /usr /run /var 4471196 /usr 49860 /run 1381428 /var echo OK OK du -s /usr /var /run 4471196 /usr 1431288 /var echo Fail Fail du -s /run /var /usr 49860 /run 1381428 /var 4471196 /usr echo OK OK du -s /run /usr /var 49860 /run 4471196 /usr 1381428 /var echo OK OK du -s /var /usr /run 1431288 /var 4471196 /usr echo Fail Fail du -s /var /run /usr 1431288 /var 4471196 /usr echo Fail Fail du -s /usr /run 4471196 /usr 49860 /run echo OK OK du -s /run /usr 49860 /run 4471196 /usr echo OK OK du -s /var /run 1431288 /var echo Fail Fail du -s /run /var 49860 /run 1381428 /var echo OK OK Expected results: The size of /run is (always) printed as requested. Additional info: Please let me know if you need something else. Thanks.
/run is symlink to /var/run in F16+ - systemd changes... therefore it probably doesn't like when /var is called afterwards - so maybe protection for counting duplicates. What does the du print as an error message? What is the error code? Could you please get strace of the "du -s /var /run" ? (This one should be sufficient, others are just modifications of this) I don't have F16 installation available at the moment, so I can't check that myself.
Ondrej, The machine is an F16 upgraded from F15 using preupgrade. The /run is a directory not a symlink: $ ll -d /var /run /var/run drwxr-xr-x. 34 root root 1180 Feb 25 13:06 /run drwxr-xr-x. 19 root root 4096 Dec 11 13:37 /var drwxr-xr-x. 34 root root 1180 Feb 25 13:06 /var/run $ mount | egrep 'var|run' tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,seclabel,mode=755) tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,seclabel,mode=755) tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,seclabel,mode=755) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) The strace will follow soon.
Created attachment 565756 [details] Output of: strace du -s /var /run > strace_du_var_run.log 2>&1
There is no error message. The return code ($?) is zero.
(In reply to comment #2) > $ mount | egrep 'var|run' > tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,seclabel,mode=755) > tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,seclabel,mode=755) It looks like there is a bind mount between /run and /var/run on your machine. du does not list a directory that was already included in a previous directory. There is a ticket at Austin Group for this issue: http://austingroupbugs.net/view.php?id=527 You can use the --count-links (-l) option as a workaround. *** This bug has been marked as a duplicate of bug 747075 ***