[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] A simple "du /" question
From: |
Bob Proulx |
Subject: |
Re: [coreutils] A simple "du /" question |
Date: |
Thu, 14 Aug 2008 18:28:41 -0600 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Michel Briand wrote:
> this may not be a bug. Please pardon for any annoyance, but this
> question is not visibly treated in FAQ.
>
> I wonder why, when I use "du /" (as root), it reports errors like this:
Look at the documentation for the 'du -x' option. I think you will
want it in your context.
> du: cannot access `./proc/4607': No such file or directory
The /proc filesystem is a dynamically changing one that reports on the
state of the system. Processes start and stop. At the time that du
read the directory the process 4607 existed and so did a directory
there but before du could read the directory the process exited and so
disappeared from the filesystem. Arguably du could ignore this type
of issue. 'find' will do so with "-ignore_readdir_race" .
> du: cannot access `./<nfsroot>/<somehost>/<somedir>': No such file or
> directory
Same thing. The file has disappeared between reading the directory
and trying to stat the file.
Also since you are running as root and this is over NFS then you may
see permission problems. By default root does not have superuser
access over NFS. By default root is the nobody user over NFS as a
security issue.
When NFS is present it isn't a good idea to walk every filesystem from
the root down. That will also scan through all of the nfs mounted
filesystems. If that is what you want to do that is fine but usually
that isn't what was intended and can negatively affect the networked
collection of systems.
> I have automount started and /<nfsroot> is my NFS access to other hosts:
>
> automount(pid3579) on /<nfsroot> type autofs
> (rw,fd=4,pgrp=3579,minproto=2,maxproto=4)
The "root_squash" option is an NFS server option outside the control
of the NFS client.
Try using 'du -x /'. You may also want to 'du --exclude=PATH' some
paths.
Bob