LoginSignup
0
0

More than 1 year has passed since last update.

ディレクトリ内のディレクトリ数の上限【Google Compute Engine】

Posted at

TL;DR

10GBの場合、約57万個(575444)ディレクトリを作成できる。30GBならその3倍作成できる。
Screenshot from 2022-04-20 07-13-04.png
us-west1e2-microで試しました

/dev/sda1IFreeで残りのディレクトリ数(575308)の上限を確認できる。

$ df -i
Filesystem     Inodes IUsed  IFree IUse% Mounted on
udev           123900   297 123603    1% /dev
tmpfs          126223   374 125849    1% /run
/dev/sda1      647168 71858 575310   12% /
tmpfs          126223     1 126222    1% /dev/shm
tmpfs          126223     3 126220    1% /run/lock
tmpfs          126223    17 126206    1% /sys/fs/cgroup
/dev/sda15          0     0      0     - /boot/efi
tmpfs          126223    10 126213    1% /run/user/1000

575444個目までは問題なくディレクトリを作成できる

2時間ほど実行にかかります

for i in `seq 575444`; do mkdir $i; done

ファイル作成後

$ df -i
Filesystem     Inodes  IUsed  IFree IUse% Mounted on
udev           123900    297 123603    1% /dev
tmpfs          126223    379 125844    1% /run
/dev/sda1      647168 647168      0  100% /
tmpfs          126223      1 126222    1% /dev/shm
tmpfs          126223      3 126220    1% /run/lock
tmpfs          126223     17 126206    1% /sys/fs/cgroup
/dev/sda15          0      0      0     - /boot/efi
tmpfs          126223     10 126213    1% /run/user/1000

image.png

575445個目を作成しようとするとNo space left on deviceになる

$ mkdir 575445
mkdir: cannot create directory ‘575445’: No space left on device
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0