Report this

What is the reason for this report?

Block storage directory limitations

Posted on July 29, 2016

What are the file/directory limitations of block storage? For example, is it possible to store any number of files inside a single directory?

And if there aren’t any practical limitations, are there any performance issues that may arise when storing lots of files (hundreds of thousands, possibly millions) inside a single directory?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@botch - Block storage is like buying a physical raw disk. First you specify the size of the partitions, followed by the parameters you set for the filesystems in each partition. So the answer for the limits on the number of directories and files you can create, as well as the performance characteristics for accessing files, depends on the filesystem you select.

On ext4 filesystems, for example, you can specify the inode count when creating the filesystem by using the -I parameter. Use the shell command man mkfs.ext4 to find out how to specify that value for ext4 filesystems, or how the default value is determined. Note that the -i parameter specifies the size of each inode, whereas the -I parameter specifies the max count of inodes. Usually the total space for inodes is calculated by a ratio or percentage of the space in the partition.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.