-2

The easy answers are 1.) move to ext4 and/or 2.) "shard" the directory somehow - by placing them in sub folders either numbered or lettered.

These changes won't be easy to make though so I'm looking for some creative solutions. Any ideas?

ckliborn
  • 2,750
  • 4
  • 24
  • 36
  • 1
    why is everybody downvoting this question? It is not dumb, only unsolvable in a beautiful way.. Better upvote the answer describing the problem :D – krissi May 22 '12 at 16:43
  • 1
    @krissi I'm not one of the downvoters, but for the record "How do I hack my production system to do something it's not designed to do when various well-supported options to meet my needs exist?" is, in and of itself, a bad question for a ***professional*** sysadmin to be asking. Unsupported hackery leads to problems later. – voretaq7 May 22 '12 at 16:49
  • @voretaq7 I agree with you. But as this question is formulated with "trick" and the "easy answers" already stated it is something different than the typically "dumb" question. Of course the reason why not only upgrading to ext4 would be nice, but then a comment by the downvoter would help more. It is not a bad thing to ask others if there is another way I do not know to solve a problem, maybe with less effort. If not: Okay, but that does not make the question bad – krissi May 22 '12 at 17:02

2 Answers2

10

Really you should not choose a "creative" solution if you have a simple, effective, and more correct way to do it. Just because the migration isn't easy to implement, the creative solution, in my experience, usually ends with a much bigger headache down the road and ending up having to do it the "right" way anyway.

It sounds like you already know better answers of what you should be doing instead...

Bart Silverstrim
  • 31,092
  • 9
  • 65
  • 87
  • 3
    +1 - Creative solutions are BAD. – voretaq7 May 22 '12 at 15:43
  • 1
    The statement 'Creative solutions are BAD' is meaningless. I think what people mean is 'working around sensible limitations by hacking stuff is BAD'. If I develop a creative solution to a problem that falls within the bounds of all the tools involved and is elegant, in what way is it bad. – EightBitTony May 22 '12 at 18:57
  • 1
    @EightBitTony Having supported some incredibly creative infrastructures, I have to agree. See http://programmers.stackexchange.com/questions/25276/why-is-cleverness-considered-harmful-in-programming-by-some-people - it's quite relevant for our field as well. – Shane Madden May 23 '12 at 05:15
6

You've identified the best approaches/fixes to the problem. There's no shortcut available to you at this point. The ext2/ext3 filesystems have a hard limit of 31998 links.

Of course, the XFS filesystem is another nice solution for this... Can you provide more information on the application and reason for so many subdirectories?

ewwhite
  • 194,921
  • 91
  • 434
  • 799