On 09/15/2016 12:00 PM, John Spray wrote:
On Thu, Sep 15, 2016 at 2:20 PM, Burkhard Linke
<burkhard.li...@computational.bio.uni-giessen.de> wrote:

does CephFS impose an upper limit on the number of files in a directory?

We currently have one directory with a large number of subdirectories:

$ ls | wc -l

Creating a new subdirectory fails:

$ touch foo
touch: cannot touch 'foo': No space left on device
thansk for the fast reply.
This limit was added recently: it's a limit on the size of a directory fragment.

Previously folks were hitting nasty OSD issues with very large
directory fragments, so we added this limit to give a clean failure
I remember seeing a thread on the devel mailing list about this issue.

Directory fragmentation (mds_bal_frag setting) is turned off by
default in Jewel: I was planning to get this activated by default in
Kraken, but haven't quite got there yet.  Once fragmentation is
enabled you should find that the threshold for splitting dirfrags is
hit well before you hit the safety limit that gives you ENOSPC.
Does enabling directory fragmentation require a MDS restart? And are directories processed at restart or on demand during the first access? Are there known problems with fragmentation?

Note that if you set mds_bal_frag then you also need to use the "ceph
fs set <myfs> allow_dirfrags true" (that command from memory so check
the help if it's wrong), or the MDSs will ignore the setting.
So its allowing fragmentation first and changing the MDS configuration afterwards.

ceph-users mailing list

Reply via email to