Disk Space lost mysteriously upon breaking a process.


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Disk Space lost mysteriously upon breaking a process.
# 1  
Old 04-15-2010
MySQL Disk Space lost mysteriously upon breaking a process.

Hi All,

Today when I was working on a script to generate custom wordlist. So I ran a script and the output was directed to /tmp.

The disk space was around 19 gb. While the script was running, I decided to direct the o/p file to my 1TB drive. So I broke the run using Ctrl + C.

Now when I use df -h, I find only 14 gb free disk space. I have searched for the o/p file everywhere on the disk but it's nowhere to be found. Even the /tmp size has not increased.

Could anyone please suggest how I can identify the lost space and recover it?

/Thanks
# 2  
Old 04-15-2010
Total space where? Where is it mounted?

If the file is being held open by anything, it will remain on disk until closed.

You can list all files modified n days ago or newer in /path by
Code:
find /path -mtime 2

# 3  
Old 04-15-2010
Quote:
Originally Posted by Corona688
Total space where? Where is it mounted?

If the file is being held open by anything, it will remain on disk until closed.

You can list all files modified n days ago or newer in /path by
Code:
find /path -mtime 2

hi Corona688,

I was running a script to create an output file in /tmp. No external mount was used.

I use the command
Code:
find /tmp -mtime 2

but there is no result.

I checked again n the input file is not being used by any other file or program.

/Thanks
# 4  
Old 04-15-2010
We have no idea what you did exactly or what the program does. However consider this.
1. program A opens a file
2. program A deletes the file while it is still open
3. file continues to exist until the last process holding it open exits.
4. This means that nobody can see or touch or read the file, but it lives on the disk

I am assuming Corona is trying to rule out this scenario. If it is ruled out then the disk space was used by other program(s) or processes.

To rule out the above scenario, reboot your box. If the space is still missing then your program cannot be the problem, since you cannot see the file with ls.

then try:
Code:
find /tmp -size +10000 -exec ls -l {} \;

# 5  
Old 04-17-2010
Hi Jim,

I rebooted the box and did df -h n here are the results

root@morningSun:/home/shine# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda7 18G 13G 4.4G 75% /
tmpfs 996M 0 996M 0% /lib/init/rw
varrun 996M 248K 996M 1% /var/run
varlock 996M 0 996M 0% /var/lock
udev 996M 2.8M 993M 1% /dev
tmpfs 996M 104K 996M 1% /dev/shm
lrm 996M 2.2M 994M 1% /lib/modules/2.6.27-17-generic/volatile
/dev/sdb1 299G 235G 64G 79% /media/FreeAgent Drive

It seems the space has just disappeared!

Last edited by morningSunshine; 04-17-2010 at 12:28 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Process holding /tmp space, need to know the process details

Hi , In a server /tmp has almost reached 75% and i can see the File system utilization is 48Mb only , so i believe some process is using the /tmp space. I would like to know which process is using /tmp space. # df -h /tmp Filesystem size used avail capacity Mounted on swap ... (9 Replies)
Discussion started by: chidori
9 Replies

2. Solaris

13 disk raidz2 pool lost

Hi guys, I appreciate any help in this regard, we have lost sensitive data in the company. One box with 2 disk mirrored and a 3ware controller handling 13 disks in a raidz2 pool. Suddenly the box restart and keeps "Reading ZFS config" for hours. Unplugging disk by disk we isolate the disk... (3 Replies)
Discussion started by: tatxo
3 Replies

3. Shell Programming and Scripting

awk: searching for non-breaking-space

This code shal search for the non-breaking space 0xA0 though it returns the error "fatal: attempt to use scalar 'nbs' as array" Can somebody help? awk --non-decimal-data -v nbs="0xA0" '{if($0 in nbs) {print FILENAME, NR}}' *.txt (1 Reply)
Discussion started by: sdf
1 Replies

4. Boot Loaders

Lost MBR on disk

trying to recover a lost partition table, where the signature (0x55AA) has been lost, though attempting to restore using a number of tools (fdisk, testdisk et al) the write fails. also the os is unable to read the disk geometry correctly, after attempting to correct the geometry, the updated... (2 Replies)
Discussion started by: xaphan
2 Replies

5. Shell Programming and Scripting

Breaking long lines into (characters, newline, space) groups

Hello, I am currently trying to edit an ldif file. The ldif specification states that a newline followed by a space indicates the subsequent line is a continuation of the line. So, in order to search and replace properly and edit the file, I open the file in textwrangler, search for "\r " and... (14 Replies)
Discussion started by: rowie718
14 Replies

6. AIX

Type of Logical Volume lost after vgexport/gvimport process

Hi, I have the next doubt about of lost of characteristic of LV in my original configuration # lsvg -l ifxvg ifxvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT aw64m_01 jfs 1 1 1 open/syncd N/A aw64m_02 jfs 1... (1 Reply)
Discussion started by: cerber0
1 Replies

7. UNIX for Dummies Questions & Answers

non-breaking space question

Might anyone know how to make a nbsp (160|0xA0) character? I am using a Dell Latitude D620 running Windows XP and then starting Exceed 9.0 defaulting to native window emulation for my X (us.kbf keymapping) (Latin-1 symbol set I believe) and calling an xterm (fontdefault, whatever that might be)... (1 Reply)
Discussion started by: runmeat6
1 Replies

8. Solaris

Solaris 10 - breaking of mirror and change new hard disk

Hi, am a newbie at solaris. Need advice and help on this. 1) How do I break the mirror between 2 hard disks. (wish to keep 1 good hard disk as backup) 2) After remove 1 hard disk and put in new hard disk, how do I initialise or fomat the new hard disk? 3) How do I put back the backup... (3 Replies)
Discussion started by: chongkls77
3 Replies

9. Solaris

Lost space on file system

Hi everybody, I got a problem on my SUN server in Solaris 9. I'll try to explain, if somebody could help me. I have mounted some volumes in RAID 0+1, that is stripped slices and then mirror. To be clear the result of metastat d80 is as follow : d80: Mirror Submirror 0: d81 State:... (2 Replies)
Discussion started by: aribault
2 Replies

10. UNIX for Dummies Questions & Answers

available disk space on disk device???

Hello, Can someone please tell me which command to use to determine the available disk space on a given disk device? I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be? Thanks in advance! Al. (4 Replies)
Discussion started by: alan
4 Replies
Login or Register to Ask a Question