Block storage directory limitations

July 29, 2016 496 views
Block Storage

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?

1 Answer

@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.

Have another answer? Share your knowledge.