Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk full. Cant write 1

Status
Not open for further replies.

heyyunus

IS-IT--Management
Apr 11, 2006
121
US
Hi
I am facing a strange problem. My Redhat 9 system, all of a sudden saying Disk full, Cant write. I cant edit any file or create under / filesystem.

when i ran du -h -T command it is showing:
/dev/hda2 100%

I have deleted so many files&folders but still it is giving that 100% usage only. I ran fsck in the maintenance mode, It came out clean.

Can anyone help me in fixing this problem.

Thanks


-------
Yunus
 
You need to take a look at the output of 'mount' and conclude which folders are on that partition.

It is likely that you've been deleting from the wrong partition.

Also, keep in mind that ongoing processes will be logging to wherever they are assigned. As a result, you might be taking 2 steps fwd and one step back as you delete.

D.E.R. Management - IT Project Management Consulting
 
/tmp
/var/tmp


Those are two good starting points.
As thedaver said, check from where you are deleting.

"That time in Seattle... was a nightmare. I came out of it dead broke, without a house, without anything except a girlfriend and a knowledge of UNIX."
"Well, that's something," Avi says. "Normally those two are mutually exclusive."
-- Neal Stephenson, "Cryptonomicon"
 
One more point to consider:
In some cases the space of a deleted file will not be released as long as a process writing to it keeps running. So stop all unneeded processes. If you are in doubt, a reboot may help.
regards
 
I deleted some file from /var/log and the utilization came down.
But is thereany way of recovering files from a partition with ext3 file system.


-------
Yunus
 
What do you mean by 'recovering'? Undeleting? What was the 'some file' you deleted?
 
One main file i deleted from my home directory i want it back. Is there any way


-------
Yunus
 
There is no way I can think of to recover a file like that.

This may be a little after the fact, but one suggestion for your next install may be to create a small partition for /, then a larger separate partition for /var. I usually configure like this...
/ = 1GB
/var = 5-25GB (depends on how the machine is used. if using mysql, for example, I'd make /var larger).
/usr = 5-10GB
/swap = 2x physical memory
/home = everything else

Lately, I've been using /opt for a few items, but I've mounted a separate drive over that fs.

Good luck,
Mark
 
Thanks for the help


-------
Yunus
 
There are threads in this forum dealing with this - try a keyword search for undelete. Whether these were successful or not, I don't know. I take it you don't have a backup?
 
Exactly i dont have one, But is it so hard for Linux to have a tool that can recover/find a deleted file.


-------
Yunus
 
'Coroner' seems to be one, but I've never used it. I think you'll find that a good backup strategy should be part of any implementation, particularly a production one. Good luck.
 
If you need the data from your file, and not the file itself, it may be possible to get some or all of it. There are forensic tools, like EnCase that do just that for Law Enforcement officers all of the time. Generally it is very difficult to reconstruct the entire file, but 80% is often achievable. And that is frequently enough to ensure conviction.

Here is a RedHat reference to undeleting ext3 files:

Look at this link for some undelete tools:

Here is an open-source disk editor:

Don't get me wrong, this is definitely not easy, but almost anything is possible.

Try using dd to image the disk before you try any of this stuff. You can mount the dd image as if it were an actual disk, and modify that instead of screwing up your now operational disk.


pansophic
 
This is one reason I liked Novell for a server. It had a built in undelete that was easy to use, and even told you who deleted the file.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Is there anyway i can generate a filename based on Calendar for eg; If i say make files from 1oct2005 to 31oct2005, will any script/software can do that for me. I would like the file name in the following format:
Day_Month_Date_hh_min_ss_Year

hh=hour
min=minutes
ss=seconds

Eg: Mon_Jan_31_04_05_06_2007.

Please i need it desperately.



-------
Yunus
 
heyyunus:
You probably want to start a new thread with your question. I would never have seen it if I hadn't been reading this thread.



Just my 2¢

"In order to start solving a problem, one must first identify its owner." --Me
--Greg
 
Try this (just edit sourcefile and destfile).

Code:
#!/bin/bash

SRC=sourcefile
DEST=destfile
##############################

REALDEST=DEST_`date +%Y%m%d_%H%M`

echo REALDEST
mv SRC REALDEST
 
sorry, some mistakes.....

Code:
#!/bin/bash

SRC=sourcefile
DEST=destfile
##############################
REALDST="$DST"_`date +%Y%m%d_%H%M`
echo $REALDST
mv $SRC $REALDST

Tested and working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top