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

Re: XFS and inodes (was: Recommendation on stable Reiserfs+NFS setup)



> Martin,
> (cc XFS Mailing List)
> 
> On Thu, 23 Aug 2001 at 09:11, Martin Apel wrote:
> > There's one drawback using XFS instead of ReiserFS. You have to fix
> > the number of available i-nodes at FS-creation time. A few times in
> > the past I had too few i-nodes on a filesystem which was otherwise
> > still not full, so I had to copy all data somewhere else, reformat,
> > and copy back. This is something I would like to avoid.
> 
> This is interesting. I have not handled filesystems as large as yours, but
> have always been under the impression that XFS on Linux preallocates
> inodes based on need (on-demand). Perhaps one limiting factor, though,
> could be the maximum percentage of the space to be allocated for inodes
> defined when the filesystem is made.
> 
> I'm sending a copy of this reply to the XFS mailing list, though, so that
> the experts there can help us both clarify this issue on maximum inodes.

XFS defaults to allowing 25% of the filesystem space to being available for
inodes, this is a mkfs option. What this means is that once you have consumed
this amount of space for inodes you will be allowed to create no more. The
other reason for failing to create inodes is a full filesystem.

With the default inode size this translates to 1 million inodes per Gbyte
being allowed in the filesystem. If your average file size is very small
then you could run out, allowing a bigger percentage at mkfs time would
make this less of an issue. 

Also Nathan was correct, you can change this dynamically with xfs_growfs:

     -m   Specify a new value for the maximum percentage of space in the
          filesystem that can be allocated as inodes.  In mkfs_xfs this is
          specified with -i maxpct=nn.

Steve


> 
> > Apart from that we have a few volumes with very many small files which
> > have to be exported via NFS. ReiserFS is probably a better choice for
> > these filesystems. But I anyway I will have a closer look at XFS.
> 
> Wrong. ReiserFS is _better_ for those many small files. On the other hand
> XFS is great as the file size increases, and you will see this trend even
> on the benchmarks done by the ReiserFS team.
> 
>  --> Jijo
> 
> --
> Federico Sevilla III  :: jijo@leathercollection.ph
> Network Administrator :: The Leather Collection, Inc.
> GnuPG Key: <http://jijo.leathercollection.ph/jijo.gpg>