LinuxQuestions.org
Review your favorite Linux distribution.
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 11-06-2011, 08:08 AM   #1
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 364

Rep: Reputation: 38
Did I hit the max inode limit?


Had some fun testing the limits of Linux filesystem (All non-pseudo partitions are ext4). Here is what is did, separated into sections of code for easier interpretation:

Code:
[root@scarecrow mystuffz]# mkdir -p /tmp/mystuffz
[root@scarecrow mystuffz]# cd /tmp/mystuffz
[root@scarecrow mystuffz]# for i in $(seq 1 3000000); do touch file$i.{txt,dat,log}; done
touch: cannot touch `file217120.txt': No space left on device
touch: cannot touch `file217120.dat': No space left on device
touch: cannot touch `file217120.log': No space left on device
touch: cannot touch `file217121.txt': No space left on device
touch: cannot touch `file217121.dat': No space left on device
^C
But there is ample space left:
Code:
[root@scarecrow mystuffz]# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                9.9G  584M  8.8G   7% /
udev                  3.0G  4.0K  3.0G   1% /dev
tmpfs                 3.0G  644K  3.0G   1% /dev/shm
tmpfs                 3.0G  764K  3.0G   1% /run
/dev/mapper/vg_main-lv_root
                      9.9G  584M  8.8G   7% /
tmpfs                 3.0G     0  3.0G   0% /sys/fs/cgroup
tmpfs                 3.0G     0  3.0G   0% /media
/dev/md0              485M   67M  394M  15% /boot
/dev/mapper/vg_main-lv_var
                       12G  763M   11G   7% /var
/dev/mapper/vg_main-lv_virtualization
                      197G   99G   89G  53% /virtualization
/dev/mapper/vg_main-lv_home
                       25G  7.9G   16G  34% /home
/dev/mapper/vg_main-lv_opt
                      7.9G  415M  7.1G   6% /opt
/dev/mapper/vg_main-lv_usr
                       20G  4.8G   14G  26% /usr
/dev/mapper/vg_main-lv_tmp
                      9.9G  754M  8.7G   8% /tmp
/dev/mapper/vg_main-lv_tmp
                      9.9G  754M  8.7G   8% /tmp
/dev/mapper/vg_main-lv_var
                       12G  763M   11G   7% /var/tmp
/dev/mapper/vg_main-lv_home
                       25G  7.9G   16G  34% /home
OK, let's create another file in this /tmp partition:
Code:
[root@scarecrow mystuffz]# cd ..
[root@scarecrow tmp]# touch file
touch: cannot touch `file': No space left on device
[root@scarecrow tmp]# echo $?
1
Let's try creating a file in another partition:
Code:
[root@scarecrow tmp]# cd ~
[root@scarecrow ~]# touch file
[root@scarecrow ~]# echo $?
0
So, did I hit the inode limit for /tmp partition?

Last edited by the_gripmaster; 11-06-2011 at 08:10 AM.
 
Old 11-06-2011, 08:12 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Seems to be so, yes. You can test that with
Code:
df -i
 
1 members found this post helpful.
Old 11-06-2011, 08:45 AM   #3
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 364

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by TobiSGD View Post
Seems to be so, yes. You can test that with
Code:
df -i
Thanks. I can try this troubleshooting trick on some sysadmins. I bet many sysadmins can't figure this out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Increase max inode count xPhoenix Slackware 2 10-05-2006 02:14 AM
java: need lots of socket connections open at once, but hit file limit BrianK Programming 6 01-10-2006 09:02 PM
ext2/ext3 limit of 32,000 links in an inode ogross74 Linux - General 2 10-10-2005 12:52 PM
Threads - Max Limit socratesinus Linux - Software 5 04-20-2005 03:43 PM

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

All times are GMT -5. The time now is 10:19 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