[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Increasing inodes without recreating file system



Robin Bowes wrote:
nodata wrote:


I don't think you can do it online.


That was my understanding too - I thought I'd ask here as a last resort :(

In the meanwhile, you should find the user with lots of small files to
buy you some time.


Erm, that will be me! I'm the only user of the box.

I originally envisaged the large partition would be for my music library (mainly flac), i.e. the files would be big but not all the numerous, so I changed the default inode allocation when I created the file system. Bad move!

I'm now using /home for other things, e.g. /home/apache has all my websites, /home/vpopmail has all my mail, and I've used up all my inodes.

I guess I can do some shuffling around to keep things running, e.g. move stuff to /usr (where there is 6.8GB free and loads of inodes).

Something like:
cd /home && for i in *; do echo -n "$i: "; find $i -type f | wc -l;
done
will probably do it.


I ran your script with the following results:

apache: 92685
builder: 3
dan: 1696
du-2004-08-25-17:42:28: 1
eztest: 67
jane: 4
mysql: 2795
notes: 1692
postgres: 1567
robin: 292498
slimserver: 27799
smtpd: 5402
sockd: 4
svn: 38
test: 164776
testlist: 46
tom: 726
valiant: 6
vpopmail: 275006

As you can see, I am the main culprit, with vpopmail a close second.

I'm sure I can sort that out to keep me rolling for a while longer.

Thanks,

R.


From man mkfs.ext3
-i bytes-per-inode
Specify the bytes/inode ratio. mke2fs creates an inode for every bytes-per-inode bytes of space on the disk. The larger the bytes-per-inode ratio, the fewer inodes will be created. This value generally shouldn’t be smaller than the blocksize of the filesystem, since then too many inodes will be made. Be warned that is not possible to expand the number of inodes on a filesystem after it is created, so be careful deciding the correct value for this parameter.



As I am planning on doing the same thing in the very near future with a RAID array, this is of interest to me. I will have many files that are in the 10k to 200K range, graphics and ogg/mp3's/flac files.


Does the default number of inodes work with this or should I run mkfs.ext3 with the -i option and specify a small number?

Or be save and use the -T  news option and be safe?

Is there a maximum number of inodes allowed per filesystem?

--
Robin Laing


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]