Live data from Hacker News

No Space Left on Device

carlmastrangelo.com

1–10 of 77 posts

Re: No Space Left on Device

#2
Huh, max 32000 files in a directory seems awfully low. Even crusty old NTFS is supposed to support 4294967295 files.

Explorer will not be too happy displaying such a folder though!

Re: No Space Left on Device

#3
I thought this changed from ext3 to ext4? I know I've run into this issue before and moving to ext4 was the easiest way to resolve it. Ext4 is much quicker at doing operations on very large directories too.

Re: No Space Left on Device

#4
During my young naïve programming days (which coming to think of it haven't really ended) I thought to myself "Why bother using some third party database when I could just store user information in text files, the OS handles that sort of thing really well, right?". I looked into it as much as I could be bothered and found no huge red flags.

After a few years of this server merrily creating a new file for each user I found that my disk was full, as this poster did. After a lot of hunting around, I found out that I had hit my inode limit, a concept I was completely unaware of.

I know for sure I won't be making THAT mistake again.

Re: No Space Left on Device

#7
post #4

During my young naïve programming days (which coming to think of it haven't really ended) I thought to myself "Why bother using some third party database when I could just store user information in text files, the OS handles that sort of thing really well, right?". I looked into it as much as I could be bothered and found no huge red flags. After a few years of this server merrily creating a new file for each user I…

"After a lot of hunting around, I found out that I had hit my inode limit, a concept I was completely unaware of."

What was the number you hit?

I have a flat file system for something I'm prototyping. The files are in a database with a random SHA256 filename associated with them. I was thinking about doing what Git does with creating folders for parts of the string to alleviate the number of files in one single directory. I'm sure that makes file retrieval a prettier process.

Do all the files for have to be in the same directory for the iNode limit to be reached or just there in general?

NOTE: I ask because the prototype isn't ever meant to go into production, but my customer keeps getting confused and I'm concerned this very important system may inherit (or even use) my design.

Re: No Space Left on Device

#8
post #6

No date on the post. Probably old and fixed now. Just checked with a random folder, it happily supported 782292 files.

I think his point still stands. Basically, if you do something far enough outside the norm, you may hit really time consuming bugs.

Re: No Space Left on Device

#9
post #7
post #4

During my young naïve programming days (which coming to think of it haven't really ended) I thought to myself "Why bother using some third party database when I could just store user information in text files, the OS handles that sort of thing really well, right?". I looked into it as much as I could be bothered and found no huge red flags. After a few years of this server merrily creating a new file for each user I…

"After a lot of hunting around, I found out that I had hit my inode limit, a concept I was completely unaware of." What was the number you hit? I have a flat file system for something I'm prototyping. The files are in a database with a random SHA256 filename associated with them. I was thinking about doing what Git does with creating folders for parts of the string to alleviate the number of files in one single direc…

It's a global limit per filesystem. You can check what the limits are for your filesysems, and what the current use is with `df -i`.

The thing that git does is for speed.

Re: No Space Left on Device

#10
post #6

No date on the post. Probably old and fixed now. Just checked with a random folder, it happily supported 782292 files.

There is mention of 2016.

"The lesson here is that even in 2016, filesystems still are finicky with large numbers of files in a single directory."

Post reply on HN