Reduce system inode count


 
Thread Tools Search this Thread
# 1  
Reduce system inode count

I have lots of space on my system.
Code:
linux-e30c:~ # df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        41G  3.4G   35G   9% /
/dev/sda3        91G   36G   51G  42% /home
/dev/sda2        99G  3.4G   91G   4% /usr

But still somehow the inode count has almost finished up and some times I am not able to create files.
Code:
linux-e30c:~ # df -ih
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sda1        2.6M  2.6M   12K  100% /
/dev/sda3        5.8M  109K  5.7M    2% /home
/dev/sda2        6.3M  143K  6.2M    3% /usr

I tried deleting many files especially of small sizes.
Is there any way(other then to format the sda1) out of this issue to decrease the inode count?
# 2  
Have you tried running the filesystem checker (fsck)?

---------- Post updated at 10:25 AM ---------- Previous update was at 10:17 AM ----------

Alternatively, you could find and remove empty or zero sized files since they occupy inodes:

Code:
touch myfile
cat myfile

ls -i myfile
740458 myfile

This User Gave Thanks to in2nix4life For This Post:
# 3  
Yes I have tried fsck but did not succeed.
# 4  
To reduce the number of inodes, you will need to reduce the number of files.

Not enough inodes for the number of files is a common problem in small ext2/3 filesystems. You can tell it to give you more inodes when created but it's difficult to add more later.
This User Gave Thanks to Corona688 For This Post:
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

9 More Discussions You Might Find Interesting

1. Red Hat

How to reduce inode size of /var?

Hi, inode size reached its 100% in /var Due to this i'am getting the error No space left on device my crond process is stopped and when i want to restart it it is showing the below error Starting crond: crond: can't open or create /var/run/crond.pid: No space left on device df -i o/p ... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies

2. Linux

Berkeley version bdf: combination of inode and file system usage

hello, i need a command like "bdf" of HP-UX. ( report number of free disk blocks (Berkeley version) ). it should report inode and file system usage in one line like bdf -i manpage : Man Page for bdf (all Section 1m) - The UNIX and Linux Forums HP-UX command "" report inode and file... (2 Replies)
Discussion started by: bora99
2 Replies

3. UNIX for Dummies Questions & Answers

Reduce the count on the 98 record by 2,

recod,amount,noofaccount,count 98,+00000187865779787,00319,000000640/ 99,+00000187865779787,00001,000000642/ thsi is my input file my question is 1) Reduce the count on the 98 record by 2 (6 Replies)
Discussion started by: sgoud
6 Replies

4. UNIX for Dummies Questions & Answers

Is there a way to completely remove an inode when the Link count is 2 ?

Currently my data is organised in a volume which has a cache directory (where all the files are first created or transferred). After that there are suitable directories on the volume which in their subdirs, contain files hardlinked to files in the cache. This is done so that the same inode... (1 Reply)
Discussion started by: abcdino
1 Replies

5. Shell Programming and Scripting

Include special system characters in file count

Hi, I have a script that checks the length of each record/line in file - This seems to be working when there are no special systems character that are invisible or hidden. awk -v file=$file '{ if (filename==file) { k+=$5 if (length() <= 10 ){print size length(), "bytes " k} }... (2 Replies)
Discussion started by: asemota
2 Replies

6. Shell Programming and Scripting

Reduce

printf "\nClosing stats:\n" >> data.txt echo >> data.txt sed 's/^ \t*//;/^#/d;/^$/d' $stats | while read line do close=$(grep -w "^$line" $datafile | sed -e 's/\(.*\),\(.*\),\(.*\)/\2/') if ; then printf "%5d. %-s was not found in file\n"... (3 Replies)
Discussion started by: jafa401
3 Replies

7. Filesystems, Disks and Memory

why the inode index of file system starts from 1 unlike array index(0)

why do inode indices starts from 1 unlike array indexes which starts from 0 its a question from "the design of unix operating system" of maurice j bach id be glad if i get to know the answer quickly :) (0 Replies)
Discussion started by: sairamdevotee
0 Replies

8. HP-UX

How to reduce fil system size seen in bdf!

When i execute bdf, /home direcory seems 100% full. But when i check /home with 'du', total used memory is 30 MB in 1,4 Gb. how can I reduce this 100% to its real state? (11 Replies)
Discussion started by: akyuceisik
11 Replies

9. UNIX for Dummies Questions & Answers

Can I reduce sysdump?

Hi, I have a server which is running out of space on the rootvg. When trying to find some spare space I discovered there are 2 sysdump logical volumes, each of 5GB, yet if I get an estimate of the dump size it's only 0.5 GB. $ lsvg -l rootvg|grep sysdump hd71 sysdump 20 ... (1 Reply)
Discussion started by: m223464
1 Replies

Featured Tech Videos