Cheating with inodes
Did you run out of inodes, but still have plenty of free blocks left?
Have you been told that you can't create more inodes without re-formatting?
Think again...
If re-formatting isn't an easy option because you're in a pinch, then it's time to cheat with inodes!
We all know that 1 inode is used for each file, no matter how small or large that file is.
Due to loop mounted file systems, you have a "temporary" option that is much quicker than backing up, re-formatting, and restoring.
Let's create a new filesystem with the last inode to store all the extra stuff that wouldn't fit. All we need is 1 inode for this new filesystem in which we can create as many extra inodes that we need. I don't think I would want to run permanently like this, but this is a fast time saver when you have no time to waste. Also think twice when creating this new filesystem if you will be storing many many little files (which consume large amounts of inodes in comparison with blocks consumed). If so, then be sure to create as many extra inodes in this new fs, that you need.
Step 1 - Create space to hold fs
For some strange reason, let's say we need an extra 700M
dd if=/dev/zero of=mynewfs.ext2 bs=1024k count=700
You could also just as well fill all the remaining file space with this new fs, but I wouldn't do this on any important partitions (/, /usr, /var, /etc, ...). I would do this on some extra storage partition that you added, but forgot to create enough inodes to support it:
dd if=/dev/zero of=mynewfs.ext2 bs=1024k
Step 2 - Format it (with enough inodes)
Step 3 - Add ext3 if desired
Step 4 - mount it
Step 5 - Fill it
Step 6
You'll have to mount this whenever you want access to it, it's kind of a "double mount" because it's not a "real/physical" partition.
Search this Site!: