I am using a backup server that is an inode hog. I must increase the amount of inodes or tune the use of inodes to be more efficient. Any ideas on how to do this?
This may be a newbie question, but what is an inode? and what are they used for?<br><br>Thanks<br><br><br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br> I am interested in Mining Software, as well as Genetic Algorithms.
Warmongr,<br><br>I've not done this in Linux - but in other unices it's a <FONT FACE=monospace><b>newfs</font></b> option.<br><br>Fenris,<br><br>An inode holds details of a single file, creation time, modification time and so forth -- one inode = one file -- so you have to specify if you're going to have a lot fo files.<br><br>That's right isn't it warmongr?<br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
Yup. When you run out of inodes, it's either clean up or reformat.<br><br>fenris,<br><br>As Mike says, the inode describes a file. But inodes are made up of fixed-size structures that don't contain the file name or any directory structure information. That is why *n*x file names can be very long (limit varies depending on which *n*x) - they are stored, along with directory structure information, in a variable length structure outside the inode block. This is why when you move (mv) a file within the same disk partition (*n*x "filesystem" the move happens so fast - the file stayed right where it was. The inode wasn't even touched, only the filename-directory structure was tweaked. Once the OS has found a file by name, it only uses the inode number to refer to the file. Filenames are for sissies (users), not the OS.<br><br>Also, links live only in the filename area. A "hard" link is just a different name for the same inode refered to by it's "proper" name. A symbolic link just points to another entry in the filename area, not to an inode, which is why symlinks are slower than hard links - gotta make two (or more) name lookups before you can find the inode. <p>Octalman<br><a href=mailto: > </a><br><a href= > </a><br>
You are all correct. In linux there are some files that can be tweaked to help modify/optimize your file systems inode use. They are:<br><br>/proc/sys/fs/file-max<br>/proc/sys/fs/inode-max<br>/proc/sys/fs/inode-nr<br><br>These can be modified like the following<br>cat /proc/sys/fs/file-max<br> You should see a number like 4096<br>I bumped mine up using:<br>echo 12288 > /proc/sys/fs/file-max (3 times the amount showing 4096*3)<br>echo 36864 > /proc/sys/fs/inode-nr (3 times the amount of file-max)<br><br>I then moved my back-up server database to another partition which had plenty of inodes. The back-up ran fine. More as a result of moving files than the file system tweaks. <br><br>*** These file system mods should not be made just to make them. If you constantly get errors indicating 'not enough file handles' or you are constantly running out of inodes then try this and see if your problem goes away. Otherwise as stated above (and what I am doing today) is to rebuild. If your problem is resolved and you want to keep the above mods you will have to modify your /etc/rc.d/rc.local to include the above echo statements otherwise your files will go back to normal next time you boot.<br><br>If you want more documentation on it check /usr/local/src/Documentation/sysctl/fs.txt <br><br>Hope someone gets some use out of this.<br><br>I'm outta here!<br><br>War...
Thanks for answering my question on inodes as well. <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br> I am interested in Mining Software, as well as Genetic Algorithms.
I must submit a flame to myself. In my above post I stated:<br><br>echo 36864 > /proc/sys/fs/inode-nr (3 times the amount of file-max)<br><br>It should have said:<br><br>echo 36864 > /proc/sys/fs/inode-max (3 times the amount of file-max)<br><br>I then said the documentation could be found in /usr/local/src/Documentation/sysctl/fs.txt while in fact it is in /usr/src/linux/Documentation/sysctl/fs.txt.<br><br>My apologies if you have corrupted any files however if you have made the changes above I will give you full refund. Really though remove the lines from your rc.local and reboot your machine. They will go back to the system default. <br><br>Sorry,<br>war...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.