[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Upgrade Problem



Roberto C  Sánchez wrote:
...
> It might also indicate files that exist (i.e., occupy blocks) without
> having directory entries.  For example, this is the case when a program
> creates a temporary file, gets the descritor back from the syscall, then
> immediatley calls unlink on it.  The file descriptor is still active and
> the file can be written/read with the descriptor reference, but the file
> cannot be seen with 'ls' and, as I recall, it will not show up in the
> calculation made by 'du'.  The calculation made by 'df' will still be
> accurate, though.
>
> So, you might ask yourself, why would a program create a file only to
> immediately unlink it?  Well, it happen that if the program terminates
> abnormally (i.e,. crashes), the disappearance of the reference to the
> file descriptor when the kernel cleans up the process table also causes
> it to free the associated blocks.  The same thing happens in a normal
> program termination, but in the abnormal case you have no guarantee that
> any clean up code will run.
>
> As it happens, this is a great practical interview question for a system
> administrator.  Give them a machine where 'df' reports no free space but
> 'du' says it is not all used up and see if they know why that might be
> the case and how to resolve it.

  wouldn't fsck clean that up?

  if it might be potential useful information you were missing
and wanted to get back you could copy the entire partition and
then run a recovery/forensics program on it to see what it all
was.


  songbird


Reply to: