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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum number of files in a single partition

Status
Not open for further replies.

NiceButDim

Programmer
Feb 12, 2002
154
0
0
GB
Hi
I am experiencing a problem due to having a very large number of files in a single partition which I hope someone might be able to help me with.

I have been migrating an old badly written application from a Unix box to a Linux box. In total, the application has around 470,000 files in its partition on the Unix box. When I attempted to transferred these files to the Linux machine I eventually encountered the following message
“no space left on device”

There is over 4 gigs of disk space left on the partition. Deleting a single file allowed me to create a single file, but no more. I realised that the problem was that I had too many files.

Is this a known problem? And is there a setting somewhere that sets a limit on the number of file?

Thanks


john.
 
It could very well be that you have run into the limits of the filesystem. But without knowing which filesystem you're running it's difficult to say for sure.

This Wikipedia article on Linux' ext3 filesystem reads in part:

The maximum number of inodes (and hence the maximum number of files and directories) is set when the file system is created. If V is the volume size in bytes, then the default number of inodes is given by V/2^13 (or the number of blocks, whichever is less), and the minimum by V/2^23. The default was deemed sufficient for most applications.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Thanks for the reply.
The bad news for me is that it appears that the only way to increase the number of inodes is to re-format the partiton.
Thanks again

john.
 
Not necessarily. You could create a new partition (or install a new disk) and mount it temporarily at /mnt/hdb1 (or another temporary location).

Copy data from /application to /mnt/hdb1.

Change /etc/fstab to mount /dev/hdb1 to /application.

When you reboot, you will have all of your files in the /application directory and as many inodes as the space on /dev/hdb1 allows.


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top