Rich Freeman on 28 Sep 2017 08:39:53 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Reclaiming inodes |
On Thu, Sep 28, 2017 at 7:45 AM, K.S. Bhaskar <bhaskar@bhaskars.com> wrote: > Might fstransform to transform the filesystem in place to something else > (xfs seems to never run out of inodes) be an option? > I wouldn't switch filesystems JUST because you've run out of inodes. Various filesystems have various pros and cons and you should make an informed decision based on your needs. xfs does allocate inodes dynamically, while ext2/3/4 have static allocation. However, with ext4 you can allocate any number that you wish at time of filesystem creation. Depending on how the filesystem is intended to use, or how its use is expected to change over time, you might choose either as being better. There are other filesystems with their own pros and cons. It looks like you have a relatively small root filesystem, and these are prone to inode starvation if you don't explicitly allocate more than the default ratio. However, if this is otherwise a typical root filesystem you're probably going to be fine as long as you re-create it with more. On ext4 each inode will cost you 256 bytes of space. You need one for every single file/link/etc on the filesystem. The easiest way to adjust the number of inodes is with the -i option with mkfs.ext4. The default on my distro at least is a ratio of 16384 bytes per inode. If you lower the ratio then you'll get more inodes. If you raise the ratio you'll get less. If you lower the ratio all the way to 256 then you'll end up with a filesystem consisting of nothing but inodes, so you can store gobs of symlinks but no actual data (well, setting aside tiny files that can be packed into the inodes). 4096 isn't a bad ratio for a small filesystem that contains a very large number of small files, which is common for small root filesystems. 1/16th of your drive will be used up by inodes though. You can also allocate an explictit number of inodes with -N. I'm not saying that xfs is a bad choice. It might be a better choice for your situation than ext4, or it might be a worse one. I have no idea what you're using this system for, and neither does anybody else here, so nobody can really say one way or the other. It does allocate inodes dynamically so you would probably not have this particular problem (though on most distros you're still capped at 25% of disk space use for inodes). You might have others instead, or not. -- Rich ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug