Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jan 2005 22:10:39 -0600
From:      David Kelly <dkelly@HiWAAY.net>
To:        Gregor Mosheh <stigmata_blackangel@yahoo.com>
Cc:        FreeBSD_Questions FreeBSD_Questions <freebsd-questions@freebsd.org>
Subject:   Re: 4.8 - / out of space
Message-ID:  <97E8FBEA-5E06-11D9-BC68-000393BB56F2@HiWAAY.net>
In-Reply-To: <20050104010723.34785.qmail@web53801.mail.yahoo.com>
References:  <20050104010723.34785.qmail@web53801.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jan 3, 2005, at 7:07 PM, Gregor Mosheh wrote:

> --- David Kelly <dkelly@HiWAAY.net> wrote:
>
>> Another goof is for root to "write" to an unmounted filesystem.
>> Later when the filesystem is mounted the written files are hidden
>> yet still consume space on the fs containing the mount point
>> (usually /).
>
> Could you explain how this happens (or point me to a doc)? Do you
> mean something like "tar cvf /dev/ad0s1a"?

Guessing you quoted the wrong paragraph for the question.

As for tar, yes, "tar -cvf /dev/baddevicename myfiles" will happily 
create a file (not device) named /dev/baddevicename and write the 
contents of myfiles into it. Iff you have write permission on /dev/. 
Its no different than "tar -cvf myfiles.tar myfiles" other than you 
tried to hit a device but created a file instead.

As for what I was writing about consider the case where one is running 
single user and /usr is not yet mounted. A directory named /usr exists. 
Nothing is preventing root from writing in the /usr directory. This 
will consume space on / but no longer exist in file namespace once a 
filesystem is mounted on top of the /usr directory. Files are still 
there but you can't get to them.

> Does that cause fs corruption? Would fsck reclaim that space?

No corruption. Fsck is perfectly happy with it and won't change a 
thing. The stuff hidden under the mount point is still there. The only 
way to get at it is to umount the fs on top and then the previous 
contents of /usr reappear. Assuming of course that /usr actually had 
files underneath.

Go read the manpage for mount. Search for "union". Its talking about 
the same thing as above only a union mount appends the underlying 
namespace at the end of the mounted filesystem's namespace. Without 
"union" the underlying namespace is unreachable.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97E8FBEA-5E06-11D9-BC68-000393BB56F2>