LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-11-2011, 09:32 PM   #1
wpns
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Rep: Reputation: 0
Question To many files in unspecified directory?


I was having the same problem with a Centos 5.5 system, lots of free space, lots of free inodes, but "no space left on device' errors.

I had 30,000+ small files in one directory, deleting them seems to have solved the problem.

FWIW:

rm -rf /home/Movies/jpgs/*

doesn't work, 'argument list too long', so you have to do something like:

find /home/Movies/jpgs/ -name '*.jpg' -delete
 
Old 06-11-2011, 11:01 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by wpns View Post
I was having the same problem with a Centos 5.5 system, lots of free space, lots of free inodes, but "no space left on device' errors.

I had 30,000+ small files in one directory, deleting them seems to have solved the problem.

FWIW:

rm -rf /home/Movies/jpgs/*

doesn't work, 'argument list too long', so you have to do something like:

find /home/Movies/jpgs/ -name '*.jpg' -delete
Why would you do:
Code:
rm -rf /home/Movies/jpgs/*
when you could just delete the entire directory (then recreate it if you choose):
Code:
rm -r /home/Movies/jpgs
 
Old 06-11-2011, 11:44 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
To other posters, please be aware that this thread is over SEVEN YEARS OLD
 
Old 06-13-2011, 08:07 AM   #4
wpns
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Original Poster
Rep: Reputation: 0
I'm with Wim on this one, isn't it astounding that SEVEN years later, Linux still throws a "Disk Full" error when the failure condition is "To Many Files In Some Unspecified Directory"?

Oh, well, at least Google can still find this thread, and the fix still works.

LQ Wins again!
 
Old 06-13-2011, 08:54 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
It is pretty much true of any filesystem that a disk is considered (or reported as) "full" when any critical data structure runs out of space ... and yes, that can include an individual sub-directory. There will always be some amount of disk space which is set-aside for administrative purposes.

And, yes, this kind of message is always confusing. Even seven years later.
 
Old 06-13-2011, 09:00 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Extracted posts to a new thread.

@OP As other members have pointed out, please do not resurrect old threads. Easier to create a new thread with your problem.
 
Old 06-13-2011, 10:29 AM   #7
ssrameez
Member
 
Registered: Oct 2006
Location: bangalore
Distribution: Fedora, Ubuntu, Debian, Redhat
Posts: 82

Rep: Reputation: 6
Use the command "df -iP".
It will show whether the inode threshold has been reached.

Then rm command has a limit of accepting number of files. That is the reason it has given too many inputs error.
As andrewthomas mentioned, the best to remove the directory itself and then recreate the directory.
If the entire directory can't be removed, some filtering mechanism can be used.

rm *.jpg .. etc

if that also too large, I usually use a for loop mechanism.. But that is a weird one.. there might be some other better options.

for i in `ls *.jpg`
do
rm $i
done
 
Old 06-18-2011, 04:21 PM   #8
wpns
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Original Poster
Rep: Reputation: 0
OK, after working for a while, the problem is back:

# df -iP
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup00-LogVol00 37650432 82267 37568165 1% /
/dev/sda1 26104 80 26024 1% /boot
tmpfs 218890 1 218889 1% /dev/shm
/dev/md0 244203520 4023724 240179796 2% /mnt/raid

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
140G 139G 0 100% /
/dev/sda1 99M 25M 69M 27% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/md0 1.8T 867G 875G 50% /mnt/raid

and I'm getting errors while running my Perl scripts like:

Exception 450: Output file write error --- out of disk space? `/home/Movies/jpgs/P11246.jpg' @ error/jpeg.c/EmitMessage/235 at pool01.pl line 247.


Where the 'offending' lines in pool01.jpg is where I use ImageMagick to write another output file:

$status = $Image->Write($OFN);
warn "$status" if "$status";

Centos 5.5, Linux 2.6.18-194.3.1.el5PAE

/dev/md0 is the source of the images, and they are being written to /dev/sda1 at /home/Movies/jpgs if that helps.

Any thoughts as to what might be going wrong, and how I could fix it? I've checked /dev/sda1 a couple of times on boot with tune2fs, but that didn't help...

I don't think I'm leaving temporary files somewhere else that might be clogging up a different directory, could there be something else going on? Is there another error message that I find (or increase a logging level of) so that I could get a better idea of what I'm running out of?


Many Thanks In Advance!
 
Old 06-18-2011, 04:53 PM   #9
wpns
LQ Newbie
 
Registered: Nov 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Well, don't I feel stupid?

For some reason I thought that /dev/mapper/VolGroup00-LogVol00 was some virtual thing that was always full, as I seem to remember always seeing it full.

I'm clearing out over 100G of space on it now, and will probably end up moving the movies to the raid array.

Urg. Sorry about that...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Hangs After Unspecified Time Of Usage lupusarcanus General 6 12-18-2010 01:31 AM
FSpot: Unspecified Error; File Management Prefs does nothing... brianpbarnes Linux - Software 0 12-02-2010 10:57 AM
Regular expression to match unspecified number of characters until a '>' cygnal Linux - General 7 07-15-2010 12:21 PM
[SOLVED] mailx script using unspecified recipients danishgambit Linux - General 2 03-01-2010 07:46 AM
Unspecified number of arguments. ArthurHuang Programming 2 05-30-2006 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration