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

Re: which files took the space



On Fri 04 Mar 2016 at 07:18:59 (+0300), Adam Wilson wrote:
> On Fri, 4 Mar 2016 04:03:01 +1100 Andrew McGlashan
> <andrew.mcglashan@affinityvision.com.au> wrote:
> 
> > On 4/03/2016 3:07 AM, Adam Wilson wrote:
> > > On Fri, 4 Mar 2016 03:03:53 +1100 Andrew McGlashan
> > > <andrew.mcglashan@affinityvision.com.au> wrote:
> > >> It also may have been files in the file system, but where another
> > >> file system mount hides them....
> > > 
> > > What does this mean? Mounts overlapping and hiding other mounts?
> > > 
> > > Explain, please.
> > 
> > Yes, this is more likely to happen to the root file system.
> > 
> > Say you have a bunch of files in /boot, but for some reason you have a
> > /boot partition that wasn't mounted when those files were created ....
> > then you mount the /normal/ boot partition over it and now the other
> > files are now hidden from view, but still taking up space.
> 
> So you're talking about creating files in an unmounted partition, and
> then mounting it, but since file addition happened when the FS was
> still in an unmounted state, the new files weren't written to the
> journal?
> 
> Surely in that case the new files would simply not be registered and
> act as free space (as if they had been deleted)?

No, the other way around. (You can't create files on an unmounted filesystem.)

1. A directory contains some files.
2. You mount a filesystem onto that directory. (You obviously don't
   realise that this, while unusual, is a perfectly well-defined
   operation. †)
3. The directory now contains the top-level files in the filesystem.
   The files that were in the directory before are inaccessible,
   hidden under the mounted filesystem.
4. You unmount the filesystem. Now you can see the original files again.

While the files are hidden, they still occupy the space.

† Take a look at the first three paragraphs of   man mount.

Cheers,
David.


Reply to: