Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Deleting Big files don't free space (AiX 414)

1,101 views
Skip to first unread message

Allaoua BOUABDALLAH

unread,
Jun 24, 1997, 3:00:00 AM6/24/97
to


That's what happen to me several times. I deleted big files of an
Oracle database but AiX don't give me back the freed space until
I umount/mount the filesystem.

Any idea ?

______________________________________________________________________
Allaoua BOUABDALLAH Email: al...@concept.fr
CONCEPT SA - 52, rue Marcel Dassault - 92514 Boulogne Billancourt
TEL: 01 46 09 33 98 FAX: 01 46 09 32 74 http://www.concept.fr


David Boone

unread,
Jun 24, 1997, 3:00:00 AM6/24/97
to

> That's what happen to me several times. I deleted big files of an
> Oracle database but AiX don't give me back the freed space until
> I umount/mount the filesystem.
>
> Any idea ?

If I understand this correctly about UNIX...
If a process has that file open, then the disk space is not freed by the
deletion of the file until the process is finished with it. Probably
Oracle has the file opened and a refresh of the Oracle daemons would
free the disk space.

David Boone


Burleigh

unread,
Jun 24, 1997, 3:00:00 AM6/24/97
to

That is correct. If you delete a file that is currently being accessed
by a process, the file will be gone from the listing, but the space will
not show free until the process has been ended (or killed).

Burleigh

Jesper James Jensen

unread,
Jun 24, 1997, 3:00:00 AM6/24/97
to Allaoua BOUABDALLAH

Allaoua BOUABDALLAH wrote:
>
> That's what happen to me several times. I deleted big files of an
> Oracle database but AiX don't give me back the freed space until
> I umount/mount the filesystem.
>
> Any idea ?
>

Hi,

People suggested to look at open files with 'fuser' or 'lsof' But in my
case i found no processes holding the file (5GB) before it was deleted.
And the space could not be reclaimed. This is under AIX 4.2.0

best regards,
Jesper James

________________________________________________________________________
_____________
Jesper James Jensen | | phone: +45 35 26 60 11
ODEGAARD A/S | /\ | fax: +45 35 26 50 18
1, Kroghsgade |__/ \ /\___| e-mail: j...@oedan.dk
DK-2100 Copenhagen | \/ | homepage:
www.oedegaard.com
Denmark |_____________|
________________________________________________________________________

Scott Overby

unread,
Jun 25, 1997, 3:00:00 AM6/25/97
to

In article <33AFD08A...@bnr.ca>, dlb...@bnr.ca says...

>
>> That's what happen to me several times. I deleted big files of an
>> Oracle database but AiX don't give me back the freed space until
>> I umount/mount the filesystem.
>>
>> Any idea ?
>
>If I understand this correctly about UNIX...
>If a process has that file open, then the disk space is not freed by the
>deletion of the file until the process is finished with it. Probably
>Oracle has the file opened and a refresh of the Oracle daemons would
>free the disk space.
>

I experienced a similar situation in which I was the only user and
my SQL*PLUS session must have had an open on the datafile(I offlined the
tablespace and blew it away). I exited SQL*PLUS and the space was
freed up.

I am surprised that you could unmount the filesystem with an open file
in it.


--
==========================================================================
Scott Overby E-mail scott....@sdsdata.com
Sr. Systems Analyst
Strategic Data Systems FAX (414) 459-9123
615 Penn Ave.
Sheboygan, WI 53082
===========================================================================


Kevin Gee

unread,
Jun 25, 1997, 3:00:00 AM6/25/97
to

Jesper James Jensen wrote:

>
> Allaoua BOUABDALLAH wrote:
> >
> > That's what happen to me several times. I deleted big files of an
> > Oracle database but AiX don't give me back the freed space until
> > I umount/mount the filesystem.
> >
> > Any idea ?
> >
>
> Hi,
>
> People suggested to look at open files with 'fuser' or 'lsof' But in my
> case i found no processes holding the file (5GB) before it was deleted.
> And the space could not be reclaimed. This is under AIX 4.2.0

Then there is still something running on that file system, not
detectable by either lsof or fuser. I can't speak for lsof, but
fuser was designed specifically to report PIDs that have open
processes - not kernel extensions, streams, device drivers, etc.
Is this a limitation with fuser? Sure.


--
Kevin Gee
Kernel/LVM/Filesystem/Boot Support - AIX Supportline
IBM is only responsible for the opinions for which they pay me.
I can only guarantee responses given in a work context.

Kevin Gee

unread,
Jun 25, 1997, 3:00:00 AM6/25/97
to

Scott Overby wrote:
>
> In article <33AFD08A...@bnr.ca>, dlb...@bnr.ca says...
> >
> >> That's what happen to me several times. I deleted big files of an
> >> Oracle database but AiX don't give me back the freed space until
> >> I umount/mount the filesystem.
> >>
> >> Any idea ?
> >
> >If I understand this correctly about UNIX...
> >If a process has that file open, then the disk space is not freed by the
> >deletion of the file until the process is finished with it. Probably
> >Oracle has the file opened and a refresh of the Oracle daemons would
> >free the disk space.
> >
>
> I experienced a similar situation in which I was the only user and
> my SQL*PLUS session must have had an open on the datafile(I offlined the
> tablespace and blew it away). I exited SQL*PLUS and the space was
> freed up.
>
> I am surprised that you could unmount the filesystem with an open file
> in it.

You can't unmount a file system until no files are in use. Period.
Any behavior to the contrary indicates a serious problem.

Ade Barkah

unread,
Jun 26, 1997, 3:00:00 AM6/26/97
to

Kevin Gee (ge...@interlock.dfw.ibm.com) wrote:
: You can't unmount a file system until no files are in use. Period.

: Any behavior to the contrary indicates a serious problem.

Really ? Many versions of Unix allow unmounting of a file system
even while it is busy.

From *BSD "umount":

| -f The file system is forcibly unmounted. Active special
| devices continue to work, but all other files return
| errors if further accesses are attempted. ...

Does AIX not have a similar feature ?

Regards,

-Ade
--------------------------------------------------------------------
Inet: mba...@hemi.com - HEMISPHERE ONLINE - www: <http://hemi.com/>
--------------------------------------------------------------------

Kevin Gee

unread,
Jun 26, 1997, 3:00:00 AM6/26/97
to

Ade Barkah wrote:
>
> Kevin Gee (ge...@interlock.dfw.ibm.com) wrote:
> : You can't unmount a file system until no files are in use. Period.
> : Any behavior to the contrary indicates a serious problem.

I should change that to "AIX file system". If you try to unmount
a file system that is busy in any way, you will get "file system
busy" errors.

> Really ? Many versions of Unix allow unmounting of a file system
> even while it is busy.

--

Scott L. Fields

unread,
Jun 27, 1997, 3:00:00 AM6/27/97
to

Kevin Gee wrote:

> Ade Barkah wrote:
> >
> > Kevin Gee (ge...@interlock.dfw.ibm.com) wrote:
> > : You can't unmount a file system until no files are in use.
> Period.
> > : Any behavior to the contrary indicates a serious problem.
>
> I should change that to "AIX file system". If you try to unmount
> a file system that is busy in any way, you will get "file system
> busy" errors.
>
> > Really ? Many versions of Unix allow unmounting of a file system
> > even while it is busy.

This probably needs to be clarified more. JFS and CDRFS filesystems
cannot be
unmounted if there are active references. You DO have the "forced" flag
for unmounting,
but it generally only works for NFS filesystems.


Jesper James Jensen

unread,
Jun 30, 1997, 3:00:00 AM6/30/97
to Kevin Gee

Kevin Gee wrote:
>
> > Hi,
> >
> > People suggested to look at open files with 'fuser' or 'lsof' But in my
> > case i found no processes holding the file (5GB) before it was deleted.
> > And the space could not be reclaimed. This is under AIX 4.2.0
>
> Then there is still something running on that file system, not
> detectable by either lsof or fuser. I can't speak for lsof, but
> fuser was designed specifically to report PIDs that have open
> processes - not kernel extensions, streams, device drivers, etc.
> Is this a limitation with fuser? Sure.

Hi,

Yes something is/was running, because the filesystem could not be
unmounted properly(!) when rebooting the machine. When booting the next
time, the system replayed the log for the discs in question and the
space was free'd.

Best regards,
Jesper James

--

Kevin Gee

unread,
Jun 30, 1997, 3:00:00 AM6/30/97
to Jesper James Jensen

Jesper James Jensen wrote:
>
> Kevin Gee wrote:
> >
> > > Hi,
> > >
> > > People suggested to look at open files with 'fuser' or 'lsof' But in my
> > > case i found no processes holding the file (5GB) before it was deleted.
> > > And the space could not be reclaimed. This is under AIX 4.2.0
> >
> > Then there is still something running on that file system, not
> > detectable by either lsof or fuser. I can't speak for lsof, but
> > fuser was designed specifically to report PIDs that have open
> > processes - not kernel extensions, streams, device drivers, etc.
> > Is this a limitation with fuser? Sure.
>
> Hi,
>
> Yes something is/was running, because the filesystem could not be
> unmounted properly(!) when rebooting the machine. When booting the next
> time, the system replayed the log for the discs in question and the
> space was free'd.


Thanks for agreeing with me. What applications run on this particular
file system? Obviously, there is STILL some open reference in this file
system that lsof/fuser isn't reporting. You can try running
"slibclean", but other than that, try to see if this only happens with
certain applications that run (I've seen this happen today, in fact,
with a file system called /usr/lpp/newviewdm. Guess what's running
on this file system?).

Jesper James Jensen

unread,
Jul 1, 1997, 3:00:00 AM7/1/97
to Kevin Gee

Kevin Gee wrote:
>
> Thanks for agreeing with me. What applications run on this particular
> file system? Obviously, there is STILL some open reference in this file
> system that lsof/fuser isn't reporting. You can try running
> "slibclean", but other than that, try to see if this only happens with
> certain applications that run (I've seen this happen today, in fact,
> with a file system called /usr/lpp/newviewdm. Guess what's running
> on this file system?).

Hi,

The applications we run on these big files (seismic data) is purely
homegrown applications (fortran, C, C++) for manipulating them in
different ways. Most of the time the file is laying around for a while
before it's deleted. One time the cause of the problem was clear - the
application core'd because it ran out of disc space(!) The files
(temporary+result) dissapeared, but i could not reclaim the space?? One
thing is that a program core's - but that should not mess up a
filesystem.

---

Gilbert Ramirez

unread,
Jul 10, 1997, 3:00:00 AM7/10/97
to

Scott Overby <scott....@sdsdata.com> wrote:
> In article <33AFD08A...@bnr.ca>, dlb...@bnr.ca says...
> >
> >> That's what happen to me several times. I deleted big files of an
> >> Oracle database but AiX don't give me back the freed space until
> >> I umount/mount the filesystem.
> >>
> >> Any idea ?
> >
> >If I understand this correctly about UNIX...
> >If a process has that file open, then the disk space is not freed by the
> >deletion of the file until the process is finished with it. Probably
> >Oracle has the file opened and a refresh of the Oracle daemons would
> >free the disk space.
> >

Yes. Using 'rm' merely unlinks that reference to the file. There could be
another [hard] link to that file, or another process can have it open. If
you want to remove the space used by that file while another process has it
open, you can truncate it:

cat /dev/null > the_file


--gilbert
--
_______________________________________________________________________
Gilbert Ramirez Jr. gr...@merece.uthscsa.edu
University of Texas http://merece.uthscsa.edu/gram/
Health Science Center at San Antonio University Health System

Ja Rasta (Remove the -SPAM to reply)

unread,
Jul 10, 1997, 3:00:00 AM7/10/97
to

Gilbert Ramirez <gr...@lucy.uhscis> wrote:

I have noticed this also. If you've already deleted the file, can you
just touch a file of the same name in the same directory to free the
space?

Tom


Kevin Gee

unread,
Jul 11, 1997, 3:00:00 AM7/11/97
to

> I have noticed this also. If you've already deleted the file, can you
> just touch a file of the same name in the same directory to free the
> space?

The name doesn't really matter. The inode usually has a non-zero
reference count.

0 new messages