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

Re: Filesystem problem



On Wed, Oct 18, 2000 at 02:58:36PM +0200, Frederik (frederik@maui.kotnet.org) wrote:
> Hi,
> 
> I have a 20 GB HD, partitioned in several smaller parts, some vfat:
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/hda5              1035628    677468    305552  69% /
> /dev/hda11              909112    693236    169692  81% /home
> /dev/hda6              2063504   1247640    711044  64% /usr
> /dev/hda12             1296528   1099708    130956  90% /hana
> /dev/hda1              2096160   2026496     69664  97% /wailea
> /dev/hda7              2096160   1899840    196320  91% /paia
> /dev/hda8              5114684   4285368    829316  84% /makena
> /dev/hda9              5114684   4909000    205684  96% /lahaina
> 
> /dev/hda5       /               ext2    defaults,errors=remount-ro      01
> /dev/hda10      none            swap    sw                      0       0
> proc            /proc           proc    defaults                        00
> /dev/hda1 /wailea vfat defaults,uid=1000 0 0
> /dev/hda7 /paia vfat defaults,uid=1000 0 0
> /dev/hda8 /makena vfat defaults,uid=1000 0 0
> /dev/hda9 /lahaina vfat defaults,uid=1000 0 0
> /dev/hda11 /home ext2 rw                        0       2
> /dev/hda6 /usr ext2 rw                  0       2
> /dev/hda12 /hana ext2 rw 0 2
> 
> Problem is: on /wailea, according to df, I only have a little space
> left, although there should be almost half a GB free. This is a
> recurring problem on that partition: df only shows the right amount of
> free space after a while (it may take several hours). I don't know
> what's causing this delay, and I haven't noticed it on any other
> partition.
> 
> I am using Woody, kernel 2.2.17 with ide backport installed. I've
> tried sync, but that doesn't change anything.
> 
> Anyone an idea what might be going on, and how I should fix this
> problem? I don't think my system has been compromised, 'cause the free
> space was only created (by deleting a large file) seconds before I did
                          ^^^^^^^^^^^^^^^^^^^^^^^^
This is very likely your problem.

Are you sure that no process(es) had that file open and were reading
from or (worse) writing from it?  What file was it?

In general, you want to first trim, then delete, runaway files.  You do
this by:

    $ cat /dev/null > runawayfile
    $ fuser runawayfile
    # optional - kill the process if it exists
    $ rm runawayfile

Once you delete the file, you've lost access to most convenient ways of
accessing it, *but you haven't deallocated the data on disk if the file
is still held open by another process*.

To find the open process, try running 'lsof'.  In your case:

    $ lsof /dev/hda1

Following shows me creating a large file, finding it open, deleting the
filehandle, and showing that the file is still open and being written
to.  Note the "(deleted)" marker next to the deleted (but still open)
file.

[karsten@navel:karsten]$ dd if=/dev/zero of=test &
[1] 20272
[karsten@navel:karsten]$ sudo /usr/sbin/lsof /dev/hda2
COMMAND   PID    USER   FD   TYPE DEVICE     SIZE  NODE NAME
bash    19573 karsten  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
dd      20272 karsten  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
dd      20272 karsten    1w   REG    3,2 27353600 80192 /mnt/misc1/karsten/test
lsof    20274    root  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
lsof    20275    root  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
[karsten@navel:karsten]$ rm test
[karsten@navel:karsten]$ sudo /usr/sbin/lsof /dev/hda2
kill %1COMMAND   PID    USER   FD   TYPE DEVICE     SIZE  NODE NAME
bash    19573 karsten  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
dd      20272 karsten  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
dd      20272 karsten    1w   REG    3,2 75658240 80192 /mnt/misc1/karsten/test (deleted)
lsof    20277    root  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
lsof    20278    root  cwd    DIR    3,2     4096 80161 /mnt/misc1/karsten
[karsten@navel:karsten]$ kill %1

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Opensales, Inc.                    http://www.opensales.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0

Attachment: pgpqX9Zm8p6HU.pgp
Description: PGP signature


Reply to: