1848593 Members
5781 Online
104033 Solutions
New Discussion

about filesystem

 
itkennyw
Occasional Contributor

about filesystem

expert,
there is a filesystem in my system,after i copy a 5GB file to it ,i type "bdf",i can see the used byte 5GB,but after i delete the file from the filesystem, the result of "bdf" also show the used byte 5GB.after umount and mount the filesystem ,i can see the normal value.
i meet this situation several times,so i recreate the lv, but the problem still exist.
how can i do.
KENNY
5 REPLIES 5
Michael Tully
Honored Contributor

Re: about filesystem

Is the process that creates the file still active when you try to remove it ?
Anyone for a Mutiny ?
U.SivaKumar_2
Honored Contributor

Re: about filesystem

hi,
I think is a common problem . Try this after deleting the 5GB file.
#fuser -u /yourdirectory
Some process might be accesing that
#fuser -ku /yourdriectory
Now
#cd yourdirectory
#ll -R
#bdf

regards,
U.SivaKumar
Innovations are made when conventions are broken
S.K. Chan
Honored Contributor

Re: about filesystem

It's not unusual for "bdf" to immediately show the update, especially true if the process that reserved that space is still active. In your case if it is just normal file then I would say "bdf" will eventually show the available space, you just have to wait a bit longer.
I would recommend use "du" to check the filesystem space, because that will be reflected immediately. Another "experiment" you acn try is instead of removing the file, try "zeroing" it .. like so ..

# >yourfile
# rm yourfile

which will make the size zero and now try the "bdf" again. It should reflect the available space immediately.

Sridhar Bhaskarla
Honored Contributor

Re: about filesystem

Two possibilities.

1. It may be used by processes so that it is still opened though you don't see it in which case you can use SivaKumar's method.

2. Depending on your file system mount options, the change may not be immediately visible. Wait for a couple of minutes and then see after rm is returned.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try