症状:在创建了65000个目录后无法创建新目录
解决方案:打开dir_nlink
参考资料:Normally, ext4 allows an inode to have no more than 65,000 hard links. This applies to regular files as well as directories, which means that there can be no more than 64,998 subdirectories in a directory (because each of the '.' and '..' entries, as well as the directory entry for the directory in its parent directory counts as a hard link). This feature lifts this limit by causing ext4 to use a link count of 1 to indicate that the number of hard links to a directory is not known when the link count might exceed the maximum count limit.
When creating a new file system, the default is hash directories. If your directories are still linear, it's probably because you upgraded an old ext3 partition. (Ext3 got the hash-based directories feature later.)
Test whether a directory is almost-linear or hash-based
$ sudo debugfs /dev/partition
$ htree /
htree: Not a hash-indexed directory
转换:
- 卸载分区
- sudo tune2fs -O dir_index,dir_nlink /dev/partition
- sudo e2fsck -f -D /dev/partition
Comments | NOTHING