Friday, April 21, 2017

Linux: Why deleting files does not free space

You are in the middle of compiling your code and you see errors:
/disk/user1/platform_dev/odfl/driver/openwrt/staging_dir_arm_platform/bin/arm-unknown-linux-uclibcgnueabi-objcopy:/disk/user1/platform_dev/odfl/driver/base/build_platform/kmod/linuxmodule/stI4AuYi: No space left on device
make[5]: *** [/disk/user1/platform_dev/odfl/driver/base/build_platform/kmod/linuxmodule/handlerproxy.o] Error 1
make[5]: *** Waiting for unfinished jobs....

So this is just like old times. You run df -h and check if you are running at disk capacity.
I find that I am at 70% disk usage but still the make process is complaining.

I decide to be conservative and free up more space on the system.
Then I see something interesting. Despite doing the rm -Rf on a couple of big chunks of data,
I do not see the free space on my system going up. 

That gets me thinking why this might be happening. The reason is that the deletes I did were through screen. And, Linux will not free up any descriptors (Inodes) as long as they are being referred through some process.

So I ran the command
lsof | grep deleted

This command listed a buch of my recent deletes that had not gone through. I tried to manually do the cleanup by restarting the processes and killing the screen sessions. It was too much work so I ended up rebooting the machine instead.

This fixed the problem.


Canelo Golovkin said...

State of Origin
State of Origin Date
State of Origin 2017
State of Origin Game 1
State of Origin Live Stream
NBA Finals
NBA Finals Live
NBA Finals Schedule
NBA Finals 2017
Indy 500
Indy 500 TV Schedule
Indy 500 Starting Grid
2017 Indy 500 Live
Indy 500 Winners
Indy 500 Results
Indy 500 Live Stream
Cavs vs Warriors
Cavs vs Warriors Live

satyajit Bhowmik said...

NBA Finals Live
NBA Finals Live stream
NBA Finals
NBA Finals 2017
NBA Finals Schedule
NBA Finals 2017 Scores

Cavs vs Warriors
Cavs vs Warriors live stream
Cavs vs Warriors TV Schedule
Cavs vs Warriors Live
Cavs vs Warriors Scores
Cavs vs Warriors Game

NBA Playoffs
NBA Playoffs 2017
NBA Playoff Scores

satyajit Bhowmik said...

The US Open: You need to know the US Open Golf Championship will be the 117th US Open Golf 2017, US Open Schedule to be played June 15–18 at Erin Hills in Erin, Wisconsin, northwest of Milwaukee. For so many years, US Open Live everyone knew what to expect US Open Golf Live and US Open Live Stream. For the second time in three years, the 2017 US Open Golf is headed to a course that has never hosted a major. It will be the first US Golf Open in 25 years that doesn't have the names Tiger Woods or Phil Mickelson among the starting times US Golf Open 2017. Woods is missing all the majors for the second straight year because of a fourth back surgery, which was a month before his DUI arrest in Florida 2017 US Open Golf Live. Mickelson US Open Golf Live Stream, with a record six runner-up finishes in the only major he hasn't won, said he plans to skip because his daughter's high school graduation is the same day as the opening round. US Open TV Coverage and US Open 2017 Results

US Open Golf 2017
US Open Golf 2017 Live
US Open Golf 2017 Live Stream

US Open Championship
US Open Championship Live
US Open Championship 2017

ifohancroft said...

Another reason the script still dying with 'No space left on device' might be that the drive on which /tmp is, doesn't have enough free space (Happen to me, today at work).

All Time Free Enjoy said...

Mayweather vs McGregor

Mayweather vs McGregorLive

Mayweather vs McGregorLive Stream

McGregor vs Mayweather

McGregor vs Mayweather

Post a Comment