Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix problem - Urgent help required

Re: Unix problem - Urgent help required

From: <bsilverio_at_necc.mass.edu>
Date: Sun, 5 Nov 2000 20:42:24 -0500 (EST)
Message-Id: <10671.121163@fatcity.com>


A move is a copy followed by an unlink of the original file. If a process was still writing to the original file the blocks would NOT be released. The space is only released when the link count drops to zero. When a process opens a file the link count is increased by 1. If the writing process was still running then there will be inodes and file system blocks still chained together but NOT linked to a directory. The are "lost". Fixing this is what fsck was written for.

I suggest the following:

1.	run fsck manually make some notes about what questions it asks
	you.
2.	mount the filesystem
3.	cd to /problem.filesystem/lost+found and look around.  There will
	be files
	there with names that are numbers.  The file names are the inode
	numbers 
	that fsck turned up while it was rooting through the disk.
4.	LOOK AT THE FILE CONTENTS AND SEE IF YOU CAN FIGURE OUT WHAT IT
	IS!
	I can't emphasize this enougn.  Without this postmortem you can be 
	assured that the problem will be back.
5.	Compress the files and copy them off somewhere for future use.
6.	remove the files in lost+found

You should now have your space back.

In these types of situations NEVER remove the files. If a process has them open for writing the space will not be returned AND you will no longer have any way to access the file contents. When I run into this, I look at the file contents to see what is causing the problem and then free up the space by >/the/file/lives/here
This truncates the file to zero bytes. You can do the same with cp /dev/null /the/file/lives/here
but that takes more keystrokes.
Once you have the space back, you can find and kill the process that is causing the problem.

And, BTW, once the process writes the next block, the file will show in an ls as still being very large. This is because it is now a "sparse file". ls shows the largest address you can seek to, not the total of all data blocks.

Brian

On Sat, 4 Nov 2000 RanganathK_at_lgcommerznow.com wrote:

> Dear all,
>
> I have a problem On Sun Solaris 2.6. One of my filesystems/partitions
> was showing as 100% full. So I moved some of the directories and files to
> the other partition. Then also this filesystem was showing as 100% full.
> So I thought that may be by shutting down and restarting the machine the
> filesystem will show some free space. But after shutting down and
> restarting the machine I observed this particular filesystem is not
> mounting and it was booting in single user mode and asking me to run fsck
> as the filesystem is inconsistent. But even after running fsck I observed
> that the filesystem was not mounting. Can anyone help me in getting the
> filesystem mounted. Any help in this regard will be very much appreciated.
>
> TIA,
>
> Ranganath
>
>
> --------
> Think you know someone who can answer the above question? Forward it to them!
> to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com
> to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
Received on Sun Nov 05 2000 - 19:42:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US